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

OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy > Class Template Reference

#include <mbd_sequential_collision_resolver.h>

Inheritance diagram for OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >:
OpenTissue::mbd::CollisionResolverInterface< mbd_types > collision_law_policy OpenTissue::mbd::StepperInterface< mbd_types >

List of all members.

Classes

class  constraint_traits
struct  ContactPointComparision
class  edge_traits
class  node_traits

Public Member Functions

 SequentialCollisionResolver ()
virtual ~SequentialCollisionResolver ()
void resolve_collisions (group_type &group)

Protected Types

typedef
mbd_types::math_policy::real_type 
real_type
typedef
mbd_types::math_policy::vector3_type 
vector3_type
typedef mbd_types::group_type group_type
typedef mbd_types::body_type body_type
typedef mbd_types::edge_type edge_type
typedef mbd_types::contact_type contact_type
typedef mbd_types::material_type material_type
typedef std::vector
< contact_type * > 
contact_ptr_heap

Protected Member Functions

template<typename iterator >
void init_heap (iterator const &cbegin, iterator const &cend, contact_ptr_heap &S)
void update_heap (contact_ptr_heap &S)
contact_typeminimum (contact_ptr_heap &S)
void update_all_dependent_contacts (contact_type *cp)
void update (contact_type *cp)

Detailed Description

template<typename mbd_types, typename collision_law_policy>
class OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >

A Sequential Collision Resolver. This collision resovler can be used with any collision law by specifying the collision law as a template policy.

The algorithm iterates over all contacs in the specified group, in an increasing order determined by their relative contact velocity in the normal direction.

In some cases such a scheme may fail, entering a inifinite loop, or even computational death due to very slow convergence.ly off, but by default it is on.

Notice that if one by any chance uses negative values of coefficient of restitution this algorithm will enter an infinite loop.


Member Typedef Documentation

template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::body_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::body_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef std::vector<contact_type*> OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::contact_ptr_heap [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::contact_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::contact_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::edge_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::edge_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::group_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::group_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::material_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::material_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::math_policy::real_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::real_type [protected]
template<typename mbd_types, typename collision_law_policy>
typedef mbd_types::math_policy::vector3_type OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::vector3_type [protected]

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename mbd_types, typename collision_law_policy>
template<typename iterator >
void OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::init_heap ( iterator const &  cbegin,
iterator const &  cend,
contact_ptr_heap S 
) [inline, protected]

Initialize Heap

Parameters:
cbegin The position of the first contact in a range.
cend The position one past the last contact in a range.
S The heap.
template<typename mbd_types, typename collision_law_policy>
contact_type* OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::minimum ( contact_ptr_heap S  )  [inline, protected]

Get Minimum element from Heap.

Parameters:
S The heap.
Returns:
A pointer to the contact point with smallest contact normal velocity.
template<typename mbd_types, typename collision_law_policy>
void OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::resolve_collisions ( group_type group  )  [inline]
template<typename mbd_types, typename collision_law_policy>
void OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::update ( contact_type cp  )  [inline, protected]

Update Contact Point.

Parameters:
cp A pointer to the contact that should be updated. That is its relative normal contact velocity is re-computed.
template<typename mbd_types, typename collision_law_policy>
void OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::update_all_dependent_contacts ( contact_type cp  )  [inline, protected]

Update All Dependent Contacts. This method updates all contacts that shares a body with the specified contact. The contact graph data structure is used to quickly identify the contacts that needs to be updated.

Parameters:
cp The contact point indicating the bodies that are shared.
template<typename mbd_types, typename collision_law_policy>
void OpenTissue::mbd::SequentialCollisionResolver< mbd_types, collision_law_policy >::update_heap ( contact_ptr_heap S  )  [inline, protected]

Update Heap.

Parameters:
S The heap that should be updated.

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