Skip to content

Commit

Permalink
Update convergence criterion
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed Oct 27, 2024
1 parent e5571de commit a891abd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Material/Material1D/vonMises/ArmstrongFrederick1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int ArmstrongFrederick1D::update_trial_status(const vec& t_strain) {
const auto error = fabs(incre);
if(1u == counter) ref_error = error;
suanpan_debug("Local iteration error: {:.5E}.\n", error);
if(error < tolerance * ref_error || ((fabs(yield_func) < tolerance || error < datum::eps) && counter > 5u)) break;
if(error < tolerance * ref_error || ((error < tolerance || fabs(yield_func) < tolerance) && counter > 5u)) break;

gamma -= incre;
q -= incre;
Expand Down
2 changes: 1 addition & 1 deletion Material/Material1D/vonMises/NonlinearGurson1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ int NonlinearGurson1D::update_trial_status(const vec& t_strain) {
const auto error = inf_norm(incre);
if(1u == counter) ref_error = error;
suanpan_debug("Local iteration error: {:.5E}.\n", error);
if(error < tolerance * ref_error || (inf_norm(residual) < tolerance && counter > 5u)) break;
if(error < tolerance * ref_error || ((error < tolerance || inf_norm(residual) < tolerance) && counter > 5u)) break;

gamma -= incre(0);
pe -= incre(1);
Expand Down
2 changes: 1 addition & 1 deletion Material/Material1D/vonMises/NonlinearMises1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int NonlinearMises1D::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(yield_func) < tolerance && counter > 5u)) break;
if(error < tolerance * ref_error || ((error < tolerance || fabs(yield_func) < tolerance) && counter > 5u)) break;
incre_h = compute_h(plastic_strain = current_history(0) + (gamma += incre_gamma)) - current_h;
yield_func = norm_shifted_stress - elastic_modulus * gamma - std::max(0., compute_k(plastic_strain)) - incre_h;
}
Expand Down
2 changes: 1 addition & 1 deletion Material/Material1D/vonMises/VAFCRP1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int VAFCRP1D::update_trial_status(const vec& t_strain) {
const auto error = fabs(incre);
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;

gamma -= incre;
p -= incre;
Expand Down

0 comments on commit a891abd

Please sign in to comment.