Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 7187f70

Browse files
qichenghuaOpenModelica-Hudson
authored andcommitted
set algloop to 1e12 instead of 1e6 when evaluating the right hand side fails
1 parent 5914059 commit 7187f70

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SimulationRuntime/cpp/Solver/Nox/NOX_StatusTest_SgnChange.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ NOX::StatusTest::StatusType NOX::StatusTest::SgnChange::checkStatus(const NOX::S
3333
{
3434
if(_firstCall) initialize(problem);
3535
std::vector<bool> fSignChange(_dimSys, false);
36-
Teuchos::RCP<NOX::LAPACK::Group> grp=Teuchos::rcp(new NOX::LAPACK::Group(dynamic_cast<const NOX::LAPACK::Group&>(problem.getSolutionGroup())));//(problem.getSolutionGroup());//solutiongroup is constant, thus we need to assign it to be able to modify it.
36+
Teuchos::RCP<NOX::LAPACK::Group> grp=Teuchos::rcp(new NOX::LAPACK::Group(dynamic_cast<const NOX::LAPACK::Group&>(problem.getSolutionGroup())));//(problem.getSolutionGroup());//solutiongroup is constant, thus we need to assign it to be able to modify it.//throws an error if used in conjunction with lapack
3737
*_x1=*_x0=grp->getX();
3838
grp->computeF();
3939
*_f0=grp->getF();

SimulationRuntime/cpp/Solver/Nox/NoxLapackInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ bool NoxLapackInterface::computeActualF(NOX::LAPACK::Vector& f, const NOX::LAPAC
167167

168168
//new, experimental version. Delete comments, when this is tested.
169169
for(int i=0;i<_dimSys;i++){
170-
_rhs[i]= ((_rhs[i]<0.0) ? -1.0e6 : 1.0e6);
170+
_rhs[i]= ((_rhs[i]<0.0) ? -1.0e12 : 1.0e12);
171171
}
172172
//Maybe this should have conical form, ie. in case of high values, use 1.0e6*x+1.0e6 instead.
173173

0 commit comments

Comments
 (0)