Skip to content

Commit

Permalink
Fixes issues with some of the test cases
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20197 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Michael Kloeppel committed Apr 17, 2014
1 parent 7077847 commit 7b72abd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions SimulationRuntime/cpp/Solver/Newton/Newton.cpp
@@ -1,4 +1,3 @@

#include "stdafx.h"
#include "Newton.h"

Expand Down Expand Up @@ -102,7 +101,6 @@ void Newton::solve()
while(_iterationStatus == CONTINUE)
{
_iterationStatus = DONE;
calcFunction(_y,_f);
// Check stopping criterion
calcFunction(_y,_f);
if(totStps)
Expand All @@ -120,7 +118,7 @@ void Newton::solve()
_iterationStatus = CONTINUE;

// New right hand side

//calcFunction(_y,_f);

if(_iterationStatus == CONTINUE)
{
Expand Down Expand Up @@ -192,7 +190,7 @@ void Newton::calcJacobian()
{
// Reset variables for every column
memcpy(_yHelp,_y,_dimSys*sizeof(double));
double stepsize=1.e-6+(1.e-6*_yHelp[j]);
double stepsize=1.e-6;//+(1.e-6*_yHelp[j]);


// Finitializee difference
Expand Down
6 changes: 3 additions & 3 deletions SimulationRuntime/cpp/Solver/Newton/NewtonSettings.cpp
Expand Up @@ -5,9 +5,9 @@

NewtonSettings::NewtonSettings()
: iNewt_max (50)
, dRtol (1e-9)
, dAtol (1e-9)
, dDelta (1.)
, dRtol (1e-6)
, dAtol (1e-6)
, dDelta (1)
{
};

Expand Down

0 comments on commit 7b72abd

Please sign in to comment.