|
Stellarator and Tokamak Modeling and Meshing Software (STOMMS)
|
Public Member Functions | |
| GridFieldData () | |
| GridFieldData (const std::vector< double > &pointsR, const std::vector< double > &pointsZ) | |
| void | setDoubleFieldOnGrid (const std::vector< double > &field, const FieldType &fieldType) |
| void | setPsiArray (const std::vector< double > &psi) |
| void | setPoloidalCurrentArray (const std::vector< double > &poloidalCurrent) |
| void | setLimiter (const std::vector< double > &rLim, const std::vector< double > &zLim) |
| void | setPlasmaBoundary (const std::vector< double > &rBdry, const std::vector< double > &zBdry) |
| void | setDomainBox (const std::vector< double > &box) |
| void | setPsiSpline (std::vector< double > &coefficeints, std::vector< int > &shape) |
| void | setCurrentSpline (std::vector< double > &coefficeints, std::vector< int > &shape) |
| const std::vector< double > & | getRPoints () const |
| const std::vector< double > & | getZPoints () const |
| const std::vector< double > & | getDoubleFieldData (const FieldType &fieldType) const |
| const std::vector< double > & | getPsiArray () const |
| const std::vector< double > & | getPoloidalCurrentArray () const |
| const std::vector< double > & | getLimiterPointsR () const |
| const std::vector< double > & | getLimiterPointsZ () const |
| const std::vector< double > & | getBdryPointsR () const |
| const std::vector< double > & | getBdryPointsZ () const |
| const std::vector< double > & | getDomainBox () const |
| const std::vector< double > & | getPsiSplineCoefficients () const |
| const std::vector< int > & | getPsiSplineShape () const |
| const std::vector< double > & | getCurrentSplineCoefficients () const |
| const std::vector< int > & | getCurrentSplineShape () const |
A class to save data on a grid. We can add different fields to the same Grid. Currently supports reading grid data from eqdsk/eqd files.
|
inline |
Default constructor.
| GridFieldData::GridFieldData | ( | const std::vector< double > & | pointsR, |
| const std::vector< double > & | pointsZ | ||
| ) |
Constructor to create a physical grid. It adds no field data to grid.
| pointsR | Coordinates of the points in the R direction. |
| pointsZ | Coordinates of the points in the Z direction. |
| const std::vector< double > & GridFieldData::getBdryPointsR | ( | ) | const |
Function to return r coordinate of physical boundary.
| const std::vector< double > & GridFieldData::getBdryPointsZ | ( | ) | const |
Function to return z coordinate of physical boundary.
| const std::vector< double > & GridFieldData::getCurrentSplineCoefficients | ( | ) | const |
Function to return a vector of poloidal current spline coefficients.
| const std::vector< int > & GridFieldData::getCurrentSplineShape | ( | ) | const |
Function to return a vector of size 2 for the shape of coefficients array. The original array is 2D which is flattened in a vector.
| const std::vector< double > & GridFieldData::getDomainBox | ( | ) | const |
Function to return a vector of size 4 for the rectangular domain box. rMin = box[0], zMin = box[1], rMax = box[2], zMax = box[3]
| const std::vector< double > & GridFieldData::getDoubleFieldData | ( | const FieldType & | fieldType | ) | const |
Function to return a field of type double.
| fieldType | desired output field. |
| const std::vector< double > & GridFieldData::getLimiterPointsR | ( | ) | const |
Function to return r coordinate of limiter points.
| const std::vector< double > & GridFieldData::getLimiterPointsZ | ( | ) | const |
Function to return z coordinate of limiter points.
| const std::vector< double > & GridFieldData::getPoloidalCurrentArray | ( | ) | const |
Function to return poloidal current field vector.
| const std::vector< double > & GridFieldData::getPsiArray | ( | ) | const |
Function to return psi field array.
| const std::vector< double > & GridFieldData::getPsiSplineCoefficients | ( | ) | const |
Function to return a vector of psi spline coefficients.
| const std::vector< int > & GridFieldData::getPsiSplineShape | ( | ) | const |
Function to return a vector of size 3 for the shape of coefficients array. The original array is 3D which is flattened in a vector.
| const std::vector< double > & GridFieldData::getRPoints | ( | ) | const |
Function to return r grid points.
| const std::vector< double > & GridFieldData::getZPoints | ( | ) | const |
Function to return z grid points.
| void GridFieldData::setCurrentSpline | ( | std::vector< double > & | coefficeints, |
| std::vector< int > & | shape | ||
| ) |
Function to set poloidal current spline coefficients to the grid data.
| coefficients | a vector containing the coefficients. |
| shape | a vector of size 2 defining the shape of coefficients array. coefficients.size() == shape[0]*shape[1] |
| void GridFieldData::setDomainBox | ( | const std::vector< double > & | box | ) |
Function to set the domain box to grid data.
| box | A vector of size = 4 containing rMin, yMin, rMax, yMax. |
| void GridFieldData::setDoubleFieldOnGrid | ( | const std::vector< double > & | field, |
| const FieldType & | fieldType | ||
| ) |
Function to set a field of type double on the grid.
| field | a vector of the field values on the grid. |
| fieldType | field type. See class FieldType for details. |
| void GridFieldData::setLimiter | ( | const std::vector< double > & | rLim, |
| const std::vector< double > & | zLim | ||
| ) |
Function to set raw limiter data (wall curve) to the grid data.
| rLim | R coordinates of the limiter points. |
| zLim | Z coordinates of the limiter points. |
| void GridFieldData::setPlasmaBoundary | ( | const std::vector< double > & | rBdry, |
| const std::vector< double > & | zBdry | ||
| ) |
Function to set plasma boundary (separatrix) data to the grid data.
| rBdry | R coordinates of the poloidal boundary. |
| zBdry | Z coordinates of the poloidal boundary. |
| void GridFieldData::setPoloidalCurrentArray | ( | const std::vector< double > & | poloidalCurrent | ) |
Function to set an array of poloidal current values from the magnetic field source file.
| poloidalCurrent | a vector of poloidal current values. |
| void GridFieldData::setPsiArray | ( | const std::vector< double > & | psi | ) |
Function to set array of psi values from the magnetic field source file.
| psi | a vector of psi values. |
| void GridFieldData::setPsiSpline | ( | std::vector< double > & | coefficeints, |
| std::vector< int > & | shape | ||
| ) |
Function to set psi spline coefficients to the grid data.
| coefficients | a vector containing the coefficients. |
| shape | a vector of size 3 defining the shape of coefficients array. coefficients.size() == shape[0]*shape[1]*shape[2] |