From 8ffa2be6c0926f84adc1f911cd3c4a37eb409a4e Mon Sep 17 00:00:00 2001 From: Theodore Chang Date: Fri, 20 Dec 2024 18:27:05 +0100 Subject: [PATCH] Relax convergence test --- Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp b/Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp index ca05a09b..b0dad1ba 100644 --- a/Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp +++ b/Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp @@ -23,7 +23,7 @@ const mat NonlinearDruckerPrager::unit_x_unit = tensor::unit_tensor2 * tensor::u NonlinearDruckerPrager::NonlinearDruckerPrager(const unsigned T, const double E, const double V, const double ETAY, const double ETAF, const double XI, const double R) : DataNonlinearDruckerPrager{E, V, ETAY, ETAF, XI} - , Material3D(T, R) {} + , Material3D(T, R) { access::rw(tolerance) = 1E-13; } int NonlinearDruckerPrager::initialize(const shared_ptr&) { trial_stiffness = current_stiffness = initial_stiffness = tensor::isotropic_stiffness(elastic_modulus, poissons_ratio); @@ -69,7 +69,7 @@ int NonlinearDruckerPrager::update_trial_status(const vec& t_strain) { const auto error = fabs(incre_gamma); if(1u == counter) ref_error = error; suanpan_debug("Local iteration error: {:.5E}.\n", error); - if(error < tolerance * ref_error || (fabs(residual) < tolerance && counter > 5u)) break; + if(error < tolerance * ref_error || ((error < tolerance || fabs(residual) < tolerance) && counter > 5u)) break; plastic_strain = current_history(0) + xi * (gamma += incre_gamma); }