Skip to content

Commit

Permalink
Relax convergence test
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Dec 20, 2024
1 parent 4190eb0 commit 8ffa2be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Material/Material3D/DruckerPrager/NonlinearDruckerPrager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<DomainBase>&) {
trial_stiffness = current_stiffness = initial_stiffness = tensor::isotropic_stiffness(elastic_modulus, poissons_ratio);
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 8ffa2be

Please sign in to comment.