Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes

OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types > Class Template Reference

#include <mbd_separated_collision_contact_fixed_step_simulator.h>

Inheritance diagram for OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >:
OpenTissue::mbd::SimulatorInterface< mbd_types >

List of all members.

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_typem_all
 A pointer to a group containing all bodies in the configuration.
group_ptr_container m_groups

Detailed Description

template<typename mbd_types>
class OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >

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.


Member Typedef Documentation

template<typename mbd_types >
typedef mbd_types::group_ptr_container OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::group_ptr_container [protected]
template<typename mbd_types >
typedef mbd_types::group_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::group_type [protected]
template<typename mbd_types >
typedef math_policy::idx_vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::idx_vector_type [protected]
template<typename mbd_types >
typedef material_library_type::material_iterator OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::material_iterator [protected]
template<typename mbd_types >
typedef mbd_types::material_library_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::material_library_type [protected]
template<typename mbd_types >
typedef mbd_types::math_policy OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::math_policy [protected]
template<typename mbd_types >
typedef math_policy::matrix_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::matrix_type [protected]
template<typename mbd_types >
typedef StackPropagation<mbd_types> OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::propagation_algorithm [protected]
template<typename mbd_types >
typedef math_policy::index_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::size_type [protected]
template<typename mbd_types >
typedef mbd_types::stepper_policy OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::stepper_policy [protected]
template<typename mbd_types >
typedef math_policy::vector3_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::vector3_type [protected]
template<typename mbd_types >
typedef math_policy::vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::vector_type [protected]

Constructor & Destructor Documentation

template<typename mbd_types >
virtual OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::~SeparatedCollisionContactFixedStepSimulator (  )  [inline, virtual]

Member Function Documentation

template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::contact_handling ( real_type const &  h  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::extract_restitution (  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::increase_restitution ( real_type const &  amount  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::position_update ( real_type const &  h  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::resolve_collisions ( real_type const &  h  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::restore_restitution (  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::run ( real_type const &  time_step  )  [inline, virtual]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::shock_propagation ( real_type const &  h  )  [inline, protected]
template<typename mbd_types >
void OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::velocity_update ( real_type const &  h  )  [inline, protected]

Member Data Documentation

template<typename mbd_types >
group_type* OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_all [protected]

A pointer to a group containing all bodies in the configuration.

template<typename mbd_types >
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_F [protected]

Generalized force vector of all bodies.

template<typename mbd_types >
group_ptr_container OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_groups [protected]

Temporary Storage, used to hold results from the collision detection engine.

template<typename mbd_types >
matrix_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_invM [protected]

Generalized inverse mass matrix of all bodies.

Stack Propagation Algorithm to be used.

template<typename mbd_types >
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_restitution [protected]

Temporary storage for keeping restitution values.

template<typename mbd_types >
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_s_cur [protected]

Generalized position vector of all bodies.

template<typename mbd_types >
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_s_predicted [protected]

Generalized position vector of all bodies.

The stepper functor to use on each layer.

template<typename mbd_types >
vector_type OpenTissue::mbd::SeparatedCollisionContactFixedStepSimulator< mbd_types >::m_u [protected]

Generalized velocity vector of all bodies.


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