|
IBAMR
IBAMR version 0.19.
|
Class MblkPatchBoundaryNodeSum provides operations for summing node data values at nodes that are shared by multiple patches on a single level or across multiple hierarchy levels.
More...
#include <MblkPatchBoundaryNodeSum.h>
Public Member Functions | |
| MblkPatchBoundaryNodeSum (const std::string &object_name, tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > hierarchy) | |
| Constructor initializes object to default (mostly undefined) state. More... | |
| ~MblkPatchBoundaryNodeSum () | |
| Destructor for the schedule releases all internal storage. More... | |
| void | registerSum (int node_data_id) |
| Register node data with given patch data identifier for summing. More... | |
| void | setupSum (tbox::Pointer< hier::MultiblockPatchLevel< DIM > > level) |
| Set up summation operations for node data across shared nodes on a single level. More... | |
| void | computeSum (const bool fill_hanging_nodes=false) const |
| Compute sum of node values at each shared node and replace each such node value with the corresponding sum. More... | |
Private Types | |
| enum | PATCH_BDRY_NODE_SUM_DATA_ID { ID_UNDEFINED = -1 } |
Private Member Functions | |
| void | doLevelSum (tbox::Pointer< hier::MultiblockPatchLevel< DIM > > level) const |
| void | copyNodeToOuternodeOnLevel (tbox::Pointer< hier::MultiblockPatchLevel< DIM > > level, const tbox::Array< int > &node_data_id, const tbox::Array< int > &onode_data_id) const |
| void | copyOuternodeToNodeOnLevel (tbox::Pointer< hier::MultiblockPatchLevel< DIM > > level, const tbox::Array< int > &onode_data_id, const tbox::Array< int > &node_data_id) const |
Static Private Attributes | |
| static int | s_instance_counter |
| static tbox::Array< tbox::Array< int > > | s_onode_src_id_array |
| static tbox::Array< tbox::Array< int > > | s_onode_dst_id_array |
Usage of a patch boundry node sum involves the following sequence of steps:
* MblkPatchBoundaryNodeSum<DIM> my_node_sum("My Node Sum");
* * my_node_sum.registerSum(node_data_id1); * my_node_sum.registerSum(node_data_id2); * etc... *
* my_node_sum.setupSum(level); // single level * -- or -- * my_node_sum.setupSum(hierarchy, coarsest_ln, finest_ln); // multiple levels *
* my_node_sum.computeSum() *
The result of these operations is that each node patch data value associated with the registered ids at patch boundaries, on either the single level or range of hierarchy levels, is replaced by the sum of all data values at the node.
Note that only one of the setupSum() functions may be called once a MblkPatchBoundaryNodeSum<DIM> object is created.
|
private |
| SAMRAI::algs::MblkPatchBoundaryNodeSum< DIM >::MblkPatchBoundaryNodeSum | ( | const std::string & | object_name, |
| tbox::Pointer< hier::MultiblockPatchHierarchy< DIM > > | hierarchy | ||
| ) |
| object_name | const std::string reference for name of object used in error reporting. When assertion checking is on, the string cannot be empty. |
| hierarchy | the hierarchy. |
| SAMRAI::algs::MblkPatchBoundaryNodeSum< DIM >::~MblkPatchBoundaryNodeSum | ( | ) |
| void SAMRAI::algs::MblkPatchBoundaryNodeSum< DIM >::registerSum | ( | int | node_data_id | ) |
| node_data_id | integer patch data index for node data to sum |
The node data id must be a valid patch data id (>=0) and must correspond to node-centered double data. If not, an error will result.
| void SAMRAI::algs::MblkPatchBoundaryNodeSum< DIM >::setupSum | ( | tbox::Pointer< hier::MultiblockPatchLevel< DIM > > | level | ) |
If the other setupSum() function for a range of hierarchy levels has been called previously for this object, an error will result.
| level | pointer to level on which to perform node sum |
When assertion checking is active, the level pointer cannot be null.
| void SAMRAI::algs::MblkPatchBoundaryNodeSum< DIM >::computeSum | ( | const bool | fill_hanging_nodes = false | ) | const |
At the end of this method, all values at shared node locations on patch boundaries (on levels indicated by the call to one of the setupSum() routines) will have the same value.
When the setupSum() method taking a range of patch levels in a hierarchy is called, this method will compute the sum of nodal quantities at all the specified patch boundaries. For nodes at a coarse-fine boundary, nodal sums will only be performed where the coarse and fine nodes overlap. A node on a fine level that is not also a node on the next coarser level (a so-called "hanging node") will not be summed.
The boolean "fill_hanging_nodes" argument specifies whether the the hanging nodes should be filled using linearly interpolated values from neighboring non-hanging nodes (i.e. those that overlap nodes on a coarse level). The correct steps required to deal with hanging nodes is algorithm dependent so, if left unspecified, values at the hanging nodes will not be adjusted. However, because many algorithms average hanging nodes we provide the capability to do it here. Note that the hanging node interpolation provided does not take into consideration the spatial location of the nodes. So the interpolation may not be correct for coordinate systems other than standard Cartesian grid geometry.
| fill_hanging_nodes | Optional boolean value specifying whether hanging node values should be set to values interpolated from neighboring non-hanging node values. The default is false. |
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.17