ESyS-Particle  2.3.4
CLocalDamping< T > Class Template Reference

Local damping of the particle motion by a damping coefficient. More...

#include <LocalDamping.h>

Collaboration diagram for CLocalDamping< T >:

Public Types

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

Public Member Functions

 CLocalDamping (T *, double, double)
 
 CLocalDamping (T *, const CLocalDampingIGP &)
 
 CLocalDamping (T *, CLocalDampingIGP *)
 
virtual ~CLocalDamping ()
 
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, Vec3getRaw2Data () 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 &)
 

Protected Attributes

T * m_p
 the particle More...
 
double m_visc
 damping coefficient More...
 
double m_dt
 time step More...
 
double m_E_diss
 dissipated energy More...
 
Vec3 m_force
 current force More...
 

Detailed Description

template<class T>
class CLocalDamping< T >

Local damping of the particle motion by a damping coefficient.

Member Typedef Documentation

◆ CheckedScalarFieldFunction

template<class T >
typedef pair<bool,double>(CLocalDamping::* CLocalDamping< T >::CheckedScalarFieldFunction) () const

◆ ParameterType

template<class T >
typedef CLocalDampingIGP CLocalDamping< T >::ParameterType

◆ ScalarFieldFunction

template<class T >
typedef double(CLocalDamping::* CLocalDamping< T >::ScalarFieldFunction) () const

◆ VectorFieldFunction

template<class T >
typedef Vec3(CLocalDamping::* CLocalDamping< T >::VectorFieldFunction) () const

Constructor & Destructor Documentation

◆ CLocalDamping() [1/3]

template<class T >
CLocalDamping< T >::CLocalDamping ( T *  P,
double  visc,
double  dt 
)

Construct a local damping "interaction" for a particle

Parameters
Pthe particle
viscthe damping coefficient
dtthe time step

◆ CLocalDamping() [2/3]

template<class T >
CLocalDamping< T >::CLocalDamping ( T *  P,
const CLocalDampingIGP param 
)

Construct a local damping "interaction" for a particle

Parameters
Pthe particle
paramthe parameters

References CLocalDampingIGP::getTimeStep(), and CLocalDampingIGP::getVisc().

Here is the call graph for this function:

◆ CLocalDamping() [3/3]

template<class T >
CLocalDamping< T >::CLocalDamping ( T *  P,
CLocalDampingIGP param 
)

Construct a local damping "interaction" for a particle

Parameters
Pthe particle
parampointer to the parameters

References CLocalDampingIGP::getTimeStep(), and CLocalDampingIGP::getVisc().

Here is the call graph for this function:

◆ ~CLocalDamping()

template<class T >
CLocalDamping< T >::~CLocalDamping
virtual

destructor

Member Function Documentation

◆ calcForces()

template<class T >
void CLocalDamping< T >::calcForces
virtual

Calculate the local damping force.

References Vec3::norm(), Vec3::X(), Vec3::Y(), and Vec3::Z().

Here is the call graph for this function:

◆ getAllID()

template<class T >
vector< int > CLocalDamping< T >::getAllID

return a vector of all particle IDs

◆ getCheckedScalarFieldFunction()

template<class T >
CLocalDamping< T >::CheckedScalarFieldFunction CLocalDamping< 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.

◆ getDissipatedEnergy()

template<class T >
double CLocalDamping< T >::getDissipatedEnergy

return the amount of energy dissipated during the last time step

◆ getForce()

template<class T >
Vec3 CLocalDamping< T >::getForce

◆ getPos()

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

References CLocalDamping< T >::m_p.

Referenced by CLocalDamping< T >::getRaw2Data().

Here is the caller graph for this function:

◆ getPosFirst()

template<class T >
virtual Vec3 CLocalDamping< T >::getPosFirst ( ) const
inlinevirtual

◆ getPosSecond()

template<class T >
virtual Vec3 CLocalDamping< T >::getPosSecond ( ) const
inlinevirtual

◆ getRaw2Data()

template<class T >
esys::lsm::quintuple<Vec3,double,Vec3,double,Vec3> CLocalDamping< T >::getRaw2Data ( ) const
inline

References CLocalDamping< T >::getPos(), CLocalDamping< T >::m_p, and Vec3::ZERO.

Here is the call graph for this function:

◆ getScalarFieldFunction()

template<class T >
CLocalDamping< T >::ScalarFieldFunction CLocalDamping< 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.

◆ getVectorFieldFunction()

template<class T >
CLocalDamping< T >::VectorFieldFunction CLocalDamping< 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.

◆ hasTag()

template<class T >
bool CLocalDamping< 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

◆ setTimeStepSize()

template<class T >
void CLocalDamping< T >::setTimeStepSize ( double  dt)

Member Data Documentation

◆ m_dt

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

time step

◆ m_E_diss

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

dissipated energy

◆ m_force

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

current force

◆ m_p

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

◆ m_visc

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

damping coefficient


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