Seismo-VLAB  1.3
An Open-Source Finite Element Software for Meso-Scale Simulations
CentralDifference Class Reference

Class for integrating the equation of motion using an explicit central difference method. More...

#include <CentralDifference.hpp>

Inheritance diagram for CentralDifference:
Collaboration diagram for CentralDifference:

Public Member Functions

 CentralDifference (std::shared_ptr< Mesh > &mesh, double TimeStep, double mtol=1E-12, double ktol=1E-12, double ftol=1E-12)
 Creates a CentralDifference object. More...
 
 ~CentralDifference ()
 Destroys this CentralDifference object. More...
 
void Initialize (std::shared_ptr< Mesh > &mesh)
 Initialize model matrices. More...
 
void SetLoadCombination (std::shared_ptr< LoadCombo > &combo)
 Set the load combination. More...
 
void SetAlgorithm (std::shared_ptr< Algorithm > &algorithm)
 Sets the integrator for this algorithm. More...
 
const Eigen::VectorXd & GetDisplacements ()
 Gets the displacement vector. More...
 
const Eigen::VectorXd & GetVelocities ()
 Gets the velocity vector. More...
 
const Eigen::VectorXd & GetAccelerations ()
 Gets the acceleration vector. More...
 
const Eigen::VectorXd & GetPMLHistoryVector ()
 Gets the PML history vector. More...
 
bool ComputeNewStep (std::shared_ptr< Mesh > &mesh, unsigned int k=0)
 Computes a new time step. More...
 
Eigen::VectorXd ComputeReactionForce (std::shared_ptr< Mesh > &mesh, unsigned int k=0)
 Gets the reaction force ins this step. More...
 
Eigen::VectorXd ComputeProgressiveForce (std::shared_ptr< Mesh > &mesh, unsigned int k=0)
 Gets the external force vector from previous analysis. More...
 
void ComputeSupportMotionVector (std::shared_ptr< Mesh > &mesh, Eigen::VectorXd &Feff, double factor=1.00, unsigned int k=0)
 Gets the incremental nodal support motion vector. More...
 
void ComputeEffectiveForce (std::shared_ptr< Mesh > &mesh, Eigen::VectorXd &Feff, double factor=1.00, unsigned int k=0)
 Gets the effective force associated to the CentralDifference integrator. More...
 
void ComputeEffectiveStiffness (std::shared_ptr< Mesh > &mesh, Eigen::SparseMatrix< double > &Keff)
 Gets the effective stiffness associated to the CentralDifference integrator. More...
 
- Public Member Functions inherited from Integrator
 Integrator (const std::shared_ptr< Mesh > &mesh)
 Creates a Integrator object. More...
 
virtual ~Integrator ()=0
 Destroys this Integrator object. More...
 

Protected Attributes

double dt
 Integration time step. More...
 
Eigen::VectorXd U
 Total current displacements. More...
 
Eigen::VectorXd V
 Total current velocity. More...
 
Eigen::VectorXd A
 Total current acceleration. More...
 
Eigen::VectorXd Up
 Total previous displacements (t - dt). More...
 
Eigen::VectorXd Ubar
 Total previous pml history values. More...
 
Eigen::VectorXd Fbar
 The previous stage Force vector. More...
 
Eigen::SparseMatrix< double > M
 Model mass matrix. More...
 
Eigen::SparseMatrix< double > C
 Model damping matrix. More...
 
Eigen::SparseMatrix< double > K
 Model stiffness matrix. More...
 
std::weak_ptr< AlgorithmtheAlgorithm
 The static solver algorithm. More...
 
std::unique_ptr< AssemblertheAssembler
 The finite element assembler. More...
 
- Protected Attributes inherited from Integrator
Eigen::VectorXd SupportMotion
 Nodal support motion vector. More...
 
Eigen::SparseMatrix< double > Total2FreeMatrix
 Operator that enforced restrain/constraint. More...
 

Detailed Description

Class for integrating the equation of motion using an explicit central difference method.

See also
Algorithm.hpp Integrator.hpp Analysis.hpp

Constructor & Destructor Documentation

◆ CentralDifference()

CentralDifference::CentralDifference ( std::shared_ptr< Mesh > &  mesh,
double  TimeStep,
double  mtol = 1E-12,
double  ktol = 1E-12,
double  ftol = 1E-12 
)

Creates a CentralDifference object.

Parameters
meshPointer to the Mesh container to extract Node and Element.
mtolThreshold for which a mass value will be neglected.
ktolThreshold for which a stiffness value will be neglected.
ftolThreshold for which a force value will be neglected.
Note
More details can be found at CentralDifference.
See also
Assembler::MassTolerance, Assembler::StiffnessTolerance, Assembler::ForceTolerance.

◆ ~CentralDifference()

CentralDifference::~CentralDifference ( )

Destroys this CentralDifference object.

Member Function Documentation

◆ ComputeEffectiveForce()

void CentralDifference::ComputeEffectiveForce ( std::shared_ptr< Mesh > &  mesh,
Eigen::VectorXd &  Feff,
double  factor = 1.00,
unsigned int  k = 0 
)
virtual

Gets the effective force associated to the CentralDifference integrator.

Parameters
meshPointer to the Mesh object where Node and Element are stored.
FeffVector that stores the effective force.
factorThe incremental load factor.
kThe time step number to be solved.
Note
More details can be found at CentralDifference.
See also
Assembler::ComputeInternalForceVector(), Assembler::ComputeExternalForceVector().

Implements Integrator.

◆ ComputeEffectiveStiffness()

void CentralDifference::ComputeEffectiveStiffness ( std::shared_ptr< Mesh > &  mesh,
Eigen::SparseMatrix< double > &  Keff 
)
virtual

Gets the effective stiffness associated to the CentralDifference integrator.

Parameters
meshPointer to the Mesh object where Node and Element are stored.
KeffMatrix that stores the effective stiffness.
Note
More details can be found at CentralDifference.
See also
Assembler::ComputeMassMatrix(), Assembler::ComputeStiffnessMatrix(), Assembler::ComputeDampingMatrix().

Implements Integrator.

◆ ComputeNewStep()

bool CentralDifference::ComputeNewStep ( std::shared_ptr< Mesh > &  mesh,
unsigned int  k = 0 
)
virtual

Computes a new time step.

Parameters
meshThe finite element Mesh object.
kThe time step number to be solved.
Returns
Whether or not the Integrator was successfully applied.

Implements Integrator.

◆ ComputeProgressiveForce()

Eigen::VectorXd CentralDifference::ComputeProgressiveForce ( std::shared_ptr< Mesh > &  mesh,
unsigned int  k = 0 
)
virtual

Gets the external force vector from previous analysis.

Parameters
meshPointer to the Mesh object where Node and Element are stored.
kThe time step number to be solved.
See also
Assembler::ComputeExternalForceVector().

Implements Integrator.

◆ ComputeReactionForce()

Eigen::VectorXd CentralDifference::ComputeReactionForce ( std::shared_ptr< Mesh > &  mesh,
unsigned int  k = 0 
)
virtual

Gets the reaction force ins this step.

Parameters
meshPointer to the Mesh object where Node are stored.
kThe time step number to be solved.
Returns
Vector with the reaction forces and external forces.
Note
More details can be found at Reaction.
See also
Node::GetReaction(), Assembler::ComputeDynamicInternalForceVector().

Implements Integrator.

◆ ComputeSupportMotionVector()

void CentralDifference::ComputeSupportMotionVector ( std::shared_ptr< Mesh > &  mesh,
Eigen::VectorXd &  Feff,
double  factor = 1.00,
unsigned int  k = 0 
)
virtual

Gets the incremental nodal support motion vector.

Parameters
meshPointer to the Mesh object where Node are stored.
FeffThe effective force vector to incorporate support motion forces.
factorThe incremental load factor.
kThe time step number to be solved.
Returns
Vector with the incremental support motion displacement.
See also
Node::GetSupportMotion(), Assembler::ComputeSupportMotionIncrement().

Implements Integrator.

◆ GetAccelerations()

const Eigen::VectorXd& CentralDifference::GetAccelerations ( )
virtual

Gets the acceleration vector.

Returns
Vector with the acceleration states at current time step.
Note
More details can be found at CentralDifference.

Implements Integrator.

◆ GetDisplacements()

const Eigen::VectorXd& CentralDifference::GetDisplacements ( )
virtual

Gets the displacement vector.

Returns
Vector with the displacement states at current time step.
Note
More details can be found at CentralDifference.

Implements Integrator.

◆ GetPMLHistoryVector()

const Eigen::VectorXd& CentralDifference::GetPMLHistoryVector ( )
virtual

Gets the PML history vector.

Returns
Vector with the displacement states at current time step.
Note
More details can be found at ExtendedNewmarkBeta.

Implements Integrator.

◆ GetVelocities()

const Eigen::VectorXd& CentralDifference::GetVelocities ( )
virtual

Gets the velocity vector.

Returns
Vector with the velocity states at current time step.
Note
More details can be found at CentralDifference.

Implements Integrator.

◆ Initialize()

void CentralDifference::Initialize ( std::shared_ptr< Mesh > &  mesh)
virtual

Initialize model matrices.

Parameters
meshPointer to the Mesh container to extract Node and Element.
Note
This function computes matrices that are constant through the analysis.

Implements Integrator.

◆ SetAlgorithm()

void CentralDifference::SetAlgorithm ( std::shared_ptr< Algorithm > &  algorithm)
virtual

Sets the integrator for this algorithm.

Parameters
algorithmPointer to the Algorithm to obtain the effective stiffness and force.

Implements Integrator.

◆ SetLoadCombination()

void CentralDifference::SetLoadCombination ( std::shared_ptr< LoadCombo > &  combo)
virtual

Set the load combination.

Parameters
comboPointer to the LoadCombo to be simulated.

Implements Integrator.

Member Data Documentation

◆ A

Eigen::VectorXd CentralDifference::A
protected

Total current acceleration.

◆ C

Eigen::SparseMatrix<double> CentralDifference::C
protected

Model damping matrix.

◆ dt

double CentralDifference::dt
protected

Integration time step.

◆ Fbar

Eigen::VectorXd CentralDifference::Fbar
protected

The previous stage Force vector.

◆ K

Eigen::SparseMatrix<double> CentralDifference::K
protected

Model stiffness matrix.

◆ M

Eigen::SparseMatrix<double> CentralDifference::M
protected

Model mass matrix.

◆ theAlgorithm

std::weak_ptr<Algorithm> CentralDifference::theAlgorithm
protected

The static solver algorithm.

◆ theAssembler

std::unique_ptr<Assembler> CentralDifference::theAssembler
protected

The finite element assembler.

◆ U

Eigen::VectorXd CentralDifference::U
protected

Total current displacements.

◆ Ubar

Eigen::VectorXd CentralDifference::Ubar
protected

Total previous pml history values.

◆ Up

Eigen::VectorXd CentralDifference::Up
protected

Total previous displacements (t - dt).

◆ V

Eigen::VectorXd CentralDifference::V
protected

Total current velocity.