A class that stores all information and data of particles, such as x, y, and z coordinates, neighbour lists, and bounding boxes.
More...
#include <particle_data.h>
|
| ParticleData (const Initializer &init) |
| Constructor. More...
|
|
virtual | ~ParticleData () |
| Destructor. More...
|
|
std::size_t | getCapacity () |
| Getter function of the specified array length for particle data arrays such as x, y, and z-coordinates, pressure, volume, and sound speeds. More...
|
|
std::size_t | getTotalNum () |
| Getter function of the number of all types of particles. More...
|
|
std::size_t | getFluidNum () |
| Getter function of the number of fluid particles. More...
|
|
std::size_t | getBoundaryNum () |
| Getter function of the number of boundary particles. More...
|
|
std::size_t | getGhostNum () |
| Getter function of the number of ghost particles. More...
|
|
std::size_t | getMaxNeighbourNum () |
| Getter function of the specified maximum number of neighbours of a particle. More...
|
|
std::size_t | getMaxNeighbourNumInOneDir () |
| Getter function of the specified maximum number of neighbours in one direction (eg. right-hand-side in the x-coordinate) of a particle. More...
|
|
std::size_t | getFluidStartIndex () |
| Getter function of the start index of fluid particles in the particle data arrays. More...
|
|
std::size_t | getBoundaryStartIndex () |
| Getter function of the start index of boundary particles in the particle data arrays. More...
|
|
std::size_t | getGhostStartIndex () |
| Getter function of the start index of ghost particles in the particle data arrays. More...
|
|
int | getDimension () |
| Getter function of the specified dimension of simulation. More...
|
|
const double *const | getPositionX () const |
| Getter function of the array of x-coordinates of the initialized particles. More...
|
|
const double *const | getPositionY () const |
| Getter function of the array of y-coordinates of the initialized particles. More...
|
|
const double *const | getPositionZ () const |
| Getter function of the array of z-coordinates of the initialized particles. More...
|
|
const double *const | getVelocityU () const |
| Getter function of the array of velocity in x-coordinate of the initialized particles. More...
|
|
const double *const | getVelocityV () const |
| Getter function of the array of velocity in y-coordinate of the initialized particles. More...
|
|
const double *const | getVelocityW () const |
| Getter function of the array of velocity in z-coordinate of the initialized particles. More...
|
|
const double *const | getVolume () const |
| Getter function of the array of volume of the initialized particles. More...
|
|
const double *const | getPressure () const |
| Getter function of the array of pressure of the initialized particles. More...
|
|
const double *const | getSoundSpeed () const |
| Getter function of the array of sound speed of the initialized particles. More...
|
|
const int *const | getObjectTag () const |
| Getter function of the array of "object tags" of the initialized particles. More...
|
|
const double *const | getDD1 () const |
| Getter function of the array of divided difference of order 1. More...
|
|
const double *const | getDD2Left () const |
| Getter function of the array of divided difference of order 2. More...
|
|
const double *const | getDD2Right () const |
| Getter function of the array of divided difference of order 2. More...
|
|
const double *const | getDD3Left () const |
| Getter function of the array of divided difference of order 3. More...
|
|
const double *const | getDD3Right () const |
| Getter function of the array of divided difference of order 3. More...
|
|
A class that stores all information and data of particles, such as x, y, and z coordinates, neighbour lists, and bounding boxes.
- Author
- Chen, Hsin-Chiang (morri.nosp@m.sche.nosp@m.n2008.nosp@m.@gma.nosp@m.il.co.nosp@m.m)
Co-author: Yu, Kwangmin (yukwa.nosp@m.ngmi.nosp@m.n@gma.nosp@m.il.c.nosp@m.om) on initial interface and data structure design
- Version
- 1.0
- Date
- 2014/07/12
Created on: 2014/05/23
Constructor.
Use init to retrieve information from the Initializer class, including getting scalar-valued parameters and ownership of data arrays. This method also allocates space for all other necessary particle data arrays
- Parameters
-
[in] | init | To retrieve information from init |
- Warning
- Obtains ownership of some data arrays (see implementation for details) from the Initializer class. These data arrays are deleted in the Destructor of this class and should not be deleted anywhere else
ParticleData::~ParticleData |
( |
| ) |
|
|
virtual |
Destructor.
Deletes memory of data arrays
std::size_t ParticleData::getBoundaryNum |
( |
| ) |
|
|
inline |
Getter function of the number of boundary particles.
- Parameters
-
- Returns
- The number of boundary particles
std::size_t ParticleData::getBoundaryStartIndex |
( |
| ) |
|
|
inline |
Getter function of the start index of boundary particles in the particle data arrays.
- Parameters
-
- Returns
- The start index of boundary particles in the particle data arrays
std::size_t ParticleData::getCapacity |
( |
| ) |
|
|
inline |
Getter function of the specified array length for particle data arrays such as x, y, and z-coordinates, pressure, volume, and sound speeds.
- Parameters
-
- Returns
- The specified array length for particle data arrays such as x, y, and z-coordinates, pressure, volume, and sound speeds
- Note
- Capacity is a number larger than the total number of all types of particles
const double* const ParticleData::getDD1 |
( |
| ) |
const |
|
inline |
Getter function of the array of divided difference of order 1.
- Parameters
-
- Returns
- Pointer pointing to the array of divided difference of order 1
const double* const ParticleData::getDD2Left |
( |
| ) |
const |
|
inline |
Getter function of the array of divided difference of order 2.
- Parameters
-
- Returns
- Pointer pointing to the array of divided difference of order 2
const double* const ParticleData::getDD2Right |
( |
| ) |
const |
|
inline |
Getter function of the array of divided difference of order 2.
- Parameters
-
- Returns
- Pointer pointing to the array of divided difference of order 2
const double* const ParticleData::getDD3Left |
( |
| ) |
const |
|
inline |
Getter function of the array of divided difference of order 3.
- Parameters
-
- Returns
- Pointer pointing to the array of divided difference of order 3
const double* const ParticleData::getDD3Right |
( |
| ) |
const |
|
inline |
Getter function of the array of divided difference of order 3.
- Parameters
-
- Returns
- Pointer pointing to the array of divided difference of order 3
int ParticleData::getDimension |
( |
| ) |
|
|
inline |
Getter function of the specified dimension of simulation.
- Parameters
-
- Returns
- The specified dimension of simulation
std::size_t ParticleData::getFluidNum |
( |
| ) |
|
|
inline |
Getter function of the number of fluid particles.
- Parameters
-
- Returns
- The number of fluid particles
std::size_t ParticleData::getFluidStartIndex |
( |
| ) |
|
|
inline |
Getter function of the start index of fluid particles in the particle data arrays.
- Parameters
-
- Returns
- The start index of fluid particles in the particle data arrays
std::size_t ParticleData::getGhostNum |
( |
| ) |
|
|
inline |
Getter function of the number of ghost particles.
- Parameters
-
- Returns
- The number of ghost particles
std::size_t ParticleData::getGhostStartIndex |
( |
| ) |
|
|
inline |
Getter function of the start index of ghost particles in the particle data arrays.
- Parameters
-
- Returns
- The start index of ghost particles in the particle data arrays
std::size_t ParticleData::getMaxNeighbourNum |
( |
| ) |
|
|
inline |
Getter function of the specified maximum number of neighbours of a particle.
- Parameters
-
- Returns
- The specified maximum number of neighbours of a particle
std::size_t ParticleData::getMaxNeighbourNumInOneDir |
( |
| ) |
|
|
inline |
Getter function of the specified maximum number of neighbours in one direction (eg. right-hand-side in the x-coordinate) of a particle.
- Parameters
-
- Returns
- The specified maximum number of neighbours in one direction (eg. right-hand-side in the x-coordinate) of a particle
const int* const ParticleData::getObjectTag |
( |
| ) |
const |
|
inline |
Getter function of the array of "object tags" of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of "object tags" of the initialized particles
- Note
- The tag of a particle in a fluid object is the index of the fluid object (the index of fluid object is 1,2,...). The tag of a particle not in fluid object is 0
const double* const ParticleData::getPositionX |
( |
| ) |
const |
|
inline |
Getter function of the array of x-coordinates of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of x-coordinates of the initialized particles
const double* const ParticleData::getPositionY |
( |
| ) |
const |
|
inline |
Getter function of the array of y-coordinates of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of y-coordinates of the initialized particles
const double* const ParticleData::getPositionZ |
( |
| ) |
const |
|
inline |
Getter function of the array of z-coordinates of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of z-coordinates of the initialized particles
const double* const ParticleData::getPressure |
( |
| ) |
const |
|
inline |
Getter function of the array of pressure of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of pressure of the initialized particles
const double* const ParticleData::getSoundSpeed |
( |
| ) |
const |
|
inline |
Getter function of the array of sound speed of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of sound speed of the initialized particles
std::size_t ParticleData::getTotalNum |
( |
| ) |
|
|
inline |
Getter function of the number of all types of particles.
- Parameters
-
- Returns
- The number of all types of particles
const double* const ParticleData::getVelocityU |
( |
| ) |
const |
|
inline |
Getter function of the array of velocity in x-coordinate of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of velocity in x-coordinate of the initialized particles
const double* const ParticleData::getVelocityV |
( |
| ) |
const |
|
inline |
Getter function of the array of velocity in y-coordinate of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of velocity in y-coordinate of the initialized particles
const double* const ParticleData::getVelocityW |
( |
| ) |
const |
|
inline |
Getter function of the array of velocity in z-coordinate of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of velocity in z-coordinate of the initialized particles
const double* const ParticleData::getVolume |
( |
| ) |
const |
|
inline |
Getter function of the array of volume of the initialized particles.
- Parameters
-
- Returns
- Pointer pointing to the array of volume of the initialized particles
The documentation for this class was generated from the following files: