![]() |
FrontISTR
5.9.0
Large-scale structural analysis program with finit element method
|
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, cnvstat, iterStatus, hecLagMAT) |
| 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, cnvstat, iterStatus, do_failure_check, res_for_check, hecLagMAT) |
| Core convergence check. More... | |
| subroutine, public | fstr_check_linear_solver (hecMESH, hecMAT, fstrSOLID, cstep, sub_step, iterStatus, istat) |
| Classify the linear solver result and record why the solve failed. More... | |
This module provides a unified convergence check for Newton iteration.
fstr_check_convergence measures the residual against a reference force assembled from the internal force and, in dynamic analysis, the inertia and viscous force. Quantities of different physical dimension (translational force, moment, Lagrange multiplier) are evaluated separately instead of being accumulated into a single norm. fstr_check_linear_solver does the same for the linear solver result, replacing the per-driver inline checks that followed solve_LINEQ / solve_LINEQ_contact.
Whether an iteration has converged is decided in fstr_decide_convergence and nowhere else. The other routines only prepare the table of criteria it reads: setup_stepInfo_converg of m_step fixes, when the step is read, which criteria are checked against which thresholds, and fstr_evaluate_convergence fills in their values and unchecks the criteria that do not apply to the analysis or to the iteration.
| 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, | ||
| type(fstr_convergence_state), intent(out) | cnvstat, | ||
| integer(kind=kint), intent(out) | iterStatus, | ||
| type(hecmwst_matrix_lagrange), intent(in), optional | hecLagMAT | ||
| ) |
Wrapper that calls fstr_check_convergence_main and applies the common divergence/NaN handling (status classification, failure logging, fstrSOLID stats update).
The body is kept separate so that customized convergence criteria can be implemented by swapping or extending fstr_check_convergence_main without touching the failure-handling boilerplate here.
Definition at line 59 of file fstr_CheckConvergence.f90.
| 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, | ||
| type(fstr_convergence_state), intent(out) | cnvstat, | ||
| integer(kind=kint), intent(out) | iterStatus, | ||
| logical, intent(out) | do_failure_check, | ||
| real(kind=kreal), intent(out) | res_for_check, | ||
| type(hecmwst_matrix_lagrange), intent(in), optional | hecLagMAT | ||
| ) |
Core convergence check.
The criteria, indexed by (quantity, DOF group, norm), are residual, translation, L2: ||R_t|| / max(||Q_t||, ||D_t||) residual, rotation, L2: ||R_r|| / max(||Q_r||, ||D_r||) (ndof=6 only) correction, translation, L2: ||du_t|| / ||Du_t|| correction, rotation, L2: ||du_r|| / ||Du_r|| (ndof=6 only) correction, Lagrange, L2: ||dlambda|| / max(||lambda||, Fref_t) (Lagrange rows only) and the same ratios in the max norm, the largest absolute DOF component over the nodes. Each is compared with the threshold fixed for the step, and fstr_decide_convergence combines them.
Q is the internal force and D the inertia plus viscous force, so that the reference force stays finite for a body in free vibration, where the vector sum Q+D vanishes at equilibrium while neither norm does. Pressure DOFs of ndof=4 and the Lagrange rows of the residual carry a dimension of their own and are represented by the Lagrange correction instead of entering the residual norms.
The multiplier of a contact constraint is a contact force, so the translational reference force Fref_t bounds ||lambda|| from below in its criterion. Normalizing by ||lambda|| alone makes the criterion arbitrarily strict where the contact carries little of the load, and unsatisfiable at a node entering contact, where lambda is still zero while dlambda is not.
In dynamic analysis the check precedes the linear solve, so at iter=1 the correction vector belongs to no iteration yet and the state is the one before any correction has been applied; nothing is decided there.
| [in] | hecMESH | mesh |
| [in] | hecMAT | matrix (X=solution increment) |
| [in,out] | fstrSOLID | solid data (QFORCE, DFORCE, dunode) |
| [in] | fstrPR | global parameters (solution_type) |
| [in] | ndof | degrees of freedom per node |
| [in] | iter | current Newton iteration number |
| [in] | cstep | current loading step number |
| [in] | residual_vec | assembled residual vector |
| [out] | cnvstat | criteria the decision was made from |
| [out] | iterStatus | kitrConverged or kitrContinue (failure paths handled by caller) |
| [out] | do_failure_check | true if caller should run divergence/NaN check |
| [out] | res_for_check | residual value the caller should use for divergence check |
| [in] | hecLagMAT | (optional) Lagrange multipliers of contact analysis |
| [in] | hecmat | X=solution increment |
Definition at line 151 of file fstr_CheckConvergence.f90.
| subroutine, public m_fstr_iterationcontrol::fstr_check_linear_solver | ( | type(hecmwst_local_mesh), intent(in) | hecMESH, |
| type(hecmwst_matrix), intent(in) | hecMAT, | ||
| type(fstr_solid), intent(inout) | fstrSOLID, | ||
| integer(kind=kint), intent(in) | cstep, | ||
| integer(kind=kint), intent(in) | sub_step, | ||
| integer(kind=kint), intent(out) | iterStatus, | ||
| integer(kind=kint), intent(in), optional | istat | ||
| ) |
Classify the linear solver result and record why the solve failed.
Called by every Newton driver right after the linear solve, so the drivers share one definition of a usable solution.
| [in] | hecmat | the matrix handed to the solver |
| [out] | iterstatus | kitrContinue if the solution is usable |
| [in] | istat | status returned by solve_LINEQ_contact |
Definition at line 585 of file fstr_CheckConvergence.f90.