#include <mbd_separated_collision_contact_fixed_step_simulator.h>
Classes | |
class | constraint_traits |
class | edge_traits |
class | node_traits |
struct | StepperFunctor |
Public Member Functions | |
SeparatedCollisionContactFixedStepSimulator () | |
virtual | ~SeparatedCollisionContactFixedStepSimulator () |
void | run (real_type const &time_step) |
Protected Types | |
typedef mbd_types::math_policy | math_policy |
typedef math_policy::index_type | size_type |
typedef math_policy::real_type | real_type |
typedef math_policy::vector3_type | vector3_type |
typedef math_policy::idx_vector_type | idx_vector_type |
typedef math_policy::matrix_type | matrix_type |
typedef math_policy::vector_type | vector_type |
typedef math_policy::value_traits | value_traits |
typedef mbd_types::group_type | group_type |
typedef mbd_types::group_ptr_container | group_ptr_container |
typedef mbd_types::stepper_policy | stepper_policy |
typedef StackPropagation < mbd_types > | propagation_algorithm |
typedef mbd_types::material_library_type | material_library_type |
typedef material_library_type::material_iterator | material_iterator |
Protected Member Functions | |
void | velocity_update (real_type const &h) |
void | position_update (real_type const &h) |
void | resolve_collisions (real_type const &h) |
void | contact_handling (real_type const &h) |
void | shock_propagation (real_type const &h) |
void | extract_restitution () |
void | increase_restitution (real_type const &amount) |
void | restore_restitution () |
Protected Attributes | |
propagation_algorithm | m_propagation |
Stack Propagation Algorithm to be used. | |
StepperFunctor | m_stepper_functor |
The stepper functor to use on each layer. | |
vector_type | m_s_cur |
Generalized position vector of all bodies. | |
vector_type | m_s_predicted |
Generalized position vector of all bodies. | |
vector_type | m_u |
Generalized velocity vector of all bodies. | |
vector_type | m_F |
Generalized force vector of all bodies. | |
matrix_type | m_invM |
Generalized inverse mass matrix of all bodies. | |
vector_type | m_restitution |
Temporary storage for keeping restitution values. | |
group_type * | m_all |
A pointer to a group containing all bodies in the configuration. | |
group_ptr_container | m_groups |
Separated Collision and Contact Time Integration.
The implementation herein is a generalization of the simulator described in:
"Nonconvex Rigid Bodies with Stacking" by Guendelman, Bridson, and Fedkiw, SIGGRAPH 2003, ACM TOG 22, 871-878 (2003).
In the paper a simple collision resolver is used, which simply iterates one-time through all contacts in increasing order of penetration depth. We have generalized our implementation such that the end-user can supply any kind of collision-resolving scheme, also any kind of collision law can be used.
In the paper it is suggested to re-evaluate contacts, i.e. run the collision detection, after each resolved collision. Our implementation uses the more aggressive approach proposed in the paper, which re-run the collision detection for each iteration over all the contact points.
The contact graph is also only builded once and not re-evaluated during simulation, the contact graph building algorithm is given implicitly through the stack propagation tool. Our contact graph and stack-layer detection algorithms are different from the ones desribed in the paper.
Finally we have chosen to use a semi-implicit approach for collision resolving, contact handling and shock propagation.
The simulator was tested using the IterateOnceCollisionReslover together with the FrictionalNewtonCollisionLaw.
IMPORTANT: This simulator can not be used together with a stepper that also uses StackPropagation. The reasons for this is that such a stepper will also extend the node_traits with algorithm specific traits from the class StackPropagation. This simulator will do the same thing causing a ambuigity in base classes due to multiple inheritence.
typedef mbd_types::group_ptr_container OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::group_ptr_container [protected] |
typedef mbd_types::group_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::group_type [protected] |
typedef math_policy::idx_vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::idx_vector_type [protected] |
typedef material_library_type::material_iterator OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::material_iterator [protected] |
typedef mbd_types::material_library_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::material_library_type [protected] |
typedef mbd_types::math_policy OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::math_policy [protected] |
Reimplemented from OpenTissue::mbd::SimulatorInterface< mbd_types >.
typedef math_policy::matrix_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::matrix_type [protected] |
typedef StackPropagation<mbd_types> OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::propagation_algorithm [protected] |
typedef math_policy::real_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::real_type [protected] |
Reimplemented from OpenTissue::mbd::SimulatorInterface< mbd_types >.
typedef math_policy::index_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::size_type [protected] |
typedef mbd_types::stepper_policy OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::stepper_policy [protected] |
Reimplemented from OpenTissue::mbd::SimulatorInterface< mbd_types >.
typedef math_policy::value_traits OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::value_traits [protected] |
Reimplemented from OpenTissue::mbd::SimulatorInterface< mbd_types >.
typedef math_policy::vector3_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::vector3_type [protected] |
typedef math_policy::vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::vector_type [protected] |
OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::SeparatedCollisionContactFixedStepSimulator | ( | ) | [inline] |
virtual OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::~SeparatedCollisionContactFixedStepSimulator | ( | ) | [inline, virtual] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::contact_handling | ( | real_type const & | h | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::extract_restitution | ( | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::increase_restitution | ( | real_type const & | amount | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::position_update | ( | real_type const & | h | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::resolve_collisions | ( | real_type const & | h | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::restore_restitution | ( | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::run | ( | real_type const & | time_step | ) | [inline, virtual] |
Implements OpenTissue::mbd::SimulatorInterface< mbd_types >.
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::shock_propagation | ( | real_type const & | h | ) | [inline, protected] |
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::velocity_update | ( | real_type const & | h | ) | [inline, protected] |
group_type* OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_all [protected] |
A pointer to a group containing all bodies in the configuration.
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_F [protected] |
Generalized force vector of all bodies.
group_ptr_container OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_groups [protected] |
Temporary Storage, used to hold results from the collision detection engine.
matrix_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_invM [protected] |
Generalized inverse mass matrix of all bodies.
propagation_algorithm OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_propagation [protected] |
Stack Propagation Algorithm to be used.
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_restitution [protected] |
Temporary storage for keeping restitution values.
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_s_cur [protected] |
Generalized position vector of all bodies.
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_s_predicted [protected] |
Generalized position vector of all bodies.
StepperFunctor OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_stepper_functor [protected] |
The stepper functor to use on each layer.
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_u [protected] |
Generalized velocity vector of all bodies.