Discontinuous Galerkin Library
#include "dg/algorithm.h"
Loading...
Searching...
No Matches
dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter > Struct Template Reference

Distributed memory Sparse block matrix class, asynchronous communication. More...

Public Member Functions

 MPISparseBlockMat ()=default
 
 MPISparseBlockMat (const LocalMatrixInner &inside, const LocalMatrixOuter &outside, const MPIKroneckerGather< Vector > &mpi_gather)
 
template<template< class > class V, class LI , class LO >
 MPISparseBlockMat (const MPISparseBlockMat< V, LI, LO > &src)
 
const LocalMatrixInner & inner_matrix () const
 Read access to the inner matrix.
 
const LocalMatrixOuter & outer_matrix () const
 Read access to the outer matrix.
 
LocalMatrixInner & inner_matrix ()
 Write access to the inner matrix.
 
LocalMatrixOuter & outer_matrix ()
 Write access to the outer matrix.
 
MPI_Comm communicator () const
 
template<class ContainerType1 , class ContainerType2 >
void symv (dg::get_value_type< ContainerType1 > alpha, const ContainerType1 &x, dg::get_value_type< ContainerType1 > beta, ContainerType2 &y) const
 Matrix Vector product.
 
template<class ContainerType1 , class ContainerType2 >
void symv (const ContainerType1 &x, ContainerType2 &y) const
 

Friends

template<template< class > class V, class LI , class LO >
class MPISparseBlockMat
 

Detailed Description

template<template< class > class Vector, class LocalMatrixInner, class LocalMatrixOuter = LocalMatrixInner>
struct dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >

Distributed memory Sparse block matrix class, asynchronous communication.

This is a specialisation of MPIDiatMat for our dg::EllSparseBlockMat

See Separation of communication and computation

Template Parameters
LocalMatrixInnerThe class of the matrix for local computations of the inner points. symv(m,x,y) needs to be callable on the container class of the MPI_Vector
LocalMatrixOuterThe class of the matrix for local computations of the outer points. symv(1,m,x,1,y) needs to be callable on the container class of the MPI_Vector
VectorThe storage class for internal buffers must match the execution policy of the containers in the symv functions
Note
This class overlaps communication with computation of the inner matrix

Constructor & Destructor Documentation

◆ MPISparseBlockMat() [1/3]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::MPISparseBlockMat ( )
default

◆ MPISparseBlockMat() [2/3]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::MPISparseBlockMat ( const LocalMatrixInner & inside,
const LocalMatrixOuter & outside,
const MPIKroneckerGather< Vector > & mpi_gather )
inline

◆ MPISparseBlockMat() [3/3]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
template<template< class > class V, class LI , class LO >
dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::MPISparseBlockMat ( const MPISparseBlockMat< V, LI, LO > & src)
inline

Member Function Documentation

◆ communicator()

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
MPI_Comm dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::communicator ( ) const
inline

◆ inner_matrix() [1/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
LocalMatrixInner & dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::inner_matrix ( )
inline

Write access to the inner matrix.

◆ inner_matrix() [2/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
const LocalMatrixInner & dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::inner_matrix ( ) const
inline

Read access to the inner matrix.

◆ outer_matrix() [1/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
LocalMatrixOuter & dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::outer_matrix ( )
inline

Write access to the outer matrix.

◆ outer_matrix() [2/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
const LocalMatrixOuter & dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::outer_matrix ( ) const
inline

Read access to the outer matrix.

◆ symv() [1/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
template<class ContainerType1 , class ContainerType2 >
void dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::symv ( const ContainerType1 & x,
ContainerType2 & y ) const
inline

◆ symv() [2/2]

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
template<class ContainerType1 , class ContainerType2 >
void dg::MPISparseBlockMat< Vector, LocalMatrixInner, LocalMatrixOuter >::symv ( dg::get_value_type< ContainerType1 > alpha,
const ContainerType1 & x,
dg::get_value_type< ContainerType1 > beta,
ContainerType2 & y ) const
inline

Matrix Vector product.

First the inner elements are computed with a call to symv then the global_gather function of the communication object is called. Finally the outer elements are added with a call to symv for the outer matrix

Template Parameters
ContainerTypecontainer class of the vector elements
Parameters
alphascalar
xinput
betascalar
youtput

Friends And Related Symbol Documentation

◆ MPISparseBlockMat

template<template< class > class Vector, class LocalMatrixInner , class LocalMatrixOuter = LocalMatrixInner>
template<template< class > class V, class LI , class LO >
friend class MPISparseBlockMat
friend

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