Discontinuous Galerkin Library
#include "dg/algorithm.h"
Loading...
Searching...
No Matches
mpi_init.h File Reference

convenience mpi init functions More...

#include <iostream>
#include <cassert>
#include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include "config.h"
#include "mpi_datatype.h"
#include "../enums.h"

Go to the source code of this file.

Namespaces

namespace  dg
 This is the namespace for all functions and classes defined and used by the discontinuous Galerkin library.
 

Functions

void dg::mpi_init (int argc, char *argv[])
 Convencience shortcut: Calls MPI_Init or MPI_Init_thread and inits CUDA devices.
 
template<class T >
std::vector< T > dg::mpi_read_as (unsigned num, MPI_Comm comm, std::istream &is=std::cin)
 Read num values from is and broadcast to all processes as type T.
 
void dg::mpi_read_grid (unsigned &n, std::vector< unsigned > &N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout)
 Read in grid sizes from is.
 
void dg::mpi_read_grid (unsigned &n, std::vector< unsigned * > N, MPI_Comm comm, std::istream &is=std::cin, bool verbose=true, std::ostream &os=std::cout)
 Convenience shortcut allowing a call like.
 
MPI_Comm dg::mpi_cart_create (MPI_Comm comm_old, std::vector< int > dims, std::vector< int > periods, bool reorder=true)
 Convenience call to MPI_Cart_create preceded by MPI_Dims_create.
 
MPI_Comm dg::mpi_cart_create (std::vector< dg::bc > bcs, std::istream &is=std::cin, MPI_Comm comm_old=MPI_COMM_WORLD, bool reorder=true, bool verbose=true, std::ostream &os=std::cout)
 Convenience call: read in number of processses from istream and create Cartesian MPI communicator.
 
void dg::mpi_init1d (dg::bc bcx, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED: Short for.
 
void dg::mpi_init2d (dg::bc bcx, dg::bc bcy, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED: Short for.
 
void dg::mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED: Short for.
 
void dg::mpi_init1d (dg::bc bcx, unsigned &n, unsigned &N, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED.
 
void dg::mpi_init2d (dg::bc bcx, dg::bc bcy, unsigned &n, unsigned &Nx, unsigned &Ny, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED.
 
void dg::mpi_init3d (dg::bc bcx, dg::bc bcy, dg::bc bcz, unsigned &n, unsigned &Nx, unsigned &Ny, unsigned &Nz, MPI_Comm &comm, std::istream &is=std::cin, bool verbose=true)
 DEPRECATED.
 

Detailed Description

convenience mpi init functions

enums need to be included before this