SAMRAI::solv::GhostCellRobinBcCoefs< DIM > Class Template Reference

A prefabricated Robin boundary condition coefficients for the case where cell-centered data is fixed at the first ghost-cell centers. More...

#include <source/solvers/poisson/GhostCellRobinBcCoefs.h>

Inheritance diagram for SAMRAI::solv::GhostCellRobinBcCoefs< DIM >:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GhostCellRobinBcCoefs (std::string object_name="")
 Constructor.
virtual ~GhostCellRobinBcCoefs (void)
 Destructor.
void setBcCoefs (tbox::Pointer< pdat::ArrayData< DIM, double > > &acoef_data, tbox::Pointer< pdat::ArrayData< DIM, double > > &bcoef_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.

Detailed Description

template<int DIM>
class SAMRAI::solv::GhostCellRobinBcCoefs< DIM >

A prefabricated Robin boundary condition coefficients for the case where cell-centered data is fixed at the first ghost-cell centers.

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 Documentation

template<int DIM>
SAMRAI::solv::GhostCellRobinBcCoefs< DIM >::GhostCellRobinBcCoefs ( std::string  object_name = ""  ) 

Constructor.

Parameters:
object_name Name of object for output purposes.

template<int DIM>
SAMRAI::solv::GhostCellRobinBcCoefs< DIM >::~GhostCellRobinBcCoefs ( void   )  [virtual]

Destructor.


Member Function Documentation

template<int DIM>
void SAMRAI::solv::GhostCellRobinBcCoefs< DIM >::setBcCoefs ( tbox::Pointer< pdat::ArrayData< DIM, double > > &  acoef_data,
tbox::Pointer< pdat::ArrayData< DIM, double > > &  bcoef_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 [virtual]

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.

Parameters:
acoef_data boundary coefficient data. This is defined to include index range for the boundary faces on the boundary box bdry_box. If this is a null pointer, then the calling function is not interested in a, and you can disregard it.
bcoef_data boundary coefficient data. This is defined to include index range for the boundary faces on the boundary box bdry_box.
gcoef_data boundary coefficient data. This is defined to include index range for the boundary faces on the boundary box bdry_box.
variable variable to set the coefficients for.
patch patch requiring bc coefficients
bdry_box boundary box showing where on the boundary the coefficient data is needed.
fill_time solution time corresponding to filling, for use when coefficients are time-dependent.

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

template<int DIM>
hier::IntVector< DIM > SAMRAI::solv::GhostCellRobinBcCoefs< DIM >::numberOfExtensionsFillable (  )  const [virtual]

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

template<int DIM>
void SAMRAI::solv::GhostCellRobinBcCoefs< DIM >::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.

The index must correspond to cell-centered double data with the given ghost width.

Parameters:
ghost_data_id patch data index of ghost data
extensions_fillable the number of extensions past edge of a patch that has valid ghost cell values.


The documentation for this class was generated from the following files:
Generated on Thu Jun 18 11:28:57 2009 for SAMRAI by  doxygen 1.5.1