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

Class muParserRobinBcCoefs is an implementation of the strategy class SAMRAI::solv::RobinBcCoefStrategy that allows for the run-time specification of (possibly spatially- and temporally-varying) Robin boundary conditions. More...

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

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

Public Member Functions

 muParserRobinBcCoefs (const std::string &object_name, SAMRAI::tbox::Pointer< SAMRAI::tbox::Database > input_db, SAMRAI::tbox::Pointer< SAMRAI::geom::CartesianGridGeometry< NDIM > > grid_geom)
 Constructor.
 

Implementation of SAMRAI::solv::RobinBcCoefStrategy interface.

void setBcCoefs (SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &acoef_data, SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &bcoef_data, SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &gcoef_data, const SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > &variable, const SAMRAI::hier::Patch< NDIM > &patch, const SAMRAI::hier::BoundaryBox< NDIM > &bdry_box, double fill_time=0.0) const override
 Function to fill arrays of Robin boundary condition coefficients at a patch boundary. More...
 
SAMRAI::hier::IntVector< NDIM > numberOfExtensionsFillable () const override
 

Detailed Description

Class muParserRobinBcCoefs is an implementation of the strategy class SAMRAI::solv::RobinBcCoefStrategy that allows for the run-time specification of (possibly spatially- and temporally-varying) Robin boundary conditions.

This class uses the muParser library to parse strings into mathematical functions. This class is the most common method to specify boundary conditions uses in the examples. The database in the input file contains strings for each coefficient ( $a$, $b$, and $g$) at each face of the physical boundary. Strings ending in 0 and 1 are for the $x$-faces, 2 and 3 are for the $y$-faces, and 4 and 5 are for the $z$-faces. These strings can contain spatial and temporal variables using the variable names X_0, X_1, X_2, and t. These strings can also contain if statements using the conditional operator condition ? result_if_true : result_if_false. For more exotic boundary conditions, one would need to create an extension of the class RobinBcCoefStrategy.

Warning
Not all linear solvers in IBTK properly handle time-varying homogeneous Robin boundary condition coefficients. Note, however, that all linear solvers in IBTK are presently designed to support spatially and temporally varying inhomogeneous boundary coefficients.

Member Function Documentation

◆ setBcCoefs()

void IBTK::muParserRobinBcCoefs::setBcCoefs ( SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &  acoef_data,
SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &  bcoef_data,
SAMRAI::tbox::Pointer< SAMRAI::pdat::ArrayData< NDIM, double > > &  gcoef_data,
const SAMRAI::tbox::Pointer< SAMRAI::hier::Variable< NDIM > > &  variable,
const SAMRAI::hier::Patch< NDIM > &  patch,
const SAMRAI::hier::BoundaryBox< NDIM > &  bdry_box,
double  fill_time = 0.0 
) const
overridevirtual

Function to fill arrays of Robin boundary condition coefficients at a patch boundary.

See also
SAMRAI::solv::RobinBcCoefStrategy::setBcCoefs()
Parameters
acoef_dataBoundary coefficient data. The array will have been defined to include index range for corresponding to the boundary box bdry_box and appropriate for the alignment of the given variable. If this is a null pointer, then the calling function is not interested in a, and you can disregard it.
bcoef_dataBoundary coefficient data. This array is exactly like acoef_data, except that it is to be filled with the b coefficient.
gcoef_dataBoundary coefficient data. This array is exactly like acoef_data, except that it is to be filled with the g coefficient.
variableVariable to set the coefficients for. If implemented for multiple variables, this parameter can be used to determine which variable's coefficients are being sought.
patchPatch requiring bc coefficients.
bdry_boxBoundary box showing where on the boundary the coefficient data is needed.
fill_timeSolution time corresponding to filling, for use when coefficients are time-dependent.

Implements SAMRAI::solv::RobinBcCoefStrategy< NDIM >.


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