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

This is the abstract interface class for a two-dimensional RealGeometryX. More...

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

Public Member Functions

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 aRealGeometryX2dclone () const =0
 Geometries are cloneable. More...
 
virtual ~aRealGeometryX2d ()=default
 allow deletion through base class pointer More...
 
- Public Member Functions inherited from dg::aRealTopologyX2d< 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 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...
 

Protected Member Functions

 aRealGeometryX2d (const aRealGeometryX2d &src)=default
 
aRealGeometryX2doperator= (const aRealGeometryX2d &src)=default
 
- Protected Member Functions inherited from dg::aRealTopologyX2d< real_type >
 ~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
 
aRealTopologyX2doperator= (const aRealTopologyX2d &src)=default
 

Additional Inherited Members

- Public Types inherited from dg::aRealTopologyX2d< 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 = RealGridX2d< real_type >
 

Detailed Description

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

This is the abstract interface class for a two-dimensional RealGeometryX.

Constructor & Destructor Documentation

◆ ~aRealGeometryX2d()

template<class real_type >
virtual dg::aRealGeometryX2d< real_type >::~aRealGeometryX2d ( )
virtualdefault

allow deletion through base class pointer

◆ aRealGeometryX2d()

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

explicit copy constructor (default)

Parameters
srcsource

Member Function Documentation

◆ clone()

template<class real_type >
virtual aRealGeometryX2d * dg::aRealGeometryX2d< real_type >::clone ( ) const
pure virtual

◆ jacobian()

template<class real_type >
SparseTensor< thrust::host_vector< real_type > > dg::aRealGeometryX2d< real_type >::jacobian ( ) const
inline

The Jacobian of the coordinate transformation from physical to computational space.

The elements of the Tensor are (if x,y are the coordinates in computational space and R,Z are the physical space coordinates)

\[ J = \begin{pmatrix} x_R(x,y) & x_Z(x,y) \\ y_R(x,y) & y_Z(x,y) \end{pmatrix} \]

Returns
Jacobian
Note
per default this will be the identity tensor

◆ map()

template<class real_type >
std::vector< thrust::host_vector< real_type > > dg::aRealGeometryX2d< real_type >::map ( ) const
inline

The coordinate map from computational to physical space.

The elements of the map are (if x,y are the coordinates in computational space and R,Z are the physical space coordinates)

\[ R(x,y) \\ Z(x,y) \]

Returns
a vector of size 2
Note
per default this will be the identity map

◆ metric()

template<class real_type >
SparseTensor< thrust::host_vector< real_type > > dg::aRealGeometryX2d< real_type >::metric ( ) const
inline

The (inverse) metric tensor of the coordinate system.

The elements of the inverse metric tensor are the contravariant elements of the metric \(g\). If x,y are the coordinates, then

\[ g^{-1} = \begin{pmatrix} g^{xx}(x,y) & g^{xy}(x,y) \\ & g^{yy}(x,y) \end{pmatrix} \]

Returns
symmetric tensor
Note
use the dg::tensor::volume2d function to compute the volume element from here
per default this will be the identity tensor

◆ operator=()

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

explicit assignment operator (default)

Parameters
srcsource

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