ThunderEgg  1.0.0
ThunderEgg::GMG::MPIRestrictor< D > Class Template Referenceabstract

Base class that makes the necessary mpi calls, derived classes only have to implement restrictPatches() method. More...

#include <MPIRestrictor.h>

Inheritance diagram for ThunderEgg::GMG::MPIRestrictor< D >:
Collaboration diagram for ThunderEgg::GMG::MPIRestrictor< D >:

Public Member Functions

 MPIRestrictor (const Domain< D > &coarser_domain, const Domain< D > &finer_domain)
 Create new LinearRestrictor object. More...
 
Vector< D > restrict (const Vector< D > &fine) const override
 
virtual void restrictPatches (const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D >>>> &patches, const Vector< D > &finer_vector, Vector< D > &coarser_vector) const =0
 Restrict values into coarse vector. More...
 
- Public Member Functions inherited from ThunderEgg::GMG::Restrictor< D >
virtual ~Restrictor ()
 Destroy the Restrictor object.
 
virtual Restrictor< D > * clone () const =0
 Clone this interpolator. More...
 

Detailed Description

template<int D>
class ThunderEgg::GMG::MPIRestrictor< D >

Base class that makes the necessary mpi calls, derived classes only have to implement restrictPatches() method.

Constructor & Destructor Documentation

◆ MPIRestrictor()

template<int D>
ThunderEgg::GMG::MPIRestrictor< D >::MPIRestrictor ( const Domain< D > &  coarser_domain,
const Domain< D > &  finer_domain 
)
inline

Create new LinearRestrictor object.

Parameters
ilcthe communcation package for the two levels.

Member Function Documentation

◆ restrict()

template<int D>
Vector<D> ThunderEgg::GMG::MPIRestrictor< D >::restrict ( const Vector< D > &  fine) const
inlineoverridevirtual
Parameters
fine

Implements ThunderEgg::GMG::Restrictor< D >.

◆ restrictPatches()

template<int D>
virtual void ThunderEgg::GMG::MPIRestrictor< D >::restrictPatches ( const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D >>>> &  patches,
const Vector< D > &  finer_vector,
Vector< D > &  coarser_vector 
) const
pure virtual

Restrict values into coarse vector.

The idea behind this is that this function will be called twice. Once to fill in the ghost values, and once to fill in the local values. The ghost values will be filled first and the local values will be fill while MPI communication is happening.

Parameters
patchespairs where the first value is the index in the coarse vector and the second value is a reference to the PatchInfo object
finer_vectorthe finer vector
coarser_vectorthe coarser vector

Implemented in ThunderEgg::GMG::LinearRestrictor< D >.


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