Public Types | Public Member Functions | Protected Attributes

OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField > Class Template Reference

#include <sph_system.h>

List of all members.

Public Types

typedef Types::real_type real_type
typedef Types::vector vector
typedef Types::particle particle
typedef Types::particle_container particle_container
typedef
Types::particle_cptr_container 
particle_cptr_container
typedef
Types::particle_cptr_pair_container 
particle_cptr_pair_container
typedef Types::collision_detection collision_detection
typedef Material< Typesfluid_material
typedef FluidHashPolicy< Typesfluid_hash_policy
typedef Types::template
hashing< fluid_hash_policy,
typename
fluid_hash_policy::data_type
fluid_hashing
typedef fluid_hashing::hash_grid fluid_hash_grid
typedef fluid_hashing::point_query fluid_point_query

Public Member Functions

 System ()
virtual ~System ()
template<typename MaterialPolicy >
bool create (const MaterialPolicy &material, const vector &gravity)
bool initHashing (size_t size, const real_type &spacing)
collision_detectioncollisionSystem ()
const collision_detectioncollisionSystem () const
template<typename PositionIterator >
bool init (const PositionIterator &begin, const PositionIterator &end)
template<typename PositionIterator , typename VelocityIterator >
bool init (const PositionIterator &pbegin, const PositionIterator &pend, const VelocityIterator &vbegin, const VelocityIterator &vend)
template<typename EmitterPolicy >
bool init (EmitterPolicy &emitter, size_t particles)
const particle_containerparticles () const
const fluid_materialmaterial () const
ColorField::value isoValue (const vector &pos)
bool solve ()
bool simulate ()

Protected Attributes

fluid_point_query m_search
collision_detection m_colisys
particle_container m_particles
particle_cptr_container m_cptr_particles
IntegratorPolicy * m_integrator
const DensitySolver * m_density
const PressureSolver * m_pressure
const NormalSolver * m_normal
const GravityForce * m_gravityForce
const BuoyancyForce * m_buoyancyForce
const PressureForcem_pressureForce
const ViscosityForcem_viscosityForce
const SurfaceForcem_surfaceForce
const ColorFieldm_color
const fluid_materialm_material

Detailed Description

template<typename Types, typename DensitySolver, typename PressureSolver, typename NormalSolver, typename GravityForce, typename BuoyancyForce, typename PressureForce, typename ViscosityForce, typename SurfaceForce, typename IntegratorPolicy, typename ColorField>
class OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >

SPH System Class.


Member Typedef Documentation

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::collision_detection OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::collision_detection
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef fluid_hashing::hash_grid OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::fluid_hash_grid
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef FluidHashPolicy<Types> OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::fluid_hash_policy
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::template hashing<fluid_hash_policy, typename fluid_hash_policy::data_type> OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::fluid_hashing
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Material<Types> OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::fluid_material
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef fluid_hashing::point_query OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::fluid_point_query
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::particle OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::particle
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::particle_container OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::particle_container
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::particle_cptr_container OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::particle_cptr_container
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::particle_cptr_pair_container OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::particle_cptr_pair_container
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::real_type OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::real_type
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
typedef Types::vector OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::vector

Constructor & Destructor Documentation

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::System (  )  [inline]

Default Constructor.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
virtual OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::~System (  )  [inline, virtual]

Deconstructor.


Member Function Documentation

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
collision_detection& OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::collisionSystem (  )  [inline]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const collision_detection& OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::collisionSystem (  )  const [inline]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
template<typename MaterialPolicy >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::create ( const MaterialPolicy &  material,
const vector gravity 
) [inline]

Create the SPH system.

Parameters:
particle_mass sets the const mass for all particles in this system
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
template<typename PositionIterator >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::init ( const PositionIterator &  begin,
const PositionIterator &  end 
) [inline]

System Initialization of particles (positions)

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
template<typename PositionIterator , typename VelocityIterator >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::init ( const PositionIterator &  pbegin,
const PositionIterator &  pend,
const VelocityIterator &  vbegin,
const VelocityIterator &  vend 
) [inline]

System Initialization of particles (positions and velocities)

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
template<typename EmitterPolicy >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::init ( EmitterPolicy &  emitter,
size_t  particles 
) [inline]

System Initialization of particles using emitter.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::initHashing ( size_t  size,
const real_type spacing 
) [inline]

Hash Table Initialization.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
ColorField::value OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::isoValue ( const vector pos  )  [inline]

Calculate iso value from pos.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const fluid_material* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::material (  )  const [inline]

Retrieve material.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const particle_container& OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::particles (  )  const [inline]

Retrieve particles.

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::simulate (  )  [inline]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
bool OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::solve (  )  [inline]

Sequential Solver.


Member Data Documentation

template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const BuoyancyForce* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_buoyancyForce [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
collision_detection OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_colisys [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const ColorField* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_color [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
particle_cptr_container OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_cptr_particles [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const DensitySolver* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_density [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const GravityForce* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_gravityForce [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
IntegratorPolicy* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_integrator [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const fluid_material* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_material [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const NormalSolver* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_normal [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
particle_container OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_particles [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const PressureSolver* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_pressure [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const PressureForce* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_pressureForce [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
fluid_point_query OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_search [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const SurfaceForce* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_surfaceForce [protected]
template<typename Types , typename DensitySolver , typename PressureSolver , typename NormalSolver , typename GravityForce , typename BuoyancyForce , typename PressureForce , typename ViscosityForce , typename SurfaceForce , typename IntegratorPolicy , typename ColorField >
const ViscosityForce* OpenTissue::sph::System< Types, DensitySolver, PressureSolver, NormalSolver, GravityForce, BuoyancyForce, PressureForce, ViscosityForce, SurfaceForce, IntegratorPolicy, ColorField >::m_viscosityForce [protected]

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