A 2D grid class with X-point topology.
More...
|
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 | lx () const |
| length of x More...
|
|
real_type | ly () const |
| length of y More...
|
|
real_type | hx () const |
| cell size in x More...
|
|
real_type | hy () const |
| cell size in y More...
|
|
real_type | fx () const |
| partition factor in x More...
|
|
real_type | fy () const |
| partition factor in y More...
|
|
unsigned | n () const |
| number of polynomial coefficients in x and y More...
|
|
unsigned | Nx () const |
| number of cells in x More...
|
|
unsigned | inner_Nx () const |
| number of topological cells in x More...
|
|
unsigned | outer_Nx () const |
| number of smooth rows in x More...
|
|
unsigned | Ny () const |
| number of cells in y More...
|
|
unsigned | inner_Ny () const |
| number of cells in the inner region of y More...
|
|
unsigned | outer_Ny () const |
| number of cells in one of the outer regions of y More...
|
|
bc | bcx () const |
| boundary conditions in x More...
|
|
bc | bcy () const |
| boundary conditions in y More...
|
|
RealGrid2d< real_type > | grid () const |
| Return a copy without topology. More...
|
|
const DLT< real_type > & | dlt () const |
| discrete legendre trafo More...
|
|
unsigned | size () const |
| real_typehe total number of points More...
|
|
void | display (std::ostream &os=std::cout) const |
| Display. More...
|
|
void | shift_topologic (real_type x0, real_type y0, real_type &x1, real_type &y1) const |
| Shifts a point coordinate due to topology. More...
|
|
bool | contains (real_type x, real_type y) const |
| Check if the grid contains a point. More...
|
|
|
| ~aRealTopologyX2d ()=default |
| disallow destruction through base class pointer More...
|
|
| aRealTopologyX2d (real_type x0, real_type x1, real_type y0, real_type y1, real_type fx, real_type fy, unsigned n, unsigned Nx, unsigned Ny, bc bcx, bc bcy) |
| Construct a 2D X-point grid. More...
|
|
| aRealTopologyX2d (const aRealTopologyX2d &src)=default |
|
aRealTopologyX2d & | operator= (const aRealTopologyX2d &src)=default |
|
template<class real_type>
struct dg::aRealTopologyX2d< real_type >
A 2D grid class with X-point topology.
is of the form
v |--- ---------- ---|
x |--- ---------- ---|
fx*
lx
|--- ---------- ---|
real_type lx() const
length of x
Definition: gridX.h:292
real_type fx() const
partition factor in x
Definition: gridX.h:316
real_type ly() const
length of y
Definition: gridX.h:298
real_type fy() const
partition factor in y
Definition: gridX.h:322
◆ host_grid
template<class real_type >
◆ host_vector
template<class real_type >
The host vector type used by host functions like evaluate.
◆ value_type
template<class real_type >
◆ ~aRealTopologyX2d()
template<class real_type >
disallow destruction through base class pointer
◆ aRealTopologyX2d() [1/2]
template<class real_type >
dg::aRealTopologyX2d< real_type >::aRealTopologyX2d |
( |
real_type |
x0, |
|
|
real_type |
x1, |
|
|
real_type |
y0, |
|
|
real_type |
y1, |
|
|
real_type |
fx, |
|
|
real_type |
fy, |
|
|
unsigned |
n, |
|
|
unsigned |
Nx, |
|
|
unsigned |
Ny, |
|
|
bc |
bcx, |
|
|
bc |
bcy |
|
) |
| |
|
inlineprotected |
Construct a 2D X-point grid.
- Parameters
-
x0 | left boundary in x |
x1 | right boundary in x |
y0 | lower boundary in y |
y1 | upper boundary in y |
fx | factor for the partition in x-direction (fx*Nx will be rounded) |
fy | factor for the partition in y-direction (fy*Ny will be rounded) |
n | # of polynomial coefficients per dimension (1<=n<=20, note that the library is optimized for n=3 ) |
Nx | # of points in x |
Ny | # of points in y |
bcx | boundary condition in x |
bcy | boundary condition in y |
◆ aRealTopologyX2d() [2/2]
template<class real_type >
explicit copy constructor (default)
- Parameters
-
◆ bcx()
template<class real_type >
boundary conditions in x
- Returns
◆ bcy()
template<class real_type >
boundary conditions in y
- Returns
◆ contains()
template<class real_type >
Check if the grid contains a point.
- Note
- doesn't check periodicity!!
- Parameters
-
x | x-point to check |
y | y-point to check |
- Returns
- true if x0()<=x<=x1() and y0()<=y<=y1(), false else
◆ display()
template<class real_type >
◆ dlt()
template<class real_type >
discrete legendre trafo
- Returns
◆ fx()
template<class real_type >
partition factor in x
- Returns
◆ fy()
template<class real_type >
partition factor in y
- Returns
◆ grid()
template<class real_type >
Return a copy without topology.
- Returns
◆ hx()
template<class real_type >
◆ hy()
template<class real_type >
◆ inner_Nx()
template<class real_type >
number of topological cells in x
- Returns
◆ inner_Ny()
template<class real_type >
number of cells in the inner region of y
- Returns
◆ lx()
template<class real_type >
◆ ly()
template<class real_type >
◆ n()
template<class real_type >
number of polynomial coefficients in x and y
- Returns
◆ Nx()
template<class real_type >
number of cells in x
- Returns
◆ Ny()
template<class real_type >
number of cells in y
- Returns
◆ operator=()
template<class real_type >
explicit assignment operator (default)
- Parameters
-
◆ outer_Nx()
template<class real_type >
number of smooth rows in x
- Returns
◆ outer_Ny()
template<class real_type >
number of cells in one of the outer regions of y
- Returns
◆ shift_topologic()
template<class real_type >
void dg::aRealTopologyX2d< real_type >::shift_topologic |
( |
real_type |
x0, |
|
|
real_type |
y0, |
|
|
real_type & |
x1, |
|
|
real_type & |
y1 |
|
) |
| const |
|
inline |
Shifts a point coordinate due to topology.
If you want to construct a point by adding (delta X, delta Y) to a given point (x0, y0) then the resulting coordinate x1 might be incorrect due to topologic reasons (periodic boundaries). This function corrects this coordinate
- Parameters
-
x0 | starting x-point (must lie inside of the grid) |
y0 | starting y-point (must lie inside of the grid) |
x1 | end x-point (inout) |
y1 | end y-point (inout) |
◆ size()
template<class real_type >
real_typehe total number of points
- Returns
- n*n*Nx*Ny
◆ x0()
template<class real_type >
Left boundary in x.
- Returns
◆ x1()
template<class real_type >
Right boundary in x.
- Returns
◆ y0()
template<class real_type >
left boundary in y
- Returns
◆ y1()
template<class real_type >
Right boundary in y.
- Returns
The documentation for this struct was generated from the following file: