Go to the documentation of this file.
21 #ifndef THUNDEREGG_PATCHOPERATOR_H
22 #define THUNDEREGG_PATCHOPERATOR_H
50 std::shared_ptr<const GhostFiller<D>> ghost_filler;
63 , ghost_filler(ghost_filler.
clone())
128 if constexpr (ENABLE_DEBUG) {
137 ghost_filler->fillGhost(u);
PatchOperator(const Domain< D > &domain, const GhostFiller< D > &ghost_filler)
Construct a new Patch Operator object.
Definition: PatchOperator.h:61
virtual void modifyRHSForInternalBoundaryConditions(const PatchInfo< D > &pinfo, const PatchView< const double, D > &u_view, const PatchView< double, D > &f_view) const =0
Treat the internal patch boundaries as domain boundaires and modify RHS accordingly.
Uses a collection of PatchInfo objects to represent the domain of the problem.
Definition: Domain.h:50
int getNumLocalPatches() const
Get the number of local patches.
Definition: Domain.h:272
virtual void applySinglePatch(const PatchInfo< D > &pinfo, const PatchView< const double, D > &u_view, const PatchView< double, D > &f_view) const =0
Apply the operator to a single patch.
virtual void applySinglePatchWithInternalBoundaryConditions(const PatchInfo< D > &pinfo, const PatchView< const double, D > &u_view, const PatchView< double, D > &f_view) const =0
Apply the operator to a single patch.
View for accessing data of a patch. It supports variable striding.
Definition: PatchView.h:37
The ThunderEgg namespace.
Definition: BiLinearGhostFiller.h:31
Fills ghost cells on patches.
Definition: GhostFiller.h:36
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 Domain< D > & getDomain() const
Get the Domain object associated with this PatchOperator.
Definition: PatchOperator.h:147
This is an Operator where derived classes only have to implement the two virtual functions that opera...
Definition: PatchOperator.h:40
const GhostFiller< D > & getGhostFiller() const
Get the GhostFiller object associated with this PatchOperator.
Definition: PatchOperator.h:151
Base class for operators.
Definition: Operator.h:37
PatchView< double, D > getPatchView(int patch_local_index)
Get the View objects for the specified patch index of View object will correspond to component index.
Definition: Vector.h:358
virtual PatchOperator< D > * clone() const override=0
Clone this patch operator.
Vector class for use in thunderegg.
Definition: Vector.h:42
void apply(const Vector< D > &u, Vector< D > &f) const override
Apply the operator.
Definition: PatchOperator.h:126
const std::vector< PatchInfo< D > > & getPatchInfoVector() const
Get a vector of PatchInfo pointers where index in the vector corresponds to the patch's local index.
Definition: Domain.h:259
virtual ~PatchOperator()
Destroy the PatchOperator object.
Definition: PatchOperator.h:74
int getNumLocalPatches() const
Get the number of local patches.
Definition: Vector.h:316
ThunderEgg runtime exception.
Definition: RuntimeError.h:36