suanPan
🧮 An Open Source, Parallel and Heterogeneous Finite Element Analysis Framework
Loading...
Searching...
No Matches
Integrator Class Reference

The Integrator class is basically a wrapper of the DomainBase class with regard to some status changing methods. More...

#include <Integrator.h>

Inheritance diagram for Integrator:
Collaboration diagram for Integrator:

Public Types

enum class  Type { Implicit , Explicit }
 

Public Member Functions

 Integrator (unsigned=0)
 
void set_domain (const std::weak_ptr< DomainBase > &)
 
shared_ptr< DomainBaseget_domain () const
 
virtual int initialize ()
 
virtual Type type () const
 
void set_time_step_switch (bool)
 
bool allow_to_change_time_step () const
 
void set_matrix_assembled_switch ()
 
bool matrix_is_assembled () const
 
virtual bool time_independent_matrix () const
 
int process_load ()
 
virtual int process_constraint ()
 
int process_criterion () const
 
int process_modifier () const
 
int process_load_resistance ()
 
virtual int process_constraint_resistance ()
 
void record () const
 
virtual void assemble_resistance ()
 
virtual void assemble_matrix ()
 
virtual void assemble_effective_matrix ()
 
virtual vec get_force_residual ()
 
virtual vec get_displacement_residual ()
 
vec get_auxiliary_residual () const
 
virtual sp_mat get_reference_load ()
 
virtual const vec & get_trial_displacement () const
 
void update_load () const
 
void update_constraint () const
 
void update_trial_load_factor (double) const
 
void update_trial_load_factor (const vec &) const
 
virtual void update_from_ninja ()
 
void update_trial_time (double)
 
virtual void update_incre_time (double)
 
virtual int update_trial_status (bool)
 
int sync_status (bool)
 
virtual int update_internal (const mat &)
 
mat solve (const mat &)
 
mat solve (const sp_mat &)
 
mat solve (mat &&)
 
mat solve (sp_mat &&)
 
virtual int solve (mat &, const mat &)
 
virtual int solve (mat &, const sp_mat &)
 
virtual int solve (mat &, mat &&)
 
virtual int solve (mat &, sp_mat &&)
 
void erase_machine_error (vec &) const
 
void stage_and_commit_status ()
 
void stage_status () const
 
virtual void commit_status ()
 
virtual void clear_status ()
 
virtual void reset_status ()
 
virtual vec from_incre_velocity (const vec &, const uvec &)
 
virtual vec from_incre_acceleration (const vec &, const uvec &)
 
virtual vec from_total_velocity (const vec &, const uvec &)
 
virtual vec from_total_acceleration (const vec &, const uvec &)
 
vec from_incre_velocity (double, const uvec &)
 
vec from_incre_acceleration (double, const uvec &)
 
vec from_total_velocity (double, const uvec &)
 
vec from_total_acceleration (double, const uvec &)
 
- Public Member Functions inherited from UniqueTag
 UniqueTag (const UniqueTag &)=delete
 
 UniqueTag (UniqueTag &&)=delete
 
UniqueTagoperator= (const UniqueTag &)=delete
 
UniqueTagoperator= (UniqueTag &&)=delete
 
 ~UniqueTag () override=default
 
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&) noexcept=default
 
- Public Member Functions inherited from Tag
 Tag (unsigned=0)
 
 Tag (const Tag &)=default
 
 Tag (Tag &&) noexcept=default
 
Tagoperator= (const Tag &)=delete
 
Tagoperator= (Tag &&)=delete
 
virtual ~Tag ()=default
 
void set_tag (unsigned) const
 
unsigned get_tag () const
 
void enable ()
 
void disable ()
 
void guard ()
 
void unguard ()
 
bool is_active () const
 
bool is_guarded () const
 
virtual void print ()
 

Protected Member Functions

virtual void update_parameter (double)
 
virtual int process_load_impl (bool)
 
virtual int process_constraint_impl (bool)
 
virtual bool has_corrector () const
 
virtual int correct_trial_status ()
 

Detailed Description

The Integrator class is basically a wrapper of the DomainBase class with regard to some status changing methods.

By default, the Step object calls DomainBase(Workshop) object to update displacement/resistance/stiffness independently. When it comes to dynamic analysis (time integration is involved), it is necessary to compute the equivalent load/stiffness by combining several quantities.

The Integrator object is acting like an agent between Workshop and Step, that can modify corresponding quantities to account for dynamic effect.

Author
tlc
Date
27/08/2017
Version
0.1.2

Member Enumeration Documentation

◆ Type

enum class Integrator::Type
strong
Enumerator
Implicit 
Explicit 

Constructor & Destructor Documentation

◆ Integrator()

Integrator::Integrator ( unsigned  T = 0)
explicit

Member Function Documentation

◆ allow_to_change_time_step()

bool Integrator::allow_to_change_time_step ( ) const

Some time integration methods (multistep methods) require time step to be constant (for at least some consecutive steps). Call this method in solvers to determine whether it is allowed to change time step.

◆ assemble_effective_matrix()

void Integrator::assemble_effective_matrix ( )
virtual

Assemble the global effective matrix A in AX=B. For FEM applications, it is often a linear combination of stiffness, mass, damping and geometry matrices.

Reimplemented in BatheTwoStep, GeneralizedAlpha, GSSSS, LeeNewmark, LeeNewmarkFull, LeeNewmarkIterative, Newmark, OALTS, WilsonPenzienNewmark, and ExplicitIntegrator.

◆ assemble_matrix()

void Integrator::assemble_matrix ( )
virtual

Assemble global matrices such as stiffness, mass, damping and geometry matrices. This method should come with the companion method assemble_effective_matrix().

Reimplemented in LeeNewmarkIterative, NonviscousNewmark, ImplicitIntegrator, and ExplicitIntegrator.

Here is the caller graph for this function:

◆ assemble_resistance()

void Integrator::assemble_resistance ( )
virtual

Reimplemented in GeneralizedAlphaExplicit, BatheTwoStep, GeneralizedAlpha, GSSSS, LeeNewmark, Newmark, NonviscousNewmark, OALTS, RayleighNewmark, WilsonPenzienNewmark, and ExplicitIntegrator.

Here is the caller graph for this function:

◆ clear_status()

void Integrator::clear_status ( )
virtual

Reimplemented in LeeNewmarkBase, BatheExplicit, GERKN, BatheTwoStep, NonviscousNewmark, OALTS, and WilsonPenzienNewmark.

Here is the caller graph for this function:

◆ commit_status()

void Integrator::commit_status ( )
virtual

Reimplemented in LeeNewmarkBase, BatheExplicit, GERKN, BatheTwoStep, NonviscousNewmark, OALTS, and WilsonPenzienNewmark.

Here is the caller graph for this function:

◆ correct_trial_status()

int Integrator::correct_trial_status ( )
protectedvirtual

Correct the trial status. This method is called when the integrator has a corrector. It is used to correct the trial status after the computation. The default implementation does nothing and returns success. Override this method to implement the corrector.

Reimplemented in BatheExplicit, GeneralizedAlphaExplicit, GERKN, and GSSE.

Here is the caller graph for this function:

◆ erase_machine_error()

void Integrator::erase_machine_error ( vec &  ninja) const

Avoid machine error accumulation. The penalty method can apply homogeneous constraints approximately. The corresponding DoF shall be set to zero after solving the system.

Here is the call graph for this function:

◆ from_incre_acceleration() [1/2]

vec Integrator::from_incre_acceleration ( const vec &  ,
const uvec encoding 
)
virtual

When external loads are applied, they can be applied in forms of displacement/velocity/acceleration. The time integration methods, by default, form effective stiffness matrices in displacement domain. That is, in AX=B, A is the effective stiffness matrix and X is the displacement increment. Thus, loads in velocity/acceleration must be converted to displacement. This cannot be done arbitrarily due to compatibility issues. This method takes acceleration increment and converts it to TOTAL displacement.

Reimplemented in GeneralizedAlphaExplicit, GERKN, GSSE, BatheTwoStep, GeneralizedAlpha, GSSSS, Newmark, OALTS, and ExplicitIntegrator.

Here is the caller graph for this function:

◆ from_incre_acceleration() [2/2]

vec Integrator::from_incre_acceleration ( double  magnitude,
const uvec encoding 
)

A simplified version similar to from_incre_acceleration(const vec&, const uvec&). It assumes all DoFs share the same magnitude.

Here is the call graph for this function:

◆ from_incre_velocity() [1/2]

vec Integrator::from_incre_velocity ( const vec &  ,
const uvec encoding 
)
virtual

When external loads are applied, they can be applied in forms of displacement/velocity/acceleration. The time integration methods, by default, form effective stiffness matrices in displacement domain. That is, in AX=B, A is the effective stiffness matrix and X is the displacement increment. Thus, loads in velocity/acceleration must be converted to displacement. This cannot be done arbitrarily due to compatibility issues. This method takes velocity increment and converts it to TOTAL displacement.

Reimplemented in BatheTwoStep, GeneralizedAlpha, GSSSS, Newmark, OALTS, and ExplicitIntegrator.

Here is the caller graph for this function:

◆ from_incre_velocity() [2/2]

vec Integrator::from_incre_velocity ( double  magnitude,
const uvec encoding 
)

A simplified version similar to from_incre_velocity(const vec&, const uvec&). It assumes all DoFs share the same magnitude.

Here is the call graph for this function:

◆ from_total_acceleration() [1/2]

vec Integrator::from_total_acceleration ( const vec &  total_acceleration,
const uvec encoding 
)
virtual

Reimplemented in GeneralizedAlphaExplicit, GERKN, GSSE, BatheTwoStep, OALTS, and ExplicitIntegrator.

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

◆ from_total_acceleration() [2/2]

vec Integrator::from_total_acceleration ( double  magnitude,
const uvec encoding 
)
Here is the call graph for this function:

◆ from_total_velocity() [1/2]

vec Integrator::from_total_velocity ( const vec &  total_velocity,
const uvec encoding 
)
virtual

Reimplemented in BatheTwoStep, and OALTS.

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

◆ from_total_velocity() [2/2]

vec Integrator::from_total_velocity ( double  magnitude,
const uvec encoding 
)
Here is the call graph for this function:

◆ get_auxiliary_residual()

vec Integrator::get_auxiliary_residual ( ) const

Assemble the global residual vector due to nonlinear constraints implemented via the multiplier method.

Here is the call graph for this function:

◆ get_displacement_residual()

vec Integrator::get_displacement_residual ( )
virtual

Assemble the global residual vector in displacement-controlled solving schemes. Apart from the global resistance and external load vectors, the reference load vector shall also be considered.

Reimplemented in LeeNewmarkBase, GeneralizedAlphaExplicit, GeneralizedAlpha, and GSSSS.

Here is the caller graph for this function:

◆ get_domain()

shared_ptr< DomainBase > Integrator::get_domain ( ) const
Here is the caller graph for this function:

◆ get_force_residual()

vec Integrator::get_force_residual ( )
virtual

Assemble the global residual vector in load-controlled solving schemes.

Reimplemented in LeeNewmarkBase, GeneralizedAlphaExplicit, GeneralizedAlpha, and GSSSS.

Here is the caller graph for this function:

◆ get_reference_load()

sp_mat Integrator::get_reference_load ( )
virtual

Reimplemented in GeneralizedAlphaExplicit, GeneralizedAlpha, and GSSSS.

Here is the caller graph for this function:

◆ get_trial_displacement()

const vec & Integrator::get_trial_displacement ( ) const
virtual

Reimplemented in ExplicitIntegrator.

◆ has_corrector()

bool Integrator::has_corrector ( ) const
protectedvirtual

Indicate whether the integrator has a corrector. Some time integration methods adopt predictor-corrector type scheme. The final committed state is different from the one used in computation. Override this method to indicate whether the integrator has a corrector. If it returns true, the correct_trial_status() method will be called thus has to be implemented.

Reimplemented in BatheExplicit, GeneralizedAlphaExplicit, GERKN, and GSSE.

Here is the caller graph for this function:

◆ initialize()

int Integrator::initialize ( )
virtual

Reimplemented in LeeNewmark, LeeNewmarkBase, LeeNewmarkFull, LeeNewmarkIterative, NonviscousNewmark, and WilsonPenzienNewmark.

Here is the caller graph for this function:

◆ matrix_is_assembled()

bool Integrator::matrix_is_assembled ( ) const

◆ process_constraint()

int Integrator::process_constraint ( )
virtual

The main task of this method is to apply constraints (of various forms implemented in various methods). Combinations of different types need to be considered: 1) homogeneous, 2) inhomogeneous, 3) linear, 4) nonlinear. Combinations of different methods need to be considered: 1) penalty, 2) multiplier. On exit, the global stiffness matrix should be updated, the global residual vector should be updated.

Reimplemented in LeeNewmark, LeeNewmarkFull, LeeNewmarkIterative, and WilsonPenzienNewmark.

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

◆ process_constraint_impl()

int Integrator::process_constraint_impl ( bool  full)
protectedvirtual

Reimplemented in GeneralizedAlphaExplicit, GERKN, GSSE, GeneralizedAlpha, and GSSSS.

Here is the caller graph for this function:

◆ process_constraint_resistance()

int Integrator::process_constraint_resistance ( )
virtual

This method is similar to process_constraint(), but it only updates the global residual vector. The global stiffness matrix is not touched as in some solving schemes, the global stiffness matrix is only assembled and factorised once at the beginning. Subsequent iterations do not assemble the global stiffness matrix again and reuse the factorised matrix. In this case, the factorised matrix cannot be modified.

Reimplemented in LeeNewmark, LeeNewmarkFull, and LeeNewmarkIterative.

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

◆ process_criterion()

int Integrator::process_criterion ( ) const

◆ process_load()

int Integrator::process_load ( )
Here is the call graph for this function:

◆ process_load_impl()

int Integrator::process_load_impl ( bool  full)
protectedvirtual

Reimplemented in GeneralizedAlphaExplicit, GERKN, GSSE, GeneralizedAlpha, and GSSSS.

Here is the caller graph for this function:

◆ process_load_resistance()

int Integrator::process_load_resistance ( )
Here is the call graph for this function:

◆ process_modifier()

int Integrator::process_modifier ( ) const
Here is the caller graph for this function:

◆ record()

void Integrator::record ( ) const

◆ reset_status()

void Integrator::reset_status ( )
virtual

Reimplemented in LeeNewmarkBase, and WilsonPenzienNewmark.

Here is the caller graph for this function:

◆ set_domain()

void Integrator::set_domain ( const std::weak_ptr< DomainBase > &  D)

◆ set_matrix_assembled_switch()

void Integrator::set_matrix_assembled_switch ( )

◆ set_time_step_switch()

void Integrator::set_time_step_switch ( bool  T)
Here is the caller graph for this function:

◆ solve() [1/8]

mat Integrator::solve ( const mat &  B)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ solve() [2/8]

mat Integrator::solve ( const sp_mat &  B)
Here is the call graph for this function:

◆ solve() [3/8]

mat Integrator::solve ( mat &&  B)
Here is the call graph for this function:

◆ solve() [4/8]

int Integrator::solve ( mat &  X,
const mat &  B 
)
virtual

◆ solve() [5/8]

int Integrator::solve ( mat &  X,
const sp_mat &  B 
)
virtual

◆ solve() [6/8]

int Integrator::solve ( mat &  X,
mat &&  B 
)
virtual

◆ solve() [7/8]

int Integrator::solve ( mat &  X,
sp_mat &&  B 
)
virtual

◆ solve() [8/8]

mat Integrator::solve ( sp_mat &&  B)
Here is the call graph for this function:

◆ stage_and_commit_status()

void Integrator::stage_and_commit_status ( )
Here is the call graph for this function:

◆ stage_status()

void Integrator::stage_status ( ) const
Here is the caller graph for this function:

◆ sync_status()

int Integrator::sync_status ( bool  only_correct)

When a new displacement increment is computed, it is added to global displacement vector. At this moment, nodal and elemental quantities are all computed from the previous displacement vector, directly committing the new results causes out-of-sync issue. Some algorithms use predictor-corrector type scheme, which means the converged quantities are different from the committed quantities. This method is in charge of syncing quantities between global and local quantities by updating nodal/elemental quantities using the committed quantities.

Here is the call graph for this function:

◆ time_independent_matrix()

bool Integrator::time_independent_matrix ( ) const
virtual

Indicate whether the matrix is independent of time, that is, the system does not change with time. This helps to determine whether the matrix needs to be reassembled. For single-step methods, it is typically true. For multistep methods, it is typically false.

Reimplemented in BatheTwoStep, and OALTS.

◆ type()

virtual Type Integrator::type ( ) const
inlinevirtual

Reimplemented in ImplicitIntegrator, and ExplicitIntegrator.

◆ update_constraint()

void Integrator::update_constraint ( ) const

◆ update_from_ninja()

void Integrator::update_from_ninja ( )
virtual

Reimplemented in ExplicitIntegrator.

Here is the call graph for this function:

◆ update_incre_time()

void Integrator::update_incre_time ( double  T)
virtual

Reimplemented in BatheExplicit, GERKN, and BatheTwoStep.

Here is the call graph for this function:

◆ update_internal()

int Integrator::update_internal ( const mat &  )
virtual

Some algorithms solve a system which differs from the original one. The size of the problem changes thus the computed increment contains additional internal quantities. This method updates internal quantities stored in those integrators.

Reimplemented in LeeNewmarkBase.

◆ update_load()

void Integrator::update_load ( ) const

◆ update_parameter()

void Integrator::update_parameter ( double  )
protectedvirtual

When time step changes, some parameters may need to be updated.

Reimplemented in BatheExplicit, GeneralizedAlphaExplicit, GERKN, GSSE, Tchamwa, BatheTwoStep, GeneralizedAlpha, GSSSS, Newmark, NonviscousNewmark, and OALTS.

Here is the caller graph for this function:

◆ update_trial_load_factor() [1/2]

void Integrator::update_trial_load_factor ( const vec &  lambda) const
Here is the call graph for this function:

◆ update_trial_load_factor() [2/2]

void Integrator::update_trial_load_factor ( double  lambda) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_trial_status()

int Integrator::update_trial_status ( bool  detect_trivial)
virtual

Reimplemented in BatheExplicit, GeneralizedAlphaExplicit, GERKN, GSSE, Tchamwa, BatheTwoStep, GeneralizedAlpha, GSSSS, Newmark, and OALTS.

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

◆ update_trial_time()

void Integrator::update_trial_time ( double  T)
Here is the call graph for this function:

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