Chombo + EB + MF
3.2
|
#include <Particle.H>
Public Member Functions | |
Particle () | |
default constructor More... | |
Particle (const Real a_mass, const RealVect &a_position, const RealVect &a_velocity=RealVect::Zero) | |
same as define() More... | |
virtual | ~Particle () |
default More... | |
void | define (const Real a_mass, const RealVect &a_position, const RealVect &a_velocity=RealVect::Zero) |
for non-default constructor More... | |
void | setMass (const Real a_mass) |
set particle mass More... | |
Real & | mass () |
const Real & | mass () const |
void | setVelocity (const RealVect &a_velocity) |
set velocity field More... | |
void | setVelocity (const Real &a_velocity, const int a_dir) |
RealVect & | velocity () |
const RealVect & | velocity () const |
Real | velocity (const int a_dir) const |
void | setAcceleration (const RealVect &a_velocity) |
set acceleration field More... | |
RealVect & | acceleration () |
const RealVect & | acceleration () 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} More... | |
virtual void | linearOut (void *buf) const |
virtual void | linearIn (void *buf) |
Public Member Functions inherited from BinItem | |
BinItem () | |
Null constructor, copy constructor and operator= can be compiler defined. More... | |
BinItem (const RealVect &a_position) | |
Constructs a BinItem at a_position. More... | |
virtual | ~BinItem () |
Destructor. More... | |
virtual void | define (const RealVect &a_position) |
Same as the constructor. More... | |
void | setPosition (const RealVect &a_position) |
Change the position. More... | |
void | setPosition (const Real a_position, const int a_dimension) |
Change one component of the position. More... | |
RealVect & | position () |
Return a reference to the position. More... | |
const RealVect & | position () const |
Return a constant reference to the position. More... | |
Real | position (const int a_dir) const |
Gets one component of the position. More... | |
virtual bool | operator== (const BinItem &a_p) const |
Equality operator. Checks whether two BinItems have equal data. More... | |
virtual bool | operator== (const BinItem *a_p) const |
Same as the above, but defined for a pointer. More... | |
virtual bool | operator!= (const BinItem &a_p) const |
Inequality operator. More... | |
int | preAllocatable () |
virtual void | print () const |
Write a human-readable version to stdout (for debugging) More... | |
Protected Attributes | |
Real | m_mass |
RealVect | m_velocity |
RealVect | m_acceleration |
Protected Attributes inherited from BinItem | |
RealVect | m_position |
this is the position in space of this item More... | |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const Particle &p) |
A basic particle class. Includes mass, position, velocity, and acceleration
Particle::Particle | ( | ) |
default constructor
Particle::Particle | ( | const Real | a_mass, |
const RealVect & | a_position, | ||
const RealVect & | a_velocity = RealVect::Zero |
||
) |
same as define()
|
virtual |
default
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 |
|
virtual |
|
virtual |
|
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 |
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 |
Read a linear binary representation of the internal data. Assumes that the buffer has the correct data.
Reimplemented from BinItem.
|
friend |
|
protected |
|
protected |
|
protected |