|
real_type | x0 () const |
| left boundary in x More...
|
|
real_type | x1 () const |
| right boundary in x More...
|
|
real_type | y0 () const |
| left boundary in y More...
|
|
real_type | y1 () const |
| right boundary in y More...
|
|
real_type | z0 () const |
| left boundary in z More...
|
|
real_type | z1 () const |
| right boundary in z More...
|
|
real_type | lx () const |
| length in x More...
|
|
real_type | ly () const |
| length in y More...
|
|
real_type | lz () const |
| length in z More...
|
|
real_type | hx () const |
| cell size in x More...
|
|
real_type | hy () const |
| cell size in y More...
|
|
real_type | hz () const |
| cell size in z More...
|
|
unsigned | n () const |
| number of polynomial coefficients in x More...
|
|
unsigned | nx () const |
| number of polynomial coefficients in x More...
|
|
unsigned | ny () const |
| number of polynomial coefficients in y More...
|
|
unsigned | nz () const |
| number of polynomial coefficients in z More...
|
|
unsigned | Nx () const |
| number of points in x More...
|
|
unsigned | Ny () const |
| number of points in y More...
|
|
unsigned | Nz () const |
| number of points in z More...
|
|
bc | bcx () const |
| boundary conditions in x More...
|
|
bc | bcy () const |
| boundary conditions in y More...
|
|
bc | bcz () const |
| boundary conditions in z More...
|
|
const DLT< real_type > & | dltx () const |
| discrete legendre transformation in x More...
|
|
const DLT< real_type > & | dlty () const |
| discrete legendre transformation in y More...
|
|
const DLT< real_type > & | dltz () const |
| discrete legendre transformation in z More...
|
|
const RealGrid1d< real_type > & | gx () const |
| The x-axis grid. More...
|
|
const RealGrid1d< real_type > & | gy () const |
| The y-axis grid. More...
|
|
const RealGrid1d< real_type > & | gz () const |
| The z-axis grid. More...
|
|
unsigned | size () const |
| The total number of points. More...
|
|
void | display (std::ostream &os=std::cout) const |
| Display. More...
|
|
void | shift (bool &negative, real_type &x, real_type &y, real_type &z) const |
| Shift any point coordinate to a corresponding grid coordinate according to the boundary condition. More...
|
|
void | shift (bool &negative, real_type &x, real_type &y, real_type &z, bc bcx, bc bcy, bc bcz) const |
| Shift any point coordinate to a corresponding grid coordinate according to the boundary condition. More...
|
|
bool | contains (real_type x, real_type y, real_type z) const |
| Check if the grid contains a point. More...
|
|
template<class Vector > |
bool | contains (const Vector &x) const |
| Shortcut for contains( x[0], x[1], x[2]) More...
|
|
void | multiplyCellNumbers (real_type fx, real_type fy) |
| Multiply the number of cells with a given factor. More...
|
|
void | set (unsigned new_n, unsigned new_Nx, unsigned new_Ny, unsigned new_Nz) |
| Set the number of polynomials and cells. More...
|
|
void | set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny, unsigned new_nz, unsigned new_Nz) |
| Set the number of polynomials and cells. More...
|
|
template<class real_type>
struct dg::aRealTopology3d< real_type >
An abstract base class for three-dimensional grids.
- Note
- although it is abstract, objects are not meant to be hold on the heap via a base class pointer ( we protected the destructor)
template<class real_type >
void dg::aRealTopology3d< real_type >::set |
( |
unsigned |
new_n, |
|
|
unsigned |
new_Nx, |
|
|
unsigned |
new_Ny, |
|
|
unsigned |
new_Nz |
|
) |
| |
|
inline |
Set the number of polynomials and cells.
Set nz
to 1 Same as set(new_n,new_Nx,new_n,new_Ny,1,new_Nz)
- Parameters
-
new_n | new number of Gaussian nodes in x and y |
new_Nx | new number of cells in x |
new_Ny | new number of cells in y |
new_Nz | new number of cells in z |
template<class real_type >
void dg::aRealTopology3d< real_type >::shift |
( |
bool & |
negative, |
|
|
real_type & |
x, |
|
|
real_type & |
y, |
|
|
real_type & |
z |
|
) |
| const |
|
inline |
Shift any point coordinate to a corresponding grid coordinate according to the boundary condition.
If the given point is already inside the grid, the function does nothing, else along each dimension the following happens: check the boundary condition. If dg::PER
, the point will be shifted topologically back onto the domain (modulo operation). Else the point will be mirrored at the closest boundary. If the boundary is a Dirichlet boundary (happens for dg::DIR
, dg::DIR_NEU
and dg::NEU_DIR
; the latter two apply dg::DIR
to the respective left or right boundary ) an additional sign flag is swapped. This process is repeated until the result lies inside the grid. This function forms the basis for extending/periodifying a function discretized on the grid beyond the grid boundaries.
- See also
- interpolate
- Note
- For periodic boundaries the right boundary point is considered outside the grid and is shifted to the left boundary point.
- Parameters
-
negative | swap value if there was a sign swap (happens when a point is mirrored along a Dirichlet boundary) |
x | point to shift (inout) the result is guaranteed to lie inside the grid |
y | point (y) to shift (inout) the result is guaranteed to lie inside the grid |
z | point (z) to shift (inout) the result is guaranteed to lie inside the grid |
template<class real_type >
void dg::aRealTopology3d< real_type >::shift |
( |
bool & |
negative, |
|
|
real_type & |
x, |
|
|
real_type & |
y, |
|
|
real_type & |
z, |
|
|
bc |
bcx, |
|
|
bc |
bcy, |
|
|
bc |
bcz |
|
) |
| const |
|
inline |
Shift any point coordinate to a corresponding grid coordinate according to the boundary condition.
If the given point is already inside the grid, the function does nothing, else along each dimension the following happens: check the boundary condition. If dg::PER
, the point will be shifted topologically back onto the domain (modulo operation). Else the point will be mirrored at the closest boundary. If the boundary is a Dirichlet boundary (happens for dg::DIR
, dg::DIR_NEU
and dg::NEU_DIR
; the latter two apply dg::DIR
to the respective left or right boundary ) an additional sign flag is swapped. This process is repeated until the result lies inside the grid. This function forms the basis for extending/periodifying a function discretized on the grid beyond the grid boundaries.
- See also
- interpolate
- Note
- For periodic boundaries the right boundary point is considered outside the grid and is shifted to the left boundary point.
- Parameters
-
negative | swap value if there was a sign swap (happens when a point is mirrored along a Dirichlet boundary) |
x | point to shift (inout) the result is guaranteed to lie inside the grid |
y | point (y) to shift (inout) the result is guaranteed to lie inside the grid |
z | point (z) to shift (inout) the result is guaranteed to lie inside the grid |
bcx | overrule grid internal boundary condition with this value |
bcy | overrule grid internal boundary condition with this value |
bcz | overrule grid internal boundary condition with this value |