Blender  V3.3
Public Member Functions | Public Attributes | Protected Attributes | List of all members
btDeformableBodySolver Class Reference

#include <btDeformableBodySolver.h>

Inheritance diagram for btDeformableBodySolver:
btSoftBodySolver

Public Member Functions

 btDeformableBodySolver ()
 
virtual ~btDeformableBodySolver ()
 
virtual SolverTypes getSolverType () const
 
virtual void updateSoftBodies ()
 
virtual btScalar solveContactConstraints (btCollisionObject **deformableBodies, int numDeformableBodies, const btContactSolverInfo &infoGlobal)
 
virtual void solveDeformableConstraints (btScalar solverdt)
 
void reinitialize (const btAlignedObjectArray< btSoftBody * > &softBodies, btScalar dt)
 
void setConstraints (const btContactSolverInfo &infoGlobal)
 
virtual void predictMotion (btScalar solverdt)
 
void predictDeformableMotion (btSoftBody *psb, btScalar dt)
 
void backupVelocity ()
 
void setupDeformableSolve (bool implicit)
 
void revertVelocity ()
 
void updateVelocity ()
 
bool updateNodes ()
 
void computeStep (TVStack &ddv, const TVStack &residual)
 
btScalar computeDescentStep (TVStack &ddv, const TVStack &residual, bool verbose=false)
 
virtual void copySoftBodyToVertexBuffer (const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer)
 
virtual void processCollision (btSoftBody *softBody, const btCollisionObjectWrapper *collisionObjectWrap)
 
virtual void processCollision (btSoftBody *softBody, btSoftBody *otherSoftBody)
 
void setImplicit (bool implicit)
 
void setLineSearch (bool lineSearch)
 
void updateState ()
 
void updateDv (btScalar scale=1)
 
void updateTempPosition ()
 
void backupDv ()
 
void revertDv ()
 
void updateEnergy (btScalar scale)
 
btScalar kineticEnergy ()
 
virtual void optimize (btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate=false)
 
virtual void solveConstraints (btScalar dt)
 
virtual bool checkInitialized ()
 
virtual void copyBackToSoftBodies (bool bMove=true)
 
- Public Member Functions inherited from btSoftBodySolver
 btSoftBodySolver ()
 
virtual ~btSoftBodySolver ()
 
virtual void processCollision (btSoftBody *, const struct btCollisionObjectWrapper *)=0
 
virtual void setNumberOfPositionIterations (int iterations)
 
virtual int getNumberOfPositionIterations ()
 
virtual void setNumberOfVelocityIterations (int iterations)
 
virtual int getNumberOfVelocityIterations ()
 
float getTimeScale ()
 

Public Attributes

btDeformableBackwardEulerObjectivem_objective
 
bool m_useProjection
 

Protected Attributes

int m_numNodes
 
TVStack m_dv
 
TVStack m_backup_dv
 
TVStack m_ddv
 
TVStack m_residual
 
btAlignedObjectArray< btSoftBody * > m_softBodies
 
TVStack m_backupVelocity
 
btScalar m_dt
 
btConjugateGradient< btDeformableBackwardEulerObjectivem_cg
 
btConjugateResidual< btDeformableBackwardEulerObjectivem_cr
 
bool m_implicit
 
int m_maxNewtonIterations
 
btScalar m_newtonTolerance
 
bool m_lineSearch
 
- Protected Attributes inherited from btSoftBodySolver
int m_numberOfPositionIterations
 
int m_numberOfVelocityIterations
 
float m_timeScale
 

Additional Inherited Members

- Public Types inherited from btSoftBodySolver
enum  SolverTypes {
  DEFAULT_SOLVER , CPU_SOLVER , CL_SOLVER , CL_SIMD_SOLVER ,
  DX_SOLVER , DX_SIMD_SOLVER , DEFORMABLE_SOLVER
}
 

Detailed Description

Definition at line 30 of file btDeformableBodySolver.h.

Constructor & Destructor Documentation

◆ btDeformableBodySolver()

btDeformableBodySolver::btDeformableBodySolver ( )

Definition at line 22 of file btDeformableBodySolver.cpp.

References m_backupVelocity, m_objective, and m_softBodies.

◆ ~btDeformableBodySolver()

btDeformableBodySolver::~btDeformableBodySolver ( )
virtual

Definition at line 28 of file btDeformableBodySolver.cpp.

References m_objective.

Member Function Documentation

◆ backupDv()

void btDeformableBodySolver::backupDv ( )

◆ backupVelocity()

void btDeformableBodySolver::backupVelocity ( )

◆ checkInitialized()

virtual bool btDeformableBodySolver::checkInitialized ( )
inlinevirtual

Ensure that this solver is initialized.

Implements btSoftBodySolver.

Definition at line 156 of file btDeformableBodySolver.h.

◆ computeDescentStep()

btScalar btDeformableBodySolver::computeDescentStep ( TVStack ddv,
const TVStack residual,
bool  verbose = false 
)

◆ computeStep()

void btDeformableBodySolver::computeStep ( TVStack ddv,
const TVStack residual 
)

◆ copyBackToSoftBodies()

virtual void btDeformableBodySolver::copyBackToSoftBodies ( bool  bMove = true)
inlinevirtual

Copy necessary data back to the original soft body source objects.

Implements btSoftBodySolver.

Definition at line 157 of file btDeformableBodySolver.h.

◆ copySoftBodyToVertexBuffer()

virtual void btDeformableBodySolver::copySoftBodyToVertexBuffer ( const btSoftBody *const  softBody,
btVertexBufferDescriptor vertexBuffer 
)
inlinevirtual

Definition at line 105 of file btDeformableBodySolver.h.

◆ getSolverType()

virtual SolverTypes btDeformableBodySolver::getSolverType ( ) const
inlinevirtual

Return the type of the solver.

Implements btSoftBodySolver.

Definition at line 58 of file btDeformableBodySolver.h.

References btSoftBodySolver::DEFORMABLE_SOLVER.

◆ kineticEnergy()

btScalar btDeformableBodySolver::kineticEnergy ( )

◆ optimize()

virtual void btDeformableBodySolver::optimize ( btAlignedObjectArray< btSoftBody * > &  softBodies,
bool  forceUpdate = false 
)
inlinevirtual

Optimize soft bodies in this solver.

Implements btSoftBodySolver.

Definition at line 154 of file btDeformableBodySolver.h.

◆ predictDeformableMotion()

void btDeformableBodySolver::predictDeformableMotion ( btSoftBody psb,
btScalar  dt 
)

◆ predictMotion()

void btDeformableBodySolver::predictMotion ( btScalar  solverdt)
virtual

◆ processCollision() [1/2]

virtual void btDeformableBodySolver::processCollision ( btSoftBody ,
btSoftBody  
)
inlinevirtual

Process a collision between two soft bodies

Implements btSoftBodySolver.

Definition at line 114 of file btDeformableBodySolver.h.

References btSoftBody::defaultCollisionHandler().

◆ processCollision() [2/2]

virtual void btDeformableBodySolver::processCollision ( btSoftBody softBody,
const btCollisionObjectWrapper collisionObjectWrap 
)
inlinevirtual

Definition at line 108 of file btDeformableBodySolver.h.

References btSoftBody::defaultCollisionHandler().

◆ reinitialize()

void btDeformableBodySolver::reinitialize ( const btAlignedObjectArray< btSoftBody * > &  softBodies,
btScalar  dt 
)

◆ revertDv()

void btDeformableBodySolver::revertDv ( )

◆ revertVelocity()

void btDeformableBodySolver::revertVelocity ( )

◆ setConstraints()

void btDeformableBodySolver::setConstraints ( const btContactSolverInfo infoGlobal)

◆ setImplicit()

void btDeformableBodySolver::setImplicit ( bool  implicit)

◆ setLineSearch()

void btDeformableBodySolver::setLineSearch ( bool  lineSearch)

◆ setupDeformableSolve()

void btDeformableBodySolver::setupDeformableSolve ( bool  implicit)

◆ solveConstraints()

virtual void btDeformableBodySolver::solveConstraints ( btScalar  solverdt)
inlinevirtual

Solve constraints for a set of soft bodies

Implements btSoftBodySolver.

Definition at line 155 of file btDeformableBodySolver.h.

◆ solveContactConstraints()

btScalar btDeformableBodySolver::solveContactConstraints ( btCollisionObject **  deformableBodies,
int  numDeformableBodies,
const btContactSolverInfo infoGlobal 
)
virtual

◆ solveDeformableConstraints()

void btDeformableBodySolver::solveDeformableConstraints ( btScalar  solverdt)
virtual

◆ updateDv()

void btDeformableBodySolver::updateDv ( btScalar  scale = 1)

Definition at line 205 of file btDeformableBodySolver.cpp.

References m_ddv, m_dv, and m_numNodes.

Referenced by solveDeformableConstraints().

◆ updateEnergy()

void btDeformableBodySolver::updateEnergy ( btScalar  scale)

◆ updateNodes()

bool btDeformableBodySolver::updateNodes ( )

Definition at line 374 of file btDeformableBodySolver.cpp.

References m_numNodes, m_softBodies, and btAlignedObjectArray< T >::size().

Referenced by reinitialize().

◆ updateSoftBodies()

void btDeformableBodySolver::updateSoftBodies ( )
virtual

Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes

Implements btSoftBodySolver.

Definition at line 484 of file btDeformableBodySolver.cpp.

References BT_PROFILE, m_softBodies, btAlignedObjectArray< T >::size(), and btSoftBody::updateNormals().

Referenced by reinitialize().

◆ updateState()

void btDeformableBodySolver::updateState ( )

Definition at line 199 of file btDeformableBodySolver.cpp.

References updateTempPosition(), and updateVelocity().

Referenced by solveDeformableConstraints(), and updateEnergy().

◆ updateTempPosition()

void btDeformableBodySolver::updateTempPosition ( )

◆ updateVelocity()

void btDeformableBodySolver::updateVelocity ( )

Member Data Documentation

◆ m_backup_dv

TVStack btDeformableBodySolver::m_backup_dv
protected

Definition at line 37 of file btDeformableBodySolver.h.

Referenced by backupDv(), revertDv(), and updateEnergy().

◆ m_backupVelocity

TVStack btDeformableBodySolver::m_backupVelocity
protected

◆ m_cg

btConjugateGradient<btDeformableBackwardEulerObjective> btDeformableBodySolver::m_cg
protected

Definition at line 43 of file btDeformableBodySolver.h.

Referenced by computeDescentStep(), and computeStep().

◆ m_cr

btConjugateResidual<btDeformableBackwardEulerObjective> btDeformableBodySolver::m_cr
protected

Definition at line 44 of file btDeformableBodySolver.h.

Referenced by computeStep().

◆ m_ddv

TVStack btDeformableBodySolver::m_ddv
protected

◆ m_dt

btScalar btDeformableBodySolver::m_dt
protected

Definition at line 42 of file btDeformableBodySolver.h.

Referenced by reinitialize(), and updateTempPosition().

◆ m_dv

TVStack btDeformableBodySolver::m_dv
protected

◆ m_implicit

bool btDeformableBodySolver::m_implicit
protected

◆ m_lineSearch

bool btDeformableBodySolver::m_lineSearch
protected

Definition at line 48 of file btDeformableBodySolver.h.

Referenced by setLineSearch(), and solveDeformableConstraints().

◆ m_maxNewtonIterations

int btDeformableBodySolver::m_maxNewtonIterations
protected

Definition at line 46 of file btDeformableBodySolver.h.

Referenced by solveDeformableConstraints().

◆ m_newtonTolerance

btScalar btDeformableBodySolver::m_newtonTolerance
protected

Definition at line 47 of file btDeformableBodySolver.h.

Referenced by solveDeformableConstraints().

◆ m_numNodes

int btDeformableBodySolver::m_numNodes
protected

◆ m_objective

btDeformableBackwardEulerObjective* btDeformableBodySolver::m_objective

◆ m_residual

TVStack btDeformableBodySolver::m_residual
protected

◆ m_softBodies

btAlignedObjectArray<btSoftBody*> btDeformableBodySolver::m_softBodies
protected

◆ m_useProjection

bool btDeformableBodySolver::m_useProjection

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