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

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.

#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. More...
 
void setPatchDataIndex (int patch_data_index)
 Reset the patch data index operated upon by this class. More...
 
void setPatchDataIndices (const std::set< int > &patch_data_indices)
 Reset the patch data indices operated upon by this class. More...
 
void setPatchDataIndices (const SAMRAI::hier::ComponentSelector &patch_data_indices)
 Reset the patch data indices operated upon by this class. More...
 
void setExtrapolationType (const std::string &extrap_type)
 Set the extrapolation type employed by this class. More...
 
virtual void setPhysicalBoundaryConditions (hier::Patch< DIM > &patch, const double fill_time, const hier::IntVector< DIM > &ghost_width_to_fill)=0
 
virtual hier::IntVector< DIM > getRefineOpStencilWidth () const=0
 
virtual void preprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio)=0
 
virtual void postprocessRefine (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::Box< DIM > &fine_box, const hier::IntVector< DIM > &ratio)=0
 
virtual void preprocessRefineBoxes (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::BoxList< DIM > &fine_boxes, const hier::IntVector< DIM > &ratio)
 
virtual void postprocessRefineBoxes (hier::Patch< DIM > &fine, const hier::Patch< DIM > &coarse, const hier::BoxList< DIM > &fine_boxes, const hier::IntVector< DIM > &ratio)
 

Implementation of SAMRAI::xfer::RefinePatchStrategy interface.

std::set< intd_patch_data_indices
 
std::string d_extrap_type = "nullptr"
 
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
 
 CartExtrapPhysBdryOp (const CartExtrapPhysBdryOp &from)=delete
 Copy constructor. More...
 
CartExtrapPhysBdryOpoperator= (const CartExtrapPhysBdryOp &that)=delete
 Assignment operator. More...
 
void setPhysicalBoundaryConditions_cell (SAMRAI::hier::Patch< NDIM > &patch, const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &bdry_fill_boxes)
 The implementation of setPhysicalBoundaryConditions() for cell-centered quantities. More...
 
void setPhysicalBoundaryConditions_face (SAMRAI::hier::Patch< NDIM > &patch, const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &bdry_fill_boxes)
 The implementation of setPhysicalBoundaryConditions() for face-centered quantities. More...
 
void setPhysicalBoundaryConditions_node (SAMRAI::hier::Patch< NDIM > &patch, const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &bdry_fill_boxes)
 The implementation of setPhysicalBoundaryConditions() for node-centered quantities. More...
 
void setPhysicalBoundaryConditions_side (SAMRAI::hier::Patch< NDIM > &patch, const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &bdry_fill_boxes)
 The implementation of setPhysicalBoundaryConditions() for side-centered quantities. More...
 

Constructor & Destructor Documentation

◆ CartExtrapPhysBdryOp() [1/5]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( )
default
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/5]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( int  patch_data_index,
const std::string &  extrap_type = "CONSTANT" 
)
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/5]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( const std::set< int > &  patch_data_indices,
const std::string &  extrap_type = "CONSTANT" 
)
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/5]

IBTK::CartExtrapPhysBdryOp::CartExtrapPhysBdryOp ( const SAMRAI::hier::ComponentSelector patch_data_indices,
const std::string &  extrap_type = "CONSTANT" 
)
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()

IBTK::CartExtrapPhysBdryOp::~CartExtrapPhysBdryOp ( )
default

◆ CartExtrapPhysBdryOp() [5/5]

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

Member Function Documentation

◆ setPatchDataIndex()

void IBTK::CartExtrapPhysBdryOp::setPatchDataIndex ( int  patch_data_index)

◆ setPatchDataIndices() [1/2]

void IBTK::CartExtrapPhysBdryOp::setPatchDataIndices ( const std::set< int > &  patch_data_indices)

◆ setPatchDataIndices() [2/2]

void IBTK::CartExtrapPhysBdryOp::setPatchDataIndices ( const SAMRAI::hier::ComponentSelector patch_data_indices)

◆ setExtrapolationType()

void IBTK::CartExtrapPhysBdryOp::setExtrapolationType ( const std::string &  extrap_type)
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() [1/2]

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

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.

◆ getRefineOpStencilWidth() [1/2]

SAMRAI::hier::IntVector<NDIM> IBTK::CartExtrapPhysBdryOp::getRefineOpStencilWidth ( ) const
override

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.

◆ preprocessRefine() [1/2]

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 
)
override

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.

◆ postprocessRefine() [1/2]

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 
)
override

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.

◆ operator=()

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

◆ setPhysicalBoundaryConditions_cell()

void IBTK::CartExtrapPhysBdryOp::setPhysicalBoundaryConditions_cell ( SAMRAI::hier::Patch< NDIM > &  patch,
const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &  bdry_fill_boxes 
)
private

◆ setPhysicalBoundaryConditions_face()

void IBTK::CartExtrapPhysBdryOp::setPhysicalBoundaryConditions_face ( SAMRAI::hier::Patch< NDIM > &  patch,
const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &  bdry_fill_boxes 
)
private

◆ setPhysicalBoundaryConditions_node()

void IBTK::CartExtrapPhysBdryOp::setPhysicalBoundaryConditions_node ( SAMRAI::hier::Patch< NDIM > &  patch,
const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &  bdry_fill_boxes 
)
private

◆ setPhysicalBoundaryConditions_side()

void IBTK::CartExtrapPhysBdryOp::setPhysicalBoundaryConditions_side ( SAMRAI::hier::Patch< NDIM > &  patch,
const std::vector< std::pair< SAMRAI::hier::Box< NDIM >, std::pair< int, int > > > &  bdry_fill_boxes 
)
private

◆ setPhysicalBoundaryConditions() [2/2]

virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::setPhysicalBoundaryConditions ( hier::Patch< DIM > &  patch,
const double  fill_time,
const hier::IntVector< DIM > &  ghost_width_to_fill 
)
pure virtualinherited

Pure virtual function to set data associated with the given list of patch data indices at patch boundaries that intersect the physical domain boundary. The specific boundary conditions are determined by the user. The patch data components set in this routine correspond to the "scratch" components specified in calls to the registerRefine() function in the RefineAlgorithm<DIM> class.

Parameters
patchhier::Patch 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.

◆ getRefineOpStencilWidth() [2/2]

virtual hier::IntVector<DIM> SAMRAI::xfer::RefinePatchStrategy< DIM >::getRefineOpStencilWidth ( ) const
pure virtualinherited

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

◆ preprocessRefine() [2/2]

virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::preprocessRefine ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::Box< DIM > &  fine_box,
const hier::IntVector< DIM > &  ratio 
)
pure virtualinherited

Pure virtual function to perform user-defined preprocess data refine operations. This member function is called before standard refine operations (expressed using concrete subclasses of the RefineOperator<DIM> 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 RefineAlgorithm<DIM> class.

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

◆ postprocessRefine() [2/2]

virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::postprocessRefine ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::Box< DIM > &  fine_box,
const hier::IntVector< DIM > &  ratio 
)
pure virtualinherited

Pure virtual function to perform user-defined postprocess data refine operations. This member function is called after standard refine operations (expressed using concrete subclasses of the RefineOperator<DIM> 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 RefineAlgorithm<DIM> class.

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

◆ preprocessRefineBoxes()

virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::preprocessRefineBoxes ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::BoxList< DIM > &  fine_boxes,
const hier::IntVector< DIM > &  ratio 
)
virtualinherited

Virtual function to perform user-defined refine operations. This member function is called before standard refining operations (expressed using concrete subclasses of the RefineOperator<DIM> 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 regions.

Typically, only the pure virtual members of this class are implemented in user-defined subclasses of this base class. This version of the preprocess function operates on an entire box list. By default, this version simply loops over the box list and calls the single-box version, which is a pure virtual function.

Parameters
fineFine patch containing destination data.
coarseCoarse patch containing source data.
fine_boxestbox::List of box regions on fine patch into which data is refined.
ratioInteger vector containing ratio relating index space between coarse and fine patches.

◆ postprocessRefineBoxes()

virtual void SAMRAI::xfer::RefinePatchStrategy< DIM >::postprocessRefineBoxes ( hier::Patch< DIM > &  fine,
const hier::Patch< DIM > &  coarse,
const hier::BoxList< DIM > &  fine_boxes,
const hier::IntVector< DIM > &  ratio 
)
virtualinherited

Virtual function to perform user-defined refine operations. This member function is called after standard refining operations (expressed using concrete subclasses of the RefineOperator<DIM> 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 regions.

Typically, only the pure virtual members of this class are implemented in user-defined subclasses of this base class. This version of the postprocess function operates on an entire box list. By default, this version simply loops over the box list and calls the single-box version, which is a pure virtual function.

Parameters
fineFine patch containing destination data.
coarseCoarse patch containing source data.
fine_boxestbox::List of box regions on fine patch into which data is refined.
ratioInteger vector containing ratio relating index space between coarse and fine patches.

Member Data Documentation

◆ d_patch_data_indices

std::set<int> IBTK::CartExtrapPhysBdryOp::d_patch_data_indices
private

◆ d_extrap_type

std::string IBTK::CartExtrapPhysBdryOp::d_extrap_type = "nullptr"
private

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