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

three-dimensional Grid with Cylindrical metric More...

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

Public Types

using perpendicular_grid = RealCartesianGrid2d< real_type >
 
- Public Types inherited from dg::aRealTopology3d< real_type >
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 = RealGrid3d< real_type >
 

Public Member Functions

 RealCylindricalGrid3d (real_type x0, real_type x1, real_type y0, real_type y1, real_type z0, real_type z1, unsigned n, unsigned Nx, unsigned Ny, unsigned Nz, bc bcx=PER, bc bcy=PER, bc bcz=PER)
 Equal polynomial coefficients. More...
 
 RealCylindricalGrid3d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy, RealGrid1d< real_type > gz)
 Construct a 3d topology as the product of three 1d grids. More...
 
virtual RealCylindricalGrid3dclone () const override final
 Geometries are cloneable. More...
 
- Public Member Functions inherited from dg::aRealProductGeometry3d< real_type >
aRealGeometry2d< real_type > * perp_grid () const
 The grid made up by the first two dimensions. More...
 
virtual ~aRealProductGeometry3d ()=default
 allow deletion through base class pointer More...
 
virtual aRealProductGeometry3dclone () const =0
 Geometries are cloneable. More...
 
- Public Member Functions inherited from dg::aRealGeometry3d< real_type >
SparseTensor< thrust::host_vector< real_type > > jacobian () const
 The Jacobian of the coordinate transformation from physical to computational space. More...
 
SparseTensor< thrust::host_vector< real_type > > metric () const
 The (inverse) metric tensor of the coordinate system. More...
 
std::vector< thrust::host_vector< real_type > > map () const
 The coordinate map from computational to physical space. More...
 
virtual aRealGeometry3dclone () const =0
 Geometries are cloneable. More...
 
virtual ~aRealGeometry3d ()=default
 allow deletion through base class pointer More...
 
- Public Member Functions inherited from dg::aRealTopology3d< real_type >
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...
 

Additional Inherited Members

- Protected Member Functions inherited from dg::aRealProductGeometry3d< real_type >
 aRealProductGeometry3d (const aRealProductGeometry3d &src)=default
 
aRealProductGeometry3doperator= (const aRealProductGeometry3d &src)=default
 
- Protected Member Functions inherited from dg::aRealGeometry3d< real_type >
 aRealGeometry3d (const aRealGeometry3d &src)=default
 
aRealGeometry3doperator= (const aRealGeometry3d &src)=default
 
- Protected Member Functions inherited from dg::aRealTopology3d< real_type >
 ~aRealTopology3d ()=default
 disallow deletion through base class pointer More...
 
 aRealTopology3d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy, RealGrid1d< real_type > gz)
 Construct a 3d topology as the product of three 1d grids. More...
 
 aRealTopology3d (const aRealTopology3d &src)=default
 
aRealTopology3doperator= (const aRealTopology3d &src)=default
 
virtual void do_set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny, unsigned new_nz, unsigned new_Nz)=0
 

Detailed Description

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

three-dimensional Grid with Cylindrical metric

Note
map() returns the identity, i.e. Cylindrical coordinates count as physical coordinates. Evaluate the dg::cooRZP2X() functions to transform to a Cartesian coordinate system.

Member Typedef Documentation

◆ perpendicular_grid

template<class real_type >
using dg::RealCylindricalGrid3d< real_type >::perpendicular_grid = RealCartesianGrid2d<real_type>

Constructor & Destructor Documentation

◆ RealCylindricalGrid3d() [1/2]

template<class real_type >
dg::RealCylindricalGrid3d< real_type >::RealCylindricalGrid3d ( real_type  x0,
real_type  x1,
real_type  y0,
real_type  y1,
real_type  z0,
real_type  z1,
unsigned  n,
unsigned  Nx,
unsigned  Ny,
unsigned  Nz,
bc  bcx = PER,
bc  bcy = PER,
bc  bcz = PER 
)
inline

Equal polynomial coefficients.

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
n# of polynomial coefficients for x and y dimension ( z-direction is set to 1) (1<=n<=20)
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
Note
x corresponds to R, y to Z and z to phi, the volume element is R

◆ RealCylindricalGrid3d() [2/2]

template<class real_type >
dg::RealCylindricalGrid3d< real_type >::RealCylindricalGrid3d ( RealGrid1d< real_type >  gx,
RealGrid1d< real_type >  gy,
RealGrid1d< real_type >  gz 
)
inline

Construct a 3d topology as the product of three 1d grids.

The simplest implementation of aRealTopology3d.
Definition: grid.h:844
real_type y0() const
left boundary in y
Definition: grid.h:547
unsigned nz() const
number of polynomial coefficients in z
Definition: grid.h:616
bc bcz() const
boundary conditions in z
Definition: grid.h:652
unsigned Nx() const
number of points in x
Definition: grid.h:622
unsigned ny() const
number of polynomial coefficients in y
Definition: grid.h:614
real_type x0() const
left boundary in x
Definition: grid.h:534
real_type y1() const
right boundary in y
Definition: grid.h:553
real_type z0() const
left boundary in z
Definition: grid.h:560
real_type x1() const
right boundary in x
Definition: grid.h:540
unsigned Ny() const
number of points in y
Definition: grid.h:628
bc bcy() const
boundary conditions in y
Definition: grid.h:646
bc bcx() const
boundary conditions in x
Definition: grid.h:640
real_type z1() const
right boundary in z
Definition: grid.h:566
unsigned Nz() const
number of points in z
Definition: grid.h:634
unsigned nx() const
number of polynomial coefficients in x
Definition: grid.h:612
Parameters
gxa Grid1d in x - direction
gya Grid1d in y - direction
gza Grid1d in z - direction

Member Function Documentation

◆ clone()

template<class real_type >
virtual RealCylindricalGrid3d * dg::RealCylindricalGrid3d< real_type >::clone ( ) const
inlinefinaloverridevirtual

Geometries are cloneable.

Implements dg::aRealProductGeometry3d< real_type >.


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