Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

SAMRAI::appu::CartesianBoundaryUtilities3 Struct Reference

Class CartesianBoundaryUtilities2 is a utility class that simplifies the implementation of simple physical boundary data in 3 spatial dimensions. It contains routines for reading boundary data information from input files, applying those boundary conditions, and error checking boundary data. These routines apply to the case of cell-centered double data only. One may use all of these capabilities, or use the input reading, boundary setting, and error checking routines independently. More...

#include <source/apputils/boundary/CartesianBoundaryUtilities3.h>

List of all members.

Static Public Member Functions

static void readBoundaryInput (BoundaryUtilityStrategy *bdry_strategy, tbox::Pointer< tbox::Database > bdry_db, tbox::Array< int > &face_conds, tbox::Array< int > &edge_conds, tbox::Array< int > &node_conds, const hier::IntVector< 3 > &periodic)
static void fillFaceBoundaryData (const string &varname, tbox::Pointer< pdat::CellData< 3, double > > &vardata, const hier::Patch< 3 > &patch, const hier::IntVector< 3 > &ghost_width_to_fill, const tbox::Array< int > &bdry_face_conds, const tbox::Array< double > &bdry_face_values)
static void fillEdgeBoundaryData (const string &varname, tbox::Pointer< pdat::CellData< 3, double > > &vardata, const hier::Patch< 3 > &patch, const hier::IntVector< 3 > &ghost_width_to_fill, const tbox::Array< int > &bdry_edge_conds, const tbox::Array< double > &bdry_face_values)
static void fillNodeBoundaryData (const string &varname, tbox::Pointer< pdat::CellData< 3, double > > &vardata, const hier::Patch< 3 > &patch, const hier::IntVector< 3 > &ghost_width_to_fill, const tbox::Array< int > &bdry_node_conds, const tbox::Array< double > &bdry_face_values)
static int getFaceLocationForEdgeBdry (int edge_loc, int edge_btype)
static int getFaceLocationForNodeBdry (int node_loc, int node_btype)
static int checkBdryData (const string &varname, const hier::Patch< 3 > &patch, int data_id, int depth, const hier::IntVector< 3 > &gcw_to_check, const hier::BoundaryBox< 3 > &bbox, int bcase, double bstate)


Detailed Description

Class CartesianBoundaryUtilities2 is a utility class that simplifies the implementation of simple physical boundary data in 3 spatial dimensions. It contains routines for reading boundary data information from input files, applying those boundary conditions, and error checking boundary data. These routines apply to the case of cell-centered double data only. One may use all of these capabilities, or use the input reading, boundary setting, and error checking routines independently.

To use the boundary condition input reading capabilities, the format of the input file section containing the boundary information must be as described next. Boundary face, node, and edge entries are only required for those that are not filled automatically when periodic conditions apply.

The boundary condition for face "*" is provided in a section as follows:

 * 
 *    boundary_face_* {   
 *       boundary_condition  = ...  // boundary condition string identifier
 *       // Any problem-specific boundary data read by user routines 
 *       // is placed here...
 *    }
 *
 * Allowable face identifiers (i.e., values for "*") are:
 *       xlo, xhi, ylo, yhi, zlo, zhi
 * Supported face boundary_condition string values are: 
 *       "FLOW", "REFLECT", "DIRICHLET", "NEUMANN" 
 *
 * 

The boundary condition for edge "*" is provided in a section as follows:

 *
 *    boundary_edge_* {   
 *       boundary_condition  = ...  // boundary condition string identifier
 *    }
 * 
 * Allowable edge identifiers (i.e., values for "*") are:
 *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
 *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
 *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
 * Supported edge boundary_condition string values are:  
 *       "XFLOW", "YFLOW", "ZFLOW",
 *       "XREFLECT", "YREFLECT", "ZREFLECT",
 *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
 *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
 *
 * 

Note that edge conditions must be consistent with adjacent face conditions.

The boundary condition for node "*" is provided in a section as follows:

 *
 *    boundary_node_* {
 *       boundary_condition  = ...  // boundary condition string identifier
 *    }
 *
 * Allowable node identifiers (i.e., values for "*") are:
 *       ylo_zlo, yhi_zlo, ylo_zhi, yhi_zhi,
 *       xlo_zlo, xlo_zhi, xhi_zlo, xhi_zhi,
 *       xlo_ylo, xhi_ylo, xlo_yhi, xhi_yhi
 * Supported node boundary_condition values are:   
 *       "XFLOW", "YFLOW", "ZFLOW",
 *       "XREFLECT", "YREFLECT", "ZREFLECT",
 *       "XDIRICHLET", "YDIRICHLET", "ZDIRICHLET"
 *       "XNEUMANN", "YNEUMANN", "ZNEUMANN"
 *
 * 

Note that node conditions must be consistent with adjacent face conditions.

See the include file CartesianBoundaryDefines.h for integer constant definitions that apply for the various boundary types, locations, and boundary conditions. If you choose to use the input reading capabilities only and write your own boundary condition routines in FORTRAN, you should note that the integer constants for the various boundary condition types and locations are automatically "stuffed" into FORTRAN common blocks. This avoids potential problems with inconsistencies between C++ and FORTRAN usage. Please see the FORTRAN include file cartbdryparams3d.i for details.

See also:
appu::BoundaryUtilityStrategy3


Member Function Documentation

void SAMRAI::appu::CartesianBoundaryUtilities3::readBoundaryInput BoundaryUtilityStrategy bdry_strategy,
tbox::Pointer< tbox::Database bdry_db,
tbox::Array< int > &  face_conds,
tbox::Array< int > &  edge_conds,
tbox::Array< int > &  node_conds,
const hier::IntVector< 3 > &  periodic
[static]
 

Function to read 3d boundary data from input database. The integer boundary condition types are placed in the integer arrays supplied by the caller (typically, the concrete BoundaryUtilityStrategy object provided). When DIRICHLET or NEUMANN conditions are specified, control is passed to the BoundaryUtilityStrategy to read the boundary state data specific to the problem.

Errors will be reported and the program will abort whenever necessary boundary condition information is missing in the input database, or when the data read in is either unknown or inconsistent. The periodic domain information is used to determine which boundary face, edge, or node entries are not required from input. Error checking requires that node and edge boundary conditions are consistent with those specified for the faces.

When assertion checking is active, assertions will result when any of the pointer arguments is null, or an array is passed in with the the wrong size.

Parameters:
bdry_strategy user-defined object that reads DIRICHLET or NEUMANN conditions
bdry_db input database containing all boundary data
face_conds array into which integer face boundary condition types are read
edge_conds array into which integer edge boundary condition types are read
node_conds array into which integer node boundary condition types are read
periodic integer vector specifying which coordinate directions are periodic (e.g., value returned from GridGeometry2::getPeriodicShift())

void SAMRAI::appu::CartesianBoundaryUtilities3::fillFaceBoundaryData const string &  varname,
tbox::Pointer< pdat::CellData< 3, double > > &  vardata,
const hier::Patch< 3 > &  patch,
const hier::IntVector< 3 > &  ghost_width_to_fill,
const tbox::Array< int > &  bdry_face_conds,
const tbox::Array< double > &  bdry_face_values
[static]
 

Function to fill 3d face boundary values for a patch.

When assertion checking is active, assertions will result when any of the pointer arguments is null, or an array is passed in with the the wrong size.

Parameters:
varname String name of variable (for error reporting).
vardata Cell-centered patch data object to fill.
patch hier::Patch on which data object lives.
ghost_width_to_fill Width of ghost region to fill.
bdry_face_conds tbox::Array of boundary condition types for patch faces.
bdry_face_values tbox::Array of boundary values for patch faces.

void SAMRAI::appu::CartesianBoundaryUtilities3::fillEdgeBoundaryData const string &  varname,
tbox::Pointer< pdat::CellData< 3, double > > &  vardata,
const hier::Patch< 3 > &  patch,
const hier::IntVector< 3 > &  ghost_width_to_fill,
const tbox::Array< int > &  bdry_edge_conds,
const tbox::Array< double > &  bdry_face_values
[static]
 

Function to fill 3d edge boundary values for a patch.

When assertion checking is active, assertions will result when any of the pointer arguments is null, or an array is passed in with the the wrong size.

Parameters:
varname String name of variable (for error reporting).
vardata Cell-centered patch data object to fill.
patch hier::Patch on which data object lives.
ghost_width_to_fill Width of ghost region to fill.
bdry_edge_conds tbox::Array of boundary condition types for patch edges.
bdry_face_values tbox::Array of boundary values for patch faces.

void SAMRAI::appu::CartesianBoundaryUtilities3::fillNodeBoundaryData const string &  varname,
tbox::Pointer< pdat::CellData< 3, double > > &  vardata,
const hier::Patch< 3 > &  patch,
const hier::IntVector< 3 > &  ghost_width_to_fill,
const tbox::Array< int > &  bdry_node_conds,
const tbox::Array< double > &  bdry_face_values
[static]
 

Function to fill 3d node boundary values for a patch.

When assertion checking is active, assertions will result when any of the pointer arguments is null, or an array is passed in with the the wrong size.

Parameters:
varname String name of variable (for error reporting).
vardata Cell-centered patch data object to fill.
patch hier::Patch on which data object lives.
ghost_width_to_fill Width of ghost region to fill.
bdry_node_conds tbox::Array of boundary condition types for patch nodes.
bdry_face_values tbox::Array of boundary values for patch faces.

int SAMRAI::appu::CartesianBoundaryUtilities3::getFaceLocationForEdgeBdry int  edge_loc,
int  edge_btype
[static]
 

Function that returns the integer face boundary location corresponding to the given edge location and edge boundary condition.

If the edge boundary condition type or edge location are unknown, or the boundary condition type is inconsistant with the edge location an error results.

Returns:
Integer face location for edge location and boundary condition type.
Parameters:
edge_loc Integer location for edge.
edge_btype Integer boundary condition type for edge.

int SAMRAI::appu::CartesianBoundaryUtilities3::getFaceLocationForNodeBdry int  node_loc,
int  node_btype
[static]
 

Function that returns the integer face boundary location corresponding to the given node location and node boundary condition.

If the node boundary condition type or node location are unknown, or the boundary condition type is inconsistant with the node location an error results.

Returns:
Integer face location for node location and boundary condition type.
Parameters:
node_loc Integer location for node.
node_btype Integer boundary condition type for node.

int SAMRAI::appu::CartesianBoundaryUtilities3::checkBdryData const string &  varname,
const hier::Patch< 3 > &  patch,
int  data_id,
int  depth,
const hier::IntVector< 3 > &  gcw_to_check,
const hier::BoundaryBox< 3 > &  bbox,
int  bcase,
double  bstate
[static]
 

Function to check 3d boundary data for a patch data quantity on a patch after it is set. A warning message will be sent to log file for each bad boundary value that is found.

When assertion checking is active, assertions will result when any of the pointer arguments is null, or an array is passed in with the the wrong size.

Returns:
Integer number of bad boundary values found.
Parameters:
varname String name of variable (for error reporting).
patch hier::Patch on which data object lives.
data_id hier::Patch data index for data on patch.
depth Depth index of patch data to check.
gcw_to_check Width of ghost region to check.
bbox Boundary box to check.
bcase Boundary condition type for given edge or node.
bstate Boundary value that applies in DIRICHLET or NEUMANN case.


The documentation for this struct was generated from the following files:
Generated on Fri Dec 2 11:23:41 2005 for SAMRAI by  doxygen 1.4.2