Public Member Functions | List of all members
SurgSim::Math::OdeSolverEulerImplicit Class Reference

Euler Implicit ode solver. More...

#include <SurgSim/Math/OdeSolverEulerImplicit.h>

Inheritance diagram for SurgSim::Math::OdeSolverEulerImplicit:
SurgSim::Math::OdeSolver SurgSim::Math::OdeSolverLinearEulerImplicit

Public Member Functions

 OdeSolverEulerImplicit (OdeEquation *equation)
 Constructor. More...
 
virtual void solve (double dt, const OdeState &currentState, OdeState *newState) override
 Solves the equation. More...
 
- Public Member Functions inherited from SurgSim::Math::OdeSolver
 OdeSolver (OdeEquation *equation)
 Constructor. More...
 
virtual ~OdeSolver ()
 Virtual destructor. More...
 
const std::string getName () const
 Gets the solver's name. More...
 
void setLinearSolver (std::shared_ptr< LinearSolveAndInverse > linearSolver)
 Sets the specialized linear solver to use with this Ode solver. More...
 
std::shared_ptr< LinearSolveAndInverse > getLinearSolver () const
 Gets the specialized linear solver used with this Ode solver. More...
 
const Matrix & getSystemMatrix () const
 Queries the current system matrix. More...
 
const Matrix & getCompliance () const
 Queries the current compliance matrix. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SurgSim::Math::OdeSolver
void allocate (size_t size)
 Allocates the system and compliance matrices. More...
 
- Protected Attributes inherited from SurgSim::Math::OdeSolver
std::string m_name
 Name for this solver. More...
 
OdeEquation & m_equation
 The ode equation (API providing the necessary evaluation methods and the initial state) More...
 
std::shared_ptr< LinearSolveAndInverse > m_linearSolver
 The specialized linear solver to use when solving the ode equation. More...
 
Matrix m_systemMatrix
 System matrix (can be M, K, combination of MDK depending on the solver) A static solver will have K for system matrix A dynamic explicit solver will have M for system matrix A dynamic implicit solver will have a combination of M, D and K for system matrix. More...
 
Matrix m_compliance
 Compliance matrix which is the inverse of the system matrix. More...
 

Detailed Description

Euler Implicit ode solver.

Note
M(x(t), v(t)).a(t) = f(t, x(t), v(t))
This ode equation is solved as an ode of order 1 by defining the state vector y = (x v)^t:
y' = ( x' ) = ( dx/dt ) = ( v )
( v' ) = ( dv/dt ) = ( M(x, v)^{-1}.f(x, v) )
y' = f(t, y)
Euler Implicit is also called backward Euler as it solves this integral using a backward evaluation:
y' = (y(t) - y(t-dt)) / dt
which leads to the integration scheme:
{ x(t+dt) = x(t) + dt.v(t+dt)
{ v(t+dt) = v(t) + dt.a(t+dt)

Constructor & Destructor Documentation

SurgSim::Math::OdeSolverEulerImplicit::OdeSolverEulerImplicit ( OdeEquation *  equation)
explicit

Constructor.

Parameters
equationThe ode equation to be solved

Member Function Documentation

void SurgSim::Math::OdeSolverEulerImplicit::solve ( double  dt,
const OdeState &  currentState,
OdeState *  newState 
)
overridevirtual

Solves the equation.

Parameters
dtThe time step
currentStateState at time t
[out]newStateState at time t+dt

Implements SurgSim::Math::OdeSolver.

Reimplemented in SurgSim::Math::OdeSolverLinearEulerImplicit.


The documentation for this class was generated from the following files: