IBAMR  IBAMR version 0.19.
Public Member Functions | Private Member Functions | Private Attributes | List of all members
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 <LocationIndexRobinBcCoefs.h>

Inheritance diagram for SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >:
Inheritance graph
[legend]

Public Member Functions

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

Private Member Functions

void getFromInput (tbox::Pointer< tbox::Database > database)
 

Private Attributes

std::string d_object_name
 
double d_a_map [2 *DIM]
 
double d_b_map [2 *DIM]
 
double d_g_map [2 *DIM]
 

Detailed Description

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

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

◆ LocationIndexRobinBcCoefs() [1/2]

◆ LocationIndexRobinBcCoefs() [2/2]

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

◆ ~LocationIndexRobinBcCoefs()

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

Member Function Documentation

◆ setBcCoefs()

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

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_databoundary 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_databoundary coefficient data. This is defined to include index range for the boundary faces on the boundary box bdry_box.
gcoef_databoundary coefficient data. This is defined to include index range for the boundary faces on the boundary box bdry_box.
variablevariable to set the coefficients for.
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< DIM >.

◆ numberOfExtensionsFillable()

template<int DIM>
hier::IntVector<DIM> SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::numberOfExtensionsFillable ( ) const
virtual

◆ setBoundaryValue()

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::setBoundaryValue ( int  location_index,
double  value 
)
Parameters
location_indexSet coefficients for this index.
valueBoundary value at location_index.

◆ setBoundarySlope()

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::setBoundarySlope ( int  location_index,
double  slope 
)
Parameters
location_indexSet coefficients for this index.
slopeBoundary slope at location_index.

◆ setRawCoefficients()

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

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_indexSet coefficients for this index.
aValue of coefficient a at given location index.
bValue of coefficient b at given location index.
gValue of coefficient g at given location index.

◆ getCoefficients()

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

◆ operator=()

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

◆ getFromInput()

template<int DIM>
void SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::getFromInput ( tbox::Pointer< tbox::Database database)
private

Member Data Documentation

◆ d_object_name

template<int DIM>
std::string SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::d_object_name
private

◆ d_a_map

template<int DIM>
double SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::d_a_map[2 *DIM]
private

◆ d_b_map

template<int DIM>
double SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::d_b_map[2 *DIM]
private

◆ d_g_map

template<int DIM>
double SAMRAI::solv::LocationIndexRobinBcCoefs< DIM >::d_g_map[2 *DIM]
private

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