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

Interface for specifying Robin boundary conditions. More...

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

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

 RobinBcCoefStrategy ()
 Constructor.
virtual ~RobinBcCoefStrategy (void)
 Destructor.
Functions to set boundary condition coefficients a and g.
virtual 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, const double fill_time=0.0) const =0
 User-supplied function to fill arrays of Robin boundary condition coefficients at a patch boundary.
virtual hier::IntVector< DIM > numberOfExtensionsFillable () const=0

Detailed Description

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

Interface for specifying Robin boundary conditions.

The Robin boundary conditions are specified in terms of the coefficients $ \alpha $, $ \beta $ and $ \gamma $ in the Robin formula

\[ \alpha u + \beta u_n = \gamma \]

applied on the boundary with outward normal n.

This class specifies the interfaces for communicating the boundary condition coefficients.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::solv::RobinBcCoefStrategy< DIM >::RobinBcCoefStrategy (  ) 

Constructor.

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

Destructor.


Member Function Documentation

template<int DIM>
virtual void SAMRAI::solv::RobinBcCoefStrategy< 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,
const double  fill_time = 0.0 
) const [pure virtual]

User-supplied function to fill arrays of Robin boundary condition coefficients at a patch boundary.

This class specifies the Robin boundary condition coefficients at discrete locations on the patch boundary. Though these locations are defined by boundary box object, they do not necessarily coincide with the centers of the cells referred to by those boxes. These locations typically coincide with the nodes or face centers which do lie on the patch boundary. Accordingly, you use this function to provide the boundary coefficients at those locations by filling an array at indices corresponding to those locations.

When setting the values of the boundary condition coefficients it is useful to note that for any cell (i,j,k), the indices of the sides, edges and nodes are easily determined. The index on the lower side of the cell is the same as the index of the cell, whereas the index on the upper side of the cell has the next higher value. In 2D, the cell and its surrounding nodes and faces has the following indices:

    *
    *       (i,j+1)----(i,j+1)---(i+1,j+1)
    *          |                     |
    *          |                     |
    *          |                     |
    *          |                     |
    *        (i,j)      (i,j)     (i+1,j)
    *          |                     |
    *          |                     |
    *          |                     |
    *          |                     |
    *        (i,j)------(i,j)-----(i+1,j)
    *
    * 
Once this is understood, translation between the index in the boundary box index space to the index of things on the boundary is simple.

The boundary condition coefficients should be placed in the pdat::ArrayData<DIM> objects, acoef_data and gcoef_data (see argument list), which are dimensioned to contain the indices of the points alligned with variable and lying on the the boundary defined by bdry_box.

This function is only used with type-1 boundary boxes, such as faces in 3D. Other types of boundaries do not have a well-defined surface normal.

The parameter variable is passed through to tell the implementation of this function what variable to set the coefficients for. You may wish to ignore it if your implementation is intended for a specific variable.

Parameters:
acoef_data boundary 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_data boundary coefficient data. This array is exactly like acoef_data, except that it is to be filled with the b coefficient.
gcoef_data boundary coefficient data. This array is exactly like acoef_data, except that it is to be filled with the g coefficient.
variable variable to set the coefficients for. If implemented for multiple variables, this parameter can be used to determine which variable's coefficients are being sought.
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.

Implemented in SAMRAI::solv::GhostCellRobinBcCoefs< DIM >, SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >, and SAMRAI::solv::SimpleCellRobinBcCoefs< DIM >.

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

Implemented in SAMRAI::solv::GhostCellRobinBcCoefs< DIM >, SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >, and SAMRAI::solv::SimpleCellRobinBcCoefs< DIM >.


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