A structured mesh interface for MOAB-based data. More...
#include "moab/ScdInterface.hpp"
Public Member Functions | |
ScdInterface (Interface *impl, bool find_boxes=false) | |
Constructor. More... | |
~ScdInterface () | |
Interface * | impl () const |
Return the MOAB Interface instance *. More... | |
ErrorCode | construct_box (HomCoord low, HomCoord high, const double *const coords, unsigned int num_coords, ScdBox *&new_box, int *const lperiodic=NULL, ScdParData *const par_data=NULL, bool assign_global_ids=false, int resolve_shared_ents=-1) |
Construct new structured mesh box, including both vertices and elements. More... | |
ErrorCode | create_scd_sequence (const HomCoord &low, const HomCoord &high, EntityType type, int starting_id, ScdBox *&new_box, int *is_periodic=NULL) |
Create a structured sequence of vertices, quads, or hexes. More... | |
ErrorCode | find_boxes (std::vector< ScdBox * > &boxes) |
Return all the structured mesh blocks in this MOAB instance, as ScdBox objects. More... | |
ErrorCode | find_boxes (Range &boxes) |
Return all the structured mesh blocks in this MOAB instance, as entity set handles. More... | |
ErrorCode | get_boxes (std::vector< ScdBox * > &boxes) |
Return all the structured mesh blocks known by ScdInterface (does not search) More... | |
Tag | box_dims_tag (bool create_if_missing=true) |
Return the tag marking the lower and upper corners of boxes. More... | |
Tag | global_box_dims_tag (bool create_if_missing=true) |
Return the tag marking the global lower and upper corners of boxes. More... | |
Tag | part_method_tag (bool create_if_missing=true) |
Return the tag marking the partitioning method used to partition the box in parallel. More... | |
Tag | box_periodic_tag (bool create_if_missing=true) |
Return the tag marking whether box is periodic in i and j. More... | |
Tag | box_set_tag (bool create_if_missing=true) |
Return the tag marking the ScdBox for a set. More... | |
ScdBox * | get_scd_box (EntityHandle eh) |
Return the ScdBox corresponding to the entity set passed in. More... | |
ErrorCode | tag_shared_vertices (ParallelComm *pcomm, EntityHandle seth) |
Tag vertices with sharing data for parallel representations. More... | |
ErrorCode | tag_shared_vertices (ParallelComm *pcomm, ScdBox *box) |
Tag vertices with sharing data for parallel representations. More... | |
Static Public Member Functions | |
static ErrorCode | compute_partition (int np, int nr, const ScdParData &par_data, int *ldims, int *lperiodic=NULL, int *pdims=NULL) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | get_neighbor (int np, int nr, const ScdParData &spd, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
Get information about the neighbor in the dijk[] direction, where dijk can be -1 or 1 for all 3 params. More... | |
Protected Member Functions | |
ErrorCode | remove_box (ScdBox *box) |
Remove the box from the list on ScdInterface. More... | |
ErrorCode | add_box (ScdBox *box) |
Add the box to the list on ScdInterface. More... | |
Private Member Functions | |
ErrorCode | create_box_set (const HomCoord &low, const HomCoord &high, EntityHandle &scd_set, int *is_periodic=NULL) |
Create an entity set for a box, and tag with the parameters. More... | |
ErrorCode | assign_global_ids (ScdBox *box) |
assign global ids to vertices in this box More... | |
Static Private Member Functions | |
static ErrorCode | compute_partition_alljorkori (int np, int nr, const int gijk[6], const int *const gperiodic, int *lijk, int *lperiodic, int *pijk) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | compute_partition_alljkbal (int np, int nr, const int gijk[6], const int *const gperiodic, int *lijk, int *lperiodic, int *pijk) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | compute_partition_sqij (int np, int nr, const int gijk[6], const int *const gperiodic, int *lijk, int *lperiodic, int *pijk) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | compute_partition_sqjk (int np, int nr, const int gijk[6], const int *const gperiodic, int *lijk, int *lperiodic, int *pijk) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | compute_partition_sqijk (int np, int nr, const int gijk[6], const int *const gperiodic, int *lijk, int *lperiodic, int *pijk) |
Compute a partition of structured parameter space. More... | |
static ErrorCode | get_shared_vertices (ParallelComm *pcomm, ScdBox *box, std::vector< int > &procs, std::vector< int > &offsets, std::vector< int > &shared_indices) |
Get vertices shared with other processors. More... | |
static ErrorCode | get_indices (const int *const ldims, const int *const rdims, const int *const across_bdy, int *face_dims, std::vector< int > &shared_indices) |
static ErrorCode | get_neighbor_alljorkori (int np, int pfrom, const int *const gdims, const int *const gperiodic, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
static ErrorCode | get_neighbor_alljkbal (int np, int pfrom, const int *const gdims, const int *const gperiodic, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
static ErrorCode | get_neighbor_sqij (int np, int pfrom, const int *const gdims, const int *const gperiodic, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
static ErrorCode | get_neighbor_sqjk (int np, int pfrom, const int *const gdims, const int *const gperiodic, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
static ErrorCode | get_neighbor_sqijk (int np, int pfrom, const int *const gdims, const int *const gperiodic, const int *const dijk, int &pto, int *rdims, int *facedims, int *across_bdy) |
static int | gtol (const int *gijk, int i, int j, int k) |
Private Attributes | |
Interface * | mbImpl |
interface instance More... | |
bool | searchedBoxes |
whether we've searched the database for boxes yet More... | |
std::vector< ScdBox * > | scdBoxes |
structured mesh blocks; stored as ScdBox objects, can get sets from those More... | |
Tag | boxPeriodicTag |
tag representing whether box is periodic in i and j More... | |
Tag | boxDimsTag |
tag representing box lower and upper corners More... | |
Tag | globalBoxDimsTag |
tag representing global lower and upper corners More... | |
Tag | partMethodTag |
tag representing partition method More... | |
Tag | boxSetTag |
tag pointing from set to ScdBox More... | |
Friends | |
class | ScdBox |
A structured mesh interface for MOAB-based data.
Structured mesh in MOAB is created and accessed through the ScdInterface and ScdBox classes.
Structured mesh can be constructed in one of two ways. First, a rectangular block of mesh, both vertices and edges/quads/hexes, can be created in one shot, using the construct_box method. In this case, there are single sequences of vertices/entities. The second method for creating structured mesh is to create the structured blocks of vertices and elements separately. In this case, different blocks of elements can share blocks of vertices, and each block of elements has its own independent parametric space. The algorithms behind this representation are described in T. Tautges, "MOAB-SD: Integrated structured and unstructured mesh representation", Eng. w Comp, vol 20 no. 3.
Structured mesh is represented in MOAB down at the element sequence level, which is something applications don't see. In addition, when structured mesh is created, entity sets are also created and tagged with information about the parametric space. In particular, the BOX_DIMS tag is used to indicate the lower and upper corners in parametric space (this tag is integer size 6). Structured mesh blocks are also available through ScdBox class objects returned by ScdInterface. These class objects should be treated only as references to the structured mesh blocks; that is, the structured mesh referenced by these objects is not deleted when the ScdBox instance is destroyed. Functions for destroying the actual mesh are available on this class, though.
Structured mesh blocks are returned in the form of ScdBox class objects. Each ScdBox instance represents a rectangular block of vertices and possibly elements (edges, quads, or hexes). The edge/quad/hex entity handles for a ScdBox are guaranteed to be contiguous, starting at a starting value which is also available through the ScdBox class. However, vertex handles may or may not be contiguous, depending on the construction method. The start vertex handle is also available from the ScdBox class.
Each structured box has a parametric (ijk) space, which can be queried through the ScdBox interface. For non-periodic boxes, the edge/quad/hex parameter bounds are one less in each dimension than that of the vertices, otherwise they are the same as the vertex parameter bounds. In a parallel representation, boxes are locally non-periodic by default, but global ids are assigned such that the last set of vertices in a periodic direction match those of the first set of vertices in that direction.
Entity handles are allocated with the i parameter varying fastest, then j, then k.
Boxes can be periodic in i, or j, or both i and j. If only i or j is periodic, the corresponding mesh is a strip or an annular cylinder; if both i and j are periodic, the corresponding mesh is an annular torus. A box cannot be periodic in all three parameters. If i and/or j is periodic, and assuming IMIN/JMIN is zero, the parameter extents in the/each periodic direction (IMAX/JMAX) for vertices and edges/faces/hexes are the same, and the vertices on the "top" end in the periodic direction are at parameter value IMIN/JMIN.
For parallel structured meshes, each local mesh (the mesh on a given process) looks like a non-periodic structured mesh, and there are both local and global parameters of the structured mesh. If the mesh is periodic in a given direction, the last process in the periodic direction has local IMAX/JMAX that is one greater than the global IMAX/JMAX.
In parallel, the periodicity described in the previous paragraph is "local periodicity"; there is also the notion of global periodicity. For serial meshes, those concepts are the same. In parallel, a mesh can be locally non-periodic but globally periodic in a given direction. In that case, the local mesh is still non-periodic, i.e. the parametric extents for edges is one fewer than that of vertices in that direction. However, vertices are given global ids such that they match those of the parametric minimum in that direction. Geometric positions of the vertices at the high end should still be greater than the ones just below.
This interface supports parametric access to intermediate-dimension entities, e.g. adjacent faces and edges in a 3d mesh. In this case, a direction parameter is added, to identify the parametric direction of the entities being requested. For example, to retrieve the faces adjacent to a hex with parameters ijk, in the i parametric direction, you would use the parameters ijk0. These intermediate entities are not stored in a structured representation, but their parametric positions can be evaluated based on their adjacencies to higher-dimensional entities. Thanks to Milad Fatenejad for the thinking behind this.
The ScdBox class provides functions for evaluating the mesh based on the ijk parameter space. These functions are inlined where possible, for efficiency.
Definition at line 151 of file ScdInterface.hpp.
moab::ScdInterface::ScdInterface | ( | Interface * | impl, |
bool | find_boxes = false |
||
) |
Constructor.
Constructor; if find_boxes is true, this will search for entity sets marked as structured blocks, based on the BOX_DIMS tag. Structured mesh blocks will be stored in this interface class for future retrieval. Structured mesh blocks created through this interface will also be stored here.
impl | MOAB instance |
find_boxes | If true, search all the entity sets, caching the structured mesh blocks |
Definition at line 33 of file ScdInterface.cpp.
References find_boxes(), and scdBoxes.
moab::ScdInterface::~ScdInterface | ( | ) |
Definition at line 41 of file ScdInterface.cpp.
References box_set_tag(), mbImpl, scdBoxes, and moab::Interface::tag_delete().
Add the box to the list on ScdInterface.
Definition at line 462 of file ScdInterface.cpp.
References MB_SUCCESS, and scdBoxes.
Referenced by moab::ScdBox::ScdBox().
assign global ids to vertices in this box
Definition at line 252 of file ScdInterface.cpp.
References moab::Range::begin(), moab::ScdBox::box_dims(), moab::Range::end(), ErrorCode, ERRORR, moab::ScdParData::gDims, moab::Interface::globalId_tag(), moab::ScdParData::gPeriodic, moab::ScdBox::locally_periodic(), MB_SUCCESS, mbImpl, moab::ScdBox::num_vertices(), moab::ScdBox::par_data(), moab::ScdBox::start_vertex(), and moab::Interface::tag_iterate().
Referenced by construct_box().
Tag moab::ScdInterface::box_dims_tag | ( | bool | create_if_missing = true | ) |
Return the tag marking the lower and upper corners of boxes.
create_if_missing | If the tag does not yet exist, create it |
Definition at line 381 of file ScdInterface.cpp.
References boxDimsTag, ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_get_name().
Referenced by create_box_set(), and find_boxes().
Tag moab::ScdInterface::box_periodic_tag | ( | bool | create_if_missing = true | ) |
Return the tag marking whether box is periodic in i and j.
create_if_missing | If the tag does not yet exist, create it |
Definition at line 364 of file ScdInterface.cpp.
References boxPeriodicTag, ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_get_name().
Referenced by create_box_set().
Tag moab::ScdInterface::box_set_tag | ( | bool | create_if_missing = true | ) |
Return the tag marking the ScdBox for a set.
create_if_missing | If the tag does not yet exist, create it |
Definition at line 431 of file ScdInterface.cpp.
References boxSetTag, ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_OPAQUE, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_get_name().
Referenced by create_scd_sequence(), get_scd_box(), moab::ScdBox::~ScdBox(), and ~ScdInterface().
|
inlinestatic |
Compute a partition of structured parameter space.
Compute a partition of structured parameter space, based on data in the ScdParData passed in. Results are passed back in arguments, which application can set back into par_data argument if they so desire.
np | Number of processors |
nr | Rank of this processor |
par_data | ScdParData object that contains input global parameter space, desired partitioning method, and information about global periodicity. |
ldims | Local parameters for grid |
lperiodic | Whether or not a given dimension is locally periodic |
pdims | Number of procs in i, j, k directions |
Definition at line 849 of file ScdInterface.hpp.
References moab::ScdParData::ALLJKBAL, moab::ScdParData::ALLJORKORI, compute_partition_alljkbal(), compute_partition_alljorkori(), compute_partition_sqij(), compute_partition_sqijk(), compute_partition_sqjk(), ErrorCode, moab::ScdParData::gDims, moab::ScdParData::gPeriodic, MB_SUCCESS, nr, moab::ScdParData::partMethod, moab::ScdParData::SQIJ, moab::ScdParData::SQIJK, and moab::ScdParData::SQJK.
Referenced by construct_box(), moab::NCHelperDomain::init_mesh_vals(), moab::NCHelperEuler::init_mesh_vals(), and moab::NCHelperFV::init_mesh_vals().
|
inlinestaticprivate |
Compute a partition of structured parameter space.
Partitions the structured parametric space by partitioning j, and possibly k, seeking square regions of jk space For description of arguments, see ScdInterface::compute_partition.
Definition at line 983 of file ScdInterface.hpp.
References MB_SUCCESS, and nr.
Referenced by compute_partition(), and get_neighbor_alljkbal().
|
inlinestaticprivate |
Compute a partition of structured parameter space.
Partitions the structured parametric space by partitioning j, k, or i only. If j is greater than #procs, partition that, else k, else i. For description of arguments, see ScdInterface::compute_partition.
Definition at line 883 of file ScdInterface.hpp.
References MB_SUCCESS, and nr.
Referenced by compute_partition(), and get_neighbor_alljorkori().
|
inlinestaticprivate |
Compute a partition of structured parameter space.
Partitions the structured parametric space by seeking square ij partitions For description of arguments, see ScdInterface::compute_partition.
Definition at line 1073 of file ScdInterface.hpp.
References MB_SUCCESS, and nr.
Referenced by compute_partition(), and get_neighbor_sqij().
|
inlinestaticprivate |
Compute a partition of structured parameter space.
Partitions the structured parametric space by seeking square ijk partitions For description of arguments, see ScdInterface::compute_partition.
Definition at line 1261 of file ScdInterface.hpp.
References MB_SUCCESS, and nr.
Referenced by compute_partition(), and get_neighbor_sqijk().
|
inlinestaticprivate |
Compute a partition of structured parameter space.
Partitions the structured parametric space by seeking square jk partitions For description of arguments, see ScdInterface::compute_partition.
Definition at line 1174 of file ScdInterface.hpp.
References MB_SUCCESS, and nr.
Referenced by compute_partition(), and get_neighbor_sqjk().
ErrorCode moab::ScdInterface::construct_box | ( | HomCoord | low, |
HomCoord | high, | ||
const double *const | coords, | ||
unsigned int | num_coords, | ||
ScdBox *& | new_box, | ||
int *const | lperiodic = NULL , |
||
ScdParData *const | par_data = NULL , |
||
bool | assign_global_ids = false , |
||
int | resolve_shared_ents = -1 |
||
) |
Construct new structured mesh box, including both vertices and elements.
Parameter range for vertex box is [low-high], for elements is [low-high). Construct quads by passing in low[2] == high[2], and edges by passing in low[1] == high[1] and low[2] == high[2]. The result is passed back in a ScdBox*, which is a reference to the box of structured mesh. That is, the actual mesh is retained in MOAB when the ScdBox is destroyed. To actually destroy the mesh, call the destroy_mesh function on the ScdBox object first, before destroying it.
low | Lower corner in parameter space |
high | Higher corner in parameter space |
coords | Coordinates of vertices, interleaved (xyzxyz...); if NULL, coords are set to parametric values |
num_coords | Number of coordinate values |
new_box | Reference to box of structured mesh |
lperiodic[3] | If lperiodic[s] != 0, direction s is locally periodic |
par_data | If non-NULL, this will get stored on the ScdBox once created, contains info about global parallel nature of ScdBox across procs |
assign_global_ids | If true, assigns 1-based global ids to vertices using GLOBAL_ID_TAG_NAME |
resolve_shared_ents | If != -1, resolves shared entities up to and including dimension equal to value |
Definition at line 112 of file ScdInterface.cpp.
References moab::Interface::add_entities(), moab::ScdBox::add_vbox(), assign_global_ids(), moab::ScdBox::box_set(), moab::ScdBox::box_size(), compute_partition(), create_scd_sequence(), moab::SequenceManager::create_scd_sequence(), moab::ScdBox::elem_seq(), ErrorCode, ERRORR, moab::ScdBox::get_coordinate_arrays(), moab::ParallelComm::get_debug_verbosity(), moab::ParallelComm::get_pcomm(), MB_SUCCESS, MBEDGE, MBHEX, mbImpl, MBQUAD, MBVERTEX, moab::ScdParData::NOPART, moab::ScdBox::num_elements(), moab::ScdBox::par_data(), moab::ScdParData::partMethod, moab::ScdParData::pComm, moab::ScdParData::pDims, moab::ParallelComm::rank(), moab::Core::sequence_manager(), moab::HomCoord::set(), moab::ParallelComm::size(), moab::ScdBox::start_element(), and tag_shared_vertices().
Referenced by moab::ScdNCHelper::create_mesh(), and main().
|
private |
Create an entity set for a box, and tag with the parameters.
low | Lower corner parameters for this box |
high | Upper corner parameters for this box |
scd_set | Entity set created |
is_periodic[3] | If is_periodic[s] is non-zero, mesh should be periodic in direction s (s=[0,1,2]) |
Definition at line 337 of file ScdInterface.cpp.
References box_dims_tag(), box_periodic_tag(), moab::Interface::create_meshset(), ErrorCode, MB_SUCCESS, mbImpl, MESHSET_SET, and moab::Interface::tag_set_data().
Referenced by create_scd_sequence().
ErrorCode moab::ScdInterface::create_scd_sequence | ( | const HomCoord & | low, |
const HomCoord & | high, | ||
EntityType | type, | ||
int | starting_id, | ||
ScdBox *& | new_box, | ||
int * | is_periodic = NULL |
||
) |
Create a structured sequence of vertices, quads, or hexes.
Starting handle for the sequence is available from the returned ScdBox. If creating a structured quad or hex box, subsequent calls must be made to ScdBox::add_vbox, until all the vertices have been filled in for the box.
low | Lower corner of structured box |
high | Higher corner of structured box |
type | EntityType, one of MBVERTEX, MBEDGE, MBQUAD, MBHEX |
starting_id | Requested start id of entities |
new_box | Reference to the newly created box of entities |
is_periodic[3] | If is_periodic[s] is non-zero, mesh should be periodic in direction s (s=[0,1,2]) |
Definition at line 284 of file ScdInterface.cpp.
References moab::Interface::add_entities(), box_set_tag(), create_box_set(), moab::SequenceManager::create_scd_sequence(), ErrorCode, moab::Range::insert(), MB_SUCCESS, MB_TYPE_OUT_OF_RANGE, MBEDGE, MBHEX, mbImpl, MBQUAD, MBVERTEX, moab::ScdBox::num_elements(), moab::ScdBox::num_vertices(), ScdBox, moab::Core::sequence_manager(), and moab::Interface::tag_set_data().
Referenced by construct_box().
Return all the structured mesh blocks in this MOAB instance, as entity set handles.
Return the structured blocks in this MOAB instance. If these were not searched for at instantiation time, then the search is done now.
boxes | Range of entity set objects representing structured mesh blocks |
Definition at line 75 of file ScdInterface.cpp.
References box_dims_tag(), boxDimsTag, boxSetTag, moab::dum, moab::Range::empty(), ErrorCode, moab::Interface::get_entities_by_type_and_tag(), moab::Range::insert(), MB_SUCCESS, MBENTITYSET, mbImpl, scdBoxes, searchedBoxes, moab::Range::size(), moab::Interface::tag_get_data(), and moab::Interface::UNION.
Return all the structured mesh blocks in this MOAB instance, as ScdBox objects.
Return the structured blocks in this MOAB instance. If these were not searched for at instantiation time, then the search is done now.
boxes | Vector of ScdBox objects representing structured mesh blocks |
Definition at line 57 of file ScdInterface.cpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, get_scd_box(), and MB_SUCCESS.
Referenced by moab::HalfFacetRep::check_mixed_entity_type(), moab::Skinner::find_skin_scd(), and ScdInterface().
Return all the structured mesh blocks known by ScdInterface (does not search)
Return the structured blocks in this ScdInterface instance. Does not search for new boxes, just returns the contents of the list.
boxes | Structured boxes |
Definition at line 468 of file ScdInterface.cpp.
References MB_SUCCESS, and scdBoxes.
|
inlinestaticprivate |
Definition at line 1371 of file ScdInterface.hpp.
References gtol(), and MB_SUCCESS.
Referenced by get_shared_vertices().
|
inlinestatic |
Get information about the neighbor in the dijk[] direction, where dijk can be -1 or 1 for all 3 params.
Get information about the neighbor in the dijk[] direction, where dijk can be -1 or 1 for all 3 params
np | (in) Total # procs |
nr | Processor from which neighbor is requested |
spd | (in) ScdParData containing part method, gdims, gperiodic data |
dijk(*) | (in) Direction being queried, = +/-1 or 0 |
pto | (out) Processor holding the destination part |
rdims(6) | (out) Parametric min/max of destination part |
facedims(6) | (out) Parametric min/max of interface between pfrom and pto; if at the max in a periodic direction, set to global min of that direction |
across_bdy(3) | (out) If across_bdy[i] is -1(1), interface with pto is across periodic lower(upper) bdy in parameter i, 0 otherwise |
Definition at line 1410 of file ScdInterface.hpp.
References moab::ScdParData::ALLJKBAL, moab::ScdParData::ALLJORKORI, moab::ScdParData::gDims, get_neighbor_alljkbal(), get_neighbor_alljorkori(), get_neighbor_sqij(), get_neighbor_sqijk(), get_neighbor_sqjk(), moab::ScdParData::gPeriodic, MB_SUCCESS, moab::ScdParData::partMethod, moab::ScdParData::SQIJ, moab::ScdParData::SQIJK, and moab::ScdParData::SQJK.
Referenced by get_shared_vertices().
|
staticprivate |
Definition at line 861 of file ScdInterface.cpp.
References compute_partition_alljkbal(), ErrorCode, and MB_SUCCESS.
Referenced by get_neighbor().
|
staticprivate |
Definition at line 1341 of file ScdInterface.cpp.
References compute_partition_alljorkori(), ErrorCode, and MB_SUCCESS.
Referenced by get_neighbor().
|
staticprivate |
Definition at line 977 of file ScdInterface.cpp.
References compute_partition_sqij(), ErrorCode, and MB_SUCCESS.
Referenced by get_neighbor().
|
staticprivate |
Definition at line 1240 of file ScdInterface.cpp.
References compute_partition_sqijk(), ErrorCode, and MB_SUCCESS.
Referenced by get_neighbor().
|
staticprivate |
Definition at line 1122 of file ScdInterface.cpp.
References compute_partition_sqjk(), ErrorCode, and MB_SUCCESS.
Referenced by get_neighbor().
ScdBox * moab::ScdInterface::get_scd_box | ( | EntityHandle | eh | ) |
Return the ScdBox corresponding to the entity set passed in.
If the entity isn't a structured box set, NULL is returned.
eh | Entity whose box is being queried |
Definition at line 103 of file ScdInterface.cpp.
References box_set_tag(), mbImpl, and moab::Interface::tag_get_data().
Referenced by find_boxes(), and tag_shared_vertices().
|
staticprivate |
Get vertices shared with other processors.
get shared vertices for alljorkori partition scheme
Shared vertices returned as indices into each proc's handle space
box | Box used to get parametric space info |
procs | Procs this proc shares vertices with |
offsets | Offsets into indices list for each proc |
shared_indices | local/remote indices of shared vertices |
Definition at line 1442 of file ScdInterface.cpp.
References moab::ScdBox::box_dims(), ErrorCode, get_indices(), get_neighbor(), MB_SUCCESS, moab::ScdBox::par_data(), moab::ParallelComm::proc_config(), moab::ProcConfig::proc_rank(), and moab::ProcConfig::proc_size().
Referenced by tag_shared_vertices().
Tag moab::ScdInterface::global_box_dims_tag | ( | bool | create_if_missing = true | ) |
Return the tag marking the global lower and upper corners of boxes.
create_if_missing | If the tag does not yet exist, create it |
Definition at line 397 of file ScdInterface.cpp.
References ErrorCode, globalBoxDimsTag, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, moab::Interface::tag_get_handle(), and moab::Interface::tag_get_name().
|
inlinestaticprivate |
Interface * moab::ScdInterface::impl | ( | ) | const |
Return the MOAB Interface instance *.
Definition at line 52 of file ScdInterface.cpp.
References mbImpl.
Referenced by moab::ScdBox::get_adj_edge_or_face(), and moab::ScdBox::get_params().
Tag moab::ScdInterface::part_method_tag | ( | bool | create_if_missing = true | ) |
Return the tag marking the partitioning method used to partition the box in parallel.
create_if_missing | If the tag does not yet exist, create it |
Definition at line 414 of file ScdInterface.cpp.
References ErrorCode, MB_SUCCESS, MB_TAG_CREAT, MB_TAG_NOT_FOUND, MB_TAG_SPARSE, MB_TYPE_INTEGER, mbImpl, partMethodTag, moab::Interface::tag_get_handle(), and moab::Interface::tag_get_name().
Referenced by moab::NCHelper::create_conventional_tags().
Remove the box from the list on ScdInterface.
Definition at line 449 of file ScdInterface.cpp.
References MB_SUCCESS, and scdBoxes.
Referenced by moab::ScdBox::~ScdBox().
|
inline |
Tag vertices with sharing data for parallel representations.
Given the ParallelComm object to use, tag the vertices shared with other processors
Definition at line 1447 of file ScdInterface.hpp.
References moab::Range::begin(), moab::Range::end(), ErrorCode, moab::Interface::get_entities_by_type(), get_scd_box(), MB_SUCCESS, MBENTITYSET, and mbImpl.
Referenced by construct_box(), moab::ParallelComm::resolve_shared_ents(), and tag_shared_vertices().
ErrorCode moab::ScdInterface::tag_shared_vertices | ( | ParallelComm * | pcomm, |
ScdBox * | box | ||
) |
Tag vertices with sharing data for parallel representations.
Given the ParallelComm object to use, tag the vertices shared with other processors
Definition at line 733 of file ScdInterface.cpp.
References moab::ScdBox::box_dimension(), moab::ScdBox::box_set(), moab::ParallelComm::check_all_shared_handles(), moab::ParallelComm::create_interface_sets(), moab::dum, moab::TupleList::enableWriteAccess(), ErrorCode, moab::ScdParData::gDims, moab::ParallelComm::get_buffers(), moab::ParallelComm::get_debug_verbosity(), moab::Interface::get_entities_by_dimension(), get_shared_vertices(), moab::TupleList::inc_n(), moab::TupleList::initialize(), moab::Range::insert(), moab::ParallelComm::list_entities(), MB_SET_ERR, MB_SUCCESS, mbImpl, moab::ScdBox::num_elements(), moab::ScdBox::par_data(), moab::ParallelComm::partition_sets(), moab::ScdParData::partMethod, moab::ProcConfig::proc_comm(), moab::ParallelComm::proc_config(), moab::TupleList::buffer::reset(), moab::Range::size(), moab::TupleList::sort(), moab::ScdBox::start_element(), moab::ScdBox::start_vertex(), tag_shared_vertices(), moab::ParallelComm::tag_shared_verts(), moab::TupleList::vi_wr, and moab::TupleList::vul_wr.
|
friend |
Definition at line 154 of file ScdInterface.hpp.
Referenced by create_scd_sequence().
|
private |
tag representing box lower and upper corners
Definition at line 494 of file ScdInterface.hpp.
Referenced by box_dims_tag(), find_boxes(), and moab::ScdBox::ScdBox().
|
private |
tag representing whether box is periodic in i and j
Definition at line 491 of file ScdInterface.hpp.
Referenced by box_periodic_tag(), and moab::ScdBox::ScdBox().
|
private |
tag pointing from set to ScdBox
Definition at line 503 of file ScdInterface.hpp.
Referenced by box_set_tag(), and find_boxes().
|
private |
tag representing global lower and upper corners
Definition at line 497 of file ScdInterface.hpp.
Referenced by global_box_dims_tag().
|
private |
interface instance
Definition at line 482 of file ScdInterface.hpp.
Referenced by assign_global_ids(), moab::ScdBox::box_dimension(), box_dims_tag(), box_periodic_tag(), box_set_tag(), construct_box(), create_box_set(), create_scd_sequence(), find_boxes(), get_scd_box(), global_box_dims_tag(), impl(), part_method_tag(), moab::ScdBox::ScdBox(), tag_shared_vertices(), moab::ScdBox::~ScdBox(), and ~ScdInterface().
|
private |
tag representing partition method
Definition at line 500 of file ScdInterface.hpp.
Referenced by part_method_tag().
|
private |
structured mesh blocks; stored as ScdBox objects, can get sets from those
Definition at line 488 of file ScdInterface.hpp.
Referenced by add_box(), find_boxes(), get_boxes(), remove_box(), ScdInterface(), and ~ScdInterface().
|
private |
whether we've searched the database for boxes yet
Definition at line 485 of file ScdInterface.hpp.
Referenced by find_boxes().