Go to the documentation of this file.
21 #ifndef THUNDEREGG_GMG_MPIRESTRICTOR_H
22 #define THUNDEREGG_GMG_MPIRESTRICTOR_H
53 : ilc(coarser_domain, finer_domain)
57 if constexpr (ENABLE_DEBUG) {
59 throw RuntimeError(
"fine vector is incorrect length. Expected Length of " +
97 const std::vector<std::pair<
int, std::reference_wrapper<
const PatchInfo<D>>>>& patches,
Facilitates communication between a finer domain and a coarser domain.
Definition: InterLevelComm.h:52
const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D > > > > & getPatchesWithGhostParent() const
Get the vector of finer patches that have a ghost parent.
Definition: InterLevelComm.h:276
Abstract class for restriction operators.
Definition: Restrictor.h:36
Uses a collection of PatchInfo objects to represent the domain of the problem.
Definition: Domain.h:50
Vector< D > restrict(const Vector< D > &fine) const override
Definition: MPIRestrictor.h:55
void sendGhostPatchesFinish(Vector< D > &vector, const Vector< D > &ghost_vector)
Finish the communication for sending ghost values.
Definition: InterLevelComm.h:372
Base class that makes the necessary mpi calls, derived classes only have to implement restrictPatches...
Definition: MPIRestrictor.h:38
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.
const Domain< D > & getFinerDomain() const
Get the finer Domain.
Definition: InterLevelComm.h:580
Contains metadata for a patch.
Definition: PatchInfo.h:51
void setWithGhost(double alpha)
set all values in the vector (including ghost cells)
Definition: Vector.h:404
const std::vector< std::pair< int, std::reference_wrapper< const PatchInfo< D > > > > & getPatchesWithLocalParent() const
Get the vector of finer patches that have a local parent.
Definition: InterLevelComm.h:260
const Domain< D > & getCoarserDomain() const
Get the coarser Domain.
Definition: InterLevelComm.h:574
void sendGhostPatchesStart(Vector< D > &vector, const Vector< D > &ghost_vector)
Start the communication for sending ghost values.
Definition: InterLevelComm.h:293
Vector class for use in thunderegg.
Definition: Vector.h:42
Geometric-Multigrid classes.
Definition: Cycle.h:33
int getNumLocalPatches() const
Get the number of local patches.
Definition: Vector.h:316
MPIRestrictor(const Domain< D > &coarser_domain, const Domain< D > &finer_domain)
Create new LinearRestrictor object.
Definition: MPIRestrictor.h:52
Vector< D > getNewGhostVector(int num_components) const
Allocate a new vector for ghost patch values.
Definition: InterLevelComm.h:243
ThunderEgg runtime exception.
Definition: RuntimeError.h:36