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

Class SideCellNoCornersFillPattern is a concrete implementation of the abstract base class SAMRAI::xfer::VariableFillPattern. It is used to calculate overlaps according to a pattern that limits overlaps to the cell-centered ghost region surrounding a patch on the target level, excluding all corners (and, in 3D, patch edges). More...

#include <ibtk/SideNoCornersFillPattern.h>

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

Public Member Functions

 SideNoCornersFillPattern (int stencil_width, bool overwrite_interior)
 Constructor. More...
 
 ~SideNoCornersFillPattern ()=default
 Destructor. More...
 
SAMRAI::tbox::Pointer< SAMRAI::hier::BoxOverlap< NDIM > > calculateOverlap (const SAMRAI::hier::BoxGeometry< NDIM > &dst_geometry, const SAMRAI::hier::BoxGeometry< NDIM > &src_geometry, const SAMRAI::hier::Box< NDIM > &dst_patch_box, const SAMRAI::hier::Box< NDIM > &src_mask, bool overwrite_interior, const SAMRAI::hier::IntVector< NDIM > &src_offset) const override
 
SAMRAI::tbox::Pointer< SAMRAI::hier::BoxOverlap< NDIM > > calculateOverlapOnLevel (const SAMRAI::hier::BoxGeometry< NDIM > &dst_geometry, const SAMRAI::hier::BoxGeometry< NDIM > &src_geometry, const SAMRAI::hier::Box< NDIM > &dst_patch_box, const SAMRAI::hier::Box< NDIM > &src_mask, bool overwrite_interior, const SAMRAI::hier::IntVector< NDIM > &src_offset, int dst_level_num, int src_level_num) const override
 
void setTargetPatchLevelNumber (int level_num) override
 
SAMRAI::hier::IntVector< NDIM > & getStencilWidth () override
 
const std::string & getPatternName () const override
 
virtual tbox::Pointer< hier::BoxOverlap< DIM > > calculateOverlap (const hier::BoxGeometry< DIM > &dst_geometry, const hier::BoxGeometry< DIM > &src_geometry, const hier::Box< DIM > &dst_patch_box, const hier::Box< DIM > &src_mask, const bool overwrite_interior, const hier::IntVector< DIM > &src_offset) const=0
 
virtual tbox::Pointer< hier::BoxOverlap< DIM > > calculateOverlapOnLevel (const hier::BoxGeometry< DIM > &dst_geometry, const hier::BoxGeometry< DIM > &src_geometry, const hier::Box< DIM > &dst_patch_box, const hier::Box< DIM > &src_mask, const bool overwrite_interior, const hier::IntVector< DIM > &src_offset, const int dst_level_num, const int src_level_num) const
 
virtual const std::string & getPatternName () const=0
 

Private Member Functions

 SideNoCornersFillPattern ()=delete
 Default constructor. More...
 
 SideNoCornersFillPattern (const SideNoCornersFillPattern &from)=delete
 Copy constructor. More...
 
SideNoCornersFillPatternoperator= (const SideNoCornersFillPattern &that)=delete
 Assignment operator. More...
 

Private Attributes

SAMRAI::hier::IntVector< NDIM > d_stencil_width
 
const bool d_overwrite_interior
 
int d_target_level_num = IBTK::invalid_level_number
 

Detailed Description

On levels other than the target level (or in cases in which the target level cannot be determined), the overlap pattern defaults to that provided by class SAMRAI::pdat::SideOverlap.

Note that for side-centered variables, class SideNoCornersFillPattern will reduce but generally will not eliminate corner coupling at patch boundaries because of the way that side overlaps are computed.

Constructor & Destructor Documentation

◆ SideNoCornersFillPattern() [1/3]

IBTK::SideNoCornersFillPattern::SideNoCornersFillPattern ( int  stencil_width,
bool  overwrite_interior 
)
Parameters
stencil_widththe width to fill
overwrite_interiorwhether to include the patch interior
Note
The parameter overwrite_interior takes precedence over the value passed in to the function calculateOverlap on the target patch level.

◆ ~SideNoCornersFillPattern()

IBTK::SideNoCornersFillPattern::~SideNoCornersFillPattern ( )
default

◆ SideNoCornersFillPattern() [2/3]

IBTK::SideNoCornersFillPattern::SideNoCornersFillPattern ( )
privatedelete
Note
This constructor is not implemented and should not be used.

◆ SideNoCornersFillPattern() [3/3]

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

Member Function Documentation

◆ calculateOverlap() [1/2]

SAMRAI::tbox::Pointer<SAMRAI::hier::BoxOverlap<NDIM> > IBTK::SideNoCornersFillPattern::calculateOverlap ( const SAMRAI::hier::BoxGeometry< NDIM > &  dst_geometry,
const SAMRAI::hier::BoxGeometry< NDIM > &  src_geometry,
const SAMRAI::hier::Box< NDIM > &  dst_patch_box,
const SAMRAI::hier::Box< NDIM > &  src_mask,
bool  overwrite_interior,
const SAMRAI::hier::IntVector< NDIM > &  src_offset 
) const
override

Calculate overlaps between the destination and source geometries according to the desired pattern. This will return the portion of the intersection of the geometries that lies in the ghost region of the specified width surrounding the patch, excluding all edges and corners. The patch is identified by the argument dst_patch_box.

Parameters
dst_geometrygeometry object for destination box
src_geometrygeometry object for source box
dst_patch_boxbox for the destination patch
src_maskthe source mask, the box resulting from shifting the source box
overwrite_interiorcontrols whether or not to include the destination box interior in the overlap
src_offsetthe offset between source and destination index space (src + src_offset = dst)
Returns
pointer to the calculated overlap object

◆ calculateOverlapOnLevel() [1/2]

SAMRAI::tbox::Pointer<SAMRAI::hier::BoxOverlap<NDIM> > IBTK::SideNoCornersFillPattern::calculateOverlapOnLevel ( const SAMRAI::hier::BoxGeometry< NDIM > &  dst_geometry,
const SAMRAI::hier::BoxGeometry< NDIM > &  src_geometry,
const SAMRAI::hier::Box< NDIM > &  dst_patch_box,
const SAMRAI::hier::Box< NDIM > &  src_mask,
bool  overwrite_interior,
const SAMRAI::hier::IntVector< NDIM > &  src_offset,
int  dst_level_num,
int  src_level_num 
) const
override

Calculate overlaps between the destination and source geometries according to the desired pattern. This will return the portion of the intersection of the geometries that lies in the ghost region of the specified width surrounding the patch, excluding all edges and corners. The patch is identified by the argument dst_patch_box.

Parameters
dst_geometrygeometry object for destination box
src_geometrygeometry object for source box
dst_patch_boxbox for the destination patch
src_maskthe source mask, the box resulting from shifting the source box
overwrite_interiorcontrols whether or not to include the destination box interior in the overlap
src_offsetthe offset between source and destination index space (src + src_offset = dst)
dst_level_numthe level of the patch hierarchy on which the dst boxes are located
src_level_numthe level of the patch hierarchy on which the src boxes are located
Returns
pointer to the calculated overlap object

◆ setTargetPatchLevelNumber()

void IBTK::SideNoCornersFillPattern::setTargetPatchLevelNumber ( int  level_num)
overridevirtual

Set the target patch level number for the variable fill pattern.

Reimplemented from SAMRAI::xfer::VariableFillPattern< NDIM >.

◆ getStencilWidth()

SAMRAI::hier::IntVector<NDIM>& IBTK::SideNoCornersFillPattern::getStencilWidth ( )
overridevirtual

Returns the stencil width.

Implements SAMRAI::xfer::VariableFillPattern< NDIM >.

◆ getPatternName() [1/2]

const std::string& IBTK::SideNoCornersFillPattern::getPatternName ( ) const
override

Returns a string name identifier "SIDE_NO_CORNERS_FILL_PATTERN".

◆ operator=()

SideNoCornersFillPattern& IBTK::SideNoCornersFillPattern::operator= ( const SideNoCornersFillPattern 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.

◆ calculateOverlap() [2/2]

virtual tbox::Pointer< hier::BoxOverlap<DIM> > SAMRAI::xfer::VariableFillPattern< DIM >::calculateOverlap ( const hier::BoxGeometry< DIM > &  dst_geometry,
const hier::BoxGeometry< DIM > &  src_geometry,
const hier::Box< DIM > &  dst_patch_box,
const hier::Box< DIM > &  src_mask,
const bool  overwrite_interior,
const hier::IntVector< DIM > &  src_offset 
) const
pure virtualinherited

This pure virtual method provides an interface to calculate overlaps between the destination and source geometries.

Parameters
dst_geometrygeometry object for destination box
src_geometrygeometry object for source box
dst_patch_boxbox for the destination patch
src_maskthe source mask, the box resulting from shifting the source box
overwrite_interiorcontrols whether or not to include the destination box interior in the overlap
src_offsetthe offset between source and destination index space. src + src_offset = dst
Returns
Pointer to the calculated overlap object

◆ calculateOverlapOnLevel() [2/2]

virtual tbox::Pointer< hier::BoxOverlap<DIM> > SAMRAI::xfer::VariableFillPattern< DIM >::calculateOverlapOnLevel ( const hier::BoxGeometry< DIM > &  dst_geometry,
const hier::BoxGeometry< DIM > &  src_geometry,
const hier::Box< DIM > &  dst_patch_box,
const hier::Box< DIM > &  src_mask,
const bool  overwrite_interior,
const hier::IntVector< DIM > &  src_offset,
const int  dst_level_num,
const int  src_level_num 
) const
virtualinherited

This virtual method provides an interface to calculate overlaps between the destination and source geometries on a specified level of the patch hierarchy.

Note
A default implementation is provided that simply calls the pure virtual method calculateOverlap() for implementations that are level independent.
Parameters
dst_geometrygeometry object for destination box
src_geometrygeometry object for source box
dst_patch_boxbox for the destination patch
src_maskthe source mask, the box resulting from shifting the source box
overwrite_interiorcontrols whether or not to include the destination box interior in the overlap
src_offsetthe offset between source and destination index space. src + src_offset = dst
dst_level_numthe level of the patch hierarchy on which the dst boxes are located
src_level_numthe level of the patch hierarchy on which the src boxes are located
Returns
Pointer to the calculated overlap object

◆ getPatternName() [2/2]

virtual const std::string& SAMRAI::xfer::VariableFillPattern< DIM >::getPatternName ( ) const
pure virtualinherited

Return a string name identifying the concrete subclass.

Member Data Documentation

◆ d_stencil_width

SAMRAI::hier::IntVector<NDIM> IBTK::SideNoCornersFillPattern::d_stencil_width
private

◆ d_overwrite_interior

const bool IBTK::SideNoCornersFillPattern::d_overwrite_interior
private

◆ d_target_level_num

int IBTK::SideNoCornersFillPattern::d_target_level_num = IBTK::invalid_level_number
private

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