Skip to content
Snippets Groups Projects
Commit 4f7ebe3e authored by oliver.sander_at_tu-dresden.de's avatar oliver.sander_at_tu-dresden.de
Browse files

TrustRegionSolver: Make detection of trust-region underflows work

There already was code that printed a warning when the trust-region
radius dropped below the required solver tolerance.  (If that happens,
the solver terminates, because the small trust-region forces the
correction to be smaller than the required tolerance.  However,
the code didn't warn the user about this, and such cases almost
looked like successful runs.)

Unfortunately, the warning code didn't work, because the standard
solver termination criterion stopped the TR iteration before
reaching the check for the trust-region size.
parent 59d81698
No related branches found
No related tags found
1 merge request!59Some small modernizations
......@@ -551,16 +551,12 @@ void TrustRegionSolver<BasisType,VectorType>::solve()
if (correctionInfinityNorm < this->tolerance_) {
if (this->verbosity_ == NumProc::FULL and rank==0)
std::cout << "CORRECTION IS SMALL ENOUGH" << std::endl;
if (this->verbosity_ != NumProc::QUIET and rank==0)
std::cout << i+1 << " trust-region steps were taken." << std::endl;
break;
}
if (trustRegion.radius() < this->tolerance_) {
if (this->verbosity_ == NumProc::FULL and rank==0)
std::cout << "TRUST REGION RADIUS IS TOO SMALL, SMALLER THAN TOLERANCE, STOPPING NOW" << std::endl;
{
if (correctionInfinityNorm < trustRegion.radius())
std::cout << "CORRECTION IS SMALL ENOUGH" << std::endl;
else
std::cout << "TRUST-REGION UNDERFLOW!" << std::endl;
}
if (this->verbosity_ != NumProc::QUIET and rank==0)
std::cout << i+1 << " trust-region steps were taken." << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment