sofa::component::odesolver::CGImplicitSolver Class Reference

Implicit time integrator using the filtered conjugate gradient solution [Baraff&Witkin 98]. More...

#include <CGImplicitSolver.h>

Inheritance diagram for sofa::component::odesolver::CGImplicitSolver:

Inheritance graph
[legend]
Collaboration diagram for sofa::component::odesolver::CGImplicitSolver:

Collaboration graph
[legend]

Public Member Functions

 CGImplicitSolver ()
void solve (double dt)
 Main computation method.
double getIntegrationFactor (int inputDerivative, int outputDerivative) const
 Given an input derivative order (0 for position, 1 for velocity, 2 for acceleration), how much will it affect the output derivative of the given order.
double getSolutionIntegrationFactor (int outputDerivative) const
 Given a solution of the linear system, how much will it affect the output derivative of the given order.

Data Fields

Data< unsigned > f_maxIter
Data< double > f_tolerance
Data< double > f_smallDenominatorThreshold
Data< double > f_rayleighStiffness
Data< double > f_rayleighMass
Data< double > f_velocityDamping
Data< bool > f_verbose

Detailed Description

Implicit time integrator using the filtered conjugate gradient solution [Baraff&Witkin 98].

Definition at line 47 of file CGImplicitSolver.h.


Constructor & Destructor Documentation

sofa::component::odesolver::CGImplicitSolver::CGImplicitSolver (  ) 

Definition at line 50 of file CGImplicitSolver.cpp.


Member Function Documentation

double sofa::component::odesolver::CGImplicitSolver::getIntegrationFactor ( int  inputDerivative,
int  outputDerivative 
) const [inline, virtual]

Given an input derivative order (0 for position, 1 for velocity, 2 for acceleration), how much will it affect the output derivative of the given order.

This method is used to compute the compliance for contact corrections. For example, a backward-Euler dynamic implicit integrator would use: Input: x_t v_t a_{t+dt} x_{t+dt} 1 dt dt^2 v_{t+dt} 0 1 dt

If the linear system is expressed on s = a_{t+dt} dt, then the final factors are: Input: x_t v_t a_t s x_{t+dt} 1 dt 0 dt v_{t+dt} 0 1 0 1 a_{t+dt} 0 0 0 1/dt The last column is returned by the getSolutionIntegrationFactor method.

Implements sofa::core::componentmodel::behavior::OdeSolver.

Definition at line 79 of file CGImplicitSolver.h.

References sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::BaseContext::getDt().

double sofa::component::odesolver::CGImplicitSolver::getSolutionIntegrationFactor ( int  outputDerivative  )  const [inline, virtual]

Given a solution of the linear system, how much will it affect the output derivative of the given order.

Implements sofa::core::componentmodel::behavior::OdeSolver.

Definition at line 94 of file CGImplicitSolver.h.

References sofa::core::objectmodel::BaseObject::getContext(), and sofa::core::objectmodel::BaseContext::getDt().

void sofa::component::odesolver::CGImplicitSolver::solve ( double  dt  )  [virtual]

Main computation method.

Specify and execute all computation for timestep integration, i.e. advancing the state from time t to t+dt.

Implements sofa::core::componentmodel::behavior::OdeSolver.

Definition at line 74 of file CGImplicitSolver.cpp.

References sofa::simulation::SolverImpl::addMdx(), sofa::simulation::SolverImpl::addSeparateGravity(), sofa::simulation::SolverImpl::computeDf(), sofa::simulation::SolverImpl::computeDfV(), sofa::simulation::SolverImpl::computeForce(), sofa::core::componentmodel::behavior::MultiVector< Parent >::dot(), sofa::simulation::Visitor::execute(), f_maxIter, sofa::core::objectmodel::BaseObject::f_printLog, f_rayleighMass, f_rayleighStiffness, f_smallDenominatorThreshold, f_tolerance, f_velocityDamping, f_verbose, sofa::core::componentmodel::behavior::BaseMechanicalState::VecId::force(), sofa::core::objectmodel::BaseObject::getContext(), sofa::core::objectmodel::Data< T >::getValue(), sofa::simulation::MechanicalVMultiOpVisitor::ops, sofa::core::componentmodel::behavior::MultiVector< Parent >::peq(), sofa::core::componentmodel::behavior::BaseMechanicalState::VecId::position(), sofa::simulation::SolverImpl::projectResponse(), sofa::simulation::SolverImpl::propagateDx(), sofa::core::componentmodel::behavior::MultiVector< Parent >::teq(), sofa::simulation::SolverImpl::v_clear(), sofa::core::componentmodel::behavior::BaseMechanicalState::VecId::V_DERIV, sofa::simulation::SolverImpl::v_op(), and sofa::core::componentmodel::behavior::BaseMechanicalState::VecId::velocity().

Referenced by sofa::component::constraint::PrecomputedConstraintCorrection< TDataTypes >::init().


Field Documentation

Definition at line 62 of file CGImplicitSolver.h.

Referenced by solve().


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

Generated on Sun Nov 23 04:21:19 2008 for Sofa by  doxygen 1.5.7.1