Skip to content
Snippets Groups Projects
Commit 82ebd929 authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

throw an exception if direction is not a descent direction

[[Imported from SVN: r5480]]
parent 6204a092
No related branches found
No related tags found
No related merge requests found
......@@ -292,12 +292,8 @@ int main (int argc, char *argv[]) try
double oldEnergy = rodAssembler.computeEnergy(x);
double energy = rodAssembler.computeEnergy(newIterate);
if (energy >= oldEnergy) {
printf("Richtung ist keine Abstiegsrichtung!\n");
// std::cout << "corr[0]\n" << corr[0] << std::endl;
exit(0);
}
if (energy >= oldEnergy)
DUNE_THROW(SolverError, "Richtung ist keine Abstiegsrichtung!");
// Add correction to the current solution
x += corr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment