16 #ifndef SURGSIM_PHYSICS_FEMELEMENT_H 17 #define SURGSIM_PHYSICS_FEMELEMENT_H 65 size_t getNumDofPerNode()
const;
69 size_t getNumNodes()
const;
73 size_t getNodeId(
size_t elementNodeId)
const;
77 const std::vector<size_t>& getNodeIds()
const;
81 void setYoungModulus(
double E);
84 double getYoungModulus()
const;
88 void setPoissonRatio(
double nu);
91 double getPoissonRatio()
const;
95 void setMassDensity(
double rho);
98 double getMassDensity()
const;
166 virtual void addMatVec(
double alphaM,
double alphaD,
double alphaK,
202 template <
typename DerivedSub,
typename T,
int Opt,
typename Index>
203 void assembleMatrixBlocks(
const DerivedSub& subMatrix,
const std::vector<size_t> blockIds,
204 size_t blockSize, Eigen::SparseMatrix<T, Opt, Index>* matrix,
205 bool initialize =
true)
const;
217 void setNumDofPerNode(
size_t numDofPerNode);
222 virtual void doUpdateFMDK(
const Math::OdeState& state,
int options) = 0;
225 void initializeFMDK();
228 virtual void doInitializeFMDK();
271 #endif // SURGSIM_PHYSICS_FEMELEMENT_H Definition: CompoundShapeToGraphics.cpp:29
size_t m_numDofPerNode
Number of degree of freedom per node for this element.
Definition: FemElement.h:231
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
double m_nu
Poisson ratio (unitless)
Definition: FemElement.h:243
SurgSim::Framework::ObjectFactory1< FemElement, std::shared_ptr< FemElementStructs::FemElementParameter > > FactoryType
Definition: FemElement.h:59
SurgSim::Math::Matrix m_D
The damping matrix.
Definition: FemElement.h:252
SurgSim::Math::Matrix m_K
The stiffness matrix.
Definition: FemElement.h:258
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
Base class for all Fem Element (1D, 2D, 3D) It handles the node ids to which it is connected and requ...
Definition: FemElement.h:45
Definitions of useful sparse matrix functions.
double m_rho
Mass density (in Kg.m-3)
Definition: FemElement.h:237
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
SurgSim::Math::Vector m_f
The force vector.
Definition: FemElement.h:246
double m_E
Young modulus (in N.m-2)
Definition: FemElement.h:240
SurgSim::Math::Matrix m_M
The mass matrix.
Definition: FemElement.h:249
Definitions of small fixed-size square matrix types.
Definitions of small fixed-size vector types.
std::vector< size_t > m_nodeIds
Node ids connected by this element.
Definition: FemElement.h:234
bool m_initializedFMDK
Flag to check in the f, M, D, K variables have been initialized.
Definition: FemElement.h:262
bool m_useDamping
Flag to specify of the damping is used.
Definition: FemElement.h:255
An object factory, once a class is registered with the factory it can be used to create instances of ...
Definition: ObjectFactory.h:83