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

A prefabricated Robin boundary condition coefficients for coefficients that are entirely specified by the boundary box location index. More...

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

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

Inheritance graph
[legend]
List of all members.

Public Member Functions

 LocationIndexRobinBcCoefs ()
 Default constructor.
 LocationIndexRobinBcCoefs (const std::string &object_name, tbox::Pointer< tbox::Database > database)
 Constructor using database.
virtual ~LocationIndexRobinBcCoefs (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 setBoundaryValue (int location_index, double value)
 Set the boundary value at a given location index.
void setBoundarySlope (int location_index, double slope)
 Set the boundary slope at a given location index.
void setRawCoefficients (int location_index, double a, double b, double g)
 Set the values of coefficients a and g at a given location index.
void getCoefficients (int location_index, double &a, double &b, double &g) const
 Access coefficients.
const LocationIndexRobinBcCoefsoperator= (const LocationIndexRobinBcCoefs &r)
 Assignment operator.

Detailed Description

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

A prefabricated Robin boundary condition coefficients for coefficients that are entirely specified by the boundary box location index.

This implementation of the strategy class RobinBcCoefStrategy<DIM> may be used when your Robin boundary condition coefficients are completely determined by the location index of the boundary box.

Before this class is used in to provide the boundary condition coefficients, you must specify what boundary conditions to associate with what location index. Methods for specifying these are setBoundaryValue(), setBoundarySlope() and setRawCoefficients(). The first two are for Dirichlet and Neumann boundary conditions, respectively. If the boundary condition is the more general Robin boundary condition, the third function should be used to set the coefficients a and g directly (see RobinBcCoefStrategy) for the meanings of a and g.

Inputs: You can specify the boundary conditions for any location index through the input database. One line is required for each location index. The input parameters are "boundary_N", where N is the index of the location. Each parameter must be a string array so that all boundary types can be accomodated the same way. The first string must be one of "value", "slope" or "coefficients". If the string is "value" or "slope" the next string is the value you want to set, defaulting to zero if not specified. If the first string is "coefficients", the next two strings specifies the values of a and g.

Examples inputs:

 * boundary_0 = "value", "0.0"
 * boundary_1 = "value", "1.0"
 * boundary_2 = "slope", "0.0"
 * boundary_4 = "coefficients", "1.0", "0.0"
 * 


Constructor & Destructor Documentation

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

Default constructor.

template<int DIM>
SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::LocationIndexRobinBcCoefs ( const std::string &  object_name,
tbox::Pointer< tbox::Database database 
)

Constructor using database.

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

Destructor.


Member Function Documentation

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< 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() fills the coefficient arrays with constant values set according to the location index of the boundary box.

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::LocationIndexRobinBcCoefs< DIM >::numberOfExtensionsFillable (  )  const [virtual]

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

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::setBoundaryValue ( int  location_index,
double  value 
)

Set the boundary value at a given location index.

Parameters:
location_index Set coefficients for this index.
value Boundary value at location_index.

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::setBoundarySlope ( int  location_index,
double  slope 
)

Set the boundary slope at a given location index.

Parameters:
location_index Set coefficients for this index.
slope Boundary slope at location_index.

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::setRawCoefficients ( int  location_index,
double  a,
double  b,
double  g 
)

Set the values of coefficients a and g at a given location index.

See RobinBcCoefStrategy<DIM> for the definitions of coefficients a and g.

If the boundary condition is neither Dirichlet nor Neumann (a general Robin boundary condition), use this function to set the values of the bc coefficients.

Parameters:
location_index Set coefficients for this index.
a Value of coefficient a at given location index.
b Value of coefficient b at given location index.
g Value of coefficient g at given location index.

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::getCoefficients ( int  location_index,
double &  a,
double &  b,
double &  g 
) const

Access coefficients.

template<int DIM>
const LocationIndexRobinBcCoefs< DIM > & SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::operator= ( const LocationIndexRobinBcCoefs< DIM > &  r  ) 

Assignment operator.


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