ThunderEgg  1.0.0
ThunderEgg::PatchOperator< D > Class Template Referenceabstract

This is an Operator where derived classes only have to implement the two virtual functions that operate on single patch. More...

#include <PatchOperator.h>

Inheritance diagram for ThunderEgg::PatchOperator< D >:
Collaboration diagram for ThunderEgg::PatchOperator< D >:

Public Member Functions

 PatchOperator (const Domain< D > &domain, const GhostFiller< D > &ghost_filler)
 Construct a new Patch Operator object. More...
 
virtual PatchOperator< D > * clone () const override=0
 Clone this patch operator. More...
 
virtual ~PatchOperator ()
 Destroy the PatchOperator object.
 
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. More...
 
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. More...
 
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. More...
 
void apply (const Vector< D > &u, Vector< D > &f) const override
 Apply the operator. More...
 
const Domain< D > & getDomain () const
 Get the Domain object associated with this PatchOperator.
 
const GhostFiller< D > & getGhostFiller () const
 Get the GhostFiller object associated with this PatchOperator.
 
- Public Member Functions inherited from ThunderEgg::Operator< D >
virtual ~Operator ()
 Destroy the Operator object.
 

Detailed Description

template<int D>
class ThunderEgg::PatchOperator< D >

This is an Operator where derived classes only have to implement the two virtual functions that operate on single patch.

Template Parameters
Dthe number of Cartesian dimensions.

Constructor & Destructor Documentation

◆ PatchOperator()

template<int D>
ThunderEgg::PatchOperator< D >::PatchOperator ( const Domain< D > &  domain,
const GhostFiller< D > &  ghost_filler 
)
inline

Construct a new Patch Operator object.

This sets the Domain and GhostFiller

Parameters
domainthe Domain
ghost_fillerthe GhostFiller

Member Function Documentation

◆ apply()

template<int D>
void ThunderEgg::PatchOperator< D >::apply ( const Vector< D > &  u,
Vector< D > &  f 
) const
inlineoverridevirtual

Apply the operator.

This will update the ghost values in u, and then will call applySinglePatch for each patch

Parameters
uthe left hand side
fthe right hand side

Implements ThunderEgg::Operator< D >.

◆ applySinglePatch()

template<int D>
virtual void ThunderEgg::PatchOperator< D >::applySinglePatch ( const PatchInfo< D > &  pinfo,
const PatchView< const double, D > &  u_view,
const PatchView< double, D > &  f_view 
) const
pure virtual

Apply the operator to a single patch.

The ghost values in u will be updated to the latest values, and should not need to be modified

Parameters
pinfothe patch
u_viewthe solution
f_viewthe left hand side

Implemented in ThunderEgg::VarPoisson::StarPatchOperator< D >, and ThunderEgg::Poisson::StarPatchOperator< D >.

◆ applySinglePatchWithInternalBoundaryConditions()

template<int D>
virtual void ThunderEgg::PatchOperator< D >::applySinglePatchWithInternalBoundaryConditions ( const PatchInfo< D > &  pinfo,
const PatchView< const double, D > &  u_view,
const PatchView< double, D > &  f_view 
) const
pure virtual

Apply the operator to a single patch.

The ghost values in u will be updated to the latest values, and should not need to be modified

Parameters
pinfothe patch
u_viewthe solution
f_viewthe left hand side

Implemented in ThunderEgg::VarPoisson::StarPatchOperator< D >, and ThunderEgg::Poisson::StarPatchOperator< D >.

◆ clone()

template<int D>
virtual PatchOperator<D>* ThunderEgg::PatchOperator< D >::clone ( ) const
overridepure virtual

Clone this patch operator.

Returns
PatchOperator<D>* a newly allocated copy of this patch operator

Implements ThunderEgg::Operator< D >.

Implemented in ThunderEgg::VarPoisson::StarPatchOperator< D >, and ThunderEgg::Poisson::StarPatchOperator< D >.

◆ modifyRHSForInternalBoundaryConditions()

template<int D>
virtual void ThunderEgg::PatchOperator< D >::modifyRHSForInternalBoundaryConditions ( const PatchInfo< D > &  pinfo,
const PatchView< const double, D > &  u_view,
const PatchView< double, D > &  f_view 
) const
pure virtual

Treat the internal patch boundaries as domain boundaires and modify RHS accordingly.

This will be u_viewed in patch solvers to formulate a RHS for the individual patch to solve for.

Parameters
pinfothe patch
u_viewthe left hand side
f_viewthe right hand side

Implemented in ThunderEgg::VarPoisson::StarPatchOperator< D >, and ThunderEgg::Poisson::StarPatchOperator< D >.


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