Discontinuous Galerkin Library
#include "dg/algorithm.h"
dg::aRealTopologyX3d< real_type > Struct Template Reference

A 3D grid class with X-point topology. More...

Inheritance diagram for dg::aRealTopologyX3d< real_type >:
[legend]

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 = RealGridX3d< real_type >
 

Public Member Functions

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...
 
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 points 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...
 
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...
 
RealGrid3d< real_type > grid () const
 Return a copy without topology. More...
 
const DLT< real_type > & dlt () const
 discrete legendre transformation More...
 
unsigned size () const
 real_typehe total number of points More...
 
void display (std::ostream &os=std::cout) const
 Display. More...
 
bool contains (real_type x, real_type y, real_type z) const
 Check if the grid contains a point. More...
 

Protected Member Functions

 ~aRealTopologyX3d ()=default
 disallow destruction through base class pointer More...
 
 aRealTopologyX3d (real_type x0, real_type x1, real_type y0, real_type y1, real_type z0, real_type z1, real_type fx, real_type fy, unsigned n, unsigned Nx, unsigned Ny, unsigned Nz, bc bcx, bc bcy, bc bcz)
 Construct a 3D X-point grid. More...
 
 aRealTopologyX3d (const aRealTopologyX3d &src)=default
 
aRealTopologyX3doperator= (const aRealTopologyX3d &src)=default
 

Detailed Description

template<class real_type>
struct dg::aRealTopologyX3d< real_type >

A 3D grid class with X-point topology.

In the third dimension only 1 polynomial coefficient is used, not n. In 2d it looks like

| -----> y
| |---x----------x---|
| |---x----------x---|
v |--- ---------- ---|
x |--- ---------- ---| fx*Lx
|--- ---------- ---|
fy*Ly
@ y
y direction
@ x
x direction
real_type fx() const
partition factor in x
Definition: gridX.h:627
real_type fy() const
partition factor in y
Definition: gridX.h:633

Member Typedef Documentation

◆ host_grid

template<class real_type >
using dg::aRealTopologyX3d< real_type >::host_grid = RealGridX3d<real_type>

◆ host_vector

template<class real_type >
using dg::aRealTopologyX3d< real_type >::host_vector = thrust::host_vector<real_type>

The host vector type used by host functions like evaluate.

◆ value_type

template<class real_type >
using dg::aRealTopologyX3d< real_type >::value_type = real_type

Constructor & Destructor Documentation

◆ ~aRealTopologyX3d()

template<class real_type >
dg::aRealTopologyX3d< real_type >::~aRealTopologyX3d ( )
protecteddefault

disallow destruction through base class pointer

◆ aRealTopologyX3d() [1/2]

template<class real_type >
dg::aRealTopologyX3d< real_type >::aRealTopologyX3d ( real_type  x0,
real_type  x1,
real_type  y0,
real_type  y1,
real_type  z0,
real_type  z1,
real_type  fx,
real_type  fy,
unsigned  n,
unsigned  Nx,
unsigned  Ny,
unsigned  Nz,
bc  bcx,
bc  bcy,
bc  bcz 
)
inlineprotected

Construct a 3D X-point grid.

Parameters
x0left boundary in x
x1right boundary in x
y0lower boundary in y
y1upper boundary in y
z0lower boundary in z
z1upper boundary in z
fxfactor for the partition in x-direction
fyfactor for the partition in y-direction
n# of polynomial coefficients per (x-,y-) dimension (1<=n<=20, note that the library is optimized for n=3 )
Attention
# of polynomial coefficients in z direction is always 1
Parameters
Nx# of points in x
Ny# of points in y
Nz# of points in z
bcxboundary condition in x
bcyboundary condition in y
bczboundary condition in z

◆ aRealTopologyX3d() [2/2]

template<class real_type >
dg::aRealTopologyX3d< real_type >::aRealTopologyX3d ( const aRealTopologyX3d< real_type > &  src)
protecteddefault

explicit copy constructor (default)

Parameters
srcsource

Member Function Documentation

◆ bcx()

template<class real_type >
bc dg::aRealTopologyX3d< real_type >::bcx ( ) const
inline

boundary conditions in x

Returns

◆ bcy()

template<class real_type >
bc dg::aRealTopologyX3d< real_type >::bcy ( ) const
inline

boundary conditions in y

Returns

◆ bcz()

template<class real_type >
bc dg::aRealTopologyX3d< real_type >::bcz ( ) const
inline

boundary conditions in z

Returns

◆ contains()

template<class real_type >
bool dg::aRealTopologyX3d< real_type >::contains ( real_type  x,
real_type  y,
real_type  z 
) const
inline

Check if the grid contains a point.

Note
doesn't check periodicity!!
Parameters
xx-point to check
yy-point to check
zz-point to check
Returns
true if x0()<=x<=x1() and y0()<=y<=y1() and z0()<=z<=z1() , false else

◆ display()

template<class real_type >
void dg::aRealTopologyX3d< real_type >::display ( std::ostream &  os = std::cout) const
inline

Display.

Parameters
osoutput stream

◆ dlt()

template<class real_type >
const DLT< real_type > & dg::aRealTopologyX3d< real_type >::dlt ( ) const
inline

discrete legendre transformation

Returns

◆ fx()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::fx ( ) const
inline

partition factor in x

Returns

◆ fy()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::fy ( ) const
inline

partition factor in y

Returns

◆ grid()

template<class real_type >
RealGrid3d< real_type > dg::aRealTopologyX3d< real_type >::grid ( ) const
inline

Return a copy without topology.

Returns

◆ hx()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::hx ( ) const
inline

cell size in x

Returns

◆ hy()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::hy ( ) const
inline

cell size in y

Returns

◆ hz()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::hz ( ) const
inline

cell size in z

Returns

◆ inner_Nx()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::inner_Nx ( ) const
inline

number of topological cells in x

Returns

◆ inner_Ny()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::inner_Ny ( ) const
inline

number of cells in the inner region of y

Returns

◆ lx()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::lx ( ) const
inline

length in x

Returns

◆ ly()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::ly ( ) const
inline

length in y

Returns

◆ lz()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::lz ( ) const
inline

length in z

Returns

◆ n()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::n ( ) const
inline

number of polynomial coefficients in x and y

Returns

◆ Nx()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::Nx ( ) const
inline

number of points in x

Returns

◆ Ny()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::Ny ( ) const
inline

number of cells in y

Returns

◆ Nz()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::Nz ( ) const
inline

number of points in z

Returns

◆ operator=()

template<class real_type >
aRealTopologyX3d & dg::aRealTopologyX3d< real_type >::operator= ( const aRealTopologyX3d< real_type > &  src)
protecteddefault

explicit assignment operator (default)

Parameters
srcsource

◆ outer_Nx()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::outer_Nx ( ) const
inline

number of smooth rows in x

Returns

◆ outer_Ny()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::outer_Ny ( ) const
inline

number of cells in one of the outer regions of y

Returns

◆ size()

template<class real_type >
unsigned dg::aRealTopologyX3d< real_type >::size ( ) const
inline

real_typehe total number of points

Returns
n*n*Nx*Ny*Nz

◆ x0()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::x0 ( ) const
inline

left boundary in x

Returns

◆ x1()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::x1 ( ) const
inline

right boundary in x

Returns

◆ y0()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::y0 ( ) const
inline

left boundary in y

Returns

◆ y1()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::y1 ( ) const
inline

right boundary in y

Returns

◆ z0()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::z0 ( ) const
inline

left boundary in z

Returns

◆ z1()

template<class real_type >
real_type dg::aRealTopologyX3d< real_type >::z1 ( ) const
inline

right boundary in z

Returns

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