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

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

#include <MPIInterpolator.h>

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

Public Member Functions

 MPIInterpolator (const Domain< D > &coarser_domain, const Domain< D > &finer_domain)
 Create new MPIInterpolator object. More...
 
virtual void interpolatePatches (const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D >>>> &patches, const Vector< D > &coarser_vector, Vector< D > &finer_vector) const =0
 Interpolate values from coarse vector to the finer vector. More...
 
void interpolate (const Vector< D > &coarse, Vector< D > &fine) const
 interpolation function More...
 
- Public Member Functions inherited from ThunderEgg::GMG::Interpolator< D >
virtual ~Interpolator ()
 Destroy the Interpolator object.
 
virtual Interpolator< D > * clone () const =0
 Clone this interpolator. More...
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ MPIInterpolator()

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

Create new MPIInterpolator object.

Parameters
ilcthe communcation package for the two levels.

Member Function Documentation

◆ interpolate()

template<int D>
void ThunderEgg::GMG::MPIInterpolator< D >::interpolate ( const Vector< D > &  coarse,
Vector< D > &  fine 
) const
inlinevirtual

interpolation function

Parameters
coarsethe input vector that is interpolated from
finethe output vector that is interpolated to.

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

◆ interpolatePatches()

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

Interpolate values from coarse vector to the finer vector.

The idea behind this is that this function will be called twice. Once to interpolate from the local values, and once to interpolate from the ghost values. The local values will be interpolated from first, while MPI communication is happening, and the ghost values will be interpolated from last.

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::DirectInterpolator< D >.


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