IBAMR
An adaptive and distributed-memory parallel implementation of the immersed boundary (IB) method
Public Member Functions | List of all members
IBTK::CartExtrapPhysBdryOp Class Reference

Class CartExtrapPhysBdryOp is a concrete SAMRAI::xfer::RefinePatchStrategy for setting ghost cell values at physical boundaries via constant, linear, or quadratic extrapolation from interior values. More...

#include </home/runner/work/IBAMR/IBAMR/ibtk/include/ibtk/CartExtrapPhysBdryOp.h>

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

Public Member Functions

 CartExtrapPhysBdryOp ()=default
 Default constructor. More...
 
 CartExtrapPhysBdryOp (int patch_data_index, const std::string &extrap_type="CONSTANT")
 Constructor. More...
 
 CartExtrapPhysBdryOp (const std::set< int > &patch_data_indices, const std::string &extrap_type="CONSTANT")
 Constructor. More...
 
 CartExtrapPhysBdryOp (const SAMRAI::hier::ComponentSelector &patch_data_indices, const std::string &extrap_type="CONSTANT")
 Constructor. More...
 
 ~CartExtrapPhysBdryOp ()=default
 Destructor.
 
void setPatchDataIndex (int patch_data_index)
 Reset the patch data index operated upon by this class.
 
void setPatchDataIndices (const std::set< int > &patch_data_indices)
 Reset the patch data indices operated upon by this class.
 
void setPatchDataIndices (const SAMRAI::hier::ComponentSelector &patch_data_indices)
 Reset the patch data indices operated upon by this class.
 
void setExtrapolationType (const std::string &extrap_type)
 Set the extrapolation type employed by this class. More...
 
- Public Member Functions inherited from SAMRAI::xfer::RefinePatchStrategy< NDIM >
virtual void preprocessRefineBoxes (hier::Patch< NDIM > &fine, const hier::Patch< NDIM > &coarse, const hier::BoxList< NDIM > &fine_boxes, const hier::IntVector< NDIM > &ratio)
 
virtual void postprocessRefineBoxes (hier::Patch< NDIM > &fine, const hier::Patch< NDIM > &coarse, const hier::BoxList< NDIM > &fine_boxes, const hier::IntVector< NDIM > &ratio)
 

Implementation of SAMRAI::xfer::RefinePatchStrategy interface.

void setPhysicalBoundaryConditions (SAMRAI::hier::Patch< NDIM > &patch, double fill_time, const SAMRAI::hier::IntVector< NDIM > &ghost_width_to_fill) override
 
SAMRAI::hier::IntVector< NDIM > getRefineOpStencilWidth () const override
 
void preprocessRefine (SAMRAI::hier::Patch< NDIM > &fine, const SAMRAI::hier::Patch< NDIM > &coarse, const SAMRAI::hier::Box< NDIM > &fine_box, const SAMRAI::hier::IntVector< NDIM > &ratio) override
 
void postprocessRefine (SAMRAI::hier::Patch< NDIM > &fine, const SAMRAI::hier::Patch< NDIM > &coarse, const SAMRAI::hier::Box< NDIM > &fine_box, const SAMRAI::hier::IntVector< NDIM > &ratio) override
 

Detailed Description

Class CartExtrapPhysBdryOp is a concrete SAMRAI::xfer::RefinePatchStrategy for setting ghost cell values at physical boundaries via constant, linear, or quadratic extrapolation from interior values.

Constructor & Destructor Documentation

◆ CartExtrapPhysBdryOp() [1/4]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( )
default

Default constructor.

Note
This constructor leaves the class in an undefined state. In particular, the patch data indices requiring cell filling and extrapolation type must each be set prior to use of method setPhysicalBoundaryConditions().
See also
setPatchDataIndex
setPatchDataIndices
setExtrapolationType

◆ CartExtrapPhysBdryOp() [2/4]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( int  patch_data_index,
const std::string extrap_type = "CONSTANT" 
)

Constructor.

Parameters
patch_data_indexPatch data index requiring ghost cell filling.
extrap_typeType of extrapolation to perform: "CONSTANT" specifies constant extrapolation, "LINEAR" specifies linear extrapolation, and "QUADRATIC" specifies quadratic extrapolation. At codim 2 or 3 boundaries, "QUADRATIC" reduces to "LINEAR" extrapolation.

◆ CartExtrapPhysBdryOp() [3/4]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( const std::set< int > &  patch_data_indices,
const std::string extrap_type = "CONSTANT" 
)

Constructor.

Parameters
patch_data_indicesCollection of patch data indices which require ghost cell filling.
extrap_typeType of extrapolation to perform: "CONSTANT" specifies constant extrapolation, "LINEAR" specifies linear extrapolation, and "QUADRATIC" specifies quadratic extrapolation. At codim 2 or 3 boundaries, "QUADRATIC" reduces to "LINEAR" extrapolation.

◆ CartExtrapPhysBdryOp() [4/4]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( const SAMRAI::hier::ComponentSelector patch_data_indices,
const std::string extrap_type = "CONSTANT" 
)

Constructor.

Parameters
patch_data_indicesCollection of patch data indices which require ghost cell filling.
extrap_typeType of extrapolation to perform: "CONSTANT" specifies constant extrapolation, "LINEAR" specifies linear extrapolation, and "QUADRATIC" specifies quadratic extrapolation. At codim 2 or 3 boundaries, "QUADRATIC" reduces to "LINEAR" extrapolation.

Member Function Documentation

◆ getRefineOpStencilWidth()

IntVector< NDIM > IBTK::CartExtrapPhysBdryOp::getRefineOpStencilWidth ( ) const
overridevirtual

Function to return maximum stencil width needed over user-defined data interpolation operations. This is needed to determine the correct interpolation data dependencies.

Presently, the refine operator stencil width is zero.

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

◆ postprocessRefine()

void IBTK::CartExtrapPhysBdryOp::postprocessRefine ( SAMRAI::hier::Patch< NDIM > &  fine,
const SAMRAI::hier::Patch< NDIM > &  coarse,
const SAMRAI::hier::Box< NDIM > &  fine_box,
const SAMRAI::hier::IntVector< NDIM > &  ratio 
)
overridevirtual

Function to perform user-defined postprocess data refine operations. This member function is called after standard refine operations (expressed using concrete subclasses of the SAMRAI::xfer::RefineOperator base class). The postprocess function must refine data from the scratch components of the coarse patch into the scratch components of the fine patch on the specified fine box region. Recall that the scratch components are specified in calls to the registerRefine() function in the SAMRAI::xfer::RefineAlgorithm class.

Presently, the implementation does nothing.

Parameters
fineFine patch containing destination data.
coarseCoarse patch containing source data.
fine_boxBox region on fine patch into which data is refined.
ratioInteger vector containing ratio relating index space between coarse and fine patches.

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

◆ preprocessRefine()

void IBTK::CartExtrapPhysBdryOp::preprocessRefine ( SAMRAI::hier::Patch< NDIM > &  fine,
const SAMRAI::hier::Patch< NDIM > &  coarse,
const SAMRAI::hier::Box< NDIM > &  fine_box,
const SAMRAI::hier::IntVector< NDIM > &  ratio 
)
overridevirtual

Function to perform user-defined preprocess data refine operations. This member function is called before standard refine operations (expressed using concrete subclasses of the SAMRAI::xfer::RefineOperator base class). The preprocess function must refine data from the scratch components of the coarse patch into the scratch components of the fine patch on the specified fine box region. Recall that the scratch components are specified in calls to the registerRefine() function in the SAMRAI::xfer::RefineAlgorithm class.

Presently, the implementation does nothing.

Parameters
fineFine patch containing destination data.
coarseCoarse patch containing source data.
fine_boxBox region on fine patch into which data is refined.
ratioInteger vector containing ratio relating index space between coarse and fine patches.

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

◆ setExtrapolationType()

void IBTK::CartExtrapPhysBdryOp::setExtrapolationType ( const std::string extrap_type)

Set the extrapolation type employed by this class.

Parameters
extrap_typeType of extrapolation to perform: "CONSTANT" specifies constant extrapolation, "LINEAR" specifies linear extrapolation, and "QUADRATIC" specifies quadratic extrapolation. At codim 2 or 3 boundaries, "QUADRATIC" reduces to "LINEAR" extrapolation.

◆ setPhysicalBoundaryConditions()

void IBTK::CartExtrapPhysBdryOp::setPhysicalBoundaryConditions ( SAMRAI::hier::Patch< NDIM > &  patch,
double  fill_time,
const SAMRAI::hier::IntVector< NDIM > &  ghost_width_to_fill 
)
overridevirtual

Function to set data associated with the given list of patch data indices at patch boundaries that intersect the physical domain boundary. The patch data components set in this routine correspond to the "scratch" components specified in calls to the registerRefine() function in the SAMRAI::xfer::RefineAlgorithm class.

Parameters
patchPatch on which to fill boundary data.
fill_timeDouble simulation time for boundary filling.
ghost_width_to_fillInteger vector describing maximum ghost width to fill over all registered scratch components.

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


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