OPAL (Object Oriented Parallel Accelerator Library)
2021.1.99
OPAL
|
#include <BoxCornerDomain.h>
Public Member Functions | |
BoxCornerDomain (double A, double B, double C, double L1, double L2, IntVector_t nr, Vector_t hr, std::string interpl) | |
~BoxCornerDomain () | |
double | getB (double z) const |
as a function of z, determine the height (B) of the geometry More... | |
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) |
![]() | |
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 |
![]() | |
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< std::pair< int, int >, double > | BoxCornerPointList |
Private Member Functions | |
double | getXIntersection (double cx, int) const |
double | getYIntersection (double cy, int z) const |
int | toCoordIdx (int x, int y, int z) const |
conversion from (x,y,z) to index in xyz 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 | |
BoxCornerPointList | IntersectXDir |
all intersection points with grid lines in X direction More... | |
BoxCornerPointList | IntersectYDir |
all intersection points with grid lines in Y direction More... | |
double | actBMin_m |
because the geometry can change in the y direction More... | |
double | actBMax_m |
double | C_m |
height of the corner More... | |
Additional Inherited Members | |
![]() | |
typedef Stencil< int > | StencilIndex_t |
typedef Stencil< double > | StencilValue_t |
typedef Vektor< int, 3 > | IntVector_t |
![]() | |
void | robinBoundaryStencil (int z, double &F, double &B, double &C) const |
function to handle the open boundary condition in longitudinal direction More... | |
![]() | |
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 71 of file BoxCornerDomain.h.
|
private |
Map from a ([(x or y], z) to a list of intersection values with boundary.
Definition at line 112 of file BoxCornerDomain.h.
BoxCornerDomain::BoxCornerDomain | ( | double | A, |
double | B, | ||
double | C, | ||
double | L1, | ||
double | L2, | ||
IntVector_t | nr, | ||
Vector_t | hr, | ||
std::string | interpl | ||
) |
A | depth of the box |
B | maximal height of the box |
C | height of the corner |
length | of the structure |
L1 | length of the first part of the structure |
L2 | length of the corner |
Definition at line 36 of file BoxCornerDomain.cpp.
References C_m, IrregularDomain::setRangeMax(), and IrregularDomain::setRangeMin().
BoxCornerDomain::~BoxCornerDomain | ( | ) |
Definition at line 49 of file BoxCornerDomain.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 59 of file BoxCornerDomain.cpp.
References actBMax_m, actBMin_m, IrregularDomain::coordMap_m, getB(), IrregularDomain::getMaxZ(), IrregularDomain::getMinZ(), IrregularDomain::getYRangeMin(), IrregularDomain::hasGeometryChanged_m, IrregularDomain::idxMap_m, IntersectXDir, IntersectYDir, isInside(), max(), IrregularDomain::nr_m, IrregularDomain::setHr(), and toCoordIdx().
|
inlineprivatevirtual |
Implements IrregularDomain.
Definition at line 146 of file BoxCornerDomain.h.
References IrregularDomain::coordMap_m.
|
inline |
as a function of z, determine the height (B) of the geometry
Definition at line 88 of file BoxCornerDomain.h.
References C_m, IrregularDomain::getYRangeMax(), IrregularDomain::getZRangeMax(), and IrregularDomain::getZRangeMin().
Referenced by compute(), getYIntersection(), and isInside().
|
inlineprivate |
Definition at line 128 of file BoxCornerDomain.h.
References IrregularDomain::getXRangeMax(), and IrregularDomain::getXRangeMin().
Referenced by linearInterpolation(), and quadraticInterpolation().
|
inlineprivate |
Definition at line 132 of file BoxCornerDomain.h.
References getB(), IrregularDomain::getYRangeMin(), and IrregularDomain::hr_m.
Referenced by linearInterpolation(), and quadraticInterpolation().
|
inlineprivatevirtual |
conversion from (x,y,z) to index on the 3D grid
Implements IrregularDomain.
Definition at line 142 of file BoxCornerDomain.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 96 of file BoxCornerDomain.h.
References getB(), IrregularDomain::getXRangeMax(), 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 131 of file BoxCornerDomain.cpp.
References abs(), IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, getXIntersection(), getYIntersection(), IrregularDomain::hr_m, isInside(), IrregularDomain::Stencil< T >::north, IrregularDomain::nr_m, IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
overrideprivatevirtual |
Reimplemented from IrregularDomain.
Definition at line 235 of file BoxCornerDomain.cpp.
References abs(), IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, getXIntersection(), getYIntersection(), IrregularDomain::hr_m, isInside(), IrregularDomain::Stencil< T >::north, IrregularDomain::nr_m, IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
|
inlineprivate |
conversion from (x,y,z) to index in xyz plane
Definition at line 137 of file BoxCornerDomain.h.
References IrregularDomain::nr_m.
Referenced by compute(), and indexAccess().
|
private |
Definition at line 123 of file BoxCornerDomain.h.
Referenced by compute().
|
private |
because the geometry can change in the y direction
Definition at line 121 of file BoxCornerDomain.h.
Referenced by compute().
|
private |
height of the corner
Definition at line 126 of file BoxCornerDomain.h.
Referenced by BoxCornerDomain(), and getB().
|
private |
all intersection points with grid lines in X direction
Definition at line 115 of file BoxCornerDomain.h.
Referenced by compute().
|
private |
all intersection points with grid lines in Y direction
Definition at line 118 of file BoxCornerDomain.h.
Referenced by compute().