ESyS-Particle  2.3.4
CRotDamping< T > Class Template Reference

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

#include <RotDamping.h>

Collaboration diagram for CRotDamping< T >:

Public Types

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

Public Member Functions

 CRotDamping (T *, CDampingIGP *)
 
virtual ~CRotDamping ()
 
void setLimit (double limit)
 
virtual void calcForces ()
 
void setTimeStepSize (double dt)
 
virtual bool hasTag (int, int) const
 
virtual Vec3 getPosFirst () const
 
virtual Vec3 getPosSecond () const
 
virtual Vec3 getPos () const
 
vector< int > getAllID () const
 
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 &)
 
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
 dissipaed 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 CRotDamping< T >

Damping of the rotational part of the particle motion by an artificial viscosity.

Member Typedef Documentation

◆ CheckedScalarFieldFunction

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

◆ ParameterType

template<class T >
typedef CDampingIGP CRotDamping< T >::ParameterType

◆ ScalarFieldFunction

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

◆ VectorFieldFunction

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

Constructor & Destructor Documentation

◆ CRotDamping()

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

Construct a rotational 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:

◆ ~CRotDamping()

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

destructor

Member Function Documentation

◆ calcForces()

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

Calculate the damping force.

25*count+8 flops

◆ Flops()

template<class T >
static int CRotDamping< T >::Flops ( )
inlinestatic

◆ getAllID()

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

return a vector of all particle IDs

◆ getCheckedScalarFieldFunction()

template<class T >
CRotDamping< T >::CheckedScalarFieldFunction CRotDamping< 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 CRotDamping< T >::getDissipatedEnergy

return the amount of energy dissipated during the last time step

◆ getForce()

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

◆ getPos()

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

References CRotDamping< T >::m_p.

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

Here is the caller graph for this function:

◆ getPosFirst()

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

References CRotDamping< T >::m_p.

◆ getPosSecond()

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

◆ getRaw2Data()

template<class T >
quintuple<Vec3,double,Vec3,double,Vec3> CRotDamping< T >::getRaw2Data ( ) const
inline

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

Here is the call graph for this function:

◆ getScalarFieldFunction()

template<class T >
CRotDamping< T >::ScalarFieldFunction CRotDamping< 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 >
CRotDamping< T >::VectorFieldFunction CRotDamping< 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 CRotDamping< 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

◆ setLimit()

template<class T >
void CRotDamping< T >::setLimit ( double  limit)
inline

◆ setTimeStepSize()

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

◆ zeroFlops()

template<class T >
static void CRotDamping< T >::zeroFlops ( )
inlinestatic

Member Data Documentation

◆ m_dt

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

time step

◆ m_E_diss

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

dissipaed energy

◆ m_force

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

current force

◆ m_maxiter

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

iteration limit

◆ m_p

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

◆ m_visc

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

artificial viscosity

◆ m_vref

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

reference velocity

◆ s_flops

template<class T >
int CRotDamping< T >::s_flops = 0
staticprotected

◆ s_limit2

template<class T >
double CRotDamping< T >::s_limit2 =1e-12
staticprotected

square error limit for iteration

Referenced by CRotDamping< T >::setLimit().


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