opensurgsim
|
Class for the complex non-linear ODE a = x.v^2. More...
#include <MockObject.h>
Public Member Functions | |
OdeComplexNonLinear () | |
Constructor. | |
Matrix | applyCompliance (const OdeState &state, const Matrix &b) override |
Calculate the product \(C.b\) where \(C\) is the compliance matrix with boundary conditions applied. More... | |
void | setOdeSolver (std::shared_ptr< SurgSim::Math::OdeSolver > solver) |
![]() | |
virtual | ~OdeEquation () |
Virtual destructor. | |
const std::shared_ptr< OdeState > | getInitialState () const |
Retrieves the ode initial conditions \((x0, v0)\) (i.e the initial state) More... | |
virtual void | updateFMDK (const OdeState &state, int options) |
Update the OdeEquation (and support data) based on the given state. More... | |
const Vector & | getF () const |
const SparseMatrix & | getM () const |
const SparseMatrix & | getD () const |
const SparseMatrix & | getK () const |
bool | hasF () const |
bool | hasM () const |
bool | hasK () const |
bool | hasD () const |
Protected Member Functions | |
void | computeF (const OdeState &state) override |
Evaluation of the RHS function \(f(x, v)\) for a given state. More... | |
void | computeM (const OdeState &state) override |
Evaluation of the LHS matrix \(M(x,v)\) for a given state. More... | |
void | computeD (const OdeState &state) override |
Evaluation of \(D = -\frac{\partial f}{\partial v}(x,v)\) for a given state. More... | |
void | computeK (const OdeState &state) override |
Evaluation of \(K = -\frac{\partial f}{\partial x}(x,v)\) for a given state. More... | |
void | computeFMDK (const OdeState &state) override |
Evaluation of \(f(x,v)\), \(M(x,v)\), \(D = -\frac{\partial f}{\partial v}(x,v)\) and \(K = -\frac{\partial f}{\partial x}(x,v)\). More... | |
Additional Inherited Members | |
![]() | |
std::shared_ptr< OdeState > | m_initialState |
The initial state (which defines the ODE initial conditions \((x0, v0)\)) More... | |
unsigned int | m_initState |
Vector | m_f |
The vector containing \(f(x, v)\). | |
SparseMatrix | m_M |
The matrix \(M(x,v)\). | |
SparseMatrix | m_D |
The The matrix \(D = -\frac{\partial f}{\partial v}(x,v)\). | |
SparseMatrix | m_K |
The The matrix \(K = -\frac{\partial f}{\partial x}(x,v)\). | |
Class for the complex non-linear ODE a = x.v^2.
|
inlineoverridevirtual |
Calculate the product \(C.b\) where \(C\) is the compliance matrix with boundary conditions applied.
Note that this can be rewritten as \((B^T)(M^{-1})(B.b) = (B^T)((M^{-1})(B.b)) = x\), where \((M^{-1})(B.b) = y\) is simply the solution to \(M.y = B.b\) and \(B^T.y = x\).
state | \((x, v)\) the current position and velocity to evaluate the various terms with |
b | The input matrix |
Implements SurgSim::Math::OdeEquation.
|
inlineoverrideprotectedvirtual |
Evaluation of \(D = -\frac{\partial f}{\partial v}(x,v)\) for a given state.
state | \((x, v)\) the current position and velocity to evaluate the Jacobian matrix with |
Implements SurgSim::Math::OdeEquation.
|
inlineoverrideprotectedvirtual |
Evaluation of the RHS function \(f(x, v)\) for a given state.
state | \((x, v)\) the current position and velocity to evaluate the function \(f(x,v)\) with |
Implements SurgSim::Math::OdeEquation.
|
inlineoverrideprotectedvirtual |
Evaluation of \(f(x,v)\), \(M(x,v)\), \(D = -\frac{\partial f}{\partial v}(x,v)\) and \(K = -\frac{\partial f}{\partial x}(x,v)\).
When all the terms are needed, this method can perform optimization in evaluating everything together
state | \((x, v)\) the current position and velocity to evaluate the various terms with |
Implements SurgSim::Math::OdeEquation.
|
inlineoverrideprotectedvirtual |
Evaluation of \(K = -\frac{\partial f}{\partial x}(x,v)\) for a given state.
state | \((x, v)\) the current position and velocity to evaluate the Jacobian matrix with |
Implements SurgSim::Math::OdeEquation.
|
inlineoverrideprotectedvirtual |
Evaluation of the LHS matrix \(M(x,v)\) for a given state.
state | \((x, v)\) the current position and velocity to evaluate the matrix \(M(x,v)\) with |
Implements SurgSim::Math::OdeEquation.