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

print max translation correction and max rotation correction separately. ...

print max translation correction and max rotation correction separately.  Slightly fiddling with the acceptance criterion

[[Imported from SVN: r1679]]
parent 289fc7fe
No related branches found
No related tags found
No related merge requests found
...@@ -326,8 +326,17 @@ void RodSolver<GridType>::solve() ...@@ -326,8 +326,17 @@ void RodSolver<GridType>::solve()
} }
if (this->verbosity_ == FULL) if (this->verbosity_ == FULL) {
printf("infinity norm of the correction: %g\n", corr.infinity_norm()); double translationMax = 0;
double rotationMax = 0;
for (size_t j=0; j<corr.size(); j++) {
for (int k=0; k<3; k++) {
translationMax = std::max(translationMax, corr[j][k]);
rotationMax = std::max(rotationMax, corr[j][k+3]);
}
}
printf("infinity norm of the correction: %g %g\n", translationMax, rotationMax);
}
if (corr.infinity_norm() < tolerance_) { if (corr.infinity_norm() < tolerance_) {
if (this->verbosity_ == FULL) if (this->verbosity_ == FULL)
...@@ -381,16 +390,17 @@ void RodSolver<GridType>::solve() ...@@ -381,16 +390,17 @@ void RodSolver<GridType>::solve()
printf("Richtung ist keine Abstiegsrichtung!\n"); printf("Richtung ist keine Abstiegsrichtung!\n");
} }
#if 1 if (energy >= oldEnergy &&
if (std::abs(oldEnergy-energy)/energy < 1e-9 || modelDecrease/energy < 1e-9) { (std::abs(oldEnergy-energy)/energy < 1e-9 || modelDecrease/energy < 1e-9)) {
if (this->verbosity_ == FULL) if (this->verbosity_ == FULL)
std::cout << "Suspecting rounding problems" << std::endl; std::cout << "Suspecting rounding problems" << std::endl;
if (this->verbosity_ != QUIET) if (this->verbosity_ != QUIET)
std::cout << i+1 << " trust-region steps were taken." << std::endl; std::cout << i+1 << " trust-region steps were taken." << std::endl;
//break;
x_ = newIterate;
break;
} }
#endif
// ////////////////////////////////////////////// // //////////////////////////////////////////////
// Check for acceptance of the step // Check for acceptance of the step
......
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