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.
protected function traverseStrongComponentsAddLambda " traverses all the strong components and adds lambda as the last variable if the system contains homotopy
<%if listEmpty(initialEquations_lambda0) then '0'elseifnot BackendDAEUtil.isInitOptModuleActivated("generateHomotopyComponents") then '1'else'2'%>, /* useHomotopy - 0: no homotopy or local homotopy, 1: global homotopy, 2: new global homotopy approach */
1083
+
<%if listEmpty(initialEquations_lambda0) then (ifnot BackendDAEUtil.isInitOptModuleActivated("generateHomotopyComponents") then '0'else'3') elseifnot BackendDAEUtil.isInitOptModuleActivated("generateHomotopyComponents") then '1'else'2'%>, /* useHomotopy - 0: no homotopy or local homotopy (equidistant lambda), 1: global homotopy (equidistant lambda), 2: new global homotopy approach, 3: new local homotopy approach */
/* initial sample and delay before initial the system */
@@ -197,8 +197,10 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
197
197
198
198
/* If there is no homotopy in the model or local homotopy is activated
199
199
or homotopy is disabled by runtime flag '-ils=<lambda_steps>',
200
-
solve WITHOUT HOMOTOPY. */
200
+
solve WITHOUT HOMOTOPY or LOCAL HOMOTOPY. */
201
201
if (!solveWithGlobalHomotopy){
202
+
if (data->callback->useHomotopy==3&& !omc_flag[FLAG_HOMOTOPY_ON_FIRST_TRY])
203
+
infoStreamPrint(LOG_INIT, 0, "Automatically set -homotopyOnFirstTry, because trying without homotopy first is not supported for the adaptive local approach yet.");
@@ -288,6 +291,10 @@ static int symbolic_initialization(DATA *data, threadData_t *threadData)
288
291
use NEW GLOBAL HOMOTOPY APPROACH. */
289
292
if (data->callback->useHomotopy==2&&solveWithGlobalHomotopy)
290
293
{
294
+
if (!omc_flag[FLAG_HOMOTOPY_ON_FIRST_TRY])
295
+
infoStreamPrint(LOG_INIT, 0, "Automatically set -homotopyOnFirstTry, because trying without homotopy first is not supported for the adaptive global approach yet.");
296
+
297
+
infoStreamPrint(LOG_INIT, 0, "Global homotopy with adaptive step size started.");
Copy file name to clipboardExpand all lines: SimulationRuntime/c/simulation/solver/nonlinearSolverHomotopy.c
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1653,7 +1653,7 @@ static int homotopyAlgorithm(DATA_HOMOTOPY* solverData, double *x)
1653
1653
if (iter>=maxTries)
1654
1654
{
1655
1655
if (solverData->initHomotopy)
1656
-
warningStreamPrint(LOG_ASSERT, 0, "Homotopy algorithm did not converge.\nThe maximum number of tries for one lamda is reached (%d).\nYou can change the number of tries with:\n\t-homMaxTries=<value>\nYou can also try to allow more newton steps in the corrector step with:\n\t-homMaxNewtonSteps=<value>\nor change the tolerance for the solution with:\n\t-homHEps=<value>\nYou can use -lv=LOG_INIT,LOG_NLS_HOMOTOPY to get more information.", iter);
1656
+
warningStreamPrint(LOG_ASSERT, 0, "Homotopy algorithm did not converge.\nThe maximum number of tries for one lambda is reached (%d).\nYou can change the number of tries with:\n\t-homMaxTries=<value>\nYou can also try to allow more newton steps in the corrector step with:\n\t-homMaxNewtonSteps=<value>\nor change the tolerance for the solution with:\n\t-homHEps=<value>\nYou can use -lv=LOG_INIT,LOG_NLS_HOMOTOPY to get more information.", iter);
1657
1657
else
1658
1658
debugInt(LOG_NLS_HOMOTOPY, "Homotopy algorithm did not converge: iter = ", iter);
0 commit comments