IBAMR  IBAMR version 0.19.
Public Member Functions | List of all members
IBTK::CartSideDoubleCubicCoarsen Class Referenceabstract

Class CartSideDoubleCubicCoarsen is a concrete SAMRAI::xfer::CoarsenOperator for restricting side-centered double precision patch data via cubic interpolation. More...

#include <ibtk/CartSideDoubleCubicCoarsen.h>

Inheritance diagram for IBTK::CartSideDoubleCubicCoarsen:
Inheritance graph
[legend]

Public Member Functions

 CartSideDoubleCubicCoarsen ()=default
 Default constructor. More...
 
 ~CartSideDoubleCubicCoarsen ()=default
 Destructor. More...
 
virtual bool findCoarsenOperator (const tbox::Pointer< hier::Variable< DIM > > &var, const std::string &op_name) const=0
 
virtual const std::string & getOperatorName () const=0
 
virtual int getOperatorPriority () const=0
 
virtual hier::IntVector< DIM > getStencilWidth () const=0
 
virtual void coarsen (hier::Patch< DIM > &coarse, const hier::Patch< DIM > &fine, const int dst_component, const int src_component, const hier::Box< DIM > &coarse_box, const hier::IntVector< DIM > &ratio) const=0
 

Implementation of SAMRAI::xfer::CoarsenOperator interface.

static const std::string s_op_name
 
SAMRAI::geom::CartesianSideDoubleWeightedAverage< NDIM > d_weighted_average_coarsen_op
 
bool findCoarsenOperator (const SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > &var, const std::string &op_name) const override
 
const std::string & getOperatorName () const override
 
int getOperatorPriority () const override
 
SAMRAI::hier::IntVector< NDIM > getStencilWidth () const override
 
void coarsen (SAMRAI::hier::Patch< NDIM > &coarse, const SAMRAI::hier::Patch< NDIM > &fine, int dst_component, int src_component, const SAMRAI::hier::Box< NDIM > &coarse_box, const SAMRAI::hier::IntVector< NDIM > &ratio) const override
 
 CartSideDoubleCubicCoarsen (const CartSideDoubleCubicCoarsen &from)=delete
 Copy constructor. More...
 
CartSideDoubleCubicCoarsenoperator= (const CartSideDoubleCubicCoarsen &that)=delete
 Assignment operator. More...
 

Detailed Description

Note
This coarsen operator requires that the refinement ratio between coarse and fine index spaces is even.
To avoid complicating the interpolation scheme at coarse-fine interfaces, the use of cubic coarsening is restricted to cases where the refinement ratio is at least 4. For refinement ratios less than 4, a warning is emitted and simple weighted averaging is used instead.

Constructor & Destructor Documentation

◆ CartSideDoubleCubicCoarsen() [1/2]

IBTK::CartSideDoubleCubicCoarsen::CartSideDoubleCubicCoarsen ( )
default

◆ ~CartSideDoubleCubicCoarsen()

IBTK::CartSideDoubleCubicCoarsen::~CartSideDoubleCubicCoarsen ( )
default

◆ CartSideDoubleCubicCoarsen() [2/2]

IBTK::CartSideDoubleCubicCoarsen::CartSideDoubleCubicCoarsen ( const CartSideDoubleCubicCoarsen from)
privatedelete
Note
This constructor is not implemented and should not be used.
Parameters
fromThe value to copy to this object.

Member Function Documentation

◆ findCoarsenOperator() [1/2]

bool IBTK::CartSideDoubleCubicCoarsen::findCoarsenOperator ( const SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > &  var,
const std::string &  op_name 
) const
override

Return true if the coarsening operation matches the variable and name string identifier request; false, otherwise.

◆ getOperatorName() [1/2]

const std::string& IBTK::CartSideDoubleCubicCoarsen::getOperatorName ( ) const
override

Return name string identifier of the coarsening operation.

◆ getOperatorPriority() [1/2]

int IBTK::CartSideDoubleCubicCoarsen::getOperatorPriority ( ) const
override

Return the priority of this operator relative to other coarsening operators. The SAMRAI transfer routines guarantee that coarsening using operators with lower priority will be performed before those with higher priority.

◆ getStencilWidth() [1/2]

SAMRAI::hier::IntVector<NDIM> IBTK::CartSideDoubleCubicCoarsen::getStencilWidth ( ) const
override

Return the stencil width associated with the coarsening operator. The SAMRAI transfer routines guarantee that the source patch will contain sufficient ghost cell data surrounding the interior to satisfy the stencil width requirements for each coarsening operator.

◆ coarsen() [1/2]

void IBTK::CartSideDoubleCubicCoarsen::coarsen ( SAMRAI::hier::Patch< NDIM > &  coarse,
const SAMRAI::hier::Patch< NDIM > &  fine,
int  dst_component,
int  src_component,
const SAMRAI::hier::Box< NDIM > &  coarse_box,
const SAMRAI::hier::IntVector< NDIM > &  ratio 
) const
override

Coarsen the source component on the fine patch to the destination component on the coarse patch. The coarsening operation is performed on the intersection of the destination patch and the coarse box. The fine patch is guaranteed to contain sufficient data for the stencil width of the coarsening operator.

◆ operator=()

CartSideDoubleCubicCoarsen& IBTK::CartSideDoubleCubicCoarsen::operator= ( const CartSideDoubleCubicCoarsen that)
privatedelete
Note
This operator is not implemented and should not be used.
Parameters
thatThe value to assign to this object.
Returns
A reference to this object.

◆ findCoarsenOperator() [2/2]

virtual bool SAMRAI::xfer::CoarsenOperator< DIM >::findCoarsenOperator ( const tbox::Pointer< hier::Variable< DIM > > &  var,
const std::string &  op_name 
) const
pure virtualinherited

Return true if the coarsening operation matches the variable and name string identifier request; false, otherwise.

◆ getOperatorName() [2/2]

virtual const std::string& SAMRAI::xfer::CoarsenOperator< DIM >::getOperatorName ( ) const
pure virtualinherited

Return name string identifier of the coarsening operation.

◆ getOperatorPriority() [2/2]

virtual int SAMRAI::xfer::CoarsenOperator< DIM >::getOperatorPriority ( ) const
pure virtualinherited

Return the priority of this operator relative to other coarsening operators. The SAMRAI transfer routines guarantee that coarsening using operators with lower priority will be performed before those with higher priority.

◆ getStencilWidth() [2/2]

virtual hier::IntVector<DIM> SAMRAI::xfer::CoarsenOperator< DIM >::getStencilWidth ( ) const
pure virtualinherited

Return the stencil width associated with the coarsening operator. The SAMRAI transfer routines guarantee that the source patch will contain sufficient ghost cell data surrounding the interior to satisfy the stencil width requirements for each coarsening operator.

◆ coarsen() [2/2]

virtual void SAMRAI::xfer::CoarsenOperator< DIM >::coarsen ( hier::Patch< DIM > &  coarse,
const hier::Patch< DIM > &  fine,
const int  dst_component,
const int  src_component,
const hier::Box< DIM > &  coarse_box,
const hier::IntVector< DIM > &  ratio 
) const
pure virtualinherited

Coarsen the source component on the fine patch to the destination component on the coarse patch. The coarsening operation is performed on the intersection of the destination patch and the coarse box. The fine patch is guaranteed to contain sufficient data for the stencil width of the coarsening operator.

Member Data Documentation

◆ s_op_name

const std::string IBTK::CartSideDoubleCubicCoarsen::s_op_name
staticprivate

The operator name.

◆ d_weighted_average_coarsen_op

SAMRAI::geom::CartesianSideDoubleWeightedAverage<NDIM> IBTK::CartSideDoubleCubicCoarsen::d_weighted_average_coarsen_op
private

"Backup" coarsen operator for even refinement ratios less than 4.


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