Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes

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

#include <mbd_material.h>

List of all members.

Public Types

typedef mbd_types::math_policy math_policy
typedef math_policy::real_type real_type
typedef math_policy::value_traits value_traits
typedef math_policy::index_type index_type
typedef math_policy::index_type size_type
typedef math_policy::vector_type vector_type
typedef math_policy::vector_range vector_range
typedef math_policy::vector3_type vector3_type

Public Member Functions

 Material ()
virtual ~Material ()
bool operator== (Material const &m) const
void clear ()
void set_material_indices (index_type A, index_type B)
index_type hash_key () const
void set_friction_coefficient (real_type const &mu)
void set_friction_coefficient (size_t const &idx, real_type const &mu)
real_type const & get_friction_coefficient (size_t const &idx) const
real_type get_isotropic_friction_coefficient () const
void set_number_of_friction_directions (size_t const &eta)
size_t get_number_of_friction_directions () const
real_type const & normal_restitution () const
real_typenormal_restitution ()
real_type const & tangential_restitution () const
real_typetangential_restitution ()
real_type const & get_error_reduction_parameter () const
void set_error_reduction_parameter (real_type const &erp)
void set_normal_regularization (real_type const &gamma)
real_type const & get_normal_regularization () const
bool get_use_sliding_direction () const
void set_use_sliding_direction (bool const &value)
bool get_use_prefixed_direction () const
void set_use_prefixed_direction (bool const &value)
vector3_type const & get_prefixed_direction () const
void set_prefixed_direction (vector3_type const &dir)
void set_prefixed_material_index (index_type const &idx)
index_type get_prefixed_material_index () const

Static Public Member Functions

static index_type hash_key (index_type A, index_type B)

Protected Attributes

index_type m_material_idx_A
 Index of material A.
index_type m_material_idx_B
 Index of material B.
vector_type m_mu
 Coefficient of friction. The size of this vector is equal to the number of friction directions.
real_type m_e_n
 Coefficient of normal restitution.
real_type m_e_t
 Coefficient of tangential restitution.
real_type m_erp
 Error reduction parameter (must be in the range 0..1).
real_type m_gamma
 The regularization (damping) term to be used for the normal force. Also known as constraint force mixing.
bool m_use_sliding_direction
 A boolean value indicating whether the relative sliding direction at a contact point should be used to pick the x-vector of the contact plane span. Default value is true.
bool m_use_prefixed_direction
 A boolean value indicating whether the relative sliding direction at a contact point is set by a prefixed direction. The use slidning direction takes precedience over this setting. Default value is false.
vector3_type m_prefixed_direction
 The value of the prefixed direction. The default setting is the zero-vector.
index_type m_prefixed_material_idx
 The value of the prefixed material idx. Default value is zero. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body.

Detailed Description

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

material_type Property Class.

Materials in Contact Coefficient of Static Friction Coefficient of Kinetic Friction Wood on wood 0.5 0.3 Waxed ski on snow 0.1 0.05 Ice on ice 0.1 0.03 Rubber on concrete (dry) value_traits::one() 0.8 Rubber on concrete (wet) 0.7 0.5 Glass on glass 0.94 0.4 Steel on aluminum 0.61 0.47 Steel on steel (dry) 0.7 0.6 Steel on steel (lubricated) 0.12 0.07 Teflon on steel 0.04 0.04 Teflon on Teflon 0.04 0.04 Synovial joints (in humans) 0.01 0.01


Member Typedef Documentation

template<typename mbd_types >
typedef math_policy::index_type OpenTissue::mbd::Material< mbd_types >::index_type
template<typename mbd_types >
typedef mbd_types::math_policy OpenTissue::mbd::Material< mbd_types >::math_policy
template<typename mbd_types >
typedef math_policy::real_type OpenTissue::mbd::Material< mbd_types >::real_type
template<typename mbd_types >
typedef math_policy::index_type OpenTissue::mbd::Material< mbd_types >::size_type
template<typename mbd_types >
typedef math_policy::value_traits OpenTissue::mbd::Material< mbd_types >::value_traits
template<typename mbd_types >
typedef math_policy::vector3_type OpenTissue::mbd::Material< mbd_types >::vector3_type
template<typename mbd_types >
typedef math_policy::vector_range OpenTissue::mbd::Material< mbd_types >::vector_range
template<typename mbd_types >
typedef math_policy::vector_type OpenTissue::mbd::Material< mbd_types >::vector_type

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::clear (  )  [inline]

This method clears all settings of the material properties. Thus every setting is returned to its default value.

template<typename mbd_types >
real_type const& OpenTissue::mbd::Material< mbd_types >::get_error_reduction_parameter (  )  const [inline]
template<typename mbd_types >
real_type const& OpenTissue::mbd::Material< mbd_types >::get_friction_coefficient ( size_t const &  idx  )  const [inline]

Get value of Friction coefficient. This methos is usefull when retrieving information about the friction coefficients. It is for instance used in the class ContactPoint.

Parameters:
idx The index of the friction direction.
Returns:
The friction coefficient value of the specified friction direction.
template<typename mbd_types >
real_type OpenTissue::mbd::Material< mbd_types >::get_isotropic_friction_coefficient (  )  const [inline]

Get Isotropic Friction Coefficient. Not all physical models or numerical methods support anisotropic friction. This method is supplemented to support these methods/models. The value returned is simply the friction coefficient of the first friction ^direction. If no such friction direction exist then the value zero is returned instead.

Returns:
A friction coefficient value that is representive of an isotropic friction model.
template<typename mbd_types >
real_type const& OpenTissue::mbd::Material< mbd_types >::get_normal_regularization (  )  const [inline]
template<typename mbd_types >
size_t OpenTissue::mbd::Material< mbd_types >::get_number_of_friction_directions (  )  const [inline]

Get the number of friction directions.

Returns:
The number of friction directions.
template<typename mbd_types >
vector3_type const& OpenTissue::mbd::Material< mbd_types >::get_prefixed_direction (  )  const [inline]

Get Prefixed Direction.

Returns:
The prefixed direction. If this has not been set then the default value is the zero vector. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body.
template<typename mbd_types >
index_type OpenTissue::mbd::Material< mbd_types >::get_prefixed_material_index (  )  const [inline]

Get fixed material index.

Returns:
The index value with respec to to which the prefixed friction direction has been specified. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body. If the prefixed material index does not match any of the material indices of the rigid bodies then it implies that the prefixed direction is specified in the world coordinate frame.
template<typename mbd_types >
bool OpenTissue::mbd::Material< mbd_types >::get_use_prefixed_direction (  )  const [inline]

Get value of ``use prefixed direction''. The use slidning direction takes precedience over this setting.

Returns:
True if the relative sliding direction at a contact point is set by a prefixed direction. Default value is false.
template<typename mbd_types >
bool OpenTissue::mbd::Material< mbd_types >::get_use_sliding_direction (  )  const [inline]

Get value of use sliding direction.

Returns:
True if the relative sliding direction at a contact point should be used to pick the x-vector of the contact plane span. Default value is true.
template<typename mbd_types >
index_type OpenTissue::mbd::Material< mbd_types >::hash_key (  )  const [inline]
template<typename mbd_types >
static index_type OpenTissue::mbd::Material< mbd_types >::hash_key ( index_type  A,
index_type  B 
) [inline, static]

Get Hash Key. This method is usefull if one want to get the hash key of a material property that needs to be looked up in a hash map.

Parameters:
material_idx_A 
material_idx_B 
Returns:
template<typename mbd_types >
real_type& OpenTissue::mbd::Material< mbd_types >::normal_restitution (  )  [inline]
template<typename mbd_types >
real_type const& OpenTissue::mbd::Material< mbd_types >::normal_restitution (  )  const [inline]
template<typename mbd_types >
bool OpenTissue::mbd::Material< mbd_types >::operator== ( Material< mbd_types > const &  m  )  const [inline]
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_error_reduction_parameter ( real_type const &  erp  )  [inline]
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_friction_coefficient ( real_type const &  mu  )  [inline]

Set Friction Coefficient. This method is convenient for setting the value of the isotropic friction coefficient. It means that the same friction coefficient are used along every friction direction.

Parameters:
mu The isotropic friction value.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_friction_coefficient ( size_t const &  idx,
real_type const &  mu 
) [inline]

Set Friction Coefficient. This method can be used for setting the friction coefficient values of each indvidual friction direction. The method is convenient for setting up anisotropic friction.

Parameters:
idx The index of the friction direction.
mu The friction coefficient value that should be set for the specified friction direction.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_material_indices ( index_type  A,
index_type  B 
) [inline]
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_normal_regularization ( real_type const &  gamma  )  [inline]
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_number_of_friction_directions ( size_t const &  eta  )  [inline]

Set Number of Friction Directions. If the number of directions are increased then the value of the friction coefficient of the last old direction is copied onto the new directions as the default value.

Parameters:
eta The new number of friction directions to be used.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_prefixed_direction ( vector3_type const &  dir  )  [inline]

Set Prefixed Direction.

Parameters:
dir The new prefixed direction. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_prefixed_material_index ( index_type const &  idx  )  [inline]

Set prefixed material index.

Parameters:
idx The new index value with respec to to which the prefixed friction direction has been specified. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_use_prefixed_direction ( bool const &  value  )  [inline]

Set value of ``use prefixed direction''.

Parameters:
value A boolean value indicating whether the relative sliding direction at a contact point is set by a prefixed direction.
template<typename mbd_types >
void OpenTissue::mbd::Material< mbd_types >::set_use_sliding_direction ( bool const &  value  )  [inline]

Set value of use sliding direction.

Parameters:
value A boolean value indicating whether the relative sliding direction at a contact point should be used to pick the x-vector of the contact plane span.
template<typename mbd_types >
real_type& OpenTissue::mbd::Material< mbd_types >::tangential_restitution (  )  [inline]
template<typename mbd_types >
real_type const& OpenTissue::mbd::Material< mbd_types >::tangential_restitution (  )  const [inline]

Member Data Documentation

template<typename mbd_types >
real_type OpenTissue::mbd::Material< mbd_types >::m_e_n [protected]

Coefficient of normal restitution.

template<typename mbd_types >
real_type OpenTissue::mbd::Material< mbd_types >::m_e_t [protected]

Coefficient of tangential restitution.

template<typename mbd_types >
real_type OpenTissue::mbd::Material< mbd_types >::m_erp [protected]

Error reduction parameter (must be in the range 0..1).

template<typename mbd_types >
real_type OpenTissue::mbd::Material< mbd_types >::m_gamma [protected]

The regularization (damping) term to be used for the normal force. Also known as constraint force mixing.

template<typename mbd_types >
index_type OpenTissue::mbd::Material< mbd_types >::m_material_idx_A [protected]

Index of material A.

template<typename mbd_types >
index_type OpenTissue::mbd::Material< mbd_types >::m_material_idx_B [protected]

Index of material B.

template<typename mbd_types >
vector_type OpenTissue::mbd::Material< mbd_types >::m_mu [protected]

Coefficient of friction. The size of this vector is equal to the number of friction directions.

template<typename mbd_types >
vector3_type OpenTissue::mbd::Material< mbd_types >::m_prefixed_direction [protected]

The value of the prefixed direction. The default setting is the zero-vector.

template<typename mbd_types >
index_type OpenTissue::mbd::Material< mbd_types >::m_prefixed_material_idx [protected]

The value of the prefixed material idx. Default value is zero. If the material index of a rigid body match this value then it means that the prefixed direction is specified wrt. the local frame of that rigid body.

template<typename mbd_types >
bool OpenTissue::mbd::Material< mbd_types >::m_use_prefixed_direction [protected]

A boolean value indicating whether the relative sliding direction at a contact point is set by a prefixed direction. The use slidning direction takes precedience over this setting. Default value is false.

template<typename mbd_types >
bool OpenTissue::mbd::Material< mbd_types >::m_use_sliding_direction [protected]

A boolean value indicating whether the relative sliding direction at a contact point should be used to pick the x-vector of the contact plane span. Default value is true.


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