SAMRAI::algs::PatchBoundaryEdgeSum< DIM > Class Template Reference

Class PatchBoundaryEdgeSum provides operations summing edge data values at edges that are shared by multiple patches on a single level. Note that this utility only works on a SINGLE patch level, not on a multiple levels in an AMR patch hierarchy like the PatchBoundaryNodeSum class. Unlike node data, edge data at coarse-fine boundaries are not co-located, so the sum operation is not clearly defined. More...

#include <source/algorithm/femutils/standard/PatchBoundaryEdgeSum.h>

List of all members.

Public Member Functions

 PatchBoundaryEdgeSum (const std::string &object_name)
 Constructor initializes object to default (mostly undefined) state.
 ~PatchBoundaryEdgeSum ()
 Destructor for the schedule releases all internal storage.
void registerSum (int edge_data_id)
 Register edge data with given patch data identifier for summing.
void setupSum (tbox::Pointer< hier::PatchLevel< DIM > > level)
 Set up summation operations for edge data across shared edges on a single level.
void computeSum () const
 Compute sum of edge values at each shared edge and replace each such edge value with the corresponding sum.

Static Public Member Functions

static int getNumSharedPatchDataSlots (int max_variables_to_register)
 Static function used to predetermine number of patch data slots ahared among all PatchBoundaryEdgeSum objects (i.e., static members). To get a correct count, this routine should only be called once.
static int getNumUniquePatchDataSlots (int max_variables_to_register)
 Static function used to predetermine number of patch data slots unique to each PatchBoundaryEdgeSum object (i.e., non-static members). To get a correct count, this routine should be called exactly once for each object that will be constructed.


Detailed Description

template<int DIM>
class SAMRAI::algs::PatchBoundaryEdgeSum< DIM >

Class PatchBoundaryEdgeSum provides operations summing edge data values at edges that are shared by multiple patches on a single level. Note that this utility only works on a SINGLE patch level, not on a multiple levels in an AMR patch hierarchy like the PatchBoundaryNodeSum class. Unlike node data, edge data at coarse-fine boundaries are not co-located, so the sum operation is not clearly defined.

Usage of a patch boundry edge sum involves the following sequence of steps:

  1. Construct a patch boundry edge sum object. For example,
     *         PatchBoundaryEdgeSum<DIM> my_edge_sum("My Edge Sum");
     *     
  2. Register edge data quantities to sum. For example,
     *         my_edge_sum.registerSum(edge_data_id1);
     *         my_edge_sum.registerSum(edge_data_id2);
     *         etc...
     *     
  3. Setup the sum operations for a single level. For example,
     *         my_edge_sum.setupSum(level);
     *     
  4. Execute the sum operation. For example,
     *         my_edge_sum.computeSum()
     *     

The result of these operations is that each edge patch data value associated with the registered ids at patch boundaries on the level is replaced by the sum of all data values at the edge.


Constructor & Destructor Documentation

template<int DIM>
SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::PatchBoundaryEdgeSum ( const std::string &  object_name  ) 

Constructor initializes object to default (mostly undefined) state.

Parameters:
object_name const std::string reference for name of object used in error reporting. When assertion checking is on, the string cannot be empty.

template<int DIM>
SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::~PatchBoundaryEdgeSum (  ) 

Destructor for the schedule releases all internal storage.


Member Function Documentation

template<int DIM>
int SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::getNumSharedPatchDataSlots ( int  max_variables_to_register  )  [static]

Static function used to predetermine number of patch data slots ahared among all PatchBoundaryEdgeSum objects (i.e., static members). To get a correct count, this routine should only be called once.

Returns:
integer number of internal patch data slots required to perform sum.
Parameters:
max_variables_to_register integer value indicating maximum number of patch data ids that will be registered with edge sum objects.

template<int DIM>
int SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::getNumUniquePatchDataSlots ( int  max_variables_to_register  )  [static]

Static function used to predetermine number of patch data slots unique to each PatchBoundaryEdgeSum object (i.e., non-static members). To get a correct count, this routine should be called exactly once for each object that will be constructed.

Returns:
integer number of internal patch data slots required to perform sum.
Parameters:
max_variables_to_register integer value indicating maximum number of patch data ids that will be registered with edge sum objects.

template<int DIM>
void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::registerSum ( int  edge_data_id  ) 

Register edge data with given patch data identifier for summing.

Parameters:
edge_data_id integer patch data index for edge data to sum
The edge data id must be a valid patch data id (>=0) and must correspond to edge-centered double data. If not, an error will result.

template<int DIM>
void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::setupSum ( tbox::Pointer< hier::PatchLevel< DIM > >  level  ) 

Set up summation operations for edge data across shared edges on a single level.

Parameters:
level pointer to level on which to perform edge sum
When assertion checking is active, the level pointer cannot be null.

template<int DIM>
void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::computeSum (  )  const

Compute sum of edge values at each shared edge and replace each such edge value with the corresponding sum.

At the end of this method, all values at shared edge locations on patch boundaries will have the same value.


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