Skip to content

Commit

Permalink
guard atol again nominal <= 0
Browse files Browse the repository at this point in the history
perhaps we should guard nominal value


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@21334 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Vitalij Ruge committed Jun 30, 2014
1 parent 65e0b71 commit be7e0df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SimulationRuntime/c/simulation/solver/dassl.c
Expand Up @@ -254,7 +254,7 @@ int dassl_initial(DATA* data, SOLVER_INFO* solverInfo, DASSL_DATA *dasslData)
for(i=0;i<data->modelData.nStates;++i)
{
dasslData->rtol[i] = data->simulationInfo.tolerance;
dasslData->atol[i] = data->simulationInfo.tolerance * data->modelData.realVarsData[i].attribute.nominal;
dasslData->atol[i] = data->simulationInfo.tolerance * fmax(fabs(data->modelData.realVarsData[i].attribute.nominal),1e-32);
}

/* setup internal ring buffer for dassl */
Expand Down

0 comments on commit be7e0df

Please sign in to comment.