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

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 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.


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 string &  object_name  ) 
 

Constructor initializes object to default (mostly undefined) state.

Parameters:
object_name const 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>
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 Fri Dec 2 11:20:29 2005 for SAMRAI by  doxygen 1.4.2