diff --git a/src/sand-wedge-data/parset.cfg b/src/sand-wedge-data/parset.cfg index 9425327f7712cf2319759f8d5910e982c81c5918..adb0b1ff4e4b95a95f46298e224d9c6e57b56081 100644 --- a/src/sand-wedge-data/parset.cfg +++ b/src/sand-wedge-data/parset.cfg @@ -60,8 +60,6 @@ verbosity = quiet [v.fpi] tolerance = 1e-10 maximumIterations = 10000 -relaxation = 0.5 -requiredReduction = 0.5 lambda = 0.5 [solver.tnnmg.linear] diff --git a/src/sand-wedge.cc b/src/sand-wedge.cc index 42e90c146aef41e725c9b3b96ff48642b8050ada..6efacbc27a0bf00592d97a64e42fecc687aa2004 100644 --- a/src/sand-wedge.cc +++ b/src/sand-wedge.cc @@ -340,8 +340,7 @@ int main(int argc, char *argv[]) { dirichletNodes); auto multigridStep = factory.getSolver(); - std::fstream iterationWriter("iterations", std::fstream::out), - relaxationWriter("relaxation", std::fstream::out); + std::fstream iterationWriter("iterations", std::fstream::out); auto timeSteppingScheme = initTimeStepper( parset.get<Config::scheme>("timeSteps.scheme"), @@ -363,10 +362,7 @@ int main(int argc, char *argv[]) { parset.get<size_t>("v.solver.maximumIterations"); auto const tau = parset.get<double>("problem.finalTime") / timeSteps, tolerance = parset.get<double>("v.solver.tolerance"), - fixedPointTolerance = parset.get<double>("v.fpi.tolerance"), - relaxation = parset.get<double>("v.fpi.relaxation"), - requiredReduction = - parset.get<double>("v.fpi.requiredReduction"); + fixedPointTolerance = parset.get<double>("v.fpi.tolerance"); auto const printProgress = parset.get<bool>("io.printProgress"); auto const verbosity = parset.get<Solver::VerbosityMode>("v.solver.verbosity"); @@ -413,8 +409,6 @@ int main(int argc, char *argv[]) { Vector u; Vector v_saved; - ScalarVector alpha_saved; - double lastStateCorrection; for (size_t stateFPI = 1; stateFPI <= maximumStateFPI; ++stateFPI) { timeSteppingScheme->extractOldVelocity(v_m); v_m *= 1.0 - lambda; @@ -423,22 +417,6 @@ int main(int argc, char *argv[]) { stateUpdater->solve(v_m); stateUpdater->extractAlpha(alpha); - if (stateFPI == 1) - relaxationWriter << "N "; - else { - double const stateCorrection = - stateEnergyNorm.diff(alpha, alpha_saved); - if (stateFPI <= 2 // lastStateCorrection is only set for stateFPI > 2 - or stateCorrection < requiredReduction * lastStateCorrection) - relaxationWriter << "N "; - else { - alpha *= (1.0 - relaxation); - Arithmetic::addProduct(alpha, relaxation, alpha_saved); - relaxationWriter << "Y "; - } - lastStateCorrection = stateCorrection; - } - solveVelocityProblem(velocityIterate, alpha); timeSteppingScheme->postProcess(velocityIterate); timeSteppingScheme->extractDisplacement(u); @@ -456,7 +434,6 @@ int main(int argc, char *argv[]) { if (stateFPI == maximumStateFPI) DUNE_THROW(Dune::Exception, "FPI failed to converge"); - alpha_saved = alpha; v_saved = v; } if (printProgress) @@ -470,7 +447,6 @@ int main(int argc, char *argv[]) { report(ur, vr, alpha); iterationWriter << std::endl; - relaxationWriter << std::endl; { BasisGridFunction<typename MyAssembler::VertexBasis, Vector> @@ -489,7 +465,6 @@ int main(int argc, char *argv[]) { } } iterationWriter.close(); - relaxationWriter.close(); Python::stop(); }