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

Virtual class for creating an element in a mesh. More...

#include <Element.hpp>

Inheritance diagram for Element:
Collaboration diagram for Element:

Public Member Functions

 Element (std::string name, const std::vector< unsigned int > nodes, unsigned int ndofs, unsigned int VTKcell, unsigned int SVLcell)
 Creates an Element in a finite element Mesh. More...
 
virtual ~Element ()=0
 Destroys this Element object. More...
 
virtual void CommitState ()=0
 Save the material/section states in the element. More...
 
virtual void UpdateState ()=0
 Update the material/section states in the element. More...
 
virtual void ReverseState ()=0
 Reverse the material/section states to previous converged state in this element. More...
 
virtual void InitialState ()=0
 Brings the material/section state to its initial state in this element. More...
 
virtual void SetDomain (std::map< unsigned int, std::shared_ptr< Node > > &nodes)=0
 Sets the finite element dependance among objects. More...
 
virtual void SetDamping (const std::shared_ptr< Damping > &damping)=0
 Sets the damping model. More...
 
virtual std::vector< unsigned int > GetTotalDegreeOfFreedom () const =0
 Gets the list of total-degree of freedom of this Element. More...
 
virtual Eigen::MatrixXd GetStrain () const =0
 Gets the material/section (generalised) strain. More...
 
virtual Eigen::MatrixXd GetStress () const =0
 Gets the material/section (generalised) stress. More...
 
virtual Eigen::MatrixXd GetStrainRate () const =0
 Gets the material/section (generalised) strain-rate. More...
 
virtual Eigen::MatrixXd GetStrainAt (double x3=0.0, double x2=0.0) const =0
 Gets the material strain in section at coordinate (x3,x2). More...
 
virtual Eigen::MatrixXd GetStressAt (double x3=0.0, double x2=0.0) const =0
 Gets the material stress in section at coordinate (x3,x2). More...
 
virtual Eigen::VectorXd GetVTKResponse (std::string response) const =0
 Gets the element internal response in VTK format for Paraview display. More...
 
virtual double ComputeEnergy ()=0
 Computes the element energy for a given deformation. More...
 
virtual Eigen::MatrixXd ComputeMassMatrix ()=0
 Compute the lumped/consistent mass matrix of the element or close form solutions. More...
 
virtual Eigen::MatrixXd ComputeStiffnessMatrix ()=0
 Compute the stiffness matrix of the element using gauss-integration or close form solutions. More...
 
virtual Eigen::MatrixXd ComputeDampingMatrix ()=0
 Compute the damping matrix of the element using gauss-integration or close form solutions. More...
 
virtual Eigen::MatrixXd ComputePMLMatrix ()=0
 Compute the PML history matrix for Perfectly-Matched Layer (PML). More...
 
virtual Eigen::VectorXd ComputeInternalForces ()=0
 Compute the internal forces acting on the element. More...
 
virtual Eigen::VectorXd ComputeInternalDynamicForces ()=0
 Compute the elastic, inertial, and viscous forces acting on the element. More...
 
virtual Eigen::VectorXd ComputeSurfaceForces (const std::shared_ptr< Load > &surface, unsigned int k)=0
 Compute the surface forces acting on the element. More...
 
virtual Eigen::VectorXd ComputeBodyForces (const std::shared_ptr< Load > &body, unsigned int k=0)=0
 Compute the body forces acting on the element. More...
 
virtual Eigen::VectorXd ComputeDomainReductionForces (const std::shared_ptr< Load > &drm, unsigned int k)=0
 Compute the domain reduction forces acting on the element. More...
 
std::string GetName () const
 Gets the Element Name. More...
 
unsigned int GetVTKCellType () const
 Gets the Element VTK cell type. More...
 
unsigned int GetVTKGroupType () const
 Gets the Element VTK group type. More...
 
unsigned int GetNumberOfNodes () const
 Returns the number of nodes in element. More...
 
unsigned int GetNumberOfDegreeOfFreedom () const
 Returns total number of degree of freedom in the element. More...
 
const std::vector< unsigned int > & GetNodes () const
 Returns the Node Connectivity Indexes. More...
 
bool HasFixedNode (const std::vector< std::shared_ptr< Node > > &nodes) const
 Returns if the element has fixed nodes. More...
 

Private Attributes

std::string Name
 The element name. More...
 
unsigned int VTKCell
 The VTK element number. More...
 
unsigned int SVLCell
 The SeismoVLAB element type. More...
 
unsigned int NumberOfNodes
 The number of nodes in element. More...
 
unsigned int NumberOfDegreeOfFreedom
 The number of nodes in element. More...
 
std::vector< unsigned int > Nodes
 The node connectivity indexes. More...
 

Detailed Description

Virtual class for creating an element in a mesh.

See also
Mesh.hpp

Constructor & Destructor Documentation

◆ Element()

Element::Element ( std::string  name,
const std::vector< unsigned int >  nodes,
unsigned int  ndofs,
unsigned int  VTKcell,
unsigned int  SVLcell 
)

Creates an Element in a finite element Mesh.

Parameters
nameThe name of this Element object.
nodesThe Node connectivity array.
ndofsThe number of degree-of-freedom of the Element object.
VTKcellThe VTK cell number for Paraview display.
SVLcellThe SeismoVLAB element type for Paraview display.
Note
More details can be found at Element.
See also
Element::Name, Element::VTKCell, Element::NumberOfNodes, Element::Nodes.

◆ ~Element()

virtual Element::~Element ( )
pure virtual

Destroys this Element object.

Member Function Documentation

◆ CommitState()

virtual void Element::CommitState ( )
pure virtual

◆ ComputeBodyForces()

virtual Eigen::VectorXd Element::ComputeBodyForces ( const std::shared_ptr< Load > &  body,
unsigned int  k = 0 
)
pure virtual

Compute the body forces acting on the element.

Parameters
bodyPointer to the Load object that contains this information.
kThe time step at which the body load is evaluated.
Returns
Vector with the Element surface force.
Note
The body force vector can be revisited in Element.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ ComputeDampingMatrix()

virtual Eigen::MatrixXd Element::ComputeDampingMatrix ( )
pure virtual

◆ ComputeDomainReductionForces()

virtual Eigen::VectorXd Element::ComputeDomainReductionForces ( const std::shared_ptr< Load > &  drm,
unsigned int  k 
)
pure virtual

Compute the domain reduction forces acting on the element.

Parameters
drmPointer to the DRM Load object that contains this information.
kThe time step at which the body load is evaluated.
Returns
Vector with the Element domain reduction forces.
Note
The DRM force vector can be revisited in Element.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ ComputeEnergy()

◆ ComputeInternalDynamicForces()

virtual Eigen::VectorXd Element::ComputeInternalDynamicForces ( )
pure virtual

◆ ComputeInternalForces()

virtual Eigen::VectorXd Element::ComputeInternalForces ( )
pure virtual

◆ ComputeMassMatrix()

virtual Eigen::MatrixXd Element::ComputeMassMatrix ( )
pure virtual

◆ ComputePMLMatrix()

virtual Eigen::MatrixXd Element::ComputePMLMatrix ( )
pure virtual

◆ ComputeStiffnessMatrix()

virtual Eigen::MatrixXd Element::ComputeStiffnessMatrix ( )
pure virtual

◆ ComputeSurfaceForces()

virtual Eigen::VectorXd Element::ComputeSurfaceForces ( const std::shared_ptr< Load > &  surface,
unsigned int  k 
)
pure virtual

Compute the surface forces acting on the element.

Parameters
surfacePointer to the Load object that contains this information.
kThe time step at which the surface load is evaluated.
Returns
Vector with the Element surface force.
Note
The surface force vector can be revisited in Element.
See also
Assembler::ComputeExternalForceVector(), Integrator::ComputeEffectiveForce().

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetName()

std::string Element::GetName ( ) const

Gets the Element Name.

Returns
String with the Element name.
See also
Element::Name.

◆ GetNodes()

const std::vector<unsigned int>& Element::GetNodes ( ) const

Returns the Node Connectivity Indexes.

Returns
The Node connectivity array in this Element.
See also
Element::Nodes.

◆ GetNumberOfDegreeOfFreedom()

unsigned int Element::GetNumberOfDegreeOfFreedom ( ) const

Returns total number of degree of freedom in the element.

Returns
The number of degree-of-freedom in this Element.
See also
Element::NumberOfDegreeOfFreedom.

◆ GetNumberOfNodes()

unsigned int Element::GetNumberOfNodes ( ) const

Returns the number of nodes in element.

Returns
The number of Node in this Element.
See also
Element::NumberOfNodes.

◆ GetStrain()

virtual Eigen::MatrixXd Element::GetStrain ( ) const
pure virtual

Gets the material/section (generalised) strain.

Returns
Matrix with the strain at each integration point.
Note
The index (i,j) are the strain and Gauss-point respectively.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetStrainAt()

virtual Eigen::MatrixXd Element::GetStrainAt ( double  x3 = 0.0,
double  x2 = 0.0 
) const
pure virtual

Gets the material strain in section at coordinate (x3,x2).

Parameters
x3Local coordinate along the x3-axis.
x2Local coordinate along the x2-axis.
Returns
Matrix with the strain at coordinate (x3,x2).
Note
The strains are interpolated at this coordinate.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetStrainRate()

virtual Eigen::MatrixXd Element::GetStrainRate ( ) const
pure virtual

Gets the material/section (generalised) strain-rate.

Returns
Matrix with the strain-rate at each integration point.
Note
The index (i,j) are the strain-rate and Gauss-point respectively.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetStress()

virtual Eigen::MatrixXd Element::GetStress ( ) const
pure virtual

Gets the material/section (generalised) stress.

Returns
Matrix with the stress at each integration point.
Note
The index (i,j) are the stress and Gauss-point respectively.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetStressAt()

virtual Eigen::MatrixXd Element::GetStressAt ( double  x3 = 0.0,
double  x2 = 0.0 
) const
pure virtual

Gets the material stress in section at coordinate (x3,x2).

Parameters
x3Local coordinate along the x3-axis.
x2Local coordinate along the x2-axis.
Returns
Matrix with the stresses at coordinate (x3,x2).
Note
The stresses are interpolated at this coordinate.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ GetTotalDegreeOfFreedom()

virtual std::vector<unsigned int> Element::GetTotalDegreeOfFreedom ( ) const
pure virtual

◆ GetVTKCellType()

unsigned int Element::GetVTKCellType ( ) const

Gets the Element VTK cell type.

Returns
Value with the VTK cell type for Paraview.
See also
Element::VTKCell.

◆ GetVTKGroupType()

unsigned int Element::GetVTKGroupType ( ) const

Gets the Element VTK group type.

Returns
Value with the SVL cell type for Paraview.
See also
Element::SVLCell.

◆ GetVTKResponse()

virtual Eigen::VectorXd Element::GetVTKResponse ( std::string  response) const
pure virtual

Gets the element internal response in VTK format for Paraview display.

Parameters
responseThe response to be display in Paraview.
Returns
Vector with the response at the Element center.
Note
The current responses are: "Strain", "Stress".

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ HasFixedNode()

bool Element::HasFixedNode ( const std::vector< std::shared_ptr< Node > > &  nodes) const

Returns if the element has fixed nodes.

See also
Node::IsFixed.

◆ InitialState()

virtual void Element::InitialState ( )
pure virtual

◆ ReverseState()

virtual void Element::ReverseState ( )
pure virtual

Reverse the material/section states to previous converged state in this element.

Note
This function returns the trial states to previous converged states at the Material/Section level.

Implemented in TIEQlin2DQuad4, EQlin2DQuad4, lin3DShell4, UnxBoucWen2DLink, UnxBoucWen3DLink, lin3DFrame2, PML3DHexa8, PML2DQuad4, PML2DQuad8, lin2DTria3, lin2DTria6, lin2DQuad4, HDRBYamamoto2DLink, HDRBYamamoto3DLink, lin3DTruss3, lin2DFrame2, kin2DQuad4, lin2DQuad8, lin2DTruss3, kin2DFrame2, lin3DTetra10, lin3DTetra4, kin3DHexa8, lin3DHexa20, lin3DHexa8, kin2DTruss2, kin3DTruss2, lin2DTruss2, lin3DTruss2, ZeroLength1D, null2DFrame2, and null3DFrame2.

◆ SetDamping()

virtual void Element::SetDamping ( const std::shared_ptr< Damping > &  damping)
pure virtual

◆ SetDomain()

virtual void Element::SetDomain ( std::map< unsigned int, std::shared_ptr< Node > > &  nodes)
pure virtual

◆ UpdateState()

virtual void Element::UpdateState ( )
pure virtual

Member Data Documentation

◆ Name

std::string Element::Name
private

The element name.

◆ Nodes

std::vector<unsigned int> Element::Nodes
private

The node connectivity indexes.

◆ NumberOfDegreeOfFreedom

unsigned int Element::NumberOfDegreeOfFreedom
private

The number of nodes in element.

◆ NumberOfNodes

unsigned int Element::NumberOfNodes
private

The number of nodes in element.

◆ SVLCell

unsigned int Element::SVLCell
private

The SeismoVLAB element type.

◆ VTKCell

unsigned int Element::VTKCell
private

The VTK element number.