You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 18, 2019. It is now read-only.
This workaround sets -homotopyOnFirstTry, so trying without homotopy
first is not possible (for kinsol with adaptive homotopy).
Belonging to [master]:
- #2185
- OpenModelica/OpenModelica-testsuite#851
infoStreamPrint(LOG_INIT, 0, "Automatically set -homotopyOnFirstTry, because trying without homotopy first is not supported for the adaptive global approach in combination with KINSOL.");
237
+
} else {
238
+
if (adaptiveGlobal)
239
+
data->callback->useHomotopy=1;
240
+
data->simulationInfo->lambda=1.0;
241
+
infoStreamPrint(LOG_INIT, 0, "Try to solve the initialization problem without homotopy first.");
@@ -241,7 +250,8 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
241
250
if (adaptiveGlobal)
242
251
data->callback->useHomotopy=2;
243
252
if(solveWithGlobalHomotopy) {
244
-
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initialization problem without homotopy method. If homotopy is available the homotopy method is used now.");
253
+
if (!kinsol)
254
+
warningStreamPrint(LOG_ASSERT, 0, "Failed to solve the initialization problem without homotopy method. If homotopy is available the homotopy method is used now.");
@@ -951,12 +958,16 @@ int solve_nonlinear_system(DATA *data, threadData_t *threadData, int sysNumber)
951
958
/* If homotopy is deactivated in this place or flag homotopyOnFirstTry is not set,
952
959
solve the system with the selected solver */
953
960
if (homotopyDeactivated|| !omc_flag[FLAG_HOMOTOPY_ON_FIRST_TRY]) {
954
-
if (!homotopyDeactivated&& !omc_flag[FLAG_HOMOTOPY_ON_FIRST_TRY])
955
-
infoStreamPrint(LOG_INIT, 0, "Try to solve nonlinear initial system %d without homotopy first.", sysNumber);
961
+
if (solveWithHomotopySolver&&kinsol) {
962
+
infoStreamPrint(LOG_INIT, 0, "Automatically set -homotopyOnFirstTry, because trying without homotopy first is not supported for the local global approach in combination with KINSOL.");
963
+
} else {
964
+
if (!homotopyDeactivated&& !omc_flag[FLAG_HOMOTOPY_ON_FIRST_TRY])
965
+
infoStreamPrint(LOG_INIT, 0, "Try to solve nonlinear initial system %d without homotopy first.", sysNumber);
0 commit comments