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.
_solverParametersPtr->sublist("Printing").set("Output Information", NOX::Utils::Error + NOX::Utils::Warning + NOX::Utils::OuterIteration + NOX::Utils::Details + NOX::Utils::Debug); //(there are also more options, but error and outer iteration are the ones that I commonly use.
// _solverParametersPtr->sublist("Printing").set("Output Information", NOX::Utils::Error + NOX::Utils::Warning + NOX::Utils::OuterIteration + NOX::Utils::InnerIteration + NOX::Utils::Details + NOX::Utils::Debug); //(there are also more options, but error and outer iteration are the ones that I commonly use.
130
-
131
130
132
131
if (_generateoutput) std::cout << "creating noxLapackInterface" << std::endl;
133
132
134
133
_noxLapackInterface = Teuchos::rcp(newNoxLapackInterface (_algLoop,-1));//this also gets the nominal values
135
134
136
-
137
-
138
135
_iterationStatus=CONTINUE;
139
136
140
137
if (_generateoutput) std::cout << "starting while loop" << std::endl;
141
138
142
139
while(_iterationStatus==CONTINUE){
143
140
iter++;
144
141
145
-
if ((false && (iter != 1))){
146
-
std::cout << "Entering next iteration of while loop" << std::endl;
147
-
_solverParametersPtr->print();
148
-
std::cout << std::endl;
149
-
}
150
-
151
142
// Reset initial guess
152
143
memcpy(_y,_y0,_dimSys*sizeof(double));
153
144
_algLoop->setReal(_y);
154
145
155
-
if ((false && (iter != 1))){
156
-
std::cout << "building grp" << std::endl;
157
-
_solverParametersPtr->print();
158
-
std::cout << std::endl;
159
-
}
160
-
161
146
try{
162
147
_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
163
148
}
@@ -167,20 +152,6 @@ void Nox::solve()
167
152
std::string errorstring(ex.what());
168
153
//we only do the error handling by variation of initial guess in case of division by zero at evaluation of initial guess
//alle Richtungen durchzuprobieren ist doof, denn das kann ich nur durch 2^_dimSys Aufrufe von der Lösungsroutine beschränken. Allerdings besteht Grund zur Hoffnung, dass es relativ schnell gelöst wird.
173
-
//Dann sollte ich allerdings nicht mehr allzu viele Methoden durchprobieren, ie. einfach Linesearch und das wars.
174
-
//Oder ich versuche herauszufinden, welche Koordinaten die Division durch Null hervorrufen. Heuristisch sind das die Koordinaten, die sowieso schon Null sind.
175
-
//anstatt vectors von arrays kann ich auch einfach mehrere vectors erstellen. Oder halt gleich eine Matrix mit Zweifachzeigern.
176
-
177
-
//iterate through all possibilities.
178
-
//bool triednew_yindirection p = true;
179
-
//algLoop->setReal(new_y);
180
-
//try{_algLoop->evaluate}
181
-
//_grp = ...
182
-
//simplelinesearchsolve(_grp);
183
-
184
155
NOX::StatusTest::StatusType stat = NOX::StatusTest::Unevaluated;
185
156
int initialguessdividebyzerofailurecounter = 0;
186
157
@@ -246,35 +217,9 @@ void Nox::solve()
246
217
}
247
218
}
248
219
249
-
if ((false && (iter != 1))){
250
-
std::cout << "grp built" << std::endl;
251
-
_solverParametersPtr->print();
252
-
std::cout << std::endl;
253
-
}
254
-
255
220
if (_generateoutput) std::cout << "building solver" << std::endl;
//(dynamic_cast<const std::stringstream &>(*output)).str().clear();//this does nothing. Also, using std::cout somehow miraculously disables the logging.
252
+
//(dynamic_cast<const std::stringstream &>(*_output)).str().clear();//this does nothing. Also, using std::cout somehow miraculously disables the logging.
316
253
}
317
-
//std::cout << "done!" << std::endl;
318
254
}
319
255
catch(const std::exception &ex)
320
256
{
321
257
std::cout << std::endl << "sth went wrong during solving, with error message" << ex.what() << std::endl;
322
-
//std::cout << add_error_info("building solver with grp, status tests and solverparameters", ex.what(), ex.getErrorID(), time) << std::endl << std::endl;
std::cout << "Some error occured when solving algloop " << _algLoop->getEquationIndex() << ". Trying to solve with different method. iter=" << iter << std::endl;
0 commit comments