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

Class for assembling the finite element matrices and vector. More...

#include <Assembler.hpp>

Public Member Functions

 Assembler ()
 Creates an Assembler object. More...
 
 ~Assembler ()
 Destroys this Assembler object. More...
 
void SetMassTolerance (double tol)
 Set the mass assembly allowed tolerance. More...
 
void SetForceTolerance (double tol)
 Set the mass assembly allowed tolerance. More...
 
void SetStiffnessTolerance (double tol)
 Set the stiffness assembly allowed tolerance. More...
 
void SetLoadCombination (std::shared_ptr< LoadCombo > &combo)
 Sets the load combination to be used. More...
 
Eigen::SparseMatrix< double > ComputeMassMatrix (std::shared_ptr< Mesh > &mesh)
 Assemble the mass matrix. More...
 
Eigen::SparseMatrix< double > ComputeStiffnessMatrix (std::shared_ptr< Mesh > &mesh)
 Assemble the stiffness matrix. More...
 
Eigen::SparseMatrix< double > ComputeDampingMatrix (std::shared_ptr< Mesh > &mesh)
 Assemble the stiffness matrix. More...
 
Eigen::SparseMatrix< double > ComputePMLHistoryMatrix (std::shared_ptr< Mesh > &mesh)
 Assemble the integrated history matrix for Perfectly-Matched Layer (PML). More...
 
Eigen::VectorXd ComputeProgressiveForceVector (std::shared_ptr< Mesh > &mesh)
 Assemble the external force vector accumulated from previous analyses. More...
 
Eigen::VectorXd ComputeInternalForceVector (std::shared_ptr< Mesh > &mesh)
 Assemble the internal force vector. More...
 
Eigen::VectorXd ComputeDynamicInternalForceVector (std::shared_ptr< Mesh > &mesh)
 Assemble the internal elastic, inertial, and viscous force vector. More...
 
Eigen::VectorXd ComputeExternalForceVector (std::shared_ptr< Mesh > &mesh, unsigned int k)
 Assemble the external force vector. More...
 
Eigen::VectorXd ComputeSupportMotionIncrement (std::shared_ptr< Mesh > &mesh, unsigned int k)
 Assemble the support motion displacement vector. More...
 
Eigen::VectorXd ComputePMLHistoryVector (std::shared_ptr< Mesh > &mesh)
 Assemble the integrated history vector for Perfectly-Matched Layer (PML). More...
 

Protected Member Functions

void AddNodeInertiaForces (std::shared_ptr< Mesh > &mesh, Eigen::VectorXd &DynamicForces)
 Adds the inertial forces contribution associated to the nodes. More...
 
void AddElementDynamicForces (std::shared_ptr< Mesh > &mesh, Eigen::VectorXd &DynamicForces)
 Adds the elastic, inertial, and viscous forces associated to the elements. More...
 
void AssembleNodalMass (std::shared_ptr< Mesh > &mesh, Eigen::SparseMatrix< double > &nodemass)
 Assemble Nodal Mass matrix. More...
 
void AssembleElementMass (std::shared_ptr< Mesh > &mesh, Eigen::SparseMatrix< double > &elemmass)
 Assemble Element Mass matrix. More...
 

Private Attributes

double MassTolerance
 Define mass tolerance. More...
 
double StiffnessTolerance
 Define stiffness tolerance. More...
 
double ForceTolerance
 Define stiffness tolerance. More...
 
std::shared_ptr< LoadComboLoadCombination
 Load combination number. More...
 

Detailed Description

Class for assembling the finite element matrices and vector.

See also
QuasiStatic.hpp CentralDifference.hpp NewmarkBeta.hpp

Constructor & Destructor Documentation

◆ Assembler()

Assembler::Assembler ( )

Creates an Assembler object.

Note
More details can be found at Assembler.

◆ ~Assembler()

Assembler::~Assembler ( )

Destroys this Assembler object.

Member Function Documentation

◆ AddElementDynamicForces()

void Assembler::AddElementDynamicForces ( std::shared_ptr< Mesh > &  mesh,
Eigen::VectorXd &  DynamicForces 
)
protected

Adds the elastic, inertial, and viscous forces associated to the elements.

Parameters
meshThe finite element Mesh object.
DynamicForcesThe vector with the Element dynamic internal forces.
See also
Element, Element::ComputeInternalDynamicForces().

◆ AddNodeInertiaForces()

void Assembler::AddNodeInertiaForces ( std::shared_ptr< Mesh > &  mesh,
Eigen::VectorXd &  DynamicForces 
)
protected

Adds the inertial forces contribution associated to the nodes.

Parameters
meshThe finite element Mesh object.
DynamicForcesThe vector with the node inertial forces.
See also
Node, Node::GetInertialForces().

◆ AssembleElementMass()

void Assembler::AssembleElementMass ( std::shared_ptr< Mesh > &  mesh,
Eigen::SparseMatrix< double > &  elemmass 
)
protected

Assemble Element Mass matrix.

Parameters
meshThe finite element Mesh object.
elemmassA matrix that stores the Element mass contribution.
See also
Element, Element::ComputeMassMatrix().

◆ AssembleNodalMass()

void Assembler::AssembleNodalMass ( std::shared_ptr< Mesh > &  mesh,
Eigen::SparseMatrix< double > &  nodemass 
)
protected

Assemble Nodal Mass matrix.

Parameters
meshThe finite element Mesh object.
nodemassA matrix that stores the Node mass contribution.
See also
Node, Node::GetMass().

◆ ComputeDampingMatrix()

Eigen::SparseMatrix<double> Assembler::ComputeDampingMatrix ( std::shared_ptr< Mesh > &  mesh)

Assemble the stiffness matrix.

Parameters
meshThe finite element Mesh object.
Returns
A matrix with the model damping.
Note
More details can be found at Assembler.
See also
Element::ComputeDampingMatrix(), Integrator::ComputeEffectiveStiffness().

◆ ComputeDynamicInternalForceVector()

Eigen::VectorXd Assembler::ComputeDynamicInternalForceVector ( std::shared_ptr< Mesh > &  mesh)

Assemble the internal elastic, inertial, and viscous force vector.

Parameters
meshThe finite element Mesh object. return A vector with the model total (inertial, viscous, elastic) internal force.
See also
Element::ComputeInternalDynamicForces().

◆ ComputeExternalForceVector()

Eigen::VectorXd Assembler::ComputeExternalForceVector ( std::shared_ptr< Mesh > &  mesh,
unsigned int  k 
)

Assemble the external force vector.

Parameters
meshThe finite element Mesh object.
kThe time step when the force is evaluated.
Returns
A vector with the model total external force.
Note
More details can be found at Assembler.
See also
Element::ComputeSurfaceForces(), Element::ComputeBodyForces(), Integrator::ComputeEffectiveForce().

◆ ComputeInternalForceVector()

Eigen::VectorXd Assembler::ComputeInternalForceVector ( std::shared_ptr< Mesh > &  mesh)

Assemble the internal force vector.

Parameters
meshThe finite element Mesh object. return A vector with the model total internal force.
See also
Element::ComputeInternalForces(), Integrator::ComputeEffectiveForce().

◆ ComputeMassMatrix()

Eigen::SparseMatrix<double> Assembler::ComputeMassMatrix ( std::shared_ptr< Mesh > &  mesh)

Assemble the mass matrix.

Parameters
meshThe finite element Mesh object. return A matrix with the model mass.
Note
More details can be found at Assembler.
See also
Element::ComputeMassMatrix(), Integrator::ComputeEffectiveStiffness().

◆ ComputePMLHistoryMatrix()

Eigen::SparseMatrix<double> Assembler::ComputePMLHistoryMatrix ( std::shared_ptr< Mesh > &  mesh)

Assemble the integrated history matrix for Perfectly-Matched Layer (PML).

Parameters
meshThe finite element Mesh object.
Returns
A vector with the PML history values.
Note
More details can be found at Assembler.
See also
Element::ComputeDampingMatrix(), Integrator::ComputeEffectiveStiffness().

◆ ComputePMLHistoryVector()

Eigen::VectorXd Assembler::ComputePMLHistoryVector ( std::shared_ptr< Mesh > &  mesh)

Assemble the integrated history vector for Perfectly-Matched Layer (PML).

Parameters
meshThe finite element Mesh object.
Returns
A vector with the PML history values.
See also
Integrator::ComputeEffectiveForce(), Integrator::ComputeEffectiveStiffness()

◆ ComputeProgressiveForceVector()

Eigen::VectorXd Assembler::ComputeProgressiveForceVector ( std::shared_ptr< Mesh > &  mesh)

Assemble the external force vector accumulated from previous analyses.

Parameters
meshThe finite element Mesh object.
Returns
A vector with the total accumulated external force.
Note
More details can be found at Assembler.
See also
Integrator::ComputeEffectiveForce().

◆ ComputeStiffnessMatrix()

Eigen::SparseMatrix<double> Assembler::ComputeStiffnessMatrix ( std::shared_ptr< Mesh > &  mesh)

Assemble the stiffness matrix.

Parameters
meshThe finite element Mesh object.
Returns
A matrix with the model stiffness.
Note
More details can be found at Assembler.
See also
Element::ComputeStiffnessMatrix(), Integrator::ComputeEffectiveStiffness().

◆ ComputeSupportMotionIncrement()

Eigen::VectorXd Assembler::ComputeSupportMotionIncrement ( std::shared_ptr< Mesh > &  mesh,
unsigned int  k 
)

Assemble the support motion displacement vector.

Parameters
meshThe finite element Mesh object.
kThe time step when the support motion is evaluated.
Returns
A vector with the model support motion displacements.
See also
Integrator::ComputeEffectiveForce(), Integrator::ComputeEffectiveStiffness()

◆ SetForceTolerance()

void Assembler::SetForceTolerance ( double  tol)

Set the mass assembly allowed tolerance.

Parameters
tolThreshold for which a force value will be neglected.

◆ SetLoadCombination()

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

Sets the load combination to be used.

Parameters
comboPointer to the load combination to be simulated.

◆ SetMassTolerance()

void Assembler::SetMassTolerance ( double  tol)

Set the mass assembly allowed tolerance.

Parameters
tolThreshold for which a mass value will be neglected.

◆ SetStiffnessTolerance()

void Assembler::SetStiffnessTolerance ( double  tol)

Set the stiffness assembly allowed tolerance.

Parameters
tolThreshold for which a stiffness value will be neglected.

Member Data Documentation

◆ ForceTolerance

double Assembler::ForceTolerance
private

Define stiffness tolerance.

◆ LoadCombination

std::shared_ptr<LoadCombo> Assembler::LoadCombination
private

Load combination number.

◆ MassTolerance

double Assembler::MassTolerance
private

Define mass tolerance.

◆ StiffnessTolerance

double Assembler::StiffnessTolerance
private

Define stiffness tolerance.