Public Member Functions | Public Attributes | List of all members
ComputationalCell Class Reference

Computational cell. More...

#include <computational_cell_2d.hpp>

Inheritance diagram for ComputationalCell:
Inheritance graph
[legend]
Collaboration diagram for ComputationalCell:
Collaboration graph
[legend]

Public Member Functions

 ComputationalCell (ComputationalCell const &other)
 Copy constructor. More...
 
 ComputationalCell (void)
 Default constructor.
 
ComputationalCelloperator+= (ComputationalCell const &other)
 Self increment operator. More...
 
ComputationalCelloperator-= (ComputationalCell const &other)
 Self reduction operator. More...
 
ComputationalCelloperator*= (double s)
 Self multiplication operator. More...
 
ComputationalCelloperator= (ComputationalCell const &other)
 Self decrement operator. More...
 
size_t getChunkSize (void) const
 Returns the size of array needed to store all data. More...
 
vector< double > serialize (void) const
 Convert an object to an array of numbers. More...
 
void unserialize (const vector< double > &data)
 Convert an array of numbers to an object. More...
 
- Public Member Functions inherited from Serializable
virtual ~Serializable (void)
 Class destructor.
 

Public Attributes

double density
 Density.
 
double pressure
 Pressure.
 
Vector2D velocity
 Velocity.
 
tvector tracers
 Tracers (can transfer from one cell to another)
 
svector stickers
 Stickers (stick to the same cell)
 

Detailed Description

Computational cell.

Definition at line 22 of file computational_cell_2d.hpp.

Constructor & Destructor Documentation

◆ ComputationalCell()

ComputationalCell::ComputationalCell ( ComputationalCell const &  other)

Copy constructor.

Parameters
otherThe cell to copy

Definition at line 10 of file computational_cell_2d.cpp.

Member Function Documentation

◆ getChunkSize()

size_t ComputationalCell::getChunkSize ( void  ) const
virtual

Returns the size of array needed to store all data.

Returns
Size of array

Implements Serializable.

Definition at line 171 of file computational_cell_2d.cpp.

◆ operator*=()

ComputationalCell & ComputationalCell::operator*= ( double  s)

Self multiplication operator.

Parameters
sThe scalar to multiply
Returns
Reference to self

Definition at line 48 of file computational_cell_2d.cpp.

Here is the call graph for this function:

◆ operator+=()

ComputationalCell & ComputationalCell::operator+= ( ComputationalCell const &  other)

Self increment operator.

Parameters
otherAddition
Returns
Reference to self

Definition at line 24 of file computational_cell_2d.cpp.

◆ operator-=()

ComputationalCell & ComputationalCell::operator-= ( ComputationalCell const &  other)

Self reduction operator.

Parameters
otherReduction
Returns
Reference to self

Definition at line 36 of file computational_cell_2d.cpp.

◆ operator=()

ComputationalCell & ComputationalCell::operator= ( ComputationalCell const &  other)

Self decrement operator.

Parameters
otherdifference
Returns
Reference to self

Definition at line 14 of file computational_cell_2d.cpp.

◆ serialize()

vector< double > ComputationalCell::serialize ( void  ) const
virtual

Convert an object to an array of numbers.

Returns
Array of numbers

Implements Serializable.

Definition at line 176 of file computational_cell_2d.cpp.

Here is the call graph for this function:

◆ unserialize()

void ComputationalCell::unserialize ( const vector< double > &  data)
virtual

Convert an array of numbers to an object.

Parameters
dataList of numbers

Implements Serializable.

Definition at line 194 of file computational_cell_2d.cpp.

Here is the caller graph for this function:

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