Skip to content
Snippets Groups Projects
Commit afb56554 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Minor cleanup

parent adb5aff6
No related branches found
No related tags found
No related merge requests found
...@@ -78,8 +78,8 @@ void FilterMultigridContactSolver<ProblemType>::solve() ...@@ -78,8 +78,8 @@ void FilterMultigridContactSolver<ProblemType>::solve()
int it(0); int it(0);
// Loop until desired tolerance or maximum number of iterations is reached // Loop until desired tolerance or maximum number of iterations is reached
for (; it <this->maxIterations_ and (error>this->tolerance_ or std::isnan(error)) and for (; it <this->maxIterations_ and (error > this->tolerance_ or std::isnan(error)) and
(crit> critTol_) ; it++) { (crit > critTol_) ; ++it) {
Dune::Timer iterationTimer; Dune::Timer iterationTimer;
...@@ -94,7 +94,7 @@ void FilterMultigridContactSolver<ProblemType>::solve() ...@@ -94,7 +94,7 @@ void FilterMultigridContactSolver<ProblemType>::solve()
std::cout << "Trust--region radius: " << trustRegion << "\n"; std::cout << "Trust--region radius: " << trustRegion << "\n";
// Measure norm of the old iterate // Measure norm of the old iterate
field_type oldNorm(0); field_type oldNorm{0};
for (size_t i=0; i<iterates.size(); i++) for (size_t i=0; i<iterates.size(); i++)
oldNorm += (*errorNorms_[i])(iterates[i]); oldNorm += (*errorNorms_[i])(iterates[i]);
...@@ -207,8 +207,8 @@ void FilterMultigridContactSolver<ProblemType>::solve() ...@@ -207,8 +207,8 @@ void FilterMultigridContactSolver<ProblemType>::solve()
newInfeasibility = std::max(newInfeasibility, std::fabs(dirichletValues_[i][j] - correction_[i][j])); newInfeasibility = std::max(newInfeasibility, std::fabs(dirichletValues_[i][j] - correction_[i][j]));
if (this->verbosity_ == Solver::FULL) if (this->verbosity_ == Solver::FULL)
std::cout<<"New energy of potential iterate "<<newEnergy<< std::cout<<"New energy of potential iterate "<< newEnergy <<
" and infeasibility "<<newInfeasibility<<std::endl; " and infeasibility "<<newInfeasibility << std::endl;
field_type infNorm = this->correction_.infinity_norm(); field_type infNorm = this->correction_.infinity_norm();
if (!std::isfinite(newEnergy)) { if (!std::isfinite(newEnergy)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment