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

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

#include <mbd_stack_propagation.h>

Inheritance diagram for OpenTissue::mbd::StackPropagation< mbd_types >:
OpenTissue::mbd::StackAnalysis< mbd_types >

List of all members.

Classes

class  constraint_traits
struct  downward_tag
class  edge_traits
struct  fixate_tag
class  node_traits
struct  upward_tag

Public Types

typedef StackAnalysis< mbd_types > analysis_type
typedef
mbd_types::math_policy::index_type 
size_type
typedef
mbd_types::math_policy::index_type 
index_type
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
mbd_types::edge_ptr_container 
edge_ptr_container
typedef
mbd_types::indirect_edge_iterator 
indirect_edge_iterator
typedef mbd_types::group_container group_container

Public Member Functions

size_type size () const
template<typename algorithm_type >
void run (group_type &group, algorithm_type &algorithm, fixate_tag, upward_tag)
template<typename algorithm_type >
void rerun (group_type &, algorithm_type &algorithm, fixate_tag, upward_tag)
template<typename algorithm_type >
void run (group_type &group, algorithm_type &algorithm, upward_tag)
template<typename algorithm_type >
void rerun (group_type &group, algorithm_type &algorithm, upward_tag)
template<typename algorithm_type >
void run (group_type &group, algorithm_type &algorithm, downward_tag)
template<typename algorithm_type >
void rerun (group_type &group, algorithm_type &algorithm, downward_tag)

Protected Member Functions

void fixiate (index_type height, group_type &layer)
void unfixiate (group_type &layer)

Protected Attributes

group_container m_layers
 Storage for keeping stack layers.
size_type m_cnt
 Number of layers in stack.

Detailed Description

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

Stack Propagation. Apply some algorithm in a stack bottom-up fashion. Thus the effects of the algorithm are propagated from the bottom of a stack to the top.

This is in some way similar to make a pre-ordring of the constraint variables for an iterative method, however there is one major difference from simple pre-ordering. The difference is that objects are fixiated during the stack propagration. This can be compared to constraint-variables only have an effect in one direction, the upward direction. In terms of iterative methods, it is a pre-ordering of variables and restriction to a preferred search direction for solutions.


Member Typedef Documentation

template<typename mbd_types>
typedef StackAnalysis<mbd_types> OpenTissue::mbd::StackPropagation< mbd_types >::analysis_type
template<typename mbd_types>
typedef mbd_types::body_type OpenTissue::mbd::StackPropagation< mbd_types >::body_type
template<typename mbd_types>
typedef mbd_types::contact_type OpenTissue::mbd::StackPropagation< mbd_types >::contact_type
template<typename mbd_types>
typedef mbd_types::edge_ptr_container OpenTissue::mbd::StackPropagation< mbd_types >::edge_ptr_container
template<typename mbd_types>
typedef mbd_types::edge_type OpenTissue::mbd::StackPropagation< mbd_types >::edge_type
template<typename mbd_types>
typedef mbd_types::group_container OpenTissue::mbd::StackPropagation< mbd_types >::group_container
template<typename mbd_types>
typedef mbd_types::group_type OpenTissue::mbd::StackPropagation< mbd_types >::group_type
template<typename mbd_types>
typedef mbd_types::math_policy::index_type OpenTissue::mbd::StackPropagation< mbd_types >::index_type
template<typename mbd_types>
typedef mbd_types::indirect_edge_iterator OpenTissue::mbd::StackPropagation< mbd_types >::indirect_edge_iterator
template<typename mbd_types>
typedef mbd_types::material_type OpenTissue::mbd::StackPropagation< mbd_types >::material_type
template<typename mbd_types>
typedef mbd_types::math_policy::index_type OpenTissue::mbd::StackPropagation< mbd_types >::size_type

Member Function Documentation

template<typename mbd_types>
void OpenTissue::mbd::StackPropagation< mbd_types >::fixiate ( index_type  height,
group_type layer 
) [inline, protected]

Fixiate all bottom bodies in a stack layer.

Parameters:
height The height of the layer.
layer The stack layer.
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::rerun ( group_type ,
algorithm_type &  algorithm,
fixate_tag  ,
upward_tag   
) [inline]
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::rerun ( group_type group,
algorithm_type &  algorithm,
upward_tag   
) [inline]
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::rerun ( group_type group,
algorithm_type &  algorithm,
downward_tag   
) [inline]
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::run ( group_type group,
algorithm_type &  algorithm,
downward_tag   
) [inline]
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::run ( group_type group,
algorithm_type &  algorithm,
upward_tag   
) [inline]
template<typename mbd_types>
template<typename algorithm_type >
void OpenTissue::mbd::StackPropagation< mbd_types >::run ( group_type group,
algorithm_type &  algorithm,
fixate_tag  ,
upward_tag   
) [inline]

Run Stack Propagation Algorithm.

Parameters:
group The total group upon which to perform stack propagation.
algorithm An unary function that takes a reference to a body group type as an argument. The argument represents a stack layer, where the bottom-most bodies are fixiated. The end user can run any kind of algorithm on this stack-layer.
fixate_tag Tag dispatching, indicating that bottom-most objects should be fixiated before applying algorithm.
upward_tag Tag dispacthing, indicating that shock moves from bottom to top.
template<typename mbd_types>
size_type OpenTissue::mbd::StackPropagation< mbd_types >::size (  )  const [inline]

Get Number of Layers. Note: only valid immediately after invocation of a run method. Re-runs do not alter this value, only invocation of run methods may alter this value.

Returns:
The number of stack layers.
template<typename mbd_types>
void OpenTissue::mbd::StackPropagation< mbd_types >::unfixiate ( group_type layer  )  [inline, protected]

Un-fixiate all bottom bodies in a stack layer.

This method assumes that the fixiate() method has been invoked prior.

Parameters:
layer The stack layer.

Member Data Documentation

template<typename mbd_types>
size_type OpenTissue::mbd::StackPropagation< mbd_types >::m_cnt [protected]

Number of layers in stack.

template<typename mbd_types>
group_container OpenTissue::mbd::StackPropagation< mbd_types >::m_layers [protected]

Storage for keeping stack layers.


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