|
IBAMR
IBAMR version 0.19.
|
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 <PatchBoundaryEdgeSum.h>
Public Member Functions | |
| PatchBoundaryEdgeSum (const std::string &object_name) | |
| Constructor initializes object to default (mostly undefined) state. More... | |
| ~PatchBoundaryEdgeSum () | |
| Destructor for the schedule releases all internal storage. More... | |
| void | registerSum (int edge_data_id) |
| Register edge data with given patch data identifier for summing. More... | |
| void | setupSum (tbox::Pointer< hier::PatchLevel< DIM > > level) |
| Set up summation operations for edge data across shared edges on a single level. More... | |
| void | computeSum () const |
| Compute sum of edge values at each shared edge and replace each such edge value with the corresponding sum. More... | |
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. More... | |
| 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. More... | |
Private Types | |
| enum | PATCH_BDRY_EDGE_SUM_DATA_ID { ID_UNDEFINED = -1 } |
Private Member Functions | |
| void | doLevelSum (tbox::Pointer< hier::PatchLevel< DIM > > level) const |
Static Private Attributes | |
| static int | s_instance_counter |
| static tbox::Array< tbox::Array< int > > | s_oedge_src_id_array |
| static tbox::Array< tbox::Array< int > > | s_oedge_dst_id_array |
Usage of a patch boundry edge sum involves the following sequence of steps:
* PatchBoundaryEdgeSum<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); *
* 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.
|
private |
| SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::PatchBoundaryEdgeSum | ( | const std::string & | object_name | ) |
| 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::PatchBoundaryEdgeSum< DIM >::~PatchBoundaryEdgeSum | ( | ) |
|
static |
| max_variables_to_register | integer value indicating maximum number of patch data ids that will be registered with edge sum objects. |
|
static |
| max_variables_to_register | integer value indicating maximum number of patch data ids that will be registered with edge sum objects. |
| void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::registerSum | ( | int | edge_data_id | ) |
| 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.
| void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::setupSum | ( | tbox::Pointer< hier::PatchLevel< DIM > > | level | ) |
| level | pointer to level on which to perform edge sum |
When assertion checking is active, the level pointer cannot be null.
| void SAMRAI::algs::PatchBoundaryEdgeSum< DIM >::computeSum | ( | ) | const |
At the end of this method, all values at shared edge locations on patch boundaries will have the same value.
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17