OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <EllipticDomain.h>
Public Member Functions | |
EllipticDomain (BoundaryGeometry *bgeom, IntVector_t nr, Vector_t hr, std::string interpl) | |
~EllipticDomain () | |
bool | isInside (int x, int y, int z) const |
queries if a given (x,y,z) coordinate lies inside the domain More... | |
void | compute (Vector_t hr, NDIndex< 3 > localId) |
calculates intersection More... | |
Public Member Functions inherited from RegularDomain | |
RegularDomain (const IntVector_t &nr, const Vector_t &hr, const std::string &interpl) | |
int | getNumXY () const override |
void | setNumXY (int nxy) |
void | resizeMesh (Vector_t &origin, Vector_t &hr, const Vector_t &rmin, const Vector_t &rmax, double dh) override |
Public Member Functions inherited from IrregularDomain | |
IrregularDomain (const IntVector_t &nr, const Vector_t &hr, const std::string &interpl) | |
void | getBoundaryStencil (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const |
void | getBoundaryStencil (int id, StencilValue_t &value, double &scaleFactor) const |
void | getNeighbours (int x, int y, int z, StencilIndex_t &index) const |
void | getNeighbours (int idx, StencilIndex_t &index) const |
virtual void | getCoord (int idx, int &x, int &y, int &z) const |
Conversion from a 3D index to (x,y,z) More... | |
int | getIdx (int x, int y, int z) const |
Conversion from (x,y,z) to index on the 3D grid. More... | |
IntVector_t | getNr () const |
Vector_t | getHr () const |
void | setNr (IntVector_t nr) |
void | setHr (Vector_t hr) |
void | setMinMaxZ (double minz, double maxz) |
double | getMinZ () const |
double | getMaxZ () const |
double | getXRangeMin () const |
double | getXRangeMax () const |
double | getYRangeMin () const |
double | getYRangeMax () const |
double | getZRangeMin () const |
double | getZRangeMax () const |
void | setRangeMin (const Vector_t &min) |
void | setRangeMax (const Vector_t &max) |
bool | hasGeometryChanged () const |
virtual | ~IrregularDomain () |
Private Types | |
typedef std::multimap< int, double > | EllipticPointList_t |
Private Member Functions | |
int | toCoordIdx (int x, int y) const |
conversion from (x,y) to index in xy plane More... | |
int | indexAccess (int x, int y, int z) const |
conversion from (x,y,z) to index on the 3D grid More... | |
int | coordAccess (int idx) const |
void | linearInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const override |
different interpolation methods for boundary points More... | |
void | quadraticInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const override |
Private Attributes | |
EllipticPointList_t | intersectXDir_m |
all intersection points with grid lines in X direction More... | |
EllipticPointList_t | intersectYDir_m |
all intersection points with grid lines in Y direction More... | |
Additional Inherited Members | |
Public Types inherited from IrregularDomain | |
typedef Stencil< int > | StencilIndex_t |
typedef Stencil< double > | StencilValue_t |
typedef Vektor< int, 3 > | IntVector_t |
Protected Member Functions inherited from RegularDomain | |
void | robinBoundaryStencil (int z, double &F, double &B, double &C) const |
function to handle the open boundary condition in longitudinal direction More... | |
Protected Attributes inherited from IrregularDomain | |
IntVector_t | nr_m |
number of mesh points in each direction More... | |
Vector_t | hr_m |
mesh-spacings in each direction More... | |
double | zMin_m |
min/max of bunch in floor coordinates More... | |
double | zMax_m |
Vector_t | min_m |
Vector_t | max_m |
bool | hasGeometryChanged_m |
flag indicating if geometry has changed for the current time-step More... | |
int | interpolationMethod_m |
interpolation type More... | |
std::map< int, int > | idxMap_m |
mapping (x,y,z) -> idx More... | |
std::map< int, int > | coordMap_m |
mapping idx -> (x,y,z) More... | |
Definition at line 39 of file EllipticDomain.h.
|
private |
Map from a single coordinate (x or y) to a list of intersection values with boundary.
Definition at line 65 of file EllipticDomain.h.
EllipticDomain::EllipticDomain | ( | BoundaryGeometry * | bgeom, |
IntVector_t | nr, | ||
Vector_t | hr, | ||
std::string | interpl | ||
) |
Definition at line 37 of file EllipticDomain.cpp.
References BoundaryGeometry::getA(), BoundaryGeometry::getB(), BoundaryGeometry::getLength(), BoundaryGeometry::getS(), max(), min(), IrregularDomain::setMinMaxZ(), IrregularDomain::setRangeMax(), and IrregularDomain::setRangeMin().
EllipticDomain::~EllipticDomain | ( | ) |
Definition at line 48 of file EllipticDomain.cpp.
calculates intersection
Implements IrregularDomain.
Definition at line 55 of file EllipticDomain.cpp.
References abs(), CONSTANT, IrregularDomain::coordMap_m, IrregularDomain::getHr(), IrregularDomain::getXRangeMax(), IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMax(), IrregularDomain::getYRangeMin(), IrregularDomain::hasGeometryChanged_m, IrregularDomain::hr_m, IrregularDomain::idxMap_m, IrregularDomain::interpolationMethod_m, intersectXDir_m, intersectYDir_m, isInside(), LINEAR, IrregularDomain::nr_m, QUADRATIC, IrregularDomain::setHr(), RegularDomain::setNumXY(), sqrt(), and toCoordIdx().
|
inlineprivatevirtual |
Implements IrregularDomain.
Definition at line 81 of file EllipticDomain.h.
References IrregularDomain::coordMap_m, and RegularDomain::getNumXY().
|
inlineprivatevirtual |
conversion from (x,y,z) to index on the 3D grid
Implements IrregularDomain.
Definition at line 77 of file EllipticDomain.h.
References RegularDomain::getNumXY(), IrregularDomain::idxMap_m, and toCoordIdx().
|
inlinevirtual |
queries if a given (x,y,z) coordinate lies inside the domain
Implements IrregularDomain.
Definition at line 48 of file EllipticDomain.h.
References IrregularDomain::getXRangeMax(), IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMax(), IrregularDomain::getYRangeMin(), IrregularDomain::hr_m, and IrregularDomain::nr_m.
Referenced by compute(), linearInterpolation(), and quadraticInterpolation().
|
overrideprivatevirtual |
different interpolation methods for boundary points
Reimplemented from IrregularDomain.
Definition at line 140 of file EllipticDomain.cpp.
References abs(), IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMin(), IrregularDomain::hr_m, intersectXDir_m, intersectYDir_m, isInside(), IrregularDomain::Stencil< T >::north, RegularDomain::robinBoundaryStencil(), IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
overrideprivatevirtual |
Reimplemented from IrregularDomain.
Definition at line 211 of file EllipticDomain.cpp.
References abs(), IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::hr_m, intersectXDir_m, intersectYDir_m, isInside(), IrregularDomain::Stencil< T >::north, IrregularDomain::nr_m, RegularDomain::robinBoundaryStencil(), IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
inlineprivate |
conversion from (x,y) to index in xy plane
Definition at line 74 of file EllipticDomain.h.
References IrregularDomain::nr_m.
Referenced by compute(), and indexAccess().
|
private |
all intersection points with grid lines in X direction
Definition at line 68 of file EllipticDomain.h.
Referenced by compute(), linearInterpolation(), and quadraticInterpolation().
|
private |
all intersection points with grid lines in Y direction
Definition at line 71 of file EllipticDomain.h.
Referenced by compute(), linearInterpolation(), and quadraticInterpolation().