Discontinuous Galerkin Library
#include "dg/algorithm.h"
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
dg::aRealProductGeometry3d< real_type > Struct Template Referenceabstract

A 3d product space Geometry g2dg1d. More...

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

Public Member Functions

aRealGeometry2d< real_type > * perp_grid () const
 The grid made up by the first two dimensions.
 
virtual ~aRealProductGeometry3d ()=default
 allow deletion through base class pointer
 
virtual aRealProductGeometry3dclone () const =0
 Geometries are cloneable.
 
- 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.
 
SparseTensor< thrust::host_vector< real_type > > metric () const
 The (inverse) metric tensor of the coordinate system.
 
std::vector< thrust::host_vector< real_type > > map () const
 The coordinate map from computational to physical space.
 
virtual ~aRealGeometry3d ()=default
 allow deletion through base class pointer
 
- Public Member Functions inherited from dg::aRealTopology< real_type, 3 >
unsigned shape (unsigned u=0) const
 nuNu the total number of points of an axis
 
host_vector abscissas (unsigned u=0) const
 Construct grid abscissas of the u axis.
 
host_vector weights (unsigned u=0) const
 Get the weights of the u axis.
 
std::array< unsigned, Nd > get_shape () const
 nuNu the total number of points of an axis
 
std::array< host_vector, Nd > get_abscissas () const
 Construct abscissas for all axes.
 
std::array< host_vector, Nd > get_weights () const
 Construct weights for all axes.
 
std::array< real_type, Nd > get_p () const
 Get left boundary point p.
 
std::array< real_type, Nd > get_q () const
 Get right boundary point q.
 
std::array< real_type, Nd > get_l () const
 Get grid length lu=qupu for all axes.
 
std::array< real_type, Nd > get_h () const
 Get grid constant hu=qupuNu for all axes.
 
std::array< unsigned, Nd > get_N () const
 Get number of cells Nu for all axes.
 
std::array< unsigned, Nd > get_n () const
 Get number of polynomial coefficients nu for all axes.
 
std::array< dg::bc, Nd > get_bc () const
 Get boundary condition bu for all axes.
 
real_type p (unsigned u=0) const
 Get left boundary point pu for axis u.
 
real_type q (unsigned u=0) const
 Get right boundary point qu for axis u.
 
real_type h (unsigned u=0) const
 Get grid constant hu=qupuNu for axis u.
 
real_type l (unsigned u=0) const
 Get grid length lu=qupu for axis u.
 
unsigned n (unsigned u=0) const
 Get number of polynomial coefficients nu for axis u.
 
unsigned N (unsigned u=0) const
 Get number of cells Nu for axis u.
 
dg::bc bc (unsigned u=0) const
 Get boundary condition bu for axis u.
 
RealGrid< real_type, 1 > grid (unsigned u) const
 Get axis u as a 1d grid.
 
RealGrid< real_type, 1 > axis (unsigned u) const
 An alias for "grid".
 
real_type x0 () const
 Equivalent to p(0)
 
real_type x1 () const
 Equivalent to p(1)
 
real_type y0 () const
 Equivalent to p(2)
 
real_type y1 () const
 Equivalent to q(0)
 
real_type z0 () const
 Equivalent to q(1)
 
real_type z1 () const
 Equivalent to q(2)
 
real_type lx () const
 Equivalent to l(0)
 
real_type ly () const
 Equivalent to l(1)
 
real_type lz () const
 Equivalent to l(2)
 
real_type hx () const
 Equivalent to h(0)
 
real_type hy () const
 Equivalent to h(1)
 
real_type hz () const
 Equivalent to h(2)
 
unsigned nx () const
 Equivalent to n(0)
 
unsigned ny () const
 Equivalent to n(1)
 
unsigned nz () const
 Equivalent to n(2)
 
unsigned Nx () const
 Equivalent to N(0)
 
unsigned Ny () const
 Equivalent to N(1)
 
unsigned Nz () const
 Equivalent to N(2)
 
dg::bc bcx () const
 Equivalent to bc(0)
 
dg::bc bcy () const
 Equivalent to bc(1)
 
dg::bc bcz () const
 Equivalent to bc(2)
 
RealGrid< real_type, 1 > gx () const
 Equivalent to grid(0)
 
RealGrid< real_type, 1 > gy () const
 Equivalent to grid(1)
 
RealGrid< real_type, 1 > gz () const
 Equivalent to grid(2)
 
std::array< unsigned, Nd > start () const
 Start coordinate in C-order for dg::file::NcHyperslab.
 
std::array< unsigned, Nd > count () const
 Count vector in C-order for dg::file::NcHyperslab.
 
std::enable_if_t<(Md >=2), void > multiplyCellNumbers (real_type fx, real_type fy)
 Multiply the number of cells in the first two dimensions with a given factor.
 
std::enable_if_t<(Md==1), void > set (unsigned new_n, unsigned new_Nx)
 Set n and N in a 1-dimensional grid.
 
std::enable_if_t<(Md==2), void > set (unsigned new_n, unsigned new_Nx, unsigned new_Ny)
 Set n and N in a 2-dimensional grid.
 
std::enable_if_t<(Md==3), void > set (unsigned new_n, unsigned new_Nx, unsigned new_Ny, unsigned new_Nz)
 Set n and N in a 3-dimensional grid.
 
void set (unsigned new_n, std::array< unsigned, Nd > new_N)
 Same as set( {new_n, new_n,...}, new_N);
 
void set (std::array< unsigned, Nd > new_n, std::array< unsigned, Nd > new_N)
 Set the number of polynomials and cells.
 
void set (std::array< real_type, Nd > new_p, std::array< real_type, Nd > new_q, std::array< unsigned, Nd > new_n, std::array< unsigned, Nd > new_N, std::array< dg::bc, Nd > new_bcs)
 Reset the entire grid.
 
void set_axis (unsigned coord, unsigned new_n, unsigned new_N)
 Set n and N for axis coord.
 
void set_pq (std::array< real_type, Nd > new_p, std::array< real_type, Nd > new_q)
 Reset the boundaries of the grid.
 
void set_bcs (std::array< dg::bc, Nd > new_bcs)
 Reset the boundary conditions of the grid.
 
unsigned size () const
 The total number of points.
 
void display (std::ostream &os=std::cout) const
 Display.
 
std::enable_if_t<(Md==1), bool > contains (real_type x) const
 Check if the grid contains a point.
 
bool contains (const Vector &x) const
 Check if the grid contains a point.
 

Protected Member Functions

 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::aRealTopology< real_type, 3 >
 ~aRealTopology ()=default
 disallow deletion through base class pointer
 
 aRealTopology ()=default
 default constructor
 
 aRealTopology (std::array< real_type, Nd > p, std::array< real_type, Nd > q, std::array< unsigned, Nd > n, std::array< unsigned, Nd > N, std::array< dg::bc, Nd > bcs)
 Construct a topology directly from points and dimensions.
 
 aRealTopology (const std::array< RealGrid< real_type, 1 >, Nd > &axes)
 Construct a topology as the product of 1d axes grids.
 
 aRealTopology (const aRealTopology &src)=default
 
aRealTopologyoperator= (const aRealTopology &src)=default
 
virtual void do_set (std::array< unsigned, Nd > new_n, std::array< unsigned, Nd > new_N)=0
 Set the number of polynomials and cells.
 
virtual void do_set (std::array< dg::bc, Nd > new_bcs)=0
 Reset the boundary conditions of the grid.
 
virtual void do_set_pq (std::array< real_type, Nd > new_p, std::array< real_type, Nd > new_q)=0
 Reset the boundaries of the grid.
 

Additional Inherited Members

- Public Types inherited from dg::aRealTopology< real_type, 3 >
using value_type
 value type of abscissas and weights
 
using host_vector
 
using host_grid
 Associated realisation.
 
- Static Public Member Functions inherited from dg::aRealTopology< real_type, 3 >
static constexpr unsigned ndim ()
 Dimensionality == Nd.
 

Detailed Description

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

A 3d product space Geometry g2dg1d.

This class represents a product space of a 2d grid (the "perp_grid") and a 1d grid (the "parallel_grid"). The special feature of the product space is that the metric is simply

g=((g2d(x,y))00g1d(x,y))

That is the metric elements do not depend on the third coordinate.

Template Parameters
real_typeThe value type of the grid

Constructor & Destructor Documentation

◆ ~aRealProductGeometry3d()

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

allow deletion through base class pointer

◆ aRealProductGeometry3d()

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

explicit copy constructor (default)

Parameters
srcsource

Member Function Documentation

◆ clone()

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

◆ operator=()

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

explicit assignment operator (default)

Parameters
srcsource

◆ perp_grid()

template<class real_type >
aRealGeometry2d< real_type > * dg::aRealProductGeometry3d< real_type >::perp_grid ( ) const
inline

The grid made up by the first two dimensions.

This is possible because the 3d grid is a product grid of a 2d perpendicular grid and a 1d parallel grid

Returns
A newly constructed perpendicular grid
Attention
The user takes ownership of the newly allocated grid
Manager class that invokes the clone() method on the managed ptr when copied.
Definition memory.h:21
RealGrid< real_type, 1 > grid(unsigned u) const
Definition grid.h:274

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