Fem3DElementCorotationalTetrahedron.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
#define SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
#include "SurgSim/Math/RigidTransform.h"
#include "SurgSim/Physics/Fem3DElementTetrahedron.h"
namespace SurgSim
{
namespace Physics
{
SURGSIM_STATIC_REGISTRATION(Fem3DElementCorotationalTetrahedron);
class Fem3DElementCorotationalTetrahedron : public Fem3DElementTetrahedron
{
public:
Fem3DElementCorotationalTetrahedron();
explicit Fem3DElementCorotationalTetrahedron(std::array<size_t, 4> nodeIds);
explicit Fem3DElementCorotationalTetrahedron(std::shared_ptr<FemElementStructs::FemElementParameter> elementData);
SURGSIM_CLASSNAME(SurgSim::Physics::Fem3DElementCorotationalTetrahedron);
void initialize(const SurgSim::Math::OdeState& state) override;
protected:
void computeRotationMassAndStiffness(const SurgSim::Math::OdeState& state, SurgSim::Math::Matrix33d* R,
Math::Matrix* Me, Math::Matrix* Ke) const;
void doUpdateFMDK(const Math::OdeState& state, int options) override;
SurgSim::Math::Matrix44d m_Vinverse;
// The mass matrix of the linear tetrahedron
Eigen::Matrix<double, 12, 12> m_MLinear;
// The stiffness matrix of the linear tetrahedron
Eigen::Matrix<double, 12, 12> m_KLinear;
// The rotation matrix
SurgSim::Math::Matrix33d m_R;
};
} // namespace Physics
} // namespace SurgSim
#endif // SURGSIM_PHYSICS_FEM3DELEMENTCOROTATIONALTETRAHEDRON_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
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::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
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::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::Math::Matrix44d
Eigen::Matrix< double, 4, 4, Eigen::RowMajor > Matrix44d
A 4x4 matrix of doubles.
Definition: Matrix.h:55
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_R
SurgSim::Math::Matrix33d m_R
Definition: Fem3DElementCorotationalTetrahedron.h:89
RigidTransform.h
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
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::Physics::Fem3DElementCorotationalTetrahedron
Fem Element 3D co-rotational based on a tetrahedron volume discretization.
Definition: Fem3DElementCorotationalTetrahedron.h:40
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::Fem3DElementCorotationalTetrahedron
Fem3DElementCorotationalTetrahedron()
Constructor.
SurgSim::Math::Matrix33d
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51
Fem3DElementTetrahedron.h
SurgSim::Physics::Fem3DElementCorotationalTetrahedron::m_MLinear
Eigen::Matrix< double, 12, 12 > m_MLinear
Definition: Fem3DElementCorotationalTetrahedron.h:83