ESyS-Particle  2.3
CDamping< T > Class Template Reference

Damping of the particle motion by an artificial viscosity. More...

#include <Damping.h>

Inheritance diagram for CDamping< T >:
Collaboration diagram for CDamping< T >:

Public Types

typedef CDampingIGP ParameterType
 
typedef double(CDamping::* ScalarFieldFunction )() const
 
typedef pair< bool, double >
(CDamping::* 
CheckedScalarFieldFunction )() const
 
typedef Vec3(CDamping::* VectorFieldFunction )() const
 

Public Member Functions

 CDamping (T *, const Vec3 &, double, double, int)
 
 CDamping (T *, const CDampingIGP &)
 
 CDamping (T *, CDampingIGP *)
 
virtual ~CDamping ()
 
void setLimit (double limit)
 
void setTimeStepSize (double dt)
 
virtual void calcForces ()
 
virtual bool hasTag (int, int) const
 
virtual Vec3 getPosFirst () const
 
virtual Vec3 getPosSecond () const
 
virtual Vec3 getPos () const
 
vector< int > getAllID () const
 
esys::lsm::quintuple< Vec3,
double, Vec3, double, Vec3
getRaw2Data () const
 
double getDissipatedEnergy () const
 
Vec3 getForce () const
 

Static Public Member Functions

static ScalarFieldFunction getScalarFieldFunction (const string &)
 
static CheckedScalarFieldFunction getCheckedScalarFieldFunction (const string &)
 
static VectorFieldFunction getVectorFieldFunction (const string &)
 
static void zeroFlops ()
 
static int Flops ()
 

Protected Attributes

T * m_p
 the particle More...
 
Vec3 m_vref
 reference velocity More...
 
double m_visc
 artificial viscosity More...
 
double m_dt
 time step More...
 
int m_maxiter
 iteration limit More...
 
double m_E_diss
 dissipated energy More...
 
Vec3 m_force
 current force More...
 

Static Protected Attributes

static double s_limit2 =1e-12
 square error limit for iteration More...
 
static int s_flops = 0
 

Detailed Description

template<class T>
class CDamping< T >

Damping of the particle motion by an artificial viscosity.

Member Typedef Documentation

template<class T>
typedef pair<bool,double>(CDamping::* CDamping< T >::CheckedScalarFieldFunction)() const
template<class T>
typedef CDampingIGP CDamping< T >::ParameterType
template<class T>
typedef double(CDamping::* CDamping< T >::ScalarFieldFunction)() const
template<class T>
typedef Vec3(CDamping::* CDamping< T >::VectorFieldFunction)() const

Constructor & Destructor Documentation

template<class T>
CDamping< T >::CDamping ( T *  P,
const Vec3 V,
double  visc,
double  dt,
int  mi 
)

Construct a damping "interaction" for a particle

Parameters
Pthe particle
Vthe reference velocity
viscthe artificial viscosity
dtthe time step
mithe maximum number of iterations
template<class T>
CDamping< T >::CDamping ( T *  P,
const CDampingIGP param 
)

Construct a damping "interaction" for a particle

Parameters
Pthe particle
paramthe parameters

References CDampingIGP::getMaxIter(), CDampingIGP::getTimeStep(), CDampingIGP::getVisc(), and CDampingIGP::getVRef().

Here is the call graph for this function:

template<class T>
CDamping< T >::CDamping ( T *  P,
CDampingIGP param 
)

Construct a damping "interaction" for a particle

Parameters
Pthe particle
parampointer to the parameters

References CDampingIGP::getMaxIter(), CDampingIGP::getTimeStep(), CDampingIGP::getVisc(), and CDampingIGP::getVRef().

Here is the call graph for this function:

template<class T >
CDamping< T >::~CDamping ( )
virtual

destructor

Member Function Documentation

template<class T >
void CDamping< T >::calcForces ( )
virtual

Calculate the damping force.

25*count+8 flops

template<class T>
static int CDamping< T >::Flops ( )
inlinestatic
template<class T >
vector< int > CDamping< T >::getAllID ( ) const

return a vector of all particle IDs

template<class T >
CDamping< T >::CheckedScalarFieldFunction CDamping< T >::getCheckedScalarFieldFunction ( const string &  name)
static

Get the particle member function which returns a checked scalar field of a given name.

Parameters
namethe name of the field

References NULL.

template<class T >
double CDamping< T >::getDissipatedEnergy ( ) const

return the amount of energy dissipated during the last time step

template<class T >
Vec3 CDamping< T >::getForce ( ) const
template<class T>
virtual Vec3 CDamping< T >::getPos ( ) const
inlinevirtual

Referenced by CDamping< ParticleType >::getRaw2Data().

Here is the caller graph for this function:

template<class T>
virtual Vec3 CDamping< T >::getPosFirst ( ) const
inlinevirtual
template<class T>
virtual Vec3 CDamping< T >::getPosSecond ( ) const
inlinevirtual
template<class T>
esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3> CDamping< T >::getRaw2Data ( ) const
inline
template<class T >
CDamping< T >::ScalarFieldFunction CDamping< T >::getScalarFieldFunction ( const string &  name)
static

Get the particle member function which returns a scalar field of a given name.

Parameters
namethe name of the field

References NULL.

template<class T >
CDamping< T >::VectorFieldFunction CDamping< T >::getVectorFieldFunction ( const string &  name)
static

Get the particle member function which returns a vector field of a given name.

Parameters
namethe name of the field

References NULL.

template<class T >
bool CDamping< T >::hasTag ( int  tag,
int  mask 
) const
virtual

check if any of the particles in the interaction fits tag & mask

Parameters
tagthe tag
maskthe mask
template<class T>
void CDamping< T >::setLimit ( double  limit)
inline
template<class T >
void CDamping< T >::setTimeStepSize ( double  dt)
template<class T>
static void CDamping< T >::zeroFlops ( )
inlinestatic

Member Data Documentation

template<class T>
double CDamping< T >::m_dt
protected

time step

template<class T>
double CDamping< T >::m_E_diss
protected

dissipated energy

template<class T>
Vec3 CDamping< T >::m_force
protected

current force

template<class T>
int CDamping< T >::m_maxiter
protected

iteration limit

template<class T>
T* CDamping< T >::m_p
protected

the particle

template<class T>
double CDamping< T >::m_visc
protected

artificial viscosity

template<class T>
Vec3 CDamping< T >::m_vref
protected

reference velocity

template<class T>
int CDamping< T >::s_flops = 0
staticprotected
template<class T>
double CDamping< T >::s_limit2 =1e-12
staticprotected

square error limit for iteration


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