FrontISTR  5.9.0
Large-scale structural analysis program with finit element method
m_fstr_iterationcontrol Module Reference

This module provides a unified convergence check for Newton iteration. More...

Functions/Subroutines

subroutine, public fstr_check_convergence (hecMESH, hecMAT, fstrSOLID, fstrPR, ndof, iter, sub_step, cstep, residual_vec, nresid, resb, res_prev, n_node_global, iterStatus, maxDLag, converg_dlag)
 Wrapper that calls fstr_check_convergence_main and applies the common divergence/NaN handling (status classification, failure logging, fstrSOLID stats update). More...
 
subroutine, public fstr_check_convergence_main (hecMESH, hecMAT, fstrSOLID, fstrPR, ndof, iter, cstep, residual_vec, nresid, resb, res_prev, n_node_global, iterStatus, do_failure_check, res_for_check, maxDLag, converg_dlag)
 Core convergence check: computes residual norm, applies the per-path convergence criterion, and (when not converged) returns the residual value used to decide divergence in the caller. More...
 

Detailed Description

This module provides a unified convergence check for Newton iteration.

The subroutine fstr_check_convergence computes residual norms from the assembled residual vector and checks convergence/divergence criteria. It replaces the former fstr_check_iteration_converged and various inline convergence checks in contact and dynamic analysis routines.

Function/Subroutine Documentation

◆ fstr_check_convergence()

subroutine, public m_fstr_iterationcontrol::fstr_check_convergence ( type(hecmwst_local_mesh), intent(in)  hecMESH,
type(hecmwst_matrix), intent(in)  hecMAT,
type(fstr_solid), intent(inout)  fstrSOLID,
type(fstr_param), intent(in)  fstrPR,
integer(kind=kint), intent(in)  ndof,
integer(kind=kint), intent(in)  iter,
integer(kind=kint), intent(in)  sub_step,
integer(kind=kint), intent(in)  cstep,
real(kind=kreal), dimension(:), intent(in)  residual_vec,
integer(kind=kint), intent(in)  nresid,
real(kind=kreal), intent(inout)  resb,
real(kind=kreal), intent(inout)  res_prev,
integer(kind=kint), intent(in)  n_node_global,
integer(kind=kint), intent(out)  iterStatus,
real(kind=kreal), intent(in), optional  maxDLag,
real(kind=kreal), intent(in), optional  converg_dlag 
)

Wrapper that calls fstr_check_convergence_main and applies the common divergence/NaN handling (status classification, failure logging, fstrSOLID stats update).

The body fstr_check_convergence_main is kept separate so that customized convergence criteria can be implemented by swapping/extending it without touching the failure-handling boilerplate here.

Definition at line 29 of file fstr_CheckConvergence.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fstr_check_convergence_main()

subroutine, public m_fstr_iterationcontrol::fstr_check_convergence_main ( type(hecmwst_local_mesh), intent(in)  hecMESH,
type(hecmwst_matrix), intent(in)  hecMAT,
type(fstr_solid), intent(inout)  fstrSOLID,
type(fstr_param), intent(in)  fstrPR,
integer(kind=kint), intent(in)  ndof,
integer(kind=kint), intent(in)  iter,
integer(kind=kint), intent(in)  cstep,
real(kind=kreal), dimension(:), intent(in)  residual_vec,
integer(kind=kint), intent(in)  nresid,
real(kind=kreal), intent(inout)  resb,
real(kind=kreal), intent(inout)  res_prev,
integer(kind=kint), intent(in)  n_node_global,
integer(kind=kint), intent(out)  iterStatus,
logical, intent(out)  do_failure_check,
real(kind=kreal), intent(out)  res_for_check,
real(kind=kreal), intent(in), optional  maxDLag,
real(kind=kreal), intent(in), optional  converg_dlag 
)

Core convergence check: computes residual norm, applies the per-path convergence criterion, and (when not converged) returns the residual value used to decide divergence in the caller.

Branching is by fstrPRsolution_type (static/dynamic) and n_node_global (>0 = contact path). Currently used paths:

  • Static, non-contact : fstr_Newton, fstr_QuasiNewton
  • Static, contact : fstr_Newton_contactALag, fstr_Newton_contactSLag
  • Dynamic, contact : fstr_Newton_dynamic_contactSLag (Dynamic non-contact path is currently not used; all dynamic Newton drivers go through the contact-aware routine.)
Parameters
[in]hecMESHmesh
[in]hecMATmatrix (B=residual, X=solution increment)
[in,out]fstrSOLIDsolid data (QFORCE, dunode)
[in]fstrPRglobal parameters (solution_type, nlgeom)
[in]ndofdegrees of freedom per node
[in]itercurrent Newton iteration number
[in]cstepcurrent loading step number
[in]residual_vecassembled residual vector (used by contact paths)
[in]nresidsize of residual_vec
[in,out]resbreference residual for self-normalization (set at iter=1)
[in,out]res_prevprevious normalized residual (for relres computation)
[in]n_node_globaltotal internal node count (>0 for contact path, 0 for non-contact)
[out]iterStatuskitrConverged or kitrContinue (failure paths handled by caller)
[out]do_failure_checktrue if caller should run divergence/NaN check
[out]res_for_checkresidual value the caller should use for divergence check
[in]maxDLag(optional) max change of Lagrange multiplier
[in]converg_dlag(optional) threshold for maxDLag

Definition at line 137 of file fstr_CheckConvergence.f90.

Here is the caller graph for this function: