This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
SimulationRuntime/cpp/Solver/Nox Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -102,8 +102,8 @@ void Nox::initialize()
102102
103103
104104 // Set up the status tests
105- _statusTestNormF = Teuchos::rcp (new NOX::StatusTest::NormF (1.0e-13 ));
106- _statusTestMaxIters = Teuchos::rcp (new NOX::StatusTest::MaxIters (100 ));
105+ _statusTestNormF = Teuchos::rcp (new NOX::StatusTest::NormF (_noxsettings-> getRtol () ));
106+ _statusTestMaxIters = Teuchos::rcp (new NOX::StatusTest::MaxIters (_noxsettings-> getNewtMax () ));
107107 _statusTestStagnation = Teuchos::rcp (new NOX::StatusTest::Stagnation (15 ,0.99 ));
108108 _statusTestDivergence = Teuchos::rcp (new NOX::StatusTest::Divergence (1.0e13 ));
109109 // _statusTestSgnChange = Teuchos::rcp(new NOX::StatusTest::SgnChange(5.0e-7));
Original file line number Diff line number Diff line change 1010#include < Solver/Nox/NoxSettings.h>
1111
1212NoxSettings::NoxSettings ()
13- : _iNewt_max (700 )
14- , _dRtol (1e-12 )
15- , _dAtol (1.0 )
13+ : _iNewt_max (100 )
14+ , _dRtol (1.0e-13 )
15+ , _dAtol (1.0e-13 )
1616, _dDelta (0.9 )
1717, _continueOnError(false )
1818{
@@ -26,7 +26,7 @@ void NoxSettings::setNewtMax(long int max)
2626{
2727 _iNewt_max =max;
2828}
29- /* Relative Toleranz für die Newtoniteration (default: 1e-6 )*/
29+ /* Relative Toleranz für die Newtoniteration (default: 1e-13 )*/
3030double NoxSettings::getRtol ()
3131{
3232 return _dRtol;
@@ -35,22 +35,26 @@ void NoxSettings::setRtol(double t)
3535{
3636 _dRtol=t;
3737}
38- /* Absolute Toleranz für die Newtoniteration (default: 1e-6 )*/
38+ /* Absolute Toleranz für die Newtoniteration (default: n/a )*/
3939double NoxSettings::getAtol ()
4040{
41- return _dAtol;
41+ throw ModelicaSimulationError (ALGLOOP_SOLVER," Do not use absolute tolerances in Nox' nonlinear solver settings." );
42+ return _dAtol;
4243}
4344void NoxSettings::setAtol (double t)
4445{
45- _dAtol =t;
46+ throw ModelicaSimulationError (ALGLOOP_SOLVER," Do not use absolute tolerances in Nox' nonlinear solver settings." );
47+ _dAtol =t;
4648}
4749/* Dämpfungsfaktor (default: 0.9)*/
4850double NoxSettings::getDelta ()
4951{
52+ throw ModelicaSimulationError (ALGLOOP_SOLVER," Do not use Delta in Nox' nonlinear solver settings." );
5053 return _dDelta;
5154}
5255void NoxSettings::setDelta (double t)
5356{
57+ throw ModelicaSimulationError (ALGLOOP_SOLVER," Do not set Delta in Nox' nonlinear solver settings." );
5458 _dDelta = t;
5559}
5660
You can’t perform that action at this time.
0 commit comments