You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 18, 2019. It is now read-only.
_grp = Teuchos::rcp(newNOX::LAPACK::Group(*_noxLapackInterface));//this also calls the getInitialGuess-function in the NoxLapackInterface and sets the initial guess in the NOX::LAPACK::Group
156
-
}
157
-
catch(const std::exception &ex)
158
-
{
159
-
std::cout << "Here is a significant error. grp building should never throw any error. (except for maybe bad alloc or alike." << std::endl;
160
-
}
156
+
_grp = Teuchos::rcp(newNOX::LAPACK::Group(*_noxLapackInterface));//this also calls the getInitialGuess-function in the NoxLapackInterface and sets the initial guess in the NOX::LAPACK::Group
if (_generateoutput) std::cout << "solving done" << std::endl;
176
172
177
-
// Get the answer
178
-
copySolution(_solver,_y);
179
-
180
-
181
-
_algLoop->setReal(_y);
182
-
try{
183
-
_algLoop->evaluate();
184
-
}
185
-
catch(const std::exception &ex)
186
-
{
187
-
if (status == NOX::StatusTest::Converged) std::cout << "Here is a significant error. The right hand side should be large and in particular nonzero (calling evaluate yields message " << ex.what() << "), however NOX reports success." << std::endl;
std::cout << std::endl << "Final solution is " << std::endl;
376
-
finalGroup->printSolution(finalSolution, finalGroup->getParam("lambda"));//does not work
377
-
}
364
+
if(_generateoutput){
365
+
// Print final solution
366
+
std::cout << std::endl << "Final solution is " << std::endl;
367
+
finalGroup->printSolution(finalSolution, finalGroup->getParam("lambda"));//does not work
368
+
}
378
369
379
-
LOCA::destroyGlobalData(globalData);
370
+
LOCA::destroyGlobalData(globalData);
380
371
381
-
for (int i=0;i<_dimSys;i++){
382
-
if (_useDomainScaling){
383
-
_y[i]=finalSolution(i)/_yScale[i];
384
-
}else{
385
-
_y[i]=finalSolution(i);
386
-
}
387
-
}
372
+
for (int i=0;i<_dimSys;i++){
373
+
if (_useDomainScaling){
374
+
_y[i]=finalSolution(i)/_yScale[i];
375
+
}else{
376
+
_y[i]=finalSolution(i);
377
+
}
378
+
}
388
379
389
-
_algLoop->setReal(_y);
390
-
try{
391
-
_algLoop->evaluate();
392
-
}catch(const std::exception &ex)
393
-
{
394
-
if (_generateoutput) std::cout << "algloop evaluation after solve failed with error message:" << std::endl << ex.what() << std::endl << "Trying to continue without. This should hopefully lead to statusTest::Failed." << std::endl;
395
-
}
380
+
_algLoop->setReal(_y);
381
+
try{
382
+
_algLoop->evaluate();
383
+
}catch(const std::exception &ex)
384
+
{
385
+
if (_generateoutput) std::cout << "algloop evaluation after solve failed with error message:" << std::endl << ex.what() << std::endl << "Trying to continue without. This should hopefully lead to statusTest::Failed." << std::endl;
// evaluate algLoop at ypluseps=y+eps*e_i and save in rhs2
545
-
memcpy(ypluseps,y,_dimSys*sizeof(double));
546
-
//ypluseps[i]*=(1.0+std::numeric_limits<double>::epsilon()*2.0);//der Faktor 2.0 ist nur zur Sicherheit und kann spaeter geloescht werden. Alternativ kann std::nextafter oder std::nexttoward verwendet werden
//(dynamic_cast<const std::stringstream &>(*_output)).str().clear();//this does nothing. Also, using std::cout somehow miraculously disables the logging.
//setting the forward difference parameters. We divide by the denominator alpha*|x_i|+beta in the computation of the difference quotient. It is similar to the Finite Difference implementation by Nox, which can be found under https://trilinos.org/docs/dev/packages/nox/doc/html/classNOX_1_1Epetra_1_1FiniteDifference.html
0 commit comments