Extension: Geometries
#include "dg/geometries/geometries.h"
dg::geo::RealCurvilinearGrid2d< real_type > Struct Template Reference

A two-dimensional grid based on curvilinear coordinates. More...

Inheritance diagram for dg::geo::RealCurvilinearGrid2d< real_type >:
[legend]

Public Member Functions

 RealCurvilinearGrid2d (const aRealGenerator2d< real_type > &generator, unsigned n, unsigned Nx, unsigned Ny, dg::bc bcx=dg::DIR, bc bcy=dg::PER)
 Construct a 2D grid. More...
 
 RealCurvilinearGrid2d (const aRealGenerator2d< real_type > &generator, Topology1d tx, Topology1d ty)
 Construct the computational space as the product of two 1d grids. More...
 
 RealCurvilinearGrid2d (RealCurvilinearProductGrid3d< real_type > g)
 Explicitly convert 3d product grid to the perpendicular grid. More...
 
const aRealGenerator2d< real_type > & generator () const
 read access to the generator More...
 
virtual RealCurvilinearGrid2dclone () const override final
 
- Public Member Functions inherited from dg::aRealGeometry2d< real_type >
SparseTensor< thrust::host_vector< real_type > > jacobian () const
 
SparseTensor< thrust::host_vector< real_type > > metric () const
 
std::vector< thrust::host_vector< real_type > > map () const
 
virtual aRealGeometry2dclone () const =0
 
virtual ~aRealGeometry2d ()=default
 
- Public Member Functions inherited from dg::aRealTopology2d< class real_type >
real_type x0 () const
 
real_type x1 () const
 
real_type y0 () const
 
real_type y1 () const
 
real_type lx () const
 
real_type ly () const
 
real_type hx () const
 
real_type hy () const
 
unsigned n () const
 
unsigned nx () const
 
unsigned ny () const
 
unsigned Nx () const
 
unsigned Ny () const
 
bc bcx () const
 
bc bcy () const
 
const DLT< real_type > & dltx () const
 
const DLT< real_type > & dlty () const
 
const RealGrid1d< real_type > & gx () const
 
const RealGrid1d< real_type > & gy () const
 
void multiplyCellNumbers (real_type fx, real_type fy)
 
void set (unsigned new_n, unsigned new_Nx, unsigned new_Ny)
 
void set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny)
 
unsigned size () const
 
void display (std::ostream &os=std::cout) const
 
void shift (bool &negative, real_type &x, real_type &y) const
 
void shift (bool &negative, real_type &x, real_type &y, bc bcx, bc bcy) const
 
bool contains (real_type x, real_type y) const
 
bool contains (const Vector &x) const
 

Additional Inherited Members

- Public Types inherited from dg::aRealTopology2d< class real_type >
typedef real_type value_type
 
typedef thrust::host_vector< real_type > host_vector
 
typedef RealGrid2d< real_type > host_grid
 
- Protected Member Functions inherited from dg::aRealGeometry2d< real_type >
 aRealGeometry2d (const aRealGeometry2d &src)=default
 
aRealGeometry2doperator= (const aRealGeometry2d &src)=default
 
- Protected Member Functions inherited from dg::aRealTopology2d< class real_type >
 ~aRealTopology2d ()=default
 
 aRealTopology2d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy)
 
 aRealTopology2d (const aRealTopology2d &src)=default
 
aRealTopology2doperator= (const aRealTopology2d &src)=default
 
virtual void do_set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny)=0
 

Detailed Description

template<class real_type>
struct dg::geo::RealCurvilinearGrid2d< real_type >

A two-dimensional grid based on curvilinear coordinates.

Constructor & Destructor Documentation

◆ RealCurvilinearGrid2d() [1/3]

template<class real_type >
dg::geo::RealCurvilinearGrid2d< real_type >::RealCurvilinearGrid2d ( const aRealGenerator2d< real_type > &  generator,
unsigned  n,
unsigned  Nx,
unsigned  Ny,
dg::bc  bcx = dg::DIR,
bc  bcy = dg::PER 
)
inline

Construct a 2D grid.

the coordinates of the computational space are called x,y

Parameters
generatorgenerate the grid: the grid boundaries are [0, generator.width()] x [0, generator.height()]
nnumber of Gaussian nodes in x and y (1<=n<=20 )
Nxnumber of cells in x
Nynumber of cells in y
bcxboundary condition in x
bcyboundary condition in y

◆ RealCurvilinearGrid2d() [2/3]

template<class real_type >
dg::geo::RealCurvilinearGrid2d< real_type >::RealCurvilinearGrid2d ( const aRealGenerator2d< real_type > &  generator,
Topology1d  tx,
Topology1d  ty 
)
inline

Construct the computational space as the product of two 1d grids.

dg::geo::RealCurvilinearGrid2d< double > CurvilinearGrid2d
Definition: curvilinear.h:234
unsigned ny() const
unsigned Nx() const
unsigned nx() const
unsigned Ny() const
const aRealGenerator2d< real_type > & generator() const
read access to the generator
Definition: curvilinear.h:131
Parameters
generatorgenerate the grid: the grid boundaries are [0, generator.width()] x [0, generator.height()]
txa Grid without boundaries in x - direction
tya Grid without boundaries in y - direction

◆ RealCurvilinearGrid2d() [3/3]

template<class real_type >
dg::geo::RealCurvilinearGrid2d< real_type >::RealCurvilinearGrid2d ( RealCurvilinearProductGrid3d< real_type >  g)
explicit

Explicitly convert 3d product grid to the perpendicular grid.

Parameters
g3d product grid

Member Function Documentation

◆ clone()

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

◆ generator()

template<class real_type >
const aRealGenerator2d< real_type > & dg::geo::RealCurvilinearGrid2d< real_type >::generator ( ) const
inline

read access to the generator


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