#include <source/algorithm/femutils/locally_active/LocallyActiveDataPatchBoundaryEdgeSum.h>
Public Member Functions | |
LocallyActiveDataPatchBoundaryEdgeSum (const std::string &object_name) | |
Constructor initializes object to default (mostly undefined) state. | |
~LocallyActiveDataPatchBoundaryEdgeSum () | |
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, tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > level_mgr) |
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 LocallyActiveDataPatchBoundaryEdgeSum 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 LocallyActiveDataPatchBoundaryEdgeSum 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. |
Usage of a patch boundry edge sum involves the following sequence of steps:
* LocallyActiveDataPatchBoundaryEdgeSum<DIM> my_edge_sum("My Edge Sum"); *
* my_edge_sum.registerSum(edge_data_id1); * my_edge_sum.registerSum(edge_data_id2); * etc... *
* my_edge_sum.setupSum(level, level_mgr); *
* 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.
SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::LocallyActiveDataPatchBoundaryEdgeSum | ( | const std::string & | object_name | ) |
Constructor initializes object to default (mostly undefined) state.
object_name | const std::string reference for name of object used in error reporting. When assertion checking is on, the string cannot be empty. |
SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::~LocallyActiveDataPatchBoundaryEdgeSum | ( | ) |
Destructor for the schedule releases all internal storage.
int SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::getNumSharedPatchDataSlots | ( | int | max_variables_to_register | ) | [static] |
Static function used to predetermine number of patch data slots ahared among all LocallyActiveDataPatchBoundaryEdgeSum objects (i.e., static members). To get a correct count, this routine should only be called once.
max_variables_to_register | integer value indicating maximum number of patch data ids that will be registered with edge sum objects. |
int SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::getNumUniquePatchDataSlots | ( | int | max_variables_to_register | ) | [static] |
Static function used to predetermine number of patch data slots unique to each LocallyActiveDataPatchBoundaryEdgeSum 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.
max_variables_to_register | integer value indicating maximum number of patch data ids that will be registered with edge sum objects. |
void SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::registerSum | ( | int | edge_data_id | ) |
Register edge data with given patch data identifier for summing.
edge_data_id | integer patch data index for edge data to sum |
void SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< DIM >::setupSum | ( | tbox::Pointer< hier::PatchLevel< DIM > > | level, | |
tbox::Pointer< hier::LocallyActiveDataPatchLevelManager< DIM > > | level_mgr | |||
) |
Set up summation operations for edge data across shared edges on a single level.
level | pointer to level on which to perform edge sum | |
level_mgr | pointer to level mgr defining active patches for edge data registered with the edge sum object |
void SAMRAI::algs::LocallyActiveDataPatchBoundaryEdgeSum< 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.