|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <RectangularDomain.h>


Public Types | |
| typedef Stencil< int > | StencilIndex_t |
| typedef Stencil< double > | StencilValue_t |
| typedef Vektor< int, 3 > | IntVector_t |
Public Member Functions | |
| RectangularDomain (double a, double b, IntVector_t nr, Vector_t hr) | |
| void | compute (Vector_t hr, NDIndex< 3 >) |
| calculates intersection with the beam pipe More... | |
| bool | isInside (int x, int y, int) const |
| queries if a given (x,y,z) coordinate lies inside the domain More... | |
| 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 |
| void | getBoundaryStencil (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const |
| method to calculate the stencil at a boundary points More... | |
| void | getBoundaryStencil (int id, StencilValue_t &value, double &scaleFactor) const |
| method to calculate the stencil at a boundary points More... | |
| void | getNeighbours (int x, int y, int z, StencilIndex_t &index) const |
| method to calculate the neighbours in the matrix of the current index (x,y,z) More... | |
| 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 |
Protected Member Functions | |
| void | robinBoundaryStencil (int z, double &F, double &B, double &C) const |
| function to handle the open boundary condition in longitudinal direction More... | |
| virtual void | linearInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const |
| virtual void | quadraticInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const |
Protected Attributes | |
| 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... | |
Private Member Functions | |
| 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 | constantInterpolation (int x, int y, int z, StencilValue_t &value, double &scaleFactor) const override |
| different interpolation methods for boundary points More... | |
Private Attributes | |
| int | nxy_m |
| number of nodes in the xy plane (for this case: independent of the z coordinate) More... | |
Definition at line 34 of file RectangularDomain.h.
|
inherited |
Definition at line 60 of file IrregularDomain.h.
|
inherited |
Definition at line 58 of file IrregularDomain.h.
|
inherited |
Definition at line 59 of file IrregularDomain.h.
| RectangularDomain::RectangularDomain | ( | double | a, |
| double | b, | ||
| IntVector_t | nr, | ||
| Vector_t | hr | ||
| ) |
| a | is the longer side a of the rectangle |
| b | is the shorter side b of the rectangle |
calculates intersection with the beam pipe
Implements IrregularDomain.
|
overrideprivatevirtualinherited |
different interpolation methods for boundary points
Reimplemented from IrregularDomain.
Definition at line 48 of file RegularDomain.cpp.
References IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::center, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::hr_m, IrregularDomain::isInside(), IrregularDomain::Stencil< T >::north, RegularDomain::robinBoundaryStencil(), IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.

|
inlineprivatevirtual |
Implements IrregularDomain.
Definition at line 60 of file RectangularDomain.h.
References RegularDomain::getNumXY().

|
inherited |
method to calculate the stencil at a boundary points
| id | index of the current element in the matrix |
| scaleFactor | of stencil values |
Definition at line 118 of file IrregularDomain.cpp.
References IrregularDomain::getBoundaryStencil(), and IrregularDomain::getCoord().

|
inherited |
method to calculate the stencil at a boundary points
| x | index of the current element in the matrix |
| y | index of the current element in the matrix |
| z | index of the current element in the matrix |
| values | of stencil element |
| scaleFactor | of stencil values |
Definition at line 95 of file IrregularDomain.cpp.
References IrregularDomain::Stencil< T >::center, CONSTANT, IrregularDomain::constantInterpolation(), IrregularDomain::interpolationMethod_m, LINEAR, IrregularDomain::linearInterpolation(), PAssert, QUADRATIC, and IrregularDomain::quadraticInterpolation().
Referenced by IrregularDomain::getBoundaryStencil().

|
virtualinherited |
Conversion from a 3D index to (x,y,z)
Definition at line 82 of file IrregularDomain.cpp.
References IrregularDomain::coordAccess(), IrregularDomain::getNumXY(), and IrregularDomain::nr_m.
Referenced by IrregularDomain::getBoundaryStencil(), and IrregularDomain::getNeighbours().

|
inlineinherited |
Definition at line 115 of file IrregularDomain.h.
References IrregularDomain::hr_m.
Referenced by EllipticDomain::compute().
|
inherited |
Conversion from (x,y,z) to index on the 3D grid.
Definition at line 89 of file IrregularDomain.cpp.
References IrregularDomain::indexAccess(), and IrregularDomain::isInside().
Referenced by IrregularDomain::getNeighbours().

|
inlineinherited |
Definition at line 126 of file IrregularDomain.h.
References IrregularDomain::zMax_m.
Referenced by BoxCornerDomain::compute(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 125 of file IrregularDomain.h.
References IrregularDomain::zMin_m.
Referenced by BoxCornerDomain::compute(), and RegularDomain::resizeMesh().
|
inherited |
Definition at line 75 of file IrregularDomain.cpp.
References IrregularDomain::getCoord(), and IrregularDomain::getNeighbours().

|
inherited |
method to calculate the neighbours in the matrix of the current index (x,y,z)
| x | index of the current element in the matrix |
| y | index of the current element in the matrix |
| z | index of the current element in the matrix |
| index | stencil indices of an element |
Definition at line 46 of file IrregularDomain.cpp.
References IrregularDomain::Stencil< T >::back, IrregularDomain::Stencil< T >::east, IrregularDomain::Stencil< T >::front, IrregularDomain::getIdx(), IrregularDomain::isInside(), IrregularDomain::Stencil< T >::north, IrregularDomain::nr_m, IrregularDomain::Stencil< T >::south, and IrregularDomain::Stencil< T >::west.
Referenced by IrregularDomain::getNeighbours().

|
inlineinherited |
Definition at line 114 of file IrregularDomain.h.
References IrregularDomain::nr_m.
|
inlineoverridevirtualinherited |
Reimplemented from IrregularDomain.
Definition at line 32 of file RegularDomain.h.
References RegularDomain::nxy_m.
Referenced by coordAccess(), EllipticDomain::coordAccess(), indexAccess(), and EllipticDomain::indexAccess().
|
inlineinherited |
Definition at line 129 of file IrregularDomain.h.
References IrregularDomain::max_m.
Referenced by EllipticDomain::compute(), BoxCornerDomain::getXIntersection(), BoxCornerDomain::isInside(), EllipticDomain::isInside(), isInside(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 128 of file IrregularDomain.h.
References IrregularDomain::min_m.
Referenced by ArbitraryDomain::compute(), EllipticDomain::compute(), BoxCornerDomain::getXIntersection(), EllipticDomain::isInside(), EllipticDomain::linearInterpolation(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 131 of file IrregularDomain.h.
References IrregularDomain::max_m.
Referenced by EllipticDomain::compute(), BoxCornerDomain::getB(), EllipticDomain::isInside(), isInside(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 130 of file IrregularDomain.h.
References IrregularDomain::min_m.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), EllipticDomain::compute(), BoxCornerDomain::getYIntersection(), EllipticDomain::isInside(), EllipticDomain::linearInterpolation(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 133 of file IrregularDomain.h.
References IrregularDomain::max_m.
Referenced by BoxCornerDomain::getB().
|
inlineinherited |
Definition at line 132 of file IrregularDomain.h.
References IrregularDomain::min_m.
Referenced by ArbitraryDomain::compute(), and BoxCornerDomain::getB().
|
inlineinherited |
Definition at line 138 of file IrregularDomain.h.
References IrregularDomain::hasGeometryChanged_m.
|
inlineprivatevirtual |
conversion from (x,y,z) to index on the 3D grid
Implements IrregularDomain.
Definition at line 56 of file RectangularDomain.h.
References RegularDomain::getNumXY(), and IrregularDomain::nr_m.

|
inlinevirtual |
queries if a given (x,y,z) coordinate lies inside the domain
Implements IrregularDomain.
Definition at line 48 of file RectangularDomain.h.
References IrregularDomain::getXRangeMax(), IrregularDomain::getYRangeMax(), IrregularDomain::hr_m, and IrregularDomain::nr_m.

|
protectedvirtualinherited |
Reimplemented in ArbitraryDomain, BoxCornerDomain, and EllipticDomain.
Definition at line 145 of file IrregularDomain.cpp.
Referenced by IrregularDomain::getBoundaryStencil().
|
protectedvirtualinherited |
Reimplemented in BoxCornerDomain, and EllipticDomain.
Definition at line 153 of file IrregularDomain.cpp.
Referenced by IrregularDomain::getBoundaryStencil().
|
overridevirtualinherited |
Reimplemented from IrregularDomain.
Definition at line 29 of file RegularDomain.cpp.
References IrregularDomain::getMaxZ(), IrregularDomain::getMinZ(), IrregularDomain::getXRangeMax(), IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMax(), IrregularDomain::getYRangeMin(), IrregularDomain::nr_m, and IrregularDomain::setMinMaxZ().

|
protectedinherited |
function to handle the open boundary condition in longitudinal direction
Definition at line 84 of file RegularDomain.cpp.
References IrregularDomain::hr_m, and IrregularDomain::nr_m.
Referenced by RegularDomain::constantInterpolation(), EllipticDomain::linearInterpolation(), and EllipticDomain::quadraticInterpolation().
|
inlineinherited |
Definition at line 118 of file IrregularDomain.h.
References IrregularDomain::hr_m.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), and EllipticDomain::compute().
|
inlineinherited |
Definition at line 120 of file IrregularDomain.h.
References IrregularDomain::zMax_m, and IrregularDomain::zMin_m.
Referenced by EllipticDomain::EllipticDomain(), and RegularDomain::resizeMesh().
|
inlineinherited |
Definition at line 117 of file IrregularDomain.h.
References nr, and IrregularDomain::nr_m.
|
inlineinherited |
Definition at line 36 of file RegularDomain.h.
References RegularDomain::nxy_m.
Referenced by EllipticDomain::compute().
|
inlineinherited |
Definition at line 136 of file IrregularDomain.h.
References max(), and IrregularDomain::max_m.
Referenced by ArbitraryDomain::ArbitraryDomain(), BoxCornerDomain::BoxCornerDomain(), and EllipticDomain::EllipticDomain().

|
inlineinherited |
Definition at line 135 of file IrregularDomain.h.
References min(), and IrregularDomain::min_m.
Referenced by ArbitraryDomain::ArbitraryDomain(), BoxCornerDomain::BoxCornerDomain(), and EllipticDomain::EllipticDomain().

|
protectedinherited |
mapping idx -> (x,y,z)
Definition at line 186 of file IrregularDomain.h.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), EllipticDomain::compute(), ArbitraryDomain::coordAccess(), BoxCornerDomain::coordAccess(), and EllipticDomain::coordAccess().
|
protectedinherited |
flag indicating if geometry has changed for the current time-step
Definition at line 177 of file IrregularDomain.h.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), EllipticDomain::compute(), and IrregularDomain::hasGeometryChanged().
|
protectedinherited |
mesh-spacings in each direction
Definition at line 167 of file IrregularDomain.h.
Referenced by EllipticDomain::compute(), ArbitraryDomain::constantInterpolation(), RegularDomain::constantInterpolation(), IrregularDomain::getHr(), BoxCornerDomain::getYIntersection(), BoxCornerDomain::isInside(), EllipticDomain::isInside(), isInside(), ArbitraryDomain::linearInterpolation(), BoxCornerDomain::linearInterpolation(), EllipticDomain::linearInterpolation(), BoxCornerDomain::quadraticInterpolation(), EllipticDomain::quadraticInterpolation(), RegularDomain::robinBoundaryStencil(), and IrregularDomain::setHr().
|
protectedinherited |
mapping (x,y,z) -> idx
Definition at line 183 of file IrregularDomain.h.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), EllipticDomain::compute(), ArbitraryDomain::indexAccess(), BoxCornerDomain::indexAccess(), and EllipticDomain::indexAccess().
|
protectedinherited |
interpolation type
Definition at line 180 of file IrregularDomain.h.
Referenced by EllipticDomain::compute(), IrregularDomain::getBoundaryStencil(), and IrregularDomain::IrregularDomain().
|
protectedinherited |
Definition at line 174 of file IrregularDomain.h.
Referenced by IrregularDomain::getXRangeMax(), IrregularDomain::getYRangeMax(), IrregularDomain::getZRangeMax(), IrregularDomain::resizeMesh(), and IrregularDomain::setRangeMax().
|
protectedinherited |
Definition at line 173 of file IrregularDomain.h.
Referenced by IrregularDomain::getXRangeMin(), IrregularDomain::getYRangeMin(), IrregularDomain::getZRangeMin(), IrregularDomain::resizeMesh(), and IrregularDomain::setRangeMin().
|
protectedinherited |
number of mesh points in each direction
Definition at line 165 of file IrregularDomain.h.
Referenced by ArbitraryDomain::compute(), BoxCornerDomain::compute(), EllipticDomain::compute(), IrregularDomain::getCoord(), IrregularDomain::getNeighbours(), IrregularDomain::getNr(), IrregularDomain::getNumXY(), indexAccess(), BoxCornerDomain::isInside(), EllipticDomain::isInside(), isInside(), ArbitraryDomain::linearInterpolation(), BoxCornerDomain::linearInterpolation(), BoxCornerDomain::quadraticInterpolation(), EllipticDomain::quadraticInterpolation(), IrregularDomain::resizeMesh(), RegularDomain::resizeMesh(), RegularDomain::robinBoundaryStencil(), IrregularDomain::setNr(), ArbitraryDomain::toCoordIdx(), EllipticDomain::toCoordIdx(), and BoxCornerDomain::toCoordIdx().
|
privateinherited |
number of nodes in the xy plane (for this case: independent of the z coordinate)
Definition at line 50 of file RegularDomain.h.
Referenced by RegularDomain::getNumXY(), and RegularDomain::setNumXY().
|
protectedinherited |
Definition at line 171 of file IrregularDomain.h.
Referenced by IrregularDomain::getMaxZ(), and IrregularDomain::setMinMaxZ().
|
protectedinherited |
min/max of bunch in floor coordinates
Definition at line 170 of file IrregularDomain.h.
Referenced by IrregularDomain::getMinZ(), and IrregularDomain::setMinMaxZ().