ESyS-Particle  2.3.4
CSphereBody Class Reference

base class for spherical non-inertial bodies (similar to simple walls) More...

#include <SphereBody.h>

Collaboration diagram for CSphereBody:

Public Member Functions

 CSphereBody ()
 
 CSphereBody (const Vec3 &, const double &)
 
virtual ~CSphereBody ()
 
void moveBy (const Vec3 &v)
 
void moveTo (const Vec3 &v)
 
void setVel (const Vec3 &v)
 
Vec3 getVel ()
 
const Vec3getCentre () const
 
const double & getRadius () const
 
void addForce (const Vec3 &force)
 
void zeroForce ()
 
const Vec3getForce ()
 
const Vec3getPos ()
 
double getDisplacement ()
 
Vec3 getTotalDisplacement ()
 
void resetDisplacement ()
 
virtual void writeCheckPoint (ostream &, const string &) const
 
virtual void loadCheckPoint (istream &)
 

Protected Attributes

Vec3 m_centre
 
double m_radius
 
Vec3 m_force
 
Vec3 m_oldpos
 
Vec3 m_vel
 

Friends

ostream & operator<< (ostream &, const CSphereBody &)
 

Detailed Description

base class for spherical non-inertial bodies (similar to simple walls)

Author
Dion Weatherley $Revision$ $Date$

Constructor & Destructor Documentation

◆ CSphereBody() [1/2]

CSphereBody::CSphereBody ( )

Default constructor. Zeroes all variables. Does not construct a useable sphere body!

References m_centre, m_force, m_oldpos, m_radius, m_vel, and Vec3::ZERO.

◆ CSphereBody() [2/2]

CSphereBody::CSphereBody ( const Vec3 c,
const double &  r 
)

constructor

Parameters
cthe centre of the sphere body
rthe radius of the sphere body

References m_centre, m_force, m_oldpos, m_radius, m_vel, and Vec3::ZERO.

◆ ~CSphereBody()

virtual CSphereBody::~CSphereBody ( )
inlinevirtual

Member Function Documentation

◆ addForce()

void CSphereBody::addForce ( const Vec3 force)
inline

References m_force.

◆ getCentre()

const Vec3& CSphereBody::getCentre ( ) const
inline

References m_centre.

◆ getDisplacement()

double CSphereBody::getDisplacement ( )
inline

References m_centre, and m_oldpos.

Referenced by ASphereBodyInteractionGroup< T >::getDisplacement().

Here is the caller graph for this function:

◆ getForce()

const Vec3& CSphereBody::getForce ( )
inline

References m_force.

◆ getPos()

const Vec3& CSphereBody::getPos ( )
inline

References m_centre.

◆ getRadius()

const double& CSphereBody::getRadius ( ) const
inline

References m_radius.

◆ getTotalDisplacement()

Vec3 CSphereBody::getTotalDisplacement ( )
inline

References m_centre, and m_oldpos.

◆ getVel()

Vec3 CSphereBody::getVel ( )
inline

References m_vel.

◆ loadCheckPoint()

void CSphereBody::loadCheckPoint ( istream &  ist)
virtual

load wall data from a restartable checkpoint

Parameters
istthe input stream from which the checkpoint is read

References m_centre, m_oldpos, and m_radius.

Referenced by TSubLattice< T >::loadCheckPointData().

Here is the caller graph for this function:

◆ moveBy()

void CSphereBody::moveBy ( const Vec3 v)
inline

References m_centre.

Referenced by ASphereBodyInteractionGroup< T >::moveSphereBodyBy().

Here is the caller graph for this function:

◆ moveTo()

void CSphereBody::moveTo ( const Vec3 v)
inline

References m_centre.

◆ resetDisplacement()

void CSphereBody::resetDisplacement ( )
inline

References m_centre, and m_oldpos.

Referenced by ASphereBodyInteractionGroup< T >::resetDisplacement().

Here is the caller graph for this function:

◆ setVel()

void CSphereBody::setVel ( const Vec3 v)
inline

References m_vel.

◆ writeCheckPoint()

void CSphereBody::writeCheckPoint ( ostream &  ost,
const string &  delim 
) const
virtual

write restartable checkpoint data to an output stream

Parameters
ostthe output stream
delim

References m_centre, m_oldpos, and m_radius.

◆ zeroForce()

void CSphereBody::zeroForce ( )
inline

References m_force.

Referenced by ASphereBodyInteractionGroup< T >::zeroForce().

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  ost,
const CSphereBody w 
)
friend

Member Data Documentation

◆ m_centre

◆ m_force

Vec3 CSphereBody::m_force
protected

◆ m_oldpos

◆ m_radius

double CSphereBody::m_radius
protected

◆ m_vel

Vec3 CSphereBody::m_vel
protected

Referenced by CSphereBody(), getVel(), and setVel().


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