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

This is the abstract interface class for a three-dimensional MPIGeometry. More...

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

Public Member Functions

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 aRealMPIGeometry3dclone () const =0
 Geometries are cloneable. More...
 
virtual aRealGeometry3d< real_type > * global_geometry () const =0
 Construct the global non-MPI geometry. More...
 
virtual ~aRealMPIGeometry3d ()=default
 allow deletion through base class pointer More...
 
- Public Member Functions inherited from dg::aRealMPITopology3d< 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 z0 () const
 Return global z0. More...
 
real_type z1 () const
 Return global z1. More...
 
real_type lx () const
 Return global lx. More...
 
real_type ly () const
 Return global ly. More...
 
real_type lz () const
 Return global lz. More...
 
real_type hx () const
 Return global hx. More...
 
real_type hy () const
 Return global hy. More...
 
real_type hz () const
 Return global hz. 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 nz () const
 number of polynomial coefficients in z More...
 
unsigned Nx () const
 Return the global number of cells. More...
 
unsigned Ny () const
 Return the global number of cells. More...
 
unsigned Nz () const
 Return the global number of cells. More...
 
bc bcx () const
 global x boundary More...
 
bc bcy () const
 global y boundary More...
 
bc bcz () const
 global z boundary More...
 
MPI_Comm communicator () const
 Return mpi cartesian communicator that is used in this grid. More...
 
MPI_Comm get_perp_comm () const
 MPI Cartesian communicator in the first two dimensions (x and y) More...
 
const DLT< real_type > & dlt () const
 The Discrete Legendre Transformation. More...
 
const DLT< real_type > & dltx () const
 
const DLT< real_type > & dlty () const
 
const DLT< real_type > & dltz () const
 
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 paramters. More...
 
int pidOf (real_type x, real_type y, real_type z) 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, 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...
 
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 RealGrid3d< real_type > & local () const
 Return a non-MPI grid local for the calling process. More...
 
const RealGrid3d< real_type > & global () const
 Return the global non-MPI grid. More...
 

Protected Member Functions

 aRealMPIGeometry3d (const aRealMPIGeometry3d &src)=default
 
aRealMPIGeometry3doperator= (const aRealMPIGeometry3d &src)=default
 
- Protected Member Functions inherited from dg::aRealMPITopology3d< real_type >
 ~aRealMPITopology3d ()=default
 disallow deletion through base class pointer More...
 
 aRealMPITopology3d (RealGrid1d< real_type > gx, RealGrid1d< real_type > gy, RealGrid1d< real_type > gz, MPI_Comm comm)
 Construct a 3d topology as the product of three 1d grids. More...
 
 aRealMPITopology3d (const aRealMPITopology3d &src)=default
 
aRealMPITopology3doperator= (const aRealMPITopology3d &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
 

Additional Inherited Members

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

Detailed Description

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

This is the abstract interface class for a three-dimensional MPIGeometry.

Constructor & Destructor Documentation

◆ ~aRealMPIGeometry3d()

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

allow deletion through base class pointer

◆ aRealMPIGeometry3d()

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

explicit copy constructor (default)

Parameters
srcsource

Member Function Documentation

◆ clone()

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

◆ global_geometry()

template<class real_type >
virtual aRealGeometry3d< real_type > * dg::aRealMPIGeometry3d< real_type >::global_geometry ( ) const
pure virtual

Construct the global non-MPI geometry.

Implemented in dg::RealCartesianMPIGrid3d< real_type >, and dg::RealCylindricalMPIGrid3d< real_type >.

◆ jacobian()

template<class real_type >
SparseTensor< MPI_Vector< thrust::host_vector< real_type > > > dg::aRealMPIGeometry3d< 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,z are the coordinates in computational space and R,Z,P are the physical space coordinates)

\[ J = \begin{pmatrix} x_R(x,y,z) & x_Z(x,y,z) & x_\varphi(x,y,z) \\ y_R(x,y,z) & y_Z(x,y,z) & y_\varphi(x,y,z) \\ z_R(x,y,z) & z_Z(x,y,z) & z_\varphi(x,y,z) \end{pmatrix} \]

Returns
Jacobian
Note
per default this will be the identity tensor

◆ map()

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

The coordinate map from computational to physical space.

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

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

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

◆ metric()

template<class real_type >
SparseTensor< MPI_Vector< thrust::host_vector< real_type > > > dg::aRealMPIGeometry3d< 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,z are the coordinates, then

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

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

◆ operator=()

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

explicit assignment operator (default)

Parameters
srcsource

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