OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ArbitraryDomain Class Reference

#include <ArbitraryDomain.h>

Inheritance diagram for ArbitraryDomain:
Inheritance graph
[legend]
Collaboration diagram for ArbitraryDomain:
Collaboration graph
[legend]

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

BoundaryGeometrybgeom_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...
 

Detailed Description

Definition at line 43 of file ArbitraryDomain.h.

Member Typedef Documentation

◆ PointList_t

typedef std::multimap< std::tuple<int, int, int>, double > ArbitraryDomain::PointList_t
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.

Constructor & Destructor Documentation

◆ ArbitraryDomain()

ArbitraryDomain::ArbitraryDomain ( BoundaryGeometry bgeom,
IntVector_t  nr,
Vector_t  hr,
std::string  interpl 
)

◆ ~ArbitraryDomain()

ArbitraryDomain::~ArbitraryDomain ( )

Definition at line 62 of file ArbitraryDomain.cpp.

Member Function Documentation

◆ compute()

void ArbitraryDomain::compute ( Vector_t  hr,
NDIndex< 3 >  localId 
)
virtual

◆ constantInterpolation()

void ArbitraryDomain::constantInterpolation ( int  x,
int  y,
int  z,
StencilValue_t value,
double &  scaleFactor 
) const
overrideprivatevirtual

◆ coordAccess()

int ArbitraryDomain::coordAccess ( int  idx) const
inlineprivatevirtual

Implements IrregularDomain.

Definition at line 94 of file ArbitraryDomain.h.

References IrregularDomain::coordMap_m.

◆ indexAccess()

int ArbitraryDomain::indexAccess ( int  x,
int  y,
int  z 
) const
inlineprivatevirtual

Implements IrregularDomain.

Definition at line 90 of file ArbitraryDomain.h.

References IrregularDomain::idxMap_m, and toCoordIdx().

Here is the call graph for this function:

◆ isInside()

bool ArbitraryDomain::isInside ( int  idx,
int  idy,
int  idz 
) const
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().

Here is the call graph for this function:

◆ linearInterpolation()

void ArbitraryDomain::linearInterpolation ( int  idx,
int  idy,
int  idz,
StencilValue_t value,
double &  scaleFactor 
) const
overrideprivatevirtual

◆ toCoordIdx()

int ArbitraryDomain::toCoordIdx ( int  idx,
int  idy,
int  idz 
) const
inlineprivate

Definition at line 85 of file ArbitraryDomain.h.

References IrregularDomain::nr_m.

Referenced by compute(), indexAccess(), and isInside().

Member Data Documentation

◆ bgeom_m

BoundaryGeometry* ArbitraryDomain::bgeom_m
private

Definition at line 60 of file ArbitraryDomain.h.

Referenced by ArbitraryDomain(), and compute().

◆ globalInsideP0_m

Vector_t ArbitraryDomain::globalInsideP0_m
private

Definition at line 82 of file ArbitraryDomain.h.

Referenced by ArbitraryDomain(), and compute().

◆ intersectHiX_m

PointList_t ArbitraryDomain::intersectHiX_m
private

all intersection points with gridlines in X direction

Definition at line 68 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ intersectHiY_m

PointList_t ArbitraryDomain::intersectHiY_m
private

all intersection points with gridlines in Y direction

Definition at line 71 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ intersectHiZ_m

PointList_t ArbitraryDomain::intersectHiZ_m
private

all intersection points with gridlines in Z direction

Definition at line 74 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ intersectLoX_m

PointList_t ArbitraryDomain::intersectLoX_m
private

Definition at line 68 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ intersectLoY_m

PointList_t ArbitraryDomain::intersectLoY_m
private

Definition at line 71 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ intersectLoZ_m

PointList_t ArbitraryDomain::intersectLoZ_m
private

Definition at line 74 of file ArbitraryDomain.h.

Referenced by compute(), and linearInterpolation().

◆ isInsideMap_m

std::map<int, bool> ArbitraryDomain::isInsideMap_m
private

Definition at line 80 of file ArbitraryDomain.h.

Referenced by compute(), and isInside().

◆ numXY_m

std::map<int, int> ArbitraryDomain::numXY_m
private

Definition at line 77 of file ArbitraryDomain.h.

Referenced by compute().


The documentation for this class was generated from the following files: