#include <psys_pressure_softbody.h>
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_type * | m_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_type > | m_area |
Storage for keeping the computed face areas. | |
std::vector< real_type > | m_d |
Storage for keeping the distance of face planes from origo. | |
std::vector< vector3_type > | m_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. |
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.
typedef types::coupling_type OpenTissue::psys::PressureSoftBody< types >::coupling_type |
typedef mesh_type::face_iterator OpenTissue::psys::PressureSoftBody< types >::face_iterator |
typedef mesh_type::face_type OpenTissue::psys::PressureSoftBody< types >::face_type |
typedef mesh_type::face_vertex_circulator OpenTissue::psys::PressureSoftBody< types >::face_vertex_circulator |
typedef types::math_types OpenTissue::psys::PressureSoftBody< types >::math_types |
typedef types::mesh_type OpenTissue::psys::PressureSoftBody< types >::mesh_type |
typedef math_types::real_type OpenTissue::psys::PressureSoftBody< types >::real_type |
typedef math_types::vector3_type OpenTissue::psys::PressureSoftBody< types >::vector3_type |
anonymous enum [protected] |
OpenTissue::psys::PressureSoftBody< types >::PressureSoftBody | ( | ) | [inline] |
virtual OpenTissue::psys::PressureSoftBody< types >::~PressureSoftBody | ( | ) | [inline, virtual] |
void OpenTissue::psys::PressureSoftBody< types >::apply | ( | ) | [inline] |
void OpenTissue::psys::PressureSoftBody< types >::compute_face_integral | ( | face_type & | f, | |
vector3_type & | n, | |||
const real_type & | d | |||
) | [inline, protected] |
void OpenTissue::psys::PressureSoftBody< types >::compute_projection_integral | ( | face_type & | f | ) | [inline, protected] |
real_type const OpenTissue::psys::PressureSoftBody< types >::compute_volume_integral | ( | mesh_type & | mesh | ) | [inline, protected] |
void OpenTissue::psys::PressureSoftBody< types >::init | ( | coupling_type const & | coupling | ) | [inline] |
real_type const& OpenTissue::psys::PressureSoftBody< types >::initial_pressure | ( | ) | const [inline] |
void OpenTissue::psys::PressureSoftBody< types >::set_initial_pressure | ( | real_type const & | pressure | ) | [inline] |
int OpenTissue::psys::PressureSoftBody< types >::m_A [protected] |
Internal variables used by volume computation.
std::vector<real_type> OpenTissue::psys::PressureSoftBody< types >::m_area [protected] |
Storage for keeping the computed face areas.
int OpenTissue::psys::PressureSoftBody< types >::m_B [protected] |
int OpenTissue::psys::PressureSoftBody< types >::m_C [protected] |
coupling_type* OpenTissue::psys::PressureSoftBody< types >::m_coupling [protected] |
A pointer to a mesh coupling.
std::vector<real_type> OpenTissue::psys::PressureSoftBody< types >::m_d [protected] |
Storage for keeping the distance of face planes from origo.
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fa [protected] |
Internal variables used by volume computation.
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fb [protected] |
real_type OpenTissue::psys::PressureSoftBody< types >::m_Fc [protected] |
real_type OpenTissue::psys::PressureSoftBody< types >::m_initial_pressure_inside [protected] |
Initial pressure inside.
real_type OpenTissue::psys::PressureSoftBody< types >::m_initial_volume [protected] |
Initial volume.
std::vector<vector3_type> OpenTissue::psys::PressureSoftBody< types >::m_normal [protected] |
Storage for keepin the computed face normals.
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.
real_type OpenTissue::psys::PressureSoftBody< types >::m_P1 [protected] |
Internal variables used by volume computation.
real_type OpenTissue::psys::PressureSoftBody< types >::m_Pa [protected] |
real_type OpenTissue::psys::PressureSoftBody< types >::m_Pb [protected] |