Particle Class Reference

#include <Particle.H>

Inheritance diagram for Particle:

Inheritance graph
[legend]

List of all members.


Detailed Description

A basic particle class. Includes mass, position, velocity, and acceleration

Public Member Functions

 Particle ()
 default constructor
 Particle (const Real a_mass, const RealVect &a_position, const RealVect &a_velocity=RealVect::Zero)
 same as define()
virtual ~Particle ()
 default
void define (const Real a_mass, const RealVect &a_position, const RealVect &a_velocity=RealVect::Zero)
 for non-default constructor
void setMass (const Real a_mass)
 set particle mass
Realmass ()
const Realmass () const
void setVelocity (const RealVect &a_velocity)
 set velocity field
void setVelocity (const Real &a_velocity, const int a_dir)
RealVectvelocity ()
const RealVectvelocity () const
Real velocity (const int a_dir) const
void setAcceleration (const RealVect &a_velocity)
 set acceleration field
RealVectacceleration ()
const RealVectacceleration () const
Real acceleration (const int a_dir) const
virtual bool operator== (const Particle &a_p) const
virtual bool operator== (const Particle *a_p) const
virtual bool operator!= (const Particle &a_p) const
virtual int size () const
 { linearization functions}
virtual void linearOut (void *buf) const
virtual void linearIn (void *buf)

Protected Attributes

Real m_mass
RealVect m_velocity
RealVect m_acceleration

Friends

std::ostream & operator<< (std::ostream &ostr, const Particle &p)

Constructor & Destructor Documentation

Particle::Particle (  ) 

default constructor

Particle::Particle ( const Real  a_mass,
const RealVect a_position,
const RealVect a_velocity = RealVect::Zero 
)

same as define()

virtual Particle::~Particle (  )  [virtual]

default


Member Function Documentation

void Particle::define ( const Real  a_mass,
const RealVect a_position,
const RealVect a_velocity = RealVect::Zero 
)

for non-default constructor

void Particle::setMass ( const Real  a_mass  ) 

set particle mass

Real& Particle::mass (  ) 

const Real& Particle::mass (  )  const

void Particle::setVelocity ( const RealVect a_velocity  ) 

set velocity field

void Particle::setVelocity ( const Real a_velocity,
const int  a_dir 
)

RealVect& Particle::velocity (  ) 

const RealVect& Particle::velocity (  )  const

Real Particle::velocity ( const int  a_dir  )  const

void Particle::setAcceleration ( const RealVect a_velocity  ) 

set acceleration field

RealVect& Particle::acceleration (  ) 

const RealVect& Particle::acceleration (  )  const

Real Particle::acceleration ( const int  a_dir  )  const

virtual bool Particle::operator== ( const Particle a_p  )  const [virtual]

virtual bool Particle::operator== ( const Particle a_p  )  const [virtual]

virtual bool Particle::operator!= ( const Particle a_p  )  const [virtual]

virtual int Particle::size (  )  const [virtual]

{ linearization functions}

Returns the size, in number of bytes, of a flat linear representation of the data in this object.

Reimplemented from BinItem.

virtual void Particle::linearOut ( void *  buf  )  const [virtual]

Write a linear binary representation of the internal data. Assumes that sufficient memory for the buffer has already been allocated by the caller.

Reimplemented from BinItem.

virtual void Particle::linearIn ( void *  buf  )  [virtual]

Read a linear binary representation of the internal data. Assumes that the buffer has the correct data.

Reimplemented from BinItem.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  ostr,
const Particle p 
) [friend]


Member Data Documentation

Real Particle::m_mass [protected]


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

Generated on Fri Apr 28 03:27:22 2017 for Chombo + EB + MF by  doxygen 1.5.5