#include <source/solvers/poisson/GhostCellRobinBcCoefs.h>
Inheritance diagram for SAMRAI::solv::GhostCellRobinBcCoefs< DIM >:
Public Member Functions | |
GhostCellRobinBcCoefs (string object_name="") | |
Constructor. | |
virtual | ~GhostCellRobinBcCoefs (void) |
Destructor. | |
void | setBcCoefs (tbox::Pointer< pdat::ArrayData< DIM, double > > &acoef_data, tbox::Pointer< pdat::ArrayData< DIM, double > > &gcoef_data, const tbox::Pointer< hier::Variable< DIM > > &variable, const hier::Patch< DIM > &patch, const hier::BoundaryBox< DIM > &bdry_box, double fill_time=0.0) const |
Function to fill arrays of Robin boundary condition coefficients at a patch boundary. | |
hier::IntVector< DIM > | numberOfExtensionsFillable () const |
void | setGhostDataId (int ghost_data_id, hier::IntVector< DIM > extensions_fillable=hier::IntVector< DIM >(0)) |
Set the patch data index of the data providing ghost cell values. |
This class is intended to make the use of the Robin boundary condition utterly trivial for users who who already have the correct values set in the ghost cells. The motivation for this seemingly needless task is to interpret the requirement that solution is fixed at ghost cell centers to solvers that do not operate directly on the ghost cell values. An example is linear solvers that operate on Ax=b and require that the boundary condition be written as changes to A and b.
This implementation of the strategy class RobinBcCoefStrategy<DIM> can be used when ghost cell values are known and have been written to the ghost cells of the data being set. You provide the patch data index to the cell-centered data, defined with a non-zero ghost cell width, where the ghost cell values can be found.
This implementation corresponds to a specific discretization of the Robin formula described in RobinBcCoefStrategy<DIM>. It assumes a linear variation of the data between the first interior and first ghost cells. It sets up the coefficients such that this linear extrapolation gives the correct value at the ghost cell center. This results in the coefficient a being 1.0/(1+0.5*h) and g being the a times the ghost cell value. h is the grid spacing normal to the boundary.
|
Constructor.
|
|
Destructor.
|
|
Function to fill arrays of Robin boundary condition coefficients at a patch boundary. This implementation of the virtual function RobinBcCoefStrategy<DIM>::setBcCoefs() sets up the coefficients as described in the above notes.
Implements SAMRAI::solv::RobinBcCoefStrategy< DIM >. |
|
Implements SAMRAI::solv::RobinBcCoefStrategy< DIM >. |
|
Set the patch data index of the data providing ghost cell values. The index must correspond to cell-centered double data with the given ghost width.
|