dune-pdelab 2.7-git
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Dune::PDELab::ISTL::ParallelHelper< GFS > Class Template Reference

#include <dune/pdelab/backend/istl/parallelhelper.hh>

Inheritance diagram for Dune::PDELab::ISTL::ParallelHelper< GFS >:
Inheritance graph

Public Member Functions

 ParallelHelper (const GFS &gfs, int verbose=1)
 
const std::vector< RankIndex > & getNeighborRanks () const
 Returns a sorted list of the ranks of all neighboring processes.
 
template<typename X >
void maskForeignDOFs (X &x) const
 Mask out all DOFs not owned by the current process with 0.
 
bool owned (const ContainerIndex &i) const
 Tests whether the given index is owned by this process.
 
bool isGhost (const ContainerIndex &i) const
 Tests whether the given index belongs to a ghost DOF.
 
template<typename X , typename Y >
PromotionTraits< typenameX::field_type, typenameY::field_type >::PromotedType disjointDot (const X &x, const Y &y) const
 Calculates the (rank-local) dot product of x and y on the disjoint partition defined by the helper.
 
RankIndex rank () const
 Returns the MPI rank of this process.
 
template<typename MatrixType , typename Comm >
void createIndexSetAndProjectForAMG (MatrixType &m, Comm &c)
 Makes the matrix consistent and creates the parallel information for AMG.
 
template<typename M , typename C >
void createIndexSetAndProjectForAMG (M &m, C &c)
 

Constructor & Destructor Documentation

◆ ParallelHelper()

template<typename GFS >
Dune::PDELab::ISTL::ParallelHelper< GFS >::ParallelHelper ( const GFS &  gfs,
int  verbose = 1 
)
inline

Member Function Documentation

◆ createIndexSetAndProjectForAMG()

template<typename GFS >
template<typename MatrixType , typename Comm >
void Dune::PDELab::ISTL::ParallelHelper< GFS >::createIndexSetAndProjectForAMG ( MatrixType &  m,
Comm &  c 
)

Makes the matrix consistent and creates the parallel information for AMG.

This function accomplishes two things:

  1. Makes the matrix consistent w.r.t. to the disjoint partitioning of the DOF space, i.e. aggregates matrix entries for border entries from neighboring ranks.
  2. Sets up the parallel communication information for AMG.
Warning
This function silenty assumes that the matrix only has a single level of blocking and will not work correctly otherwise. Also note that AMG will only work correctly for P1 discretisations.
Parameters
mThe PDELab matrix container.
cThe parallel information object providing index set, interfaces and communicators.

◆ disjointDot()

template<typename GFS >
template<typename X , typename Y >
PromotionTraits< typenameX::field_type, typenameY::field_type >::PromotedType Dune::PDELab::ISTL::ParallelHelper< GFS >::disjointDot ( const X &  x,
const Y &  y 
) const
inline

Calculates the (rank-local) dot product of x and y on the disjoint partition defined by the helper.

◆ getNeighborRanks()

template<typename GFS >
const std::vector< RankIndex > & Dune::PDELab::ISTL::ParallelHelper< GFS >::getNeighborRanks ( ) const
inline

Returns a sorted list of the ranks of all neighboring processes.

◆ isGhost()

template<typename GFS >
bool Dune::PDELab::ISTL::ParallelHelper< GFS >::isGhost ( const ContainerIndex &  i) const
inline

Tests whether the given index belongs to a ghost DOF.

◆ maskForeignDOFs()

template<typename GFS >
template<typename X >
void Dune::PDELab::ISTL::ParallelHelper< GFS >::maskForeignDOFs ( X &  x) const
inline

Mask out all DOFs not owned by the current process with 0.

◆ owned()

template<typename GFS >
bool Dune::PDELab::ISTL::ParallelHelper< GFS >::owned ( const ContainerIndex &  i) const
inline

Tests whether the given index is owned by this process.

◆ rank()

template<typename GFS >
RankIndex Dune::PDELab::ISTL::ParallelHelper< GFS >::rank ( ) const
inline

Returns the MPI rank of this process.


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