|
MolSim
|
Utility (strategy?) functions for applying boundary conditions. More...
#include "objects/Cell.h"#include "objects/CellContainer.h"#include "objects/Particle.h"#include "utils/CellUtils.h"#include <utility>Go to the source code of this file.
Functions | |
| bool | handleHaloCell (Particle &p, Cell &targetCell, CellContainer *lc) |
| Handles the scenario where a particle enters a halo cell. Returns true if the particle is handled and further processing can be skipped, false otherwise. | |
| std::pair< HaloLocation, BoundaryCondition > | determineBoundaryCondition (Particle &p, Cell &targetCell, CellContainer *lc) |
| Determines the correct halo location and boundary condition for a particle entering a halo cell. | |
| void | handleOutflowCondition (Particle &p, Cell &targetCell, CellContainer *lc) |
| Handles the outflow condition where the particle is deleted upon entering a halo cell. | |
| void | handleReflectiveCondition (Particle &p, Cell &fromCell, HaloLocation location, CellContainer *lc) |
| Handles the reflective condition where the particle is mirrored and moved to the opposite cell. | |
| void | handlePeriodicCondition (Particle &p, Cell &targetCell, CellContainer *lc) |
| Handles the periodic condition where the particle is moved from the halo cell to the appropriate border cell on the other side. | |
| void | reflectParticle (Particle &p, Cell &fromCell, Cell &toCell, CellContainer *lc, int direction) |
| Reflects a particle by mirroring its position and moving it to a new cell. | |
| void | mirrorGhostParticles (CellContainer *lc) |
| Adds ghost particles to the proper halo cells for periodic conditions. | |
| void | deleteGhostParticles (CellContainer *lc) |
| Deletes references to ghost particles from the halo cells (i.e all particle references in halo cells). | |
Utility (strategy?) functions for applying boundary conditions.
| void deleteGhostParticles | ( | CellContainer * | lc | ) |
Deletes references to ghost particles from the halo cells (i.e all particle references in halo cells).
| lc | The CellContainer we are operating in. |
| std::pair< HaloLocation, BoundaryCondition > determineBoundaryCondition | ( | Particle & | p, |
| Cell & | targetCell, | ||
| CellContainer * | lc | ||
| ) |
Determines the correct halo location and boundary condition for a particle entering a halo cell.
| p | The particle entering a halo cell. |
| targetCell | The halo cell which the particle enters. |
| lc | The CellContainer containing the cell. |
| bool handleHaloCell | ( | Particle & | p, |
| Cell & | targetCell, | ||
| CellContainer * | lc | ||
| ) |
Handles the scenario where a particle enters a halo cell. Returns true if the particle is handled and further processing can be skipped, false otherwise.
| p | The particle that has moved. |
| targetCell | The target cell that needs to be checked. |
| lc | The CellContainer containing the cell. |
| void handleOutflowCondition | ( | Particle & | p, |
| Cell & | targetCell, | ||
| CellContainer * | lc | ||
| ) |
Handles the outflow condition where the particle is deleted upon entering a halo cell.
| p | The particle entering a halo cell. |
| targetCell | The halo cell which the particle enters. |
| lc | The CellContainer containing the cell. |
| void handlePeriodicCondition | ( | Particle & | p, |
| Cell & | targetCell, | ||
| CellContainer * | lc | ||
| ) |
Handles the periodic condition where the particle is moved from the halo cell to the appropriate border cell on the other side.
| p | The particle entering a halo cell. |
| targetCell | The cell the particle has moved to before this function is called. |
| lc | The CellContainer containing the cell. |
| void handleReflectiveCondition | ( | Particle & | p, |
| Cell & | fromCell, | ||
| HaloLocation | location, | ||
| CellContainer * | lc | ||
| ) |
Handles the reflective condition where the particle is mirrored and moved to the opposite cell.
| p | The particle entering a halo cell. |
| fromCell | The current cell of the particle. |
| location | The cardinal direction of the entered halo cell. |
| lc | The CellContainer containing the cell. |
| void mirrorGhostParticles | ( | CellContainer * | lc | ) |
Adds ghost particles to the proper halo cells for periodic conditions.
| lc | The CellContainer we are operating in. |
| void reflectParticle | ( | Particle & | p, |
| Cell & | fromCell, | ||
| Cell & | toCell, | ||
| CellContainer * | lc, | ||
| int | direction | ||
| ) |
Reflects a particle by mirroring its position and moving it to a new cell.
| p | The particle entering a halo cell. |
| fromCell | The current cell of the particle. Passed to the getMirrorPosition() function in CellContainer. |
| toCell | The target cell of the particle. Passed to the getMirrorPosition() function in CellContainer. |
| lc | The CellContainer containing the cell. |
| direction | The direction argument passed to the getMirrorPosition() function in CellContainer. |