svMultiPhysics
Loading...
Searching...
No Matches
Integrator Class Reference

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

Detailed Description

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:

  • Solution variables (Ag, Yg, Dg) at generalized-alpha time levels
  • Newton iteration loop with convergence checking
  • Linear system assembly and solve
  • Boundary condition application

Line search

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.

Warning
While it is implemented for all equations, line search is currently only tested for struct, should be regarded as experimental, and used with caution.

Constructor & Destructor Documentation

◆ Integrator()

Integrator::Integrator ( Simulation * simulation,
SolutionStates && solutions )

Construct a new Integrator object.

Parameters
simulationPointer to the Simulation object containing problem data
solutionsSolution states containing old time level arrays (takes ownership via move)

Member Function Documentation

◆ get_Ag()

Array< double > & Integrator::get_Ag ( )
inline

Get reference to solution variable Ag (time derivative of variables).

Returns
Reference to Ag array (acceleration in structural mechanics)

◆ get_Dg()

Array< double > & Integrator::get_Dg ( )
inline

Get reference to solution variable Dg (integrated variables).

Returns
Reference to Dg array (displacement in structural mechanics)

◆ get_solutions()

SolutionStates & Integrator::get_solutions ( )
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();

Returns
Reference to SolutionStates struct containing all solution arrays

◆ get_Yg()

Array< double > & Integrator::get_Yg ( )
inline

Get reference to solution variable Yg (variables).

Returns
Reference to Yg array (velocity in structural mechanics)

◆ predictor()

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)

◆ step()

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.

Parameters
[in]save_resultsTrue 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.
Returns
True if all equations converged, false otherwise

The documentation for this class was generated from the following files: