Skip to content

Commit 4fd863a

Browse files
author
Bernhard Bachmann
committed
added new linear solver based on LU decomposision using total pivoting
- activated it also as default - updated some tests git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23167 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent ba4e445 commit 4fd863a

File tree

5 files changed

+553
-5
lines changed

5 files changed

+553
-5
lines changed

SimulationRuntime/c/simulation/simulation_runtime.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,20 @@ int getlinearSolverMethod(int argc, char**argv)
271271
const string *method = cflags ? new string(cflags) : NULL;
272272

273273
if(!method)
274-
return LS_LAPACK; /* default method */
274+
return LS_TOTALPIVOT; /* default method */
275275

276276
if(*method == string("lapack"))
277277
return LS_LAPACK;
278278

279+
if(*method == string("totalpivot"))
280+
return LS_TOTALPIVOT;
281+
279282
if(*method == string("lis"))
280283
return LS_LIS;
281284

282285
warningStreamPrint(LOG_STDOUT, 1, "unrecognized option -ls %s, current options are:", method->c_str());
283-
warningStreamPrint(LOG_STDOUT, 0, "%-18s [%s]", "lapack", "default method");
286+
warningStreamPrint(LOG_STDOUT, 0, "%-18s [%s]", "lapack", "method using lapack LU factorization");
287+
warningStreamPrint(LOG_STDOUT, 0, "%-18s [%s]", "totalpivot", "default method - using total pivoting LU factorization");
284288
warningStreamPrint(LOG_STDOUT, 0, "%-18s [%s]", "lis", "Lis");
285289
messageClose(LOG_STDOUT);
286290
throwStreamPrint(NULL,"see last warning");
@@ -307,9 +311,9 @@ int getNewtonStrategy(int argc, char**argv)
307311
throwStreamPrint(NULL,"see last warning");
308312

309313
return NEWTON_NONE;
310-
311314
}
312315

316+
313317
/**
314318
* Signals the type of the simulation
315319
* retuns true for interactive and false for non-interactive

0 commit comments

Comments
 (0)