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

The mpi version of RealCartesianGrid2d. More...

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

Public Member Functions

 RealCartesianMPIGrid2d (real_type x0, real_type x1, real_type y0, real_type y1, unsigned n, unsigned Nx, unsigned Ny, MPI_Comm comm)
 Equal polynomial coefficients. More...
 
 RealCartesianMPIGrid2d (real_type x0, real_type x1, real_type y0, real_type y1, unsigned n, unsigned Nx, unsigned Ny, bc bcx, bc bcy, MPI_Comm comm)
 Equal polynomial coefficients. More...
 
 RealCartesianMPIGrid2d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy, MPI_Comm comm)
 Construct a 2d grid as the product of two 1d grids. More...
 
 RealCartesianMPIGrid2d (const dg::RealMPIGrid2d< real_type > &g)
 Implicit type conversion from MPIGrid2d. More...
 
virtual RealCartesianMPIGrid2dclone () const override final
 Geometries are cloneable. More...
 
virtual RealCartesianGrid2d< real_type > * global_geometry () const override final
 Construct the global non-MPI geometry. More...
 
- Public Member Functions inherited from dg::aRealMPIGeometry2d< real_type >
SparseTensor< MPI_Vector< thrust::host_vector< real_type > > > jacobian () const
 The Jacobian of the coordinate transformation from physical to computational space. More...
 
SparseTensor< MPI_Vector< thrust::host_vector< real_type > > > metric () const
 The (inverse) metric tensor of the coordinate system. More...
 
std::vector< MPI_Vector< thrust::host_vector< real_type > > > map () const
 The coordinate map from computational to physical space. More...
 
virtual aRealMPIGeometry2dclone () const =0
 Geometries are cloneable. More...
 
virtual aRealGeometry2d< real_type > * global_geometry () const =0
 Construct the global non-MPI geometry. More...
 
virtual ~aRealMPIGeometry2d ()=default
 allow deletion through base class pointer More...
 
- Public Member Functions inherited from dg::aRealMPITopology2d< real_type >
real_type x0 () const
 Return global x0. More...
 
real_type x1 () const
 Return global x1. More...
 
real_type y0 () const
 Return global y0. More...
 
real_type y1 () const
 Return global y1. More...
 
real_type lx () const
 Return global lx. More...
 
real_type ly () const
 Return global ly. More...
 
real_type hx () const
 Return global hx. More...
 
real_type hy () const
 Return global hy. More...
 
unsigned n () const
 Return n. More...
 
unsigned nx () const
 number of polynomial coefficients in x More...
 
unsigned ny () const
 number of polynomial coefficients in y More...
 
unsigned Nx () const
 Return the global number of cells. More...
 
unsigned Ny () const
 Return the global number of cells. More...
 
bc bcx () const
 global x boundary More...
 
bc bcy () const
 global y boundary More...
 
MPI_Comm communicator () const
 Return mpi cartesian communicator that is used in this grid. 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...
 
unsigned size () const
 The total global number of points. More...
 
unsigned local_size () const
 The total local number of points. More...
 
void display (std::ostream &os=std::cout) const
 Display global and local grid. More...
 
int pidOf (real_type x, real_type y) const
 Returns the pid of the process that holds the local grid surrounding the given point. 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)
 Set the number of polynomials and cells. More...
 
void set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny)
 Set the number of polynomials and cells. More...
 
bool local2globalIdx (int localIdx, int PID, int &globalIdx) const
 Map a local index plus the PID to a global vector index. More...
 
bool global2localIdx (int globalIdx, int &localIdx, int &PID) const
 Map a global vector index to a local vector Index and the corresponding PID. More...
 
const RealGrid2d< real_type > & local () const
 Return a non-MPI grid local for the calling process. More...
 
const RealGrid2d< real_type > & global () const
 Return the global non-MPI grid. More...
 

Additional Inherited Members

- Public Types inherited from dg::aRealMPITopology2d< real_type >
using value_type = real_type
 
using host_vector = MPI_Vector< thrust::host_vector< real_type > >
 The host vector type used by host functions like evaluate. More...
 
using host_grid = RealMPIGrid2d< real_type >
 
- Protected Member Functions inherited from dg::aRealMPIGeometry2d< real_type >
 aRealMPIGeometry2d (const aRealMPIGeometry2d &src)=default
 
aRealMPIGeometry2doperator= (const aRealMPIGeometry2d &src)=default
 
- Protected Member Functions inherited from dg::aRealMPITopology2d< real_type >
 ~aRealMPITopology2d ()=default
 disallow deletion through base class pointer More...
 
 aRealMPITopology2d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy, MPI_Comm comm)
 Construct a 2d grid as the product of two 1d grids. More...
 
 aRealMPITopology2d (const aRealMPITopology2d &src)=default
 
aRealMPITopology2doperator= (const aRealMPITopology2d &src)=default
 
virtual void do_set (unsigned new_nx, unsigned new_Nx, unsigned new_ny, unsigned new_Ny)=0
 This function has an implementation. More...
 

Detailed Description

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

The mpi version of RealCartesianGrid2d.

Constructor & Destructor Documentation

◆ RealCartesianMPIGrid2d() [1/4]

template<class real_type >
dg::RealCartesianMPIGrid2d< real_type >::RealCartesianMPIGrid2d ( real_type  x0,
real_type  x1,
real_type  y0,
real_type  y1,
unsigned  n,
unsigned  Nx,
unsigned  Ny,
MPI_Comm  comm 
)
inline

Equal polynomial coefficients.

Parameters
x0left boundary in x
x1right boundary in x
y0lower boundary in y
y1upper boundary in y
n# of polynomial coefficients for both x and y dimension (1<=n<=20)
Nx# of points in x
Ny# of points in y
comma two-dimensional Cartesian communicator
Note
the paramateres given in the constructor are global parameters

◆ RealCartesianMPIGrid2d() [2/4]

template<class real_type >
dg::RealCartesianMPIGrid2d< real_type >::RealCartesianMPIGrid2d ( real_type  x0,
real_type  x1,
real_type  y0,
real_type  y1,
unsigned  n,
unsigned  Nx,
unsigned  Ny,
bc  bcx,
bc  bcy,
MPI_Comm  comm 
)
inline

Equal polynomial coefficients.

Parameters
x0left boundary in x
x1right boundary in x
y0lower boundary in y
y1upper boundary in y
n# of polynomial coefficients for both x and y dimension (1<=n<=20)
Nx# of points in x
Ny# of points in y
bcxboundary condition in x
bcyboundary condition in y
comma two-dimensional Cartesian communicator
Note
the paramateres given in the constructor are global parameters

◆ RealCartesianMPIGrid2d() [3/4]

template<class real_type >
dg::RealCartesianMPIGrid2d< real_type >::RealCartesianMPIGrid2d ( RealGrid1d< real_type >  gx,
RealGrid1d< real_type >  gy,
MPI_Comm  comm 
)
inline

Construct a 2d grid as the product of two 1d grids.

real_type x1() const
Return global x1.
Definition: mpi_grid.h:62
bc bcy() const
global y boundary
Definition: mpi_grid.h:132
unsigned nx() const
number of polynomial coefficients in x
Definition: mpi_grid.h:106
unsigned ny() const
number of polynomial coefficients in y
Definition: mpi_grid.h:108
real_type y0() const
Return global y0.
Definition: mpi_grid.h:68
unsigned Nx() const
Return the global number of cells.
Definition: mpi_grid.h:114
unsigned Ny() const
Return the global number of cells.
Definition: mpi_grid.h:120
real_type y1() const
Return global y1.
Definition: mpi_grid.h:74
real_type x0() const
Return global x0.
Definition: mpi_grid.h:56
bc bcx() const
global x boundary
Definition: mpi_grid.h:126
Parameters
gxa Grid in x - direction
gya Grid in y - direction
comma two-dimensional Cartesian communicator
Note
the paramateres given in the constructor are global parameters

◆ RealCartesianMPIGrid2d() [4/4]

template<class real_type >
dg::RealCartesianMPIGrid2d< real_type >::RealCartesianMPIGrid2d ( const dg::RealMPIGrid2d< real_type > &  g)
inline

Implicit type conversion from MPIGrid2d.

Parameters
gexisting grid object

Member Function Documentation

◆ clone()

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

Geometries are cloneable.

Implements dg::aRealMPIGeometry2d< real_type >.

◆ global_geometry()

template<class real_type >
virtual RealCartesianGrid2d< real_type > * dg::RealCartesianMPIGrid2d< real_type >::global_geometry ( ) const
inlinefinaloverridevirtual

Construct the global non-MPI geometry.

Implements dg::aRealMPIGeometry2d< real_type >.


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