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

OpenTissue::psys::PressureSoftBody< types > Class Template Reference

#include <psys_pressure_softbody.h>

List of all members.

Public Types

typedef types::math_types math_types
typedef math_types::real_type real_type
typedef math_types::vector3_type vector3_type
typedef types::coupling_type coupling_type
typedef types::mesh_type mesh_type
typedef mesh_type::face_type face_type
typedef mesh_type::face_iterator face_iterator
typedef
mesh_type::face_vertex_circulator 
face_vertex_circulator

Public Member Functions

 PressureSoftBody ()
virtual ~PressureSoftBody ()
void init (coupling_type const &coupling)
void set_initial_pressure (real_type const &pressure)
real_type const & initial_pressure () const
void apply ()

Protected Types

enum  { m_X = 0, m_Y = 1, m_Z = 2 }

Protected Member Functions

real_type const compute_volume_integral (mesh_type &mesh)
void compute_face_integral (face_type &f, vector3_type &n, const real_type &d)
void compute_projection_integral (face_type &f)

Protected Attributes

coupling_typem_coupling
 A pointer to a mesh coupling.
real_type m_P1
 Internal variables used by volume computation.
real_type m_Pa
real_type m_Pb
real_type m_Fa
 Internal variables used by volume computation.
real_type m_Fb
real_type m_Fc
int m_A
 Internal variables used by volume computation.
int m_B
int m_C
std::vector< real_typem_area
 Storage for keeping the computed face areas.
std::vector< real_typem_d
 Storage for keeping the distance of face planes from origo.
std::vector< vector3_typem_normal
 Storage for keepin the computed face normals.
real_type m_initial_pressure_inside
 Initial pressure inside.
real_type m_initial_volume
 Initial volume.
real_type m_nRT
 This values if computed from the initial pressure and value, by using P V = n R T.

Detailed Description

template<typename types>
class OpenTissue::psys::PressureSoftBody< types >

Adds a internal pressure force to a closed object.

Note that the surrounds is seen as having zero-pressure. Thus unless one applies some elastic surface forces to the object then the object will keep on expanding its volume until the internal pressure have become zero. In general this is not what one wants, therefore soft-springs should be added to the object to counter the internal pressure. Further hard-stick constraints often do not create a nice soft-blobby effect when combined with the pressure force. We recommend using soft-spring forces instead although this have a dramatic impact on the time-step size.


Member Typedef Documentation

template<typename types >
typedef types::coupling_type OpenTissue::psys::PressureSoftBody< types >::coupling_type
template<typename types >
typedef types::mesh_type OpenTissue::psys::PressureSoftBody< types >::mesh_type

Member Enumeration Documentation

template<typename types >
anonymous enum [protected]
Enumerator:
m_X 

Internal variables used by volume computation.

m_Y 
m_Z 

Constructor & Destructor Documentation

template<typename types >
OpenTissue::psys::PressureSoftBody< types >::PressureSoftBody (  )  [inline]
template<typename types >
virtual OpenTissue::psys::PressureSoftBody< types >::~PressureSoftBody (  )  [inline, virtual]

Member Function Documentation

template<typename types >
void OpenTissue::psys::PressureSoftBody< types >::apply (  )  [inline]
template<typename types >
void OpenTissue::psys::PressureSoftBody< types >::compute_face_integral ( face_type f,
vector3_type n,
const real_type d 
) [inline, protected]
template<typename types >
void OpenTissue::psys::PressureSoftBody< types >::compute_projection_integral ( face_type f  )  [inline, protected]
template<typename types >
real_type const OpenTissue::psys::PressureSoftBody< types >::compute_volume_integral ( mesh_type mesh  )  [inline, protected]
template<typename types >
void OpenTissue::psys::PressureSoftBody< types >::init ( coupling_type const &  coupling  )  [inline]
template<typename types >
real_type const& OpenTissue::psys::PressureSoftBody< types >::initial_pressure (  )  const [inline]
template<typename types >
void OpenTissue::psys::PressureSoftBody< types >::set_initial_pressure ( real_type const &  pressure  )  [inline]

Member Data Documentation

template<typename types >
int OpenTissue::psys::PressureSoftBody< types >::m_A [protected]

Internal variables used by volume computation.

template<typename types >
std::vector<real_type> OpenTissue::psys::PressureSoftBody< types >::m_area [protected]

Storage for keeping the computed face areas.

template<typename types >
int OpenTissue::psys::PressureSoftBody< types >::m_B [protected]
template<typename types >
int OpenTissue::psys::PressureSoftBody< types >::m_C [protected]
template<typename types >
coupling_type* OpenTissue::psys::PressureSoftBody< types >::m_coupling [protected]

A pointer to a mesh coupling.

template<typename types >
std::vector<real_type> OpenTissue::psys::PressureSoftBody< types >::m_d [protected]

Storage for keeping the distance of face planes from origo.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fa [protected]

Internal variables used by volume computation.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fb [protected]
template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fc [protected]

Initial pressure inside.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_initial_volume [protected]

Initial volume.

template<typename types >
std::vector<vector3_type> OpenTissue::psys::PressureSoftBody< types >::m_normal [protected]

Storage for keepin the computed face normals.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_nRT [protected]

This values if computed from the initial pressure and value, by using P V = n R T.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_P1 [protected]

Internal variables used by volume computation.

template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_Pa [protected]
template<typename types >
real_type OpenTissue::psys::PressureSoftBody< types >::m_Pb [protected]

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