From: Wasim Niyaz Munshi Date: Tue, 10 Dec 2024 03:27:36 +0000 (-0700) Subject: Use relative tolerance for the SolverControl objects X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=546b311f76062515e8a15de787103949576fbcc1;p=code-gallery.git Use relative tolerance for the SolverControl objects --- diff --git a/Phase_field_fracture_model_in_3D/phase_field.cc b/Phase_field_fracture_model_in_3D/phase_field.cc index 160c33d..89b227a 100644 --- a/Phase_field_fracture_model_in_3D/phase_field.cc +++ b/Phase_field_fracture_model_in_3D/phase_field.cc @@ -392,9 +392,9 @@ namespace PF PhaseField::setup_mesh_and_bcs () { - const unsigned int nx = 2; - const unsigned int ny = 2; - const unsigned int nz = 1; + const unsigned int nx = 20; + const unsigned int ny = 20; + const unsigned int nz = 10; const std::vector repetitions = {nx,ny,nz}; const Point<3> p1(Domain::x_min,Domain::y_min,Domain::z_min), p2(Domain::x_max,Domain::y_max,Domain::z_max); @@ -737,7 +737,7 @@ namespace PF TimerOutput::Scope ts (computing_timer, "solve_linear_system_elastic"); SolverControl solver_control (10000, - 1e-12/** system_rhs_elastic.l2_norm()*/); + 1e-12* system_rhs_elastic.l2_norm()); SolverCG solver (solver_control); @@ -946,7 +946,7 @@ namespace PF TimerOutput::Scope ts (computing_timer, "solve_linear_system_damage"); SolverControl solver_control (10000, - 1e-12/** system_rhs_damage.l2_norm()*/); + 1e-12* system_rhs_damage.l2_norm()); SolverCG solver (solver_control); @@ -1376,7 +1376,7 @@ namespace PF // Loop over staggered iterations unsigned int iteration = 0; bool stoppingCriterion = false; - while (stoppingCriterion == false && iteration<1) + while (stoppingCriterion == false) { pcout << " \n iteration number:" << iteration << std::endl; solve_elastic_subproblem (load_step);