Go to the documentation of this file.
16 #ifndef SURGSIM_MATH_ODESTATE_H
17 #define SURGSIM_MATH_ODESTATE_H
65 virtual void setNumDof(
size_t numDofPerNode,
size_t numNodes);
183 #endif // SURGSIM_MATH_ODESTATE_H
bool operator!=(const OdeState &state) const
Comparison operator (difference test)
Definition: OdeState.cpp:40
size_t getNumDof() const
Retrieves the number of degrees of freedom.
Definition: OdeState.cpp:68
OdeState()
Default constructor.
Definition: OdeState.cpp:27
void applyBoundaryConditionsToMatrix(Matrix *matrix, bool hasCompliance=true) const
Apply boundary conditions to a given matrix.
Definition: OdeState.cpp:172
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
SurgSim::Math::Vector & getPositions()
Retrieves all degrees of freedom's position (non-const version)
Definition: OdeState.cpp:83
Vector * applyBoundaryConditionsToVector(Vector *vector) const
Apply boundary conditions to a given vector.
Definition: OdeState.cpp:157
size_t getNumNodes() const
Retrieves the number of nodes.
Definition: OdeState.cpp:78
const SurgSim::Math::Vector3d getVelocity(size_t nodeId) const
Retrieves the velocity of a given node (const version)
Definition: OdeState.cpp:108
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57
virtual void setNumDof(size_t numDofPerNode, size_t numNodes)
Allocates the state for a given number of degrees of freedom.
Definition: OdeState.cpp:53
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Math::Vector m_x
Degrees of freedom position.
Definition: OdeState.h:167
Eigen::Matrix< bool, Eigen::Dynamic, 1 > m_boundaryConditionsPerDof
Boundary conditions stored per dof (True indicates a boundary condition, False does not)
Definition: OdeState.h:176
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
const std::vector< size_t > & getBoundaryConditions() const
Retrieves all boundary conditions.
Definition: OdeState.cpp:147
bool operator==(const OdeState &state) const
Comparison operator (equality test)
Definition: OdeState.cpp:35
virtual bool isValid() const
Check if this state is numerically valid.
Definition: OdeState.cpp:219
std::vector< size_t > m_boundaryConditionsAsDofIds
Boundary conditions stored as a list of dof ids.
Definition: OdeState.h:173
SurgSim::Math::Vector & getVelocities()
Retrieves all degrees of freedom's velocity (non-const version)
Definition: OdeState.cpp:98
bool isBoundaryCondition(size_t dof) const
Queries if a specific dof is a boundary condition or not.
Definition: OdeState.cpp:152
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
void addBoundaryCondition(size_t nodeId)
Adds boundary conditions for a given node (fixes all the dof for this node)
Definition: OdeState.cpp:113
size_t m_numNodes
Definition: OdeState.h:164
OdeState interpolate(const OdeState &other, double t) const
Returns the linear interpolated ODE state between this and other at parameter t.
Definition: OdeState.cpp:231
virtual void reset()
Resets the state.
Definition: OdeState.cpp:45
const SurgSim::Math::Vector3d getPosition(size_t nodeId) const
Retrieves the position of a given node (const version)
Definition: OdeState.cpp:93
size_t m_numDofPerNode
Default public copy constructor and assignment operator are being used on purpose.
Definition: OdeState.h:164
size_t getNumBoundaryConditions() const
Retrieves the number of boundary conditions.
Definition: OdeState.cpp:142
virtual ~OdeState()
Destructor.
Definition: OdeState.cpp:31
SurgSim::Math::Vector m_v
Degrees of freedom velocity (m_x 1st derivative w.r.t. time)
Definition: OdeState.h:170
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65