Skip to content

Commit

Permalink
- initialize spare structure for jacobian A if qss solver is used
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@24902 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Mar 4, 2015
1 parent 63ea0b9 commit 9e24c0a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions SimulationRuntime/c/simulation/solver/perform_qss_simulation.c
Expand Up @@ -93,6 +93,19 @@ int prefixedName_performQSSSimulation(DATA* data, SOLVER_INFO* solverInfo)

warningStreamPrint(LOG_STDOUT, 0, "This QSS method is under development and should not be used yet.");

if (data->callback->initialAnalyticJacobianA(data))
{
if(data->modelData.nStates == 1) /* TODO: is it the dummy state? */
{
infoStreamPrint(LOG_SOLVER, 0, "No SparsePattern, since there are no states! Switch back to normal.");
}
else
{
infoStreamPrint(LOG_STDOUT, 0, "Jacobian or SparsePattern is not generated or failed to initialize! Switch back to normal.");
}
}
printSparseStructure(data, LOG_SOLVER);

/***** Start main simulation loop *****/
while(solverInfo->currentTime < simInfo->stopTime)
{
Expand Down

0 comments on commit 9e24c0a

Please sign in to comment.