Blender
V3.3
|
#include <btDeformableBodySolver.h>
Public Attributes | |
btDeformableBackwardEulerObjective * | m_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< btDeformableBackwardEulerObjective > | m_cg |
btConjugateResidual< btDeformableBackwardEulerObjective > | m_cr |
bool | m_implicit |
int | m_maxNewtonIterations |
btScalar | m_newtonTolerance |
bool | m_lineSearch |
![]() | |
int | m_numberOfPositionIterations |
int | m_numberOfVelocityIterations |
float | m_timeScale |
Additional Inherited Members | |
![]() | |
enum | SolverTypes { DEFAULT_SOLVER , CPU_SOLVER , CL_SOLVER , CL_SIMD_SOLVER , DX_SOLVER , DX_SIMD_SOLVER , DEFORMABLE_SOLVER } |
Definition at line 30 of file btDeformableBodySolver.h.
btDeformableBodySolver::btDeformableBodySolver | ( | ) |
Definition at line 22 of file btDeformableBodySolver.cpp.
References m_backupVelocity, m_objective, and m_softBodies.
|
virtual |
Definition at line 28 of file btDeformableBodySolver.cpp.
References m_objective.
void btDeformableBodySolver::backupDv | ( | ) |
Definition at line 139 of file btDeformableBodySolver.cpp.
References m_backup_dv, m_dv, btAlignedObjectArray< T >::resize(), and btAlignedObjectArray< T >::size().
Referenced by solveDeformableConstraints().
void btDeformableBodySolver::backupVelocity | ( | ) |
Definition at line 316 of file btDeformableBodySolver.cpp.
References counter, m_backupVelocity, btSoftBody::m_nodes, m_softBodies, and btAlignedObjectArray< T >::size().
Referenced by btDeformableMultiBodyDynamicsWorld::solveConstraints().
|
inlinevirtual |
Ensure that this solver is initialized.
Implements btSoftBodySolver.
Definition at line 156 of file btDeformableBodySolver.h.
btScalar btDeformableBodySolver::computeDescentStep | ( | TVStack & | ddv, |
const TVStack & | residual, | ||
bool | verbose = false |
||
) |
Definition at line 165 of file btDeformableBodySolver.cpp.
References blender::math::abs(), btDeformableBackwardEulerObjective::computeNorm(), btKrylovSolver< MatrixX >::dot(), e, m_cg, m_ddv, m_objective, btAlignedObjectArray< T >::size(), btConjugateGradient< MatrixX >::solve(), and verbose.
Referenced by solveDeformableConstraints().
Definition at line 213 of file btDeformableBodySolver.cpp.
References m_cg, m_cr, m_objective, m_useProjection, btConjugateGradient< MatrixX >::solve(), and btConjugateResidual< MatrixX >::solve().
Referenced by solveDeformableConstraints().
Copy necessary data back to the original soft body source objects.
Implements btSoftBodySolver.
Definition at line 157 of file btDeformableBodySolver.h.
|
inlinevirtual |
Definition at line 105 of file btDeformableBodySolver.h.
|
inlinevirtual |
Return the type of the solver.
Implements btSoftBodySolver.
Definition at line 58 of file btDeformableBodySolver.h.
References btSoftBodySolver::DEFORMABLE_SOLVER.
btScalar btDeformableBodySolver::kineticEnergy | ( | ) |
Definition at line 121 of file btDeformableBodySolver.cpp.
References m_dv, btSoftBody::m_nodes, m_softBodies, node, and btAlignedObjectArray< T >::size().
Referenced by solveDeformableConstraints().
|
inlinevirtual |
Optimize soft bodies in this solver.
Implements btSoftBodySolver.
Definition at line 154 of file btDeformableBodySolver.h.
void btDeformableBodySolver::predictDeformableMotion | ( | btSoftBody * | psb, |
btScalar | dt | ||
) |
Definition at line 417 of file btDeformableBodySolver.cpp.
References BT_PROFILE, btDbvt::clear(), btSoftBody::Config::collisions, btSoftBody::Config::drag, btDbvt::empty(), btSoftBody::initializeFaceTree(), btSoftBody::SolverState::isdt, btSoftBody::m_bounds, btSoftBody::m_bUpdateRtCst, btSoftBody::m_cfg, btSoftBody::Node::m_constrained, btSoftBody::m_faceNodeContacts, btSoftBody::m_faceRigidContacts, btSoftBody::m_fdbvt, m_implicit, btSoftBody::m_nodeRigidContacts, btSoftBody::m_nodes, btSoftBody::Node::m_q, btSoftBody::Node::m_splitv, btSoftBody::m_sst, btSoftBody::Node::m_v, btSoftBody::Node::m_x, norm(), btSoftBody::SolverState::radmrg, btSoftBody::fCollision::SDF_RD, btSoftBody::SolverState::sdt, btAlignedObjectArray< T >::size(), btSoftBody::Config::timescale, btSoftBody::updateBounds(), btSoftBody::updateConstants(), btSoftBody::updateFaceTree(), btSoftBody::updateNodeTree(), btSoftBody::SolverState::updmrg, and btSoftBody::SolverState::velmrg.
Referenced by predictMotion().
Predict motion of soft bodies into next timestep
Implements btSoftBodySolver.
Definition at line 387 of file btDeformableBodySolver.cpp.
References btDeformableBackwardEulerObjective::applyExplicitForce(), m_implicit, btSoftBody::m_nodes, m_objective, m_residual, m_softBodies, predictDeformableMotion(), and btAlignedObjectArray< T >::size().
Referenced by btDeformableMultiBodyDynamicsWorld::predictUnconstraintMotion().
|
inlinevirtual |
Process a collision between two soft bodies
Implements btSoftBodySolver.
Definition at line 114 of file btDeformableBodySolver.h.
References btSoftBody::defaultCollisionHandler().
|
inlinevirtual |
Definition at line 108 of file btDeformableBodySolver.h.
References btSoftBody::defaultCollisionHandler().
void btDeformableBodySolver::reinitialize | ( | const btAlignedObjectArray< btSoftBody * > & | softBodies, |
btScalar | dt | ||
) |
Definition at line 221 of file btDeformableBodySolver.cpp.
References btVector3, btAlignedObjectArray< T >::copyFromArray(), m_backupVelocity, m_ddv, m_dt, m_dv, m_numNodes, m_objective, m_residual, m_softBodies, btDeformableBackwardEulerObjective::reinitialize(), btAlignedObjectArray< T >::resize(), updateNodes(), and updateSoftBodies().
Referenced by btDeformableMultiBodyDynamicsWorld::reinitialize(), and btDeformableMultiBodyDynamicsWorld::removeSoftBody().
void btDeformableBodySolver::revertDv | ( | ) |
Definition at line 148 of file btDeformableBodySolver.cpp.
References m_backup_dv, m_dv, and btAlignedObjectArray< T >::size().
Referenced by solveDeformableConstraints().
void btDeformableBodySolver::revertVelocity | ( | ) |
Definition at line 361 of file btDeformableBodySolver.cpp.
References counter, m_backupVelocity, btSoftBody::m_nodes, m_softBodies, and btAlignedObjectArray< T >::size().
void btDeformableBodySolver::setConstraints | ( | const btContactSolverInfo & | infoGlobal | ) |
Definition at line 250 of file btDeformableBodySolver.cpp.
References BT_PROFILE, infoGlobal, m_objective, and btDeformableBackwardEulerObjective::setConstraints().
Referenced by btDeformableMultiBodyDynamicsWorld::setupConstraints().
Definition at line 497 of file btDeformableBodySolver.cpp.
References m_implicit, m_objective, and btDeformableBackwardEulerObjective::setImplicit().
Referenced by btDeformableMultiBodyDynamicsWorld::reinitialize().
Definition at line 503 of file btDeformableBodySolver.cpp.
References m_lineSearch.
Referenced by btDeformableMultiBodyDynamicsWorld::reinitialize().
Definition at line 329 of file btDeformableBodySolver.cpp.
References counter, m_backupVelocity, m_dv, btSoftBody::m_nodes, m_softBodies, and btAlignedObjectArray< T >::size().
Referenced by btDeformableMultiBodyDynamicsWorld::solveConstraints().
Solve constraints for a set of soft bodies
Implements btSoftBodySolver.
Definition at line 155 of file btDeformableBodySolver.h.
|
virtual |
Definition at line 256 of file btDeformableBodySolver.cpp.
References BT_PROFILE, infoGlobal, m_objective, btDeformableBackwardEulerObjective::m_projection, and btDeformableContactProjection::update().
Definition at line 33 of file btDeformableBodySolver.cpp.
References btDeformableBackwardEulerObjective::addLagrangeMultiplier(), btDeformableBackwardEulerObjective::addLagrangeMultiplierRHS(), btDeformableBackwardEulerObjective::applyDynamicFriction(), backupDv(), beta(), BT_PROFILE, computeDescentStep(), btDeformableBackwardEulerObjective::computeNorm(), btDeformableBackwardEulerObjective::computeResidual(), computeStep(), counter, e, kineticEnergy(), m_ddv, m_dv, m_implicit, m_lineSearch, m_maxNewtonIterations, m_newtonTolerance, btSoftBody::m_nodes, m_numNodes, m_objective, btDeformableBackwardEulerObjective::m_preconditioner, m_residual, m_softBodies, m_useProjection, Preconditioner::reinitialize(), revertDv(), SIMD_EPSILON, btAlignedObjectArray< T >::size(), btDeformableBackwardEulerObjective::totalEnergy(), updateDv(), updateEnergy(), updateState(), updateVelocity(), and x.
Referenced by btDeformableMultiBodyDynamicsWorld::solveConstraints().
Definition at line 205 of file btDeformableBodySolver.cpp.
References m_ddv, m_dv, and m_numNodes.
Referenced by solveDeformableConstraints().
Definition at line 156 of file btDeformableBodySolver.cpp.
References m_backup_dv, m_ddv, m_dv, btAlignedObjectArray< T >::size(), and updateState().
Referenced by solveDeformableConstraints().
bool btDeformableBodySolver::updateNodes | ( | ) |
Definition at line 374 of file btDeformableBodySolver.cpp.
References m_numNodes, m_softBodies, and btAlignedObjectArray< T >::size().
Referenced by reinitialize().
|
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().
void btDeformableBodySolver::updateState | ( | ) |
Definition at line 199 of file btDeformableBodySolver.cpp.
References updateTempPosition(), and updateVelocity().
Referenced by solveDeformableConstraints(), and updateEnergy().
void btDeformableBodySolver::updateTempPosition | ( | ) |
Definition at line 296 of file btDeformableBodySolver.cpp.
References counter, m_dt, btSoftBody::m_nodes, m_softBodies, btAlignedObjectArray< T >::size(), and btSoftBody::updateDeformation().
Referenced by updateState().
void btDeformableBodySolver::updateVelocity | ( | ) |
Definition at line 263 of file btDeformableBodySolver.cpp.
References btMax(), counter, m_backupVelocity, m_dv, m_implicit, btSoftBody::m_maxSpeedSquared, btSoftBody::m_nodes, m_softBodies, and btAlignedObjectArray< T >::size().
Referenced by solveDeformableConstraints(), and updateState().
|
protected |
Definition at line 37 of file btDeformableBodySolver.h.
Referenced by backupDv(), revertDv(), and updateEnergy().
|
protected |
Definition at line 41 of file btDeformableBodySolver.h.
Referenced by backupVelocity(), btDeformableBodySolver(), reinitialize(), revertVelocity(), setupDeformableSolve(), and updateVelocity().
|
protected |
Definition at line 43 of file btDeformableBodySolver.h.
Referenced by computeDescentStep(), and computeStep().
|
protected |
Definition at line 44 of file btDeformableBodySolver.h.
Referenced by computeStep().
|
protected |
Definition at line 38 of file btDeformableBodySolver.h.
Referenced by computeDescentStep(), reinitialize(), solveDeformableConstraints(), updateDv(), and updateEnergy().
|
protected |
Definition at line 42 of file btDeformableBodySolver.h.
Referenced by reinitialize(), and updateTempPosition().
|
protected |
Definition at line 36 of file btDeformableBodySolver.h.
Referenced by backupDv(), kineticEnergy(), reinitialize(), revertDv(), setupDeformableSolve(), solveDeformableConstraints(), updateDv(), updateEnergy(), and updateVelocity().
|
protected |
Definition at line 45 of file btDeformableBodySolver.h.
Referenced by predictDeformableMotion(), predictMotion(), setImplicit(), solveDeformableConstraints(), and updateVelocity().
|
protected |
Definition at line 48 of file btDeformableBodySolver.h.
Referenced by setLineSearch(), and solveDeformableConstraints().
|
protected |
Definition at line 46 of file btDeformableBodySolver.h.
Referenced by solveDeformableConstraints().
|
protected |
Definition at line 47 of file btDeformableBodySolver.h.
Referenced by solveDeformableConstraints().
|
protected |
Definition at line 35 of file btDeformableBodySolver.h.
Referenced by reinitialize(), solveDeformableConstraints(), updateDv(), and updateNodes().
btDeformableBackwardEulerObjective* btDeformableBodySolver::m_objective |
Definition at line 51 of file btDeformableBodySolver.h.
Referenced by btDeformableMultiBodyDynamicsWorld::addForce(), btDeformableBodySolver(), computeDescentStep(), computeStep(), predictMotion(), btDeformableMultiBodyDynamicsWorld::reinitialize(), reinitialize(), btDeformableMultiBodyDynamicsWorld::removeForce(), btDeformableMultiBodyDynamicsWorld::removeSoftBodyForce(), setConstraints(), setImplicit(), btDeformableMultiBodyDynamicsWorld::solveConstraints(), solveContactConstraints(), solveDeformableConstraints(), and ~btDeformableBodySolver().
|
protected |
Definition at line 39 of file btDeformableBodySolver.h.
Referenced by predictMotion(), reinitialize(), and solveDeformableConstraints().
|
protected |
Definition at line 40 of file btDeformableBodySolver.h.
Referenced by backupVelocity(), btDeformableBodySolver(), kineticEnergy(), predictMotion(), reinitialize(), revertVelocity(), setupDeformableSolve(), solveDeformableConstraints(), updateNodes(), updateSoftBodies(), updateTempPosition(), and updateVelocity().
bool btDeformableBodySolver::m_useProjection |
Definition at line 52 of file btDeformableBodySolver.h.
Referenced by computeStep(), btDeformableMultiBodyDynamicsWorld::reinitialize(), and solveDeformableConstraints().