38 #include <Eigen/Dense> 62 Element(std::string name,
const std::vector<unsigned int> nodes,
unsigned int ndofs,
unsigned int VTKcell,
unsigned int SVLcell);
87 virtual void SetDomain(std::map<
unsigned int, std::shared_ptr<Node> > &nodes) = 0;
92 virtual void SetDamping(
const std::shared_ptr<Damping> &damping) = 0;
101 virtual Eigen::MatrixXd
GetStrain()
const = 0;
106 virtual Eigen::MatrixXd
GetStress()
const = 0;
118 virtual Eigen::MatrixXd
GetStrainAt(
double x3=0.0,
double x2=0.0)
const = 0;
125 virtual Eigen::MatrixXd
GetStressAt(
double x3=0.0,
double x2=0.0)
const = 0;
131 virtual Eigen::VectorXd
GetVTKResponse(std::string response)
const = 0;
179 virtual Eigen::VectorXd
ComputeSurfaceForces(
const std::shared_ptr<Load> &surface,
unsigned int k) = 0;
187 virtual Eigen::VectorXd
ComputeBodyForces(
const std::shared_ptr<Load> &body,
unsigned int k=0) = 0;
225 const std::vector<unsigned int>&
GetNodes()
const;
229 bool HasFixedNode(
const std::vector<std::shared_ptr<Node> > &nodes)
const;
virtual Eigen::MatrixXd GetStrainAt(double x3=0.0, double x2=0.0) const =0
Gets the material strain in section at coordinate (x3,x2).
virtual Eigen::VectorXd ComputeInternalDynamicForces()=0
Compute the elastic, inertial, and viscous forces acting on the element.
virtual Eigen::MatrixXd ComputeStiffnessMatrix()=0
Compute the stiffness matrix of the element using gauss-integration or close form solutions...
unsigned int GetNumberOfNodes() const
Returns the number of nodes in element.
This file contains the "Load" class declarations, which defines a load that can act in a node or an e...
virtual void ReverseState()=0
Reverse the material/section states to previous converged state in this element.
virtual Eigen::VectorXd ComputeInternalForces()=0
Compute the internal forces acting on the element.
std::vector< unsigned int > Nodes
The node connectivity indexes.
Definition: Element.hpp:248
std::string GetName() const
Gets the Element Name.
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.
virtual double ComputeEnergy()=0
Computes the element energy for a given deformation.
unsigned int GetVTKGroupType() const
Gets the Element VTK group type.
virtual void SetDomain(std::map< unsigned int, std::shared_ptr< Node > > &nodes)=0
Sets the finite element dependance among objects.
unsigned int SVLCell
The SeismoVLAB element type.
Definition: Element.hpp:239
bool HasFixedNode(const std::vector< std::shared_ptr< Node > > &nodes) const
Returns if the element has fixed nodes.
virtual void SetDamping(const std::shared_ptr< Damping > &damping)=0
Sets the damping model.
virtual Eigen::VectorXd ComputeSurfaceForces(const std::shared_ptr< Load > &surface, unsigned int k)=0
Compute the surface forces acting on the element.
virtual void InitialState()=0
Brings the material/section state to its initial state in this element.
virtual std::vector< unsigned int > GetTotalDegreeOfFreedom() const =0
Gets the list of total-degree of freedom of this Element.
virtual void UpdateState()=0
Update the material/section states in the element.
virtual Eigen::MatrixXd GetStress() const =0
Gets the material/section (generalised) stress.
unsigned int NumberOfDegreeOfFreedom
The number of nodes in element.
Definition: Element.hpp:245
const std::vector< unsigned int > & GetNodes() const
Returns the Node Connectivity Indexes.
Virtual class for creating an element in a mesh.
Definition: Element.hpp:51
virtual Eigen::VectorXd ComputeBodyForces(const std::shared_ptr< Load > &body, unsigned int k=0)=0
Compute the body forces acting on the element.
unsigned int GetVTKCellType() const
Gets the Element VTK cell type.
virtual Eigen::VectorXd GetVTKResponse(std::string response) const =0
Gets the element internal response in VTK format for Paraview display.
virtual ~Element()=0
Destroys this Element object.
virtual Eigen::MatrixXd GetStressAt(double x3=0.0, double x2=0.0) const =0
Gets the material stress in section at coordinate (x3,x2).
This file contains the "Node object" declarations, which is stores the coordinates, state variables, degrees-of-freedom, and total-degree of freedom lists of a node in a finite element mesh.
virtual Eigen::MatrixXd ComputeDampingMatrix()=0
Compute the damping matrix of the element using gauss-integration or close form solutions.
This file contains the "Damping object" declarations to update damping matrix to account for Caughey-...
unsigned int NumberOfNodes
The number of nodes in element.
Definition: Element.hpp:242
virtual void CommitState()=0
Save the material/section states in the element.
virtual Eigen::MatrixXd GetStrain() const =0
Gets the material/section (generalised) strain.
virtual Eigen::MatrixXd GetStrainRate() const =0
Gets the material/section (generalised) strain-rate.
unsigned int VTKCell
The VTK element number.
Definition: Element.hpp:236
virtual Eigen::MatrixXd ComputeMassMatrix()=0
Compute the lumped/consistent mass matrix of the element or close form solutions. ...
unsigned int GetNumberOfDegreeOfFreedom() const
Returns total number of degree of freedom in the element.
std::string Name
The element name.
Definition: Element.hpp:233
virtual Eigen::MatrixXd ComputePMLMatrix()=0
Compute the PML history matrix for Perfectly-Matched Layer (PML).
virtual Eigen::VectorXd ComputeDomainReductionForces(const std::shared_ptr< Load > &drm, unsigned int k)=0
Compute the domain reduction forces acting on the element.