OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <ArbitraryDomain.h>
Public Member Functions | |
ArbitraryDomain (BoundaryGeometry *bgeom, IntVector_t nr, Vector_t hr, std::string interpl) | |
~ArbitraryDomain () | |
bool | isInside (int idx, int idy, int idz) const |
queries if a given (x,y,z) coordinate lies inside the domain More... | |
void | compute (Vector_t hr, NDIndex< 3 > localId) |
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... | |
virtual int | getNumXY () const |
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 () |
virtual void | resizeMesh (Vector_t &origin, Vector_t &hr, const Vector_t &, const Vector_t &, double) |
Private Types | |
typedef std::multimap< std::tuple< int, int, int >, double > | PointList_t |
Private Member Functions | |
int | toCoordIdx (int idx, int idy, int idz) const |
int | indexAccess (int x, int y, int z) const |
int | coordAccess (int idx) const |
void | constantInterpolation (int idx, int idy, int idz, StencilValue_t &value, double &scaleFactor) const override |
different interpolation methods for boundary points More... | |
void | linearInterpolation (int idx, int idy, int idz, StencilValue_t &value, double &scaleFactor) const override |
Private Attributes | |
BoundaryGeometry * | bgeom_m |
PointList_t | intersectHiX_m |
all intersection points with gridlines in X direction More... | |
PointList_t | intersectLoX_m |
PointList_t | intersectHiY_m |
all intersection points with gridlines in Y direction More... | |
PointList_t | intersectLoY_m |
PointList_t | intersectHiZ_m |
all intersection points with gridlines in Z direction More... | |
PointList_t | intersectLoZ_m |
std::map< int, int > | numXY_m |
std::map< int, bool > | isInsideMap_m |
Vector_t | globalInsideP0_m |
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 IrregularDomain | |
virtual void | quadraticInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const |
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 43 of file ArbitraryDomain.h.
|
private |
PointList_t maps from an (x,z) resp. (y,z) pair to double values (=intersections with boundary)
Definition at line 65 of file ArbitraryDomain.h.
ArbitraryDomain::ArbitraryDomain | ( | BoundaryGeometry * | bgeom, |
IntVector_t | nr, | ||
Vector_t | hr, | ||
std::string | interpl | ||
) |
Definition at line 40 of file ArbitraryDomain.cpp.
References bgeom_m, BoundaryGeometry::getInsidePoint(), BoundaryGeometry::getmaxcoords(), BoundaryGeometry::getmincoords(), globalInsideP0_m, IrregularDomain::setRangeMax(), and IrregularDomain::setRangeMin().
ArbitraryDomain::~ArbitraryDomain | ( | ) |
Definition at line 62 of file ArbitraryDomain.cpp.
method to compute the intersection points with the boundary geometry (stored in some appropriate data structure)
hr | updated mesh spacings |
Implements IrregularDomain.
Definition at line 66 of file ArbitraryDomain.cpp.
References bgeom_m, IrregularDomain::coordMap_m, endl(), BoundaryGeometry::fastIsInside(), IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMin(), IrregularDomain::getZRangeMin(), globalInsideP0_m, gmsg, IrregularDomain::hasGeometryChanged_m, IrregularDomain::idxMap_m, INFOMSG, intersectHiX_m, intersectHiY_m, intersectHiZ_m, intersectLoX_m, intersectLoY_m, intersectLoZ_m, BoundaryGeometry::intersectRayBoundary(), isInside(), isInsideMap_m, level2(), IrregularDomain::nr_m, numXY_m, IrregularDomain::setHr(), and toCoordIdx().
|
overrideprivatevirtual |
different interpolation methods for boundary points
Reimplemented from IrregularDomain.
Definition at line 248 of file ArbitraryDomain.cpp.
References IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::hr_m, isInside(), IrregularDomain::Stencil< T >::north, IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
inlineprivatevirtual |
Implements IrregularDomain.
Definition at line 94 of file ArbitraryDomain.h.
References IrregularDomain::coordMap_m.
|
inlineprivatevirtual |
Implements IrregularDomain.
Definition at line 90 of file ArbitraryDomain.h.
References IrregularDomain::idxMap_m, and toCoordIdx().
|
inlinevirtual |
queries if a given (x,y,z) coordinate lies inside the domain
Implements IrregularDomain.
Definition at line 52 of file ArbitraryDomain.h.
References isInsideMap_m, and toCoordIdx().
Referenced by compute(), and constantInterpolation().
|
overrideprivatevirtual |
Reimplemented from IrregularDomain.
Definition at line 275 of file ArbitraryDomain.cpp.
References abs(), IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::hr_m, intersectHiX_m, intersectHiY_m, intersectHiZ_m, intersectLoX_m, intersectLoY_m, intersectLoZ_m, IrregularDomain::Stencil< T >::north, IrregularDomain::nr_m, IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
inlineprivate |
Definition at line 85 of file ArbitraryDomain.h.
References IrregularDomain::nr_m.
Referenced by compute(), indexAccess(), and isInside().
|
private |
Definition at line 60 of file ArbitraryDomain.h.
Referenced by ArbitraryDomain(), and compute().
|
private |
Definition at line 82 of file ArbitraryDomain.h.
Referenced by ArbitraryDomain(), and compute().
|
private |
all intersection points with gridlines in X direction
Definition at line 68 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
all intersection points with gridlines in Y direction
Definition at line 71 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
all intersection points with gridlines in Z direction
Definition at line 74 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
Definition at line 68 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
Definition at line 71 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
Definition at line 74 of file ArbitraryDomain.h.
Referenced by compute(), and linearInterpolation().
|
private |
Definition at line 80 of file ArbitraryDomain.h.
Referenced by compute(), and isInside().
|
private |
Definition at line 77 of file ArbitraryDomain.h.
Referenced by compute().