Fem3DElementCorotationalTetrahedron.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
17 #define SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
18 
21 
22 namespace SurgSim
23 {
24 
25 namespace Physics
26 {
27 SURGSIM_STATIC_REGISTRATION(Fem3DElementCorotationalTetrahedron);
28 
41 {
42 public:
45 
52  explicit Fem3DElementCorotationalTetrahedron(std::array<size_t, 4> nodeIds);
53 
61  explicit Fem3DElementCorotationalTetrahedron(std::shared_ptr<FemElementStructs::FemElementParameter> elementData);
62 
64 
65  void initialize(const SurgSim::Math::OdeState& state) override;
66 
67 protected:
74  Math::Matrix* Me, Math::Matrix* Ke) const;
75 
76  void doUpdateFMDK(const Math::OdeState& state, int options) override;
77 
81 
82  // The mass matrix of the linear tetrahedron
83  Eigen::Matrix<double, 12, 12> m_MLinear;
84 
85  // The stiffness matrix of the linear tetrahedron
86  Eigen::Matrix<double, 12, 12> m_KLinear;
87 
88  // The rotation matrix
90 };
91 
92 } // namespace Physics
93 
94 } // namespace SurgSim
95 
96 #endif // SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
SurgSim::Math::OdeState
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_KLinear
Eigen::Matrix< double, 12, 12 > m_KLinear
Definition: Fem3DElementCorotationalTetrahedron.h:86
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::doUpdateFMDK
void doUpdateFMDK(const Math::OdeState &state, int options) override
Update the FemElement based on the given state.
Definition: Fem3DElementCorotationalTetrahedron.cpp:78
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::initialize
void initialize(const SurgSim::Math::OdeState &state) override
Initialize the FemElement once everything has been set.
Definition: Fem3DElementCorotationalTetrahedron.cpp:49
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::SURGSIM_CLASSNAME
SURGSIM_CLASSNAME(SurgSim::Physics::Fem3DElementCorotationalTetrahedron)
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_Vinverse
SurgSim::Math::Matrix44d m_Vinverse
The constant inverse matrix of the undeformed tetrahedron homogeneous 4 points coordinates.
Definition: Fem3DElementCorotationalTetrahedron.h:80
SurgSim::Math::Matrix33d
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51
SurgSim::Math::Matrix44d
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > Matrix44d
A 4x4 matrix of doubles.
Definition: Matrix.h:55
RigidTransform.h
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::computeRotationMassAndStiffness
void computeRotationMassAndStiffness(const SurgSim::Math::OdeState &state, SurgSim::Math::Matrix33d *R, Math::Matrix *Me, Math::Matrix *Ke) const
Compute the rotation, mass and stiffness matrices of the element from the given state.
Definition: Fem3DElementCorotationalTetrahedron.cpp:117
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::Fem3DElementCorotationalTetrahedron
Fem3DElementCorotationalTetrahedron()
Constructor.
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_MLinear
Eigen::Matrix< double, 12, 12 > m_MLinear
Definition: Fem3DElementCorotationalTetrahedron.h:83
Fem3DElementTetrahedron.h
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_R
SurgSim::Math::Matrix33d m_R
Definition: Fem3DElementCorotationalTetrahedron.h:89
SurgSim::Physics::Fem3DElementCorotationalTetrahedron
Fem Element 3D co-rotational based on a tetrahedron volume discretization.
Definition: Fem3DElementCorotationalTetrahedron.h:40
SurgSim::Physics::Fem3DElementTetrahedron
Class for Fem Element 3D based on a tetrahedron volume discretization.
Definition: Fem3DElementTetrahedron.h:41
SurgSim::Math::Matrix
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65