|
svMultiPhysics
|
Integrator class that encapsulates the Newton iteration loop for time integration. More...
#include <Integrator.h>
Public Member Functions | |
| Integrator (Simulation *simulation, SolutionStates &&solutions) | |
| Construct a new Integrator object. | |
| bool | step (bool save_results=false) |
| Execute one time step with Newton iteration loop. | |
| void | predictor () |
| Perform predictor step for next time step. | |
| Array< double > & | get_Ag () |
| Get reference to solution variable Ag (time derivative of variables). | |
| const Array< double > & | get_Ag () const |
| Array< double > & | get_Yg () |
| Get reference to solution variable Yg (variables). | |
| const Array< double > & | get_Yg () const |
| Array< double > & | get_Dg () |
| Get reference to solution variable Dg (integrated variables). | |
| const Array< double > & | get_Dg () const |
| SolutionStates & | get_solutions () |
| Get reference to solution states struct. | |
| const SolutionStates & | get_solutions () const |
Integrator class that encapsulates the Newton iteration loop for time integration.
This class handles the nonlinear Newton iteration scheme for solving coupled multi-physics equations in svMultiPhysics. It manages:
The nonlinear iterations of an equation can be globalized by a backtracking line search, enabled by the Line_search_experimental XML element of the equation (see LineSearchParameters). Without it, every iteration applies the full increment of the linear solve.
At every nonlinear iteration of an equation with line search enabled, the increment \(\delta u\) of the linear solve is scaled by a step length \(\alpha\) before being applied, so that the solution is updated to \(u + \alpha\,\delta u\). The step lengths \(\alpha = 1, \rho, \rho^2, \dots\) are tried in turn, with \(\rho\) the step reduction factor, and the first one satisfying
\[ \| R(u + \alpha\,\delta u) \|_W \leq (1 - c\,\alpha)\,\| R(u) \|_W \]
is applied, with \(c\) the minimum decrease. Once the step length reaches the minimum step length, it is applied regardless of the residual decrease.
The norm \(\|\cdot\|_W\) weights every residual entry by the inverse square root of the magnitude of the corresponding diagonal entry of the tangent at \(u\), as the Jacobi preconditioner of the linear solver does, so that it is dimensionally homogeneous across the degrees of freedom of the equation. Degrees of freedom constrained by a Dirichlet condition have zero weight, since their residual is the reaction of the constraint. The weights are computed once per iteration and kept fixed while step lengths are tried, so that the norms of different step lengths are comparable (see compute_residual_weights).
The linear system is solved once per iteration, whatever the number of step lengths tried. Measuring a step length costs one assembly of the linear system at the trial solution, which re-advances implicitly coupled active stress models as any other assembly does. The convergence test that follows (see finalize_iteration) is the same with or without line search.
Line search is not implemented for prestress simulations: the nodal prestress is accumulated over the assemblies of a time step, which would include those of the trial step lengths unless they were excluded.
| Integrator::Integrator | ( | Simulation * | simulation, |
| SolutionStates && | solutions ) |
Construct a new Integrator object.
| simulation | Pointer to the Simulation object containing problem data |
| solutions | Solution states containing old time level arrays (takes ownership via move) |
|
inline |
Get reference to solution variable Ag (time derivative of variables).
|
inline |
Get reference to solution variable Dg (integrated variables).
|
inline |
Get reference to solution states struct.
Provides access to all solution arrays at old (n) and current (n+1) time levels. Use this to access An, Dn, Yn (current) and Ao, Do, Yo (old) via: auto& solutions = integrator.get_solutions(); auto& An = solutions.current.get_acceleration(); auto& Do = solutions.old.get_displacement();
|
inline |
Get reference to solution variable Yg (variables).
| void Integrator::predictor | ( | ) |
Perform predictor step for next time step.
Predictor step for next time step.
Performs predictor step using generalized-alpha method to estimate solution at n+1 time level based on current solution at n time level. This should be called once per time step before the Newton iteration loop.
Modifies: com_mod.pS0 com_mod.Ad solutions_.old (acceleration, velocity, displacement) solutions_.current (acceleration, velocity, displacement)
| bool Integrator::step | ( | bool | save_results = false | ) |
Execute one time step with Newton iteration loop.
Performs the complete Newton iteration sequence including initialization, assembly, boundary condition application, linear solve, and convergence check. One line is written to the standard output and to the history file for every Newton iteration, including the converged one.
| [in] | save_results | True if the results of this time step are written to a VTU file, which flags the converged iteration with an 's' in the standard output. |