ThunderEgg  1.0.0
ThunderEgg::GMG::DirectInterpolator< D > Class Template Reference

Directly places values from coarse cell into the corresponding fine cells. More...

#include <DirectInterpolator.h>

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

Public Member Functions

 DirectInterpolator (const Domain< D > &coarse_domain, const Domain< D > &fine_domain)
 Create new DirectInterpolator object. More...
 
DirectInterpolator< D > * clone () const override
 Clone this interpolator. More...
 
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 override
 Interpolate values from coarse vector to the finer vector. More...
 
- Public Member Functions inherited from ThunderEgg::GMG::MPIInterpolator< D >
 MPIInterpolator (const Domain< D > &coarser_domain, const Domain< D > &finer_domain)
 Create new MPIInterpolator object. 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.
 

Detailed Description

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

Directly places values from coarse cell into the corresponding fine cells.

This is a piecewise constant interpolation scheme.

Constructor & Destructor Documentation

◆ DirectInterpolator()

template<int D>
ThunderEgg::GMG::DirectInterpolator< D >::DirectInterpolator ( const Domain< D > &  coarse_domain,
const Domain< D > &  fine_domain 
)
inline

Create new DirectInterpolator object.

Parameters
coarse_domainthe coarser Domain
fine_domainthe finer Domain
num_componentsthe number of components in each cell

Member Function Documentation

◆ clone()

template<int D>
DirectInterpolator<D>* ThunderEgg::GMG::DirectInterpolator< D >::clone ( ) const
inlineoverridevirtual

Clone this interpolator.

Returns
DirectInterpolator<D>* a newly allocated copy of this interpolator

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

◆ interpolatePatches()

template<int D>
void ThunderEgg::GMG::DirectInterpolator< 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
inlineoverridevirtual

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

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


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