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

#include <RectangularDomain.h>

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

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

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 Member Functions inherited from IrregularDomain
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 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 34 of file RectangularDomain.h.

Constructor & Destructor Documentation

◆ RectangularDomain()

RectangularDomain::RectangularDomain ( double  a,
double  b,
IntVector_t  nr,
Vector_t  hr 
)
Parameters
ais the longer side a of the rectangle
bis the shorter side b of the rectangle

Member Function Documentation

◆ compute()

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

calculates intersection with the beam pipe

Implements IrregularDomain.

◆ coordAccess()

int RectangularDomain::coordAccess ( int  idx) const
inlineprivatevirtual

Implements IrregularDomain.

Definition at line 60 of file RectangularDomain.h.

References RegularDomain::getNumXY().

Here is the call graph for this function:

◆ indexAccess()

int RectangularDomain::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 56 of file RectangularDomain.h.

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

Here is the call graph for this function:

◆ isInside()

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

Here is the call graph for this function:

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