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

#include <BoxCornerDomain.h>

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

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

- 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 71 of file BoxCornerDomain.h.

Member Typedef Documentation

◆ BoxCornerPointList

typedef std::multimap< std::pair<int, int>, double > BoxCornerDomain::BoxCornerPointList
private

Map from a ([(x or y], z) to a list of intersection values with boundary.

Definition at line 112 of file BoxCornerDomain.h.

Constructor & Destructor Documentation

◆ BoxCornerDomain()

BoxCornerDomain::BoxCornerDomain ( double  A,
double  B,
double  C,
double  L1,
double  L2,
IntVector_t  nr,
Vector_t  hr,
std::string  interpl 
)
Parameters
Adepth of the box
Bmaximal height of the box
Cheight of the corner
lengthof the structure
L1length of the first part of the structure
L2length of the corner

Definition at line 36 of file BoxCornerDomain.cpp.

References C_m, IrregularDomain::setRangeMax(), and IrregularDomain::setRangeMin().

Here is the call graph for this function:

◆ ~BoxCornerDomain()

BoxCornerDomain::~BoxCornerDomain ( )

Definition at line 49 of file BoxCornerDomain.cpp.

Member Function Documentation

◆ compute()

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

method to compute the intersection points with the boundary geometry (stored in some appropriate data structure)

Parameters
hrupdated 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().

Here is the call graph for this function:

◆ coordAccess()

int BoxCornerDomain::coordAccess ( int  idx) const
inlineprivatevirtual

Implements IrregularDomain.

Definition at line 146 of file BoxCornerDomain.h.

References IrregularDomain::coordMap_m.

◆ getB()

double BoxCornerDomain::getB ( double  z) const
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().

Here is the call graph for this function:

◆ getXIntersection()

double BoxCornerDomain::getXIntersection ( double  cx,
int   
) const
inlineprivate

Definition at line 128 of file BoxCornerDomain.h.

References IrregularDomain::getXRangeMax(), and IrregularDomain::getXRangeMin().

Referenced by linearInterpolation(), and quadraticInterpolation().

Here is the call graph for this function:

◆ getYIntersection()

double BoxCornerDomain::getYIntersection ( double  cy,
int  z 
) const
inlineprivate

Definition at line 132 of file BoxCornerDomain.h.

References getB(), IrregularDomain::getYRangeMin(), and IrregularDomain::hr_m.

Referenced by linearInterpolation(), and quadraticInterpolation().

Here is the call graph for this function:

◆ indexAccess()

int BoxCornerDomain::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 142 of file BoxCornerDomain.h.

References IrregularDomain::idxMap_m, and toCoordIdx().

Here is the call graph for this function:

◆ isInside()

bool BoxCornerDomain::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 96 of file BoxCornerDomain.h.

References getB(), IrregularDomain::getXRangeMax(), IrregularDomain::hr_m, and IrregularDomain::nr_m.

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

Here is the call graph for this function:

◆ linearInterpolation()

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

◆ quadraticInterpolation()

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

◆ toCoordIdx()

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

Member Data Documentation

◆ actBMax_m

double BoxCornerDomain::actBMax_m
private

Definition at line 123 of file BoxCornerDomain.h.

Referenced by compute().

◆ actBMin_m

double BoxCornerDomain::actBMin_m
private

because the geometry can change in the y direction

Definition at line 121 of file BoxCornerDomain.h.

Referenced by compute().

◆ C_m

double BoxCornerDomain::C_m
private

height of the corner

Definition at line 126 of file BoxCornerDomain.h.

Referenced by BoxCornerDomain(), and getB().

◆ IntersectXDir

BoxCornerPointList BoxCornerDomain::IntersectXDir
private

all intersection points with grid lines in X direction

Definition at line 115 of file BoxCornerDomain.h.

Referenced by compute().

◆ IntersectYDir

BoxCornerPointList BoxCornerDomain::IntersectYDir
private

all intersection points with grid lines in Y direction

Definition at line 118 of file BoxCornerDomain.h.

Referenced by compute().


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