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

#include <EllipticDomain.h>

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

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

Detailed Description

Definition at line 39 of file EllipticDomain.h.

Member Typedef Documentation

◆ EllipticPointList_t

typedef std::multimap<int, double> EllipticDomain::EllipticPointList_t
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.

Constructor & Destructor Documentation

◆ EllipticDomain()

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

◆ ~EllipticDomain()

EllipticDomain::~EllipticDomain ( )

Definition at line 48 of file EllipticDomain.cpp.

Member Function Documentation

◆ compute()

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

◆ coordAccess()

int EllipticDomain::coordAccess ( int  idx) const
inlineprivatevirtual

Implements IrregularDomain.

Definition at line 81 of file EllipticDomain.h.

References IrregularDomain::coordMap_m, and RegularDomain::getNumXY().

Here is the call graph for this function:

◆ indexAccess()

int EllipticDomain::indexAccess ( int  x,
int  y,
int  z 
) const
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().

Here is the call graph for this function:

◆ isInside()

bool EllipticDomain::isInside ( int  x,
int  y,
int  z 
) const
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().

Here is the call graph for this function:

◆ linearInterpolation()

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

◆ quadraticInterpolation()

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

◆ toCoordIdx()

int EllipticDomain::toCoordIdx ( int  x,
int  y 
) const
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().

Member Data Documentation

◆ intersectXDir_m

EllipticPointList_t EllipticDomain::intersectXDir_m
private

all intersection points with grid lines in X direction

Definition at line 68 of file EllipticDomain.h.

Referenced by compute(), linearInterpolation(), and quadraticInterpolation().

◆ intersectYDir_m

EllipticPointList_t EllipticDomain::intersectYDir_m
private

all intersection points with grid lines in Y direction

Definition at line 71 of file EllipticDomain.h.

Referenced by compute(), linearInterpolation(), and quadraticInterpolation().


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