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

OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits > Class Template Reference

#include <swe_damped_wave_equation.h>

List of all members.

Classes

class  DWEParticle

Public Types

typedef math_types_ math_types
typedef math_types::real_type real_type
typedef math_types::index_type index_type
typedef math_types::vector3_type vector3_type
typedef DWEParticle dwe_particle
typedef std::vector< dwe_particleparticle_container
typedef
particle_container::iterator 
particle_iterator
typedef
particle_container::const_iterator 
particle_const_iterator

Public Member Functions

 DampedWaveEquations ()
virtual ~DampedWaveEquations ()
bool init (index_type columns, index_type rows, real_type const &default_height=0)
void simulate (real_type const &dt)
real_typedamping ()
real_type const & damping () const
real_typespeed ()
real_type const & speed () const
real_typespacing ()
real_type const & spacing () const
bool & smooth ()
bool const & smooth () const
index_type const & columns () const
index_type const & rows () const
index_type size () const
dwe_particle const & particle (index_type n) const
dwe_particleparticle (index_type n)
dwe_particle const & particle (index_type i, index_type j) const
dwe_particleparticle (index_type i, index_type j)
vector3_type normal (index_type i, index_type j) const

Protected Member Functions

dwe_particle const & get (int i, int j) const

Protected Attributes

index_type m_I
index_type m_J
real_type m_k
 Damping koefficient.
real_type m_c
 Wave speed.
real_type m_D
 Delta step size (spacing) between grid vertices => Dx = Dy.
bool m_smooth
 Smooth dwe/fdm solver flag.
particle_container m_pars

Detailed Description

template<typename math_types_, typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
class OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >

Wave Equation with Damping (Simplified Linearized Shallow Water Equations)

Implementation is based on the paper:

Gennadiy Nikishkov and Youhei Nishidate, "Fast Water Animation Using the Wave Equation with Damping", Workshop on Computer Graphics and Geometric Modeling, CGGM 2005, pp. 232-239.

http://www.u-aizu.ac.jp/~niki/papers/2005%20Fast%20water%20animation.pdf


Member Typedef Documentation

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef DWEParticle OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::dwe_particle
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef math_types::index_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::index_type
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef math_types_ OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::math_types
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef particle_container::const_iterator OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle_const_iterator
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef std::vector<dwe_particle> OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle_container
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef particle_container::iterator OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle_iterator
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef math_types::real_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::real_type
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
typedef math_types::vector3_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::vector3_type

Constructor & Destructor Documentation

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::DampedWaveEquations (  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
virtual OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::~DampedWaveEquations (  )  [inline, virtual]

Member Function Documentation

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
index_type const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::columns (  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::damping (  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::damping (  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
dwe_particle const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::get ( int  i,
int  j 
) const [inline, protected]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
bool OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::init ( index_type  columns,
index_type  rows,
real_type const &  default_height = 0 
) [inline]

Initialize the DWE system.

  • Must be called before anything can happen.
Parameters:
columns amount of particles in the "x"-direction.
rows amount of particles in the "y"-direction.
default_height default water height.
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
vector3_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::normal ( index_type  i,
index_type  j 
) const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
dwe_particle& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle ( index_type  i,
index_type  j 
) [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
dwe_particle const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle ( index_type  i,
index_type  j 
) const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
dwe_particle const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle ( index_type  n  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
dwe_particle& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::particle ( index_type  n  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
index_type const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::rows ( void   )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
void OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::simulate ( real_type const &  dt  )  [inline]

Execute one physical simulation step.

Parameters:
dt delta time == time step.
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
index_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::size (  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
bool& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::smooth (  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
bool const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::smooth (  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::spacing (  )  const [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::spacing (  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::speed (  )  [inline]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type const& OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::speed (  )  const [inline]

Member Data Documentation

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_c [protected]

Wave speed.

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_D [protected]

Delta step size (spacing) between grid vertices => Dx = Dy.

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
index_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_I [protected]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
index_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_J [protected]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
real_type OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_k [protected]

Damping koefficient.

template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
particle_container OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_pars [protected]
template<typename math_types_ , typename dwe_particle_traits = OpenTissue::utility::EmptyTraits>
bool OpenTissue::swe::DampedWaveEquations< math_types_, dwe_particle_traits >::m_smooth [protected]

Smooth dwe/fdm solver flag.


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