|
| | Cell (const std::array< double, 3 > &size, const std::array< double, 3 > &position, CellType type, int index, const std::vector< HaloLocation > &haloLocation, const std::vector< BorderLocation > &borderLocation) |
| | Constructs a new Cell object.
|
| |
| ContainerType::iterator | begin () |
| | Gets an iterator to the beginning of the Particle* forward list.
|
| |
| ContainerType::iterator | end () |
| | Gets an iterator to one past the end of the Particle* forward list.
|
| |
| std::array< double, 3 > | getRelativePosition (const Particle &p) const |
| | Calculates the relative position of a particle within the current cell.
|
| |
| void | validatePosition (const std::array< double, 3 > &relPos) const |
| | Validates if the provided relative position is within the bounds of the current cell (debug).
|
| |
| bool | isCorner (HaloLocation loc1, HaloLocation loc2) const |
| | Checks if two HaloLocation values correspond to a corner.
|
| |
| HaloLocation | handle2DCorner (const std::array< double, 3 > &relPos) const |
| | Handles the logic for 2D corner cell handling.
|
| |
| HaloLocation | handle3DCorner (const std::array< double, 3 > &relPos) const |
| | Handles the logic for 3D corner cell handling.
|
| |
| HaloLocation | handle3DDiagonal (const std::array< double, 3 > &relPos) const |
| | Handles the logic for determining the 3D diagonal region.
|
| |
| HaloLocation | handle3DTripleCorner (const std::array< double, 3 > &relPos) const |
| | Handles the logic for determining the 3D triple corner region.
|
| |
| void | addParticle (Particle &particle) |
| | Adds a Particle reference to the front of the forward list.
|
| |
| void | removeParticle (Particle &particle) |
| | Removes a Particle reference from the forward list.
|
| |
| HaloLocation | getCornerRegion (const Particle &p) const |
| | Dispatch function to handle a corner cell.
|
| |
| const std::array< double, 3 > & | getX () const |
| | Gets a const reference to the position array of this Cell.
|
| |
| const std::array< double, 3 > & | getSize () const |
| | Gets a const reference to the size array of this Cell.
|
| |
| const std::vector< HaloLocation > & | getHaloLocation () const |
| | Gets a const reference to the halo location (cardinal direction) vector of this Cell.
|
| |
| const std::vector< BorderLocation > & | getBorderLocation () const |
| | Gets a const reference to the border location (cardinal direction) vector of this Cell.
|
| |
| std::vector< int > & | getNeighbors () |
| | Gets a reference to the Cell's neighbors.
|
| |
| const std::vector< int > & | getNeighbors () const |
| | Gets a const reference to the Cell's neighbors.
|
| |
| std::forward_list< std::reference_wrapper< Particle > > & | getParticles () |
| | Gets a reference to the Cell's Particle pointer forward list.
|
| |
| const std::forward_list< std::reference_wrapper< Particle > > & | getParticles () const |
| | Gets a const reference to the Cell's Particle pointer forward list.
|
| |
| CellType | getType () const |
| | Gets the type of this Cell.
|
| |
| int | getIndex () const |
| | Gets the index of this Cell in its CellContainer.
|
| |
| std::string | toString () const |
| | Gets a string representation of this Cell.
|
| |
|
| ContainerType | m_particles {} |
| | A forward list of pointers to Particle objects contained within the current Cell.
|
| |
| std::array< double, 3 > | m_size |
| | The size of the Cell in each dimension.
|
| |
| std::array< double, 3 > | m_position |
| | The lower-left coordinates of the Cell.
|
| |
| std::vector< HaloLocation > | m_haloLocation |
| | If this is a halo cell, the locations of this cell (North, South, West, East, Above, Below) are stored here.
|
| |
| std::vector< BorderLocation > | m_borderLocation |
| | If this is a border cell, the locations of this cell (North, South, West, East, Above, Below) are stored here.
|
| |
| std::vector< int > | m_neighbors |
| | The neighboring Cell indices.
|
| |
| CellType | m_type |
| | The type of this Cell. May be INNER, BORDER or HALO.
|
| |
| int | m_index |
| | The index of this Cell in the overarching CellContainer.
|
| |
Class for storing data of a single Cell in a domain split into cells.
| HaloLocation Cell::handle2DCorner |
( |
const std::array< double, 3 > & |
relPos | ) |
const |
Handles the logic for 2D corner cell handling.
This function handles the determination of the corner region in a 2D context based on the relative position within the cell. It returns the appropriate HaloLocation (NORTH, SOUTH, EAST, or WEST) based on the position.
See the report for Worksheet 3 for more info.
- Parameters
-
| relPos | The relative position of the particle in 2D within the cell, represented as a 3D array. |
- Returns
- The appropriate HaloLocation for the 2D corner (e.g., NORTH, SOUTH, EAST, WEST).
| HaloLocation Cell::handle3DTripleCorner |
( |
const std::array< double, 3 > & |
relPos | ) |
const |
Handles the logic for determining the 3D triple corner region.
This function handles the 3D triple corner region case, where the relative position is used to determine the specific triple corner region in 3D (e.g. NORTH, WEST and ABOVE). It returns the appropriate HaloLocation for the triple corner.
See the report for Worksheet 5 for a detailed explanation.
- Parameters
-
| relPos | The relative position of the particle in 3D within the cell, represented as a 3D array. |
- Returns
- The appropriate HaloLocation for the 3D triple corner region.