Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
1D grid for X-point topology More...
Public Types | |
using | value_type = real_type |
using | host_vector = thrust::host_vector< real_type > |
The host vector type used by host functions like evaluate. More... | |
using | host_grid = RealGridX1d< real_type > |
Public Member Functions | |
RealGridX1d (real_type x0, real_type x1, real_type f, unsigned n, unsigned N, bc bcx=NEU) | |
1D X-point grid More... | |
real_type | x0 () const |
left boundary More... | |
real_type | x1 () const |
right boundary More... | |
real_type | f () const |
Factor. More... | |
real_type | lx () const |
total length of interval More... | |
real_type | h () const |
cell size More... | |
unsigned | N () const |
number of cells More... | |
unsigned | outer_N () const |
number of cells in one of the outer regions More... | |
unsigned | inner_N () const |
number of cells in the inner region More... | |
unsigned | n () const |
number of polynomial coefficients More... | |
bc | bcx () const |
boundary conditions More... | |
unsigned | size () const |
the total number of points More... | |
void | display (std::ostream &os=std::cout) const |
Display. More... | |
const DLT< real_type > & | dlt () const |
the discrete legendre transformation More... | |
RealGrid1d< real_type > | grid () const |
void | shift_topologic (real_type x0, real_type &x1) const |
Shifts a point coordinate due to topology. More... | |
bool | contains (real_type x) const |
Check if the grid contains a point. More... | |
1D grid for X-point topology
The grid looks like
, where the x indicates the periodicity and - the number of points The left boundary is x0 and the right x1, the inner boundaries lie at x0 + f*Lx and x1-f*Lx therefore f must be smaller than 0.5
using dg::RealGridX1d< real_type >::host_grid = RealGridX1d<real_type> |
using dg::RealGridX1d< real_type >::host_vector = thrust::host_vector<real_type> |
The host vector type used by host functions like evaluate.
using dg::RealGridX1d< real_type >::value_type = real_type |
|
inline |
1D X-point grid
x0 | left boundary |
x1 | right boundary |
f | factor 0<f<0.5 divides the domain |
n | # of polynomial coefficients |
N | # of cells |
bcx | boundary conditions |
|
inline |
boundary conditions
|
inline |
|
inline |
Display.
os | output stream |
|
inline |
the discrete legendre transformation
|
inline |
Factor.
|
inline |
|
inline |
cell size
|
inline |
number of cells in the inner region
|
inline |
total length of interval
|
inline |
number of cells
|
inline |
number of polynomial coefficients
|
inline |
number of cells in one of the outer regions
|
inline |
Shifts a point coordinate due to topology.
If you want to construct a point by adding delta X to a given point x0 then the resulting coordinate x1 might be incorrect due to topologic reasons (periodic boundaries). This function corrects this coordinate
x0 | starting point (must lie inside of the grid) |
x1 | end point (inout) |
|
inline |
the total number of points
|
inline |
left boundary
|
inline |
right boundary