Computational cell. More...
#include <computational_cell_2d.hpp>
Public Member Functions | |
ComputationalCell (ComputationalCell const &other) | |
Copy constructor. More... | |
ComputationalCell (void) | |
Default constructor. | |
ComputationalCell & | operator+= (ComputationalCell const &other) |
Self increment operator. More... | |
ComputationalCell & | operator-= (ComputationalCell const &other) |
Self reduction operator. More... | |
ComputationalCell & | operator*= (double s) |
Self multiplication operator. More... | |
ComputationalCell & | operator= (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... | |
![]() | |
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) | |
Computational cell.
Definition at line 22 of file computational_cell_2d.hpp.
ComputationalCell::ComputationalCell | ( | ComputationalCell const & | other | ) |
Copy constructor.
other | The cell to copy |
Definition at line 10 of file computational_cell_2d.cpp.
|
virtual |
Returns the size of array needed to store all data.
Implements Serializable.
Definition at line 171 of file computational_cell_2d.cpp.
ComputationalCell & ComputationalCell::operator*= | ( | double | s | ) |
Self multiplication operator.
s | The scalar to multiply |
Definition at line 48 of file computational_cell_2d.cpp.
ComputationalCell & ComputationalCell::operator+= | ( | ComputationalCell const & | other | ) |
Self increment operator.
other | Addition |
Definition at line 24 of file computational_cell_2d.cpp.
ComputationalCell & ComputationalCell::operator-= | ( | ComputationalCell const & | other | ) |
Self reduction operator.
other | Reduction |
Definition at line 36 of file computational_cell_2d.cpp.
ComputationalCell & ComputationalCell::operator= | ( | ComputationalCell const & | other | ) |
Self decrement operator.
other | difference |
Definition at line 14 of file computational_cell_2d.cpp.
|
virtual |
Convert an object to an array of numbers.
Implements Serializable.
Definition at line 176 of file computational_cell_2d.cpp.
|
virtual |
Convert an array of numbers to an object.
data | List of numbers |
Implements Serializable.
Definition at line 194 of file computational_cell_2d.cpp.