Discontinuous Galerkin Library
#include "dg/algorithm.h"
|
Typedefs | |
template<class MPIContainer > | |
using | dg::get_mpi_view_type = std::conditional_t< std::is_const< MPIContainer >::value, MPI_Vector< View< const typename MPIContainer::container_type > >, MPI_Vector< View< typename MPIContainer::container_type > > > |
Functions | |
template<class real_type > | |
MPI_Vector< thrust::host_vector< real_type > > | dg::global2local (const thrust::host_vector< real_type > &global, const aRealMPITopology3d< real_type > &g) |
Take the relevant local part of a global vector. More... | |
template<class real_type > | |
MPI_Vector< thrust::host_vector< real_type > > | dg::global2local (const thrust::host_vector< real_type > &global, const aRealMPITopology2d< real_type > &g) |
Take the relevant local part of a global vector. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backproject (const RealGrid1d< real_type > &g) |
Create a matrix \( PI\) that projects values to an equidistant grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backproject (const aRealTopology2d< real_type > &g) |
Create a matrix \( PI\) that projects values to an equidistant grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backproject (const aRealTopology3d< real_type > &g) |
Create a matrix \( PI\) that projects values to an equidistant grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backproject (const RealGrid1d< real_type > &g) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backproject (const aRealTopology2d< real_type > &g) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backproject (const aRealTopology3d< real_type > &g) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
template<class SharedContainer , class real_type > | |
void | dg::split (SharedContainer &in, std::vector< View< SharedContainer > > &out, const aRealTopology3d< real_type > &grid) |
Split a vector into planes along the last dimension (fast version) More... | |
template<class SharedContainer , class real_type > | |
std::vector< View< SharedContainer > > | dg::split (SharedContainer &in, const aRealTopology3d< real_type > &grid) |
Split a vector into planes along the last dimension (construct version) More... | |
template<class Container , class real_type > | |
void | dg::assign3dfrom2d (const thrust::host_vector< real_type > &in2d, Container &out, const aRealTopology3d< real_type > &grid) |
Construct a 3d vector given a 2d host vector. More... | |
template<class MPIContainer , class real_type > | |
void | dg::split (MPIContainer &in, std::vector< get_mpi_view_type< MPIContainer > > &out, const aRealMPITopology3d< real_type > &grid) |
MPI Version of split (fast version) More... | |
template<class MPIContainer , class real_type > | |
std::vector< get_mpi_view_type< MPIContainer > > | dg::split (MPIContainer &in, const aRealMPITopology3d< real_type > &grid) |
MPI Version of split (construct version) More... | |
template<class LocalContainer , class real_type > | |
void | dg::assign3dfrom2d (const MPI_Vector< thrust::host_vector< real_type > > &in2d, MPI_Vector< LocalContainer > &out, const aRealMPITopology3d< real_type > &grid) |
MPI Version of assign3dfrom2d. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backscatter (const RealGrid1d< real_type > &g) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backscatter (const aRealTopology2d< real_type > &g) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::backscatter (const aRealTopology3d< real_type > &g) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backscatter (const RealGrid1d< real_type > &g) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backscatter (const aRealTopology2d< real_type > &g) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
template<class real_type > | |
dg::IHMatrix_t< real_type > | dg::create::inv_backscatter (const aRealTopology3d< real_type > &g) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid. More... | |
using dg::get_mpi_view_type = typedef std::conditional_t< std::is_const<MPIContainer>::value, MPI_Vector<View<const typename MPIContainer::container_type> >, MPI_Vector<View<typename MPIContainer::container_type> > > |
void dg::assign3dfrom2d | ( | const MPI_Vector< thrust::host_vector< real_type > > & | in2d, |
MPI_Vector< LocalContainer > & | out, | ||
const aRealMPITopology3d< real_type > & | grid | ||
) |
MPI Version of assign3dfrom2d.
Conceptually the same as a split of the out vector followed by assigning the input to each plane
in2d | the 2d input (communicator is ignored) |
out | output (memory will be allocated) |
grid | provide dimensions in 3rd and first two dimensions |
void dg::assign3dfrom2d | ( | const thrust::host_vector< real_type > & | in2d, |
Container & | out, | ||
const aRealTopology3d< real_type > & | grid | ||
) |
Construct a 3d vector given a 2d host vector.
Conceptually the same as a split of the out vector followed by assigning the input to each plane
in2d | the 2d input |
out | output (memory will be allocated) |
grid | provide dimensions in 3rd and first two dimensions |
dg::IHMatrix_t< real_type > dg::create::backproject | ( | const aRealTopology2d< real_type > & | g | ) |
Create a matrix \( PI\) that projects values to an equidistant grid.
Same as dg::create::transformation( g_equidist, g)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::backproject | ( | const aRealTopology3d< real_type > & | g | ) |
Create a matrix \( PI\) that projects values to an equidistant grid.
Same as dg::create::transformation( g_equidist, g)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::backproject | ( | const RealGrid1d< real_type > & | g | ) |
Create a matrix \( PI\) that projects values to an equidistant grid.
Same as dg::create::transformation( g_equidist, g)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::backscatter | ( | const aRealTopology2d< real_type > & | g | ) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation.
Useful if you want to visualize a dg-formatted vector.
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::backscatter | ( | const aRealTopology3d< real_type > & | g | ) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation.
Useful if you want to visualize a dg-formatted vector.
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::backscatter | ( | const RealGrid1d< real_type > & | g | ) |
Create a matrix \( B_{eq} F\) that interpolates values to an equidistant grid ready for visualisation.
Useful if you want to visualize a dg-formatted vector.
g | The grid on which to operate |
MPI_Vector< thrust::host_vector< real_type > > dg::global2local | ( | const thrust::host_vector< real_type > & | global, |
const aRealMPITopology2d< real_type > & | g | ||
) |
Take the relevant local part of a global vector.
global | a vector the size of the global grid |
g | the assumed topology |
MPI_Vector< thrust::host_vector< real_type > > dg::global2local | ( | const thrust::host_vector< real_type > & | global, |
const aRealMPITopology3d< real_type > & | g | ||
) |
Take the relevant local part of a global vector.
global | a vector the size of the global grid |
g | the assumed topology |
dg::IHMatrix_t< real_type > dg::create::inv_backproject | ( | const aRealTopology2d< real_type > & | g | ) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
Same as dg::create::transformation( g, g_equidist)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::inv_backproject | ( | const aRealTopology3d< real_type > & | g | ) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
Same as dg::create::transformation( g, g_equidist)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::inv_backproject | ( | const RealGrid1d< real_type > & | g | ) |
Create a matrix \( (PI)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
Same as dg::create::transformation( g, g_equidist)
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::inv_backscatter | ( | const aRealTopology2d< real_type > & | g | ) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
The inverse of dg::create::backscatter
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::inv_backscatter | ( | const aRealTopology3d< real_type > & | g | ) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
The inverse of dg::create::backscatter
g | The grid on which to operate |
dg::IHMatrix_t< real_type > dg::create::inv_backscatter | ( | const RealGrid1d< real_type > & | g | ) |
Create a matrix \( (B_{eq} F)^{-1}\) that transforms values from an equidistant grid back to a dg grid.
The inverse of dg::create::backscatter
g | The grid on which to operate |
std::vector< get_mpi_view_type< MPIContainer > > dg::split | ( | MPIContainer & | in, |
const aRealMPITopology3d< real_type > & | grid | ||
) |
MPI Version of split (construct version)
may take longer due to the many calls to MPI group creation functions
in | contiguous 3d vector (must be of size grid.size() ) |
grid | provide dimensions in 3rd and first two dimensions |
out
contains grid.nz()*grid.Nz()
2d vector views of 2d size on output MPIContainer | An MPI_Vector of a SharedContainer |
void dg::split | ( | MPIContainer & | in, |
std::vector< get_mpi_view_type< MPIContainer > > & | out, | ||
const aRealMPITopology3d< real_type > & | grid | ||
) |
MPI Version of split (fast version)
out
must hold a 2d Cartesian MPI_Communicator congruent (same process group) or ident (same process group, same context) with the communicator in grid
out
in | contiguous 3d vector (must be of size grid.size() ) |
out | contains grid.nz()*grid.Nz() 2d vector views of 2d size on output |
grid | provide dimensions in 3rd and first two dimensions |
MPIContainer | An MPI_Vector of a SharedContainer |
std::vector< View< SharedContainer > > dg::split | ( | SharedContainer & | in, |
const aRealTopology3d< real_type > & | grid | ||
) |
Split a vector into planes along the last dimension (construct version)
in | contiguous 3d vector (must be of size grid.size() ) |
grid | provide dimensions in 3rd and first two dimensions |
out
contains grid.nz()*grid.Nz()
2d vector views of 2d size on output SharedContainer | TensorTraits exists for this class and the tensor_category derives from SharedVectorTag |
void dg::split | ( | SharedContainer & | in, |
std::vector< View< SharedContainer > > & | out, | ||
const aRealTopology3d< real_type > & | grid | ||
) |
Split a vector into planes along the last dimension (fast version)
in | contiguous 3d vector (must be of size grid.size() ) |
out | contains grid.nz()*grid.Nz() 2d vector views of 2d size on output |
grid | provide dimensions in 3rd and first two dimensions |
SharedContainer | TensorTraits exists for this class and the tensor_category derives from SharedVectorTag |