32#include <gtest/gtest.h>
37#include <unordered_map>
49#define ThrowRequireWithMsg(expr, message) \
52 std::ostringstream internal_throw_require_oss; \
53 internal_throw_require_oss << message; \
54 throw std::logic_error(internal_throw_require_oss.str()); \
60using EntityId = int64_t;
77 using NeighborVector = std::vector<std::pair<int, SideAdjacencyGraph::IndexType>>;
96 fullNeighborVector.reserve(simpleNeighborVector.size());
98 for (
unsigned i = 0; i < simpleNeighborVector.size(); i++) {
99 fullNeighborVector.push_back(std::make_pair(
static_cast<int>(i), simpleNeighborVector[i]));
101 return fullNeighborVector;
109 if (lhs.first < rhs.first)
111 else if (lhs.first == rhs.first && lhs.second < rhs.second)
119 namespace unit_test {
152 if (assembly !=
nullptr) {
166 "Non-assembly member: " << ge->
name()
167 <<
" in ASSEMBLY rank assembly: "
168 << assembly->
name());
220 std::string type = result.first;
221 std::string filename = result.second;
223 EXPECT_EQ(
"textmesh", type);
233 std::string header =
"textmesh:";
234 std::string meshDesc = header + textMeshDesc;
238 std::string
get_mesh_desc(
const std::string &textMeshDesc,
unsigned dimension)
240 std::stringstream dim;
241 dim <<
"|dimension:" << dimension;
243 std::string meshDesc =
get_mesh_desc(textMeshDesc) + dim.str();
259 EXPECT_EQ(goldCount, count);
276 EXPECT_EQ(goldCount, count);
280 const std::vector<std::string> &subsetNames)
282 EXPECT_TRUE(
nullptr != sideset);
285 if (subsetNames.empty()) {
292 for (std::string subsetName : subsetNames) {
293 std::transform(subsetName.begin(), subsetName.end(), subsetName.begin(), ::toupper);
295 EXPECT_TRUE(
nullptr != sideBlock);
307 const std::vector<std::string> &subsets,
313 EXPECT_TRUE(
nullptr != sideset);
316 std::sort(elemSidePairs.begin(), elemSidePairs.end(),
SideEntryLess());
318 for (
const SideEntry &sideEntry : goldElemSidePairs) {
320 int side = sideEntry.second;
325 EXPECT_TRUE(side > 0);
328 EXPECT_TRUE(std::binary_search(elemSidePairs.begin(), elemSidePairs.end(), sideEntry,
337 EXPECT_EQ(goldCount, count);
344 EXPECT_TRUE(
nullptr != nodeset);
348 std::sort(nodeIds.begin(), nodeIds.end());
351 EXPECT_TRUE(std::binary_search(nodeIds.begin(), nodeIds.end(), node));
359 EXPECT_EQ(goldCount, count);
363 const std::vector<std::string> &goldMembers)
366 EXPECT_TRUE(
nullptr != assembly);
371 EXPECT_EQ(goldMembers.size(), leafMembers.size());
373 for (
size_t i = 0; i < goldMembers.size(); i++) {
374 const std::string &goldMember = goldMembers[i];
375 const std::string &leafMember = leafMembers[i];
376 EXPECT_EQ(0, strcasecmp(goldMember.c_str(), leafMember.c_str()))
377 <<
"Comparison failure for " << name <<
": " << goldMember <<
" <-> " << leafMember;
383 for (
const PartInfo &gold : golds) {
398 EXPECT_EQ(
id, gold.second);
408 const std::vector<double> &goldCoordinates)
447 std::vector<INT> entityProc;
452 for (
size_t i = 0; i < numSharings; ++i) {
453 int iossSharingProc = entityProc[i * 2 + 1];
455 if (iossSharingProc == sharingProc) {
463 template <
typename INT>
468 std::vector<INT> ids;
473 elemIds.push_back(
static_cast<EntityId>(
id));
489 template <
typename INT>
494 std::vector<INT> ids;
499 nodeIds.push_back(
static_cast<EntityId>(
id));
515 template <
typename INT>
521 std::vector<INT> elemSideVec;
522 sb->get_field_data(
"element_side", elemSideVec);
524 for (
unsigned i = 0; i < sb->entity_count(); i++) {
525 EntityId elem = elemSideVec[2 * i + 0];
526 int side = elemSideVec[2 * i + 1];
527 elemSides.push_back({elem, side});
544 template <
typename INT>
551 std::vector<INT> connectivity;
552 std::vector<INT> elemIds;
559 size_t elementCount = elemIds.size();
562 for (
size_t i = 0; i < elementCount; ++i) {
563 INT *conn = &connectivity[i * nodesPerElem];
564 auto id =
static_cast<EntityId>(elemIds[i]);
567 for (
int j = 0; j < nodesPerElem; j++) {
568 elemConn.push_back(conn[j]);
593 "Element with id " << elemId <<
" exists in more than one block!");
620 std::vector<INT> elemIds;
621 block->get_field_data(
"ids", elemIds);
622 count += elemIds.size();
638 template <
typename INT>
646 std::vector<INT> entityProc;
649 for (
size_t i = 0; i < numSharings; ++i) {
650 EntityId iossNodeId = entityProc[i * 2];
651 int iossSharingProc = entityProc[i * 2 + 1];
653 if (iossNodeId == nodeId && iossSharingProc == sharingProc) {
673 bool validTopology = info.
topology !=
nullptr &&
675 bool validConnectivitySize = info.
connectivity.size() != 0;
680 return validConnectivitySize && validNumNodes;
691 if (strcasecmp(block->name().c_str(), blockName.c_str()) == 0) {
707 if (strcasecmp(ns->name().c_str(), name.c_str()) == 0) {
723 if (strcasecmp(ss->name().c_str(), name.c_str()) == 0) {
739 if (strcasecmp(ass->name().c_str(), name.c_str()) == 0) {
750 const std::set<EntityId> &goldIds)
754 ASSERT_EQ(goldIds.size(), elemIds.size());
756 EXPECT_EQ(1u, goldIds.count(elemId));
774 std::string meshFileName = fileName;
789 size_t pos = filename.find(
"%P");
790 if (pos != std::string::npos) {
793 std::string tmp(filename, 0, pos);
794 tmp += std::to_string(num_proc);
795 tmp += filename.substr(pos + 2);
800 std::pair<std::string, std::string>
804 std::string filename;
806 size_t colon = meshDesc.find(
':');
807 if (colon != std::string::npos && colon > 0) {
808 type = meshDesc.substr(0, colon);
809 filename = meshDesc.substr(colon + 1);
816 return std::make_pair(type, filename);
823 const std::vector<double> &coords)
832 for (
size_t nodeIndex = 0; nodeIndex <
goldNodeIds.size(); nodeIndex++) {
844 template <
typename T>
846 std::vector<T> &io_field_data)
848 size_t io_entity_count = 0;
853 return io_entity_count;
861 assert(node_blocks.size() == 1);
865 std::vector<INT> ids;
870 nodeIds.push_back(
static_cast<EntityId>(
id));
889 auto iter = std::find(ids.begin(), ids.end(), INT(nodeId));
890 return iter != ids.end();
910 const std::vector<double> &coordinates)
912 std::vector<double>::const_iterator coordIter = coordinates.begin();
913 for (
const EntityId &nodeId : nodeIds) {
921 std::vector<double> iossCoordinates;
924 assert(node_blocks.size() == 1);
932 size_t numIossNodes =
936 "Invalid coordinate data size");
949 return Data((*
this)[nodeId]);
953 const double *nodalCoords)
956 EXPECT_NEAR(goldCoords[i], nodalCoords[i], 1.0e-9) <<
error_message(nodeId, i);
962 std::stringstream message;
964 << nodeId <<
", coord index " << coordIndex;
965 return message.str();
1021 return elemData.
proc;
1028 for (
const EntityId &nodeId : elemData.
nodeIds) {
1030 if (procsForNode.count(proc) > 0) {
1066 void dump_graph(std::ostream &out = std::cout) { m_graph->dump(m_data.elementDataVec, out); }
1069 const std::vector<std::string> &selectedBlocks = {},
1073 m_data = parser.
parse(meshDesc);
1074 m_graph = std::make_shared<TextMeshGraph>(m_data);
1075 m_graph->create_graph(selectedBlocks, proc);
1080 EXPECT_EQ(m_graph->size(), goldNeighbors.size());
1081 for (
size_t i = 0; i < goldNeighbors.size(); ++i) {
1082 const auto &graphNeighborIndices = (*m_graph)[goldNeighbors[i].elemIndex];
1083 const auto &goldNeighborIndices = goldNeighbors[i].neighborIndices;
1085 unsigned numActualGoldConnections = 0;
1086 for (
const auto &entry : goldNeighborIndices) {
1087 if (entry.second >= 0) {
1088 numActualGoldConnections++;
1092 EXPECT_EQ(numActualGoldConnections, graphNeighborIndices.connections.size());
1094 for (
const auto &entry : goldNeighborIndices) {
1095 int side = entry.first + 1;
1098 if (neighborElemIndex >= 0) {
1099 EXPECT_LT(0, graphNeighborIndices.sideReference[side - 1]);
1100 EXPECT_TRUE(graphNeighborIndices.has_any_connection(side, neighborElemIndex));
1103 EXPECT_EQ(0, graphNeighborIndices.sideReference[side - 1]);
1104 EXPECT_FALSE(graphNeighborIndices.has_any_connection(side));
int Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:64
IOSS_NODISCARD constexpr T * Data(std::vector< T > &vec)
Definition Ioss_Utils.h:56
std::set< EntityId > EntityIdSet
Definition UnitTestIotmTextMeshFixture.h:62
#define ThrowRequireWithMsg(expr, message)
Definition UnitTestIotmTextMeshFixture.h:49
std::vector< EntityId > EntityIdVector
Definition UnitTestIotmTextMeshFixture.h:61
std::pair< EntityId, int > SideEntry
Definition UnitTestIotmTextMeshFixture.h:71
std::vector< SideEntry > SideVector
Definition UnitTestIotmTextMeshFixture.h:72
A homogeneous collection of other GroupingEntities.
Definition Ioss_Assembly.h:31
IOSS_NODISCARD const EntityContainer & get_members() const
Definition Ioss_Assembly.C:85
IOSS_NODISCARD EntityType get_member_type() const
Definition Ioss_Assembly.h:46
Definition Ioss_CommSet.h:27
An input or output Database.
Definition Ioss_DatabaseIO.h:63
virtual IOSS_NODISCARD std::string get_format() const =0
IOSS_NODISCARD bool ok(bool write_message=false, std::string *error_message=nullptr, int *bad_count=nullptr) const
Check to see if database state is OK.
Definition Ioss_DatabaseIO.h:84
IOSS_NODISCARD int int_byte_size_api() const
Returns 4 or 8.
Definition Ioss_DatabaseIO.C:384
IOSS_NODISCARD const Ioss::ParallelUtils & util() const
Definition Ioss_DatabaseIO.h:623
A collection of elements having the same topology.
Definition Ioss_ElementBlock.h:29
Represents an element topology.
Definition Ioss_ElementTopology.h:68
static IOSS_NODISCARD ElementTopology * factory(const std::string &type, bool ok_to_fail=false)
Definition Ioss_ElementTopology.C:67
virtual IOSS_NODISCARD int number_nodes() const =0
IOSS_NODISCARD int number_boundaries() const
Definition Ioss_ElementTopology.C:229
IOSS_NODISCARD const ElementTopology * topology() const
Get the topology of the entities in the block.
Definition Ioss_EntityBlock.h:48
Holds metadata for bulk data associated with a GroupingEntity.
Definition Ioss_Field.h:25
IOSS_NODISCARD size_t raw_count() const
Definition Ioss_Field.h:171
IOSS_NODISCARD const std::string & get_name() const
Definition Ioss_Field.h:127
Base class for all 'grouping' entities. The following derived classes are typical:
Definition Ioss_GroupingEntity.h:67
IOSS_NODISCARD DatabaseIO * get_database() const
Definition Ioss_GroupingEntity.C:95
IOSS_NODISCARD Property get_property(const std::string &property_name) const
Get the Property from the property manager associated with the entity.
Definition Ioss_GroupingEntity.h:359
int64_t get_field_data(const std::string &field_name, void *data, size_t data_size) const
Read field data from the database file into memory using a pointer.
Definition Ioss_GroupingEntity.C:254
IOSS_NODISCARD Field get_field(const std::string &field_name) const
Get a field from the entity's field manager.
Definition Ioss_GroupingEntity.h:449
IOSS_NODISCARD bool field_exists(const std::string &field_name) const
Checks if a field with a given name exists in the entity's field manager.
Definition Ioss_GroupingEntity.h:438
IOSS_NODISCARD const Field & get_fieldref(const std::string &field_name) const
Get a reference to a field from the entity's field manager.
Definition Ioss_GroupingEntity.h:460
IOSS_NODISCARD const std::string & name() const
Get name of entity.
Definition Ioss_GroupingEntity.h:100
static IOSS_NODISCARD DatabaseIO * create(const std::string &type, const std::string &filename, DatabaseUsage db_usage, Ioss_MPI_Comm communicator=Ioss::ParallelUtils::comm_world(), const Ioss::PropertyManager &properties=Ioss::PropertyManager())
Create an IO database.
Definition Ioss_IOFactory.C:71
Initialization of the Ioss library.
Definition Ionit_Initializer.h:18
A collection of all nodes in the region.
Definition Ioss_NodeBlock.h:33
A collection of nodes.
Definition Ioss_NodeSet.h:29
Definition Ioss_ParallelUtils.h:32
IOSS_NODISCARD int parallel_size() const
Definition Ioss_ParallelUtils.C:206
IOSS_NODISCARD int parallel_rank() const
Definition Ioss_ParallelUtils.C:219
static IOSS_NODISCARD constexpr Ioss_MPI_Comm comm_world()
Definition Ioss_ParallelUtils.h:48
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
IOSS_NODISCARD int64_t get_int() const
Get the property value if it is of type INTEGER.
Definition Ioss_Property.C:253
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
IOSS_NODISCARD const SideSetContainer & get_sidesets() const
Get all the region's SideSet objects.
Definition Ioss_Region.C:1638
IOSS_NODISCARD CommSet * get_commset(const std::string &my_name) const
Get the comm set with the given name.
Definition Ioss_Region.C:2315
IOSS_NODISCARD Assembly * get_assembly(const std::string &my_name) const
Get the assembly with the given name.
Definition Ioss_Region.C:2045
IOSS_NODISCARD const ElementBlockContainer & get_element_blocks() const
Get all the region's ElementBlock objects.
Definition Ioss_Region.C:1626
IOSS_NODISCARD const NodeBlockContainer & get_node_blocks() const
Get all the region's NodeBlock objects.
Definition Ioss_Region.C:1608
IOSS_NODISCARD const NodeSetContainer & get_nodesets() const
Get all the region's NodeSet objects.
Definition Ioss_Region.C:1644
IOSS_NODISCARD const AssemblyContainer & get_assemblies() const
Get all the region's Assembly objects.
Definition Ioss_Region.C:1596
A collection of element sides having the same topology.
Definition Ioss_SideBlock.h:37
A collection of element sides.
Definition Ioss_SideSet.h:29
IOSS_NODISCARD const SideBlockContainer & get_side_blocks() const
Definition Ioss_SideSet.C:84
IOSS_NODISCARD SideBlock * get_side_block(const std::string &my_name) const
Definition Ioss_SideSet.C:96
static const char * name
Definition Ioss_Unknown.h:20
Definition Iotm_TextMeshTopologyMapping.h:947
void initialize_topology_map() override
Definition Iotm_TextMeshTopologyMapping.h:952
Definition Iotm_TextMeshTopologyMapping.h:33
const std::string name() const
Definition Iotm_TextMeshTopologyMapping.h:71
Definition Iotm_TextMeshDataTypes.h:214
Definition Iotm_TextMeshAdjacencyGraph.h:86
int64_t IndexType
Definition Iotm_TextMeshAdjacencyGraph.h:88
static constexpr int ANY_PROC
Definition Iotm_TextMeshAdjacencyGraph.h:90
Definition Iotm_TextMeshUtils.h:566
TextMeshData< EntityId, Topology > parse(const std::string &meshDescription)
Definition Iotm_TextMeshUtils.h:579
Topology topology(const std::string &textMeshName) const
Definition Iotm_TextMeshDataTypes.h:45
Definition UnitTestIotmTextMeshFixture.h:122
std::vector< std::string > get_unique_leaf_members(const std::string &name)
Definition UnitTestIotmTextMeshFixture.h:130
AssemblyTreeGraph()=delete
void traverse_tree(const Ioss::Assembly *assembly)
Definition UnitTestIotmTextMeshFixture.h:149
AssemblyTreeGraph(const AssemblyTreeGraph &)=delete
AssemblyTreeGraph(Ioss::Region *region)
Definition UnitTestIotmTextMeshFixture.h:127
std::unordered_map< const Ioss::Assembly *, bool > m_visitedAssemblies
Definition UnitTestIotmTextMeshFixture.h:177
std::vector< std::string > m_leafMembers
Definition UnitTestIotmTextMeshFixture.h:178
Ioss::Region * m_region
Definition UnitTestIotmTextMeshFixture.h:176
Definition UnitTestIotmTextMeshFixture.h:820
const Ioss::Region & region
Definition UnitTestIotmTextMeshFixture.h:968
const double * get_nodal_coordinates(const EntityId &nodeId) const
Definition UnitTestIotmTextMeshFixture.h:947
void verify()
Definition UnitTestIotmTextMeshFixture.h:830
const std::vector< double > & operator[](const EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:941
std::unordered_map< EntityId, std::vector< double > > m_nodalCoords
Definition UnitTestIotmTextMeshFixture.h:974
void fill_coordinates_from_ioss()
Definition UnitTestIotmTextMeshFixture.h:919
void fill_coordinate_map(const EntityIdVector &nodeIds, const std::vector< double > &coordinates)
Definition UnitTestIotmTextMeshFixture.h:909
CoordinateVerifier(const Ioss::Region &r, const EntityIdVector &ids, const std::vector< double > &coords)
Definition UnitTestIotmTextMeshFixture.h:822
std::string error_message(const EntityId &nodeId, unsigned coordIndex)
Definition UnitTestIotmTextMeshFixture.h:960
size_t field_data_from_ioss(Ioss::GroupingEntity *io_entity, const std::string &io_fld_name, std::vector< T > &io_field_data)
Definition UnitTestIotmTextMeshFixture.h:845
const unsigned spatialDim
Definition UnitTestIotmTextMeshFixture.h:970
void verify_num_nodes()
Definition UnitTestIotmTextMeshFixture.h:903
const std::vector< double > & goldCoordinates
Definition UnitTestIotmTextMeshFixture.h:973
size_t db_api_int_size() const
Definition UnitTestIotmTextMeshFixture.h:856
EntityIdVector get_node_ids_impl() const
Definition UnitTestIotmTextMeshFixture.h:858
bool is_valid_node_impl(EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:886
bool is_valid_node(EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:893
EntityIdVector get_node_ids() const
Definition UnitTestIotmTextMeshFixture.h:876
const EntityIdVector & goldNodeIds
Definition UnitTestIotmTextMeshFixture.h:972
void verify_nodal_coordinates(const EntityId &nodeId, const double *goldCoords, const double *nodalCoords)
Definition UnitTestIotmTextMeshFixture.h:952
Definition UnitTestIotmTextMeshFixture.h:182
SideVector get_element_side_pairs_from_sideset_impl(const Ioss::SideSet *ss) const
Definition UnitTestIotmTextMeshFixture.h:516
void verify_elements_on_block(const Ioss::ElementBlock *block, const std::set< EntityId > &goldIds)
Definition UnitTestIotmTextMeshFixture.h:749
EntityIdVector get_node_ids_from_nodeset_impl(const Ioss::NodeSet *ns) const
Definition UnitTestIotmTextMeshFixture.h:490
ElementInfo get_element_info_from_block_impl(EntityId elemId, const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:545
unsigned m_spatialDimension
Definition UnitTestIotmTextMeshFixture.h:977
EntityIdVector get_node_ids_from_nodeset(const Ioss::NodeSet *ns) const
Definition UnitTestIotmTextMeshFixture.h:505
SideVector get_element_side_pairs_from_sideset(const Ioss::SideSet *ss) const
Definition UnitTestIotmTextMeshFixture.h:534
std::pair< std::string, unsigned > PartNameId
Definition UnitTestIotmTextMeshFixture.h:184
std::string get_mesh_desc(const std::string &textMeshDesc)
Definition UnitTestIotmTextMeshFixture.h:231
void fill_mesh(const std::string &meshDesc)
Definition UnitTestIotmTextMeshFixture.h:216
Ioss::SideSet * get_sideset(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:715
std::pair< std::string, std::string > get_database_type_and_filename(const std::string &meshDesc)
Definition UnitTestIotmTextMeshFixture.h:801
size_t get_node_sharing_count(int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:430
void verify_shared_nodes(const EntityIdVector &nodeIds, int sharingProc)
Definition UnitTestIotmTextMeshFixture.h:247
void verify_num_sidesets(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:272
size_t get_element_count_impl() const
Definition UnitTestIotmTextMeshFixture.h:612
Ioss::DatabaseIO * m_database
Definition UnitTestIotmTextMeshFixture.h:979
bool node_is_shared_with_proc_impl(EntityId nodeId, int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:639
size_t get_element_count() const
Definition UnitTestIotmTextMeshFixture.h:628
void verify_num_elements(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:256
void verify_sideset_subset(const Ioss::SideSet *sideset, const unsigned id, const std::vector< std::string > &subsetNames)
Definition UnitTestIotmTextMeshFixture.h:279
Ioss::NodeSet * get_nodeset(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:699
void verify_num_nodesets(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:333
void filename_substitution(std::string &filename)
Definition UnitTestIotmTextMeshFixture.h:784
void verify_block(Ioss::ElementBlock *block)
Definition UnitTestIotmTextMeshFixture.h:747
EntityIdVector get_element_ids_from_block_impl(const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:464
void create_database(const std::string &fileName, const std::string &meshType)
Definition UnitTestIotmTextMeshFixture.h:769
bool is_valid_element(const ElementInfo &info) const
Definition UnitTestIotmTextMeshFixture.h:671
int get_parallel_size()
Definition UnitTestIotmTextMeshFixture.h:212
IossTopologyMapping m_topologyMapping
Definition UnitTestIotmTextMeshFixture.h:981
TextMeshFixture(unsigned spatialDimension)
Definition UnitTestIotmTextMeshFixture.h:204
int get_parallel_rank()
Definition UnitTestIotmTextMeshFixture.h:214
void verify_single_sideset(const std::string &name, const unsigned id, const SideVector &goldElemSidePairs)
Definition UnitTestIotmTextMeshFixture.h:300
void verify_single_nodeset(const std::string &name, const unsigned id, const EntityIdVector &goldNodeIds)
Definition UnitTestIotmTextMeshFixture.h:340
~TextMeshFixture()
Definition UnitTestIotmTextMeshFixture.h:210
void verify_single_assembly(const std::string &name, const unsigned id, const std::vector< std::string > &goldMembers)
Definition UnitTestIotmTextMeshFixture.h:362
void create_ioss_region()
Definition UnitTestIotmTextMeshFixture.h:760
ElementInfo get_element_info(EntityId elemId) const
Definition UnitTestIotmTextMeshFixture.h:602
Ioss::ElementBlock * get_element_block(const std::string &blockName) const
Definition UnitTestIotmTextMeshFixture.h:683
void verify_single_element(EntityId elemId, const std::string &textMeshTopologyName, const EntityIdVector &nodeIds)
Definition UnitTestIotmTextMeshFixture.h:262
void verify_num_assemblies(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:355
size_t get_node_sharing_count_impl(int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:440
Ioss::PropertyManager m_propertyManager
Definition UnitTestIotmTextMeshFixture.h:978
void setup_text_mesh(const std::string &textMeshDesc)
Definition UnitTestIotmTextMeshFixture.h:414
Ioss::Region * m_region
Definition UnitTestIotmTextMeshFixture.h:980
ElementInfo get_element_info_impl(EntityId elemId) const
Definition UnitTestIotmTextMeshFixture.h:578
void verify_coordinates(const EntityIdVector &goldNodeIds, const std::vector< double > &goldCoordinates)
Definition UnitTestIotmTextMeshFixture.h:407
Ioss_MPI_Comm get_comm() const
Definition UnitTestIotmTextMeshFixture.h:229
bool node_is_shared_with_proc(EntityId nodeId, int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:661
EntityIdVector get_element_ids_from_block(const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:479
Ioss::Assembly * get_assembly(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:731
std::string get_topology_name(const std::string &textMeshTopologyName)
Definition UnitTestIotmTextMeshFixture.h:419
void verify_part_ids(const std::vector< PartNameId > &golds)
Definition UnitTestIotmTextMeshFixture.h:391
size_t db_api_int_size() const
Definition UnitTestIotmTextMeshFixture.h:424
void verify_single_sideset(const std::string &name, const unsigned id, const std::vector< std::string > &subsets, const SideVector &goldElemSidePairs)
Definition UnitTestIotmTextMeshFixture.h:306
std::string get_mesh_desc(const std::string &textMeshDesc, unsigned dimension)
Definition UnitTestIotmTextMeshFixture.h:238
void verify_part_membership(const std::vector< PartInfo > golds)
Definition UnitTestIotmTextMeshFixture.h:381
void verify_nodes_on_element(const ElementInfo &info, const EntityIdVector &goldNodeIds)
Definition UnitTestIotmTextMeshFixture.h:402
Definition UnitTestIotmTextMeshFixture.h:1001
TestTextMesh1d()
Definition UnitTestIotmTextMeshFixture.h:1003
Definition UnitTestIotmTextMeshFixture.h:995
TestTextMesh2d()
Definition UnitTestIotmTextMeshFixture.h:997
Definition UnitTestIotmTextMeshFixture.h:1012
EntityId get_element_id(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1056
TextMeshGraph(const TextMeshData &data)
Definition UnitTestIotmTextMeshFixture.h:1014
int get_element_proc(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1018
bool element_has_any_node_on_proc(const size_t elemIndex, int proc) const override
Definition UnitTestIotmTextMeshFixture.h:1024
const std::vector< EntityId > & get_element_node_ids(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1044
const std::string & get_element_block_name(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1038
const Topology & get_element_topology(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1050
const TextMeshData & m_data
Definition UnitTestIotmTextMeshFixture.h:1063
size_t get_num_elements() const override
Definition UnitTestIotmTextMeshFixture.h:1016
Definition UnitTestIotmTextMeshFixture.h:1007
TextMeshData m_data
Definition UnitTestIotmTextMeshFixture.h:1110
void verify_side_adjacency(const std::vector< Adjacency > &goldNeighbors)
Definition UnitTestIotmTextMeshFixture.h:1078
void dump_graph(std::ostream &out=std::cout)
Definition UnitTestIotmTextMeshFixture.h:1066
void setup_text_mesh_graph(const std::string &meshDesc, const std::vector< std::string > &selectedBlocks={}, int proc=SideAdjacencyGraph::ANY_PROC)
Definition UnitTestIotmTextMeshFixture.h:1068
std::shared_ptr< TextMeshGraph > m_graph
Definition UnitTestIotmTextMeshFixture.h:1111
TestTextMeshGraph()
Definition UnitTestIotmTextMeshFixture.h:1009
Definition UnitTestIotmTextMeshFixture.h:989
TestTextMesh()
Definition UnitTestIotmTextMeshFixture.h:991
std::vector< ElementBlock * > ElementBlockContainer
Definition Ioss_Region.h:69
DatabaseUsage
Specifies how an Ioss::DatabaseIO object will be used.
Definition Ioss_DBUsage.h:13
@ READ_MODEL
Definition Ioss_DBUsage.h:20
std::vector< NodeSet * > NodeSetContainer
Definition Ioss_Region.h:71
std::vector< SideSet * > SideSetContainer
Definition Ioss_Region.h:76
std::vector< Ioss::Assembly * > AssemblyContainer
Definition Ioss_Region.h:63
std::vector< NodeBlock * > NodeBlockContainer
Definition Ioss_Region.h:66
EntityType
The particular type of GroupingEntity.
Definition Ioss_EntityType.h:12
@ ASSEMBLY
Definition Ioss_EntityType.h:28
SplitType
Definition Iotm_TextMeshSidesetSplitter.h:49
A namespace for the textmesh database format.
Definition Iotm_DatabaseIO.C:95
int64_t EntityId
Definition Iotm_TextMesh.h:33
Definition UnitTestIotmTextMeshFixture.h:76
NeighborVector get_full_neighbor_vector(const SimpleNeighborVector &simpleNeighborVector)
Definition UnitTestIotmTextMeshFixture.h:93
std::vector< std::pair< int, SideAdjacencyGraph::IndexType > > NeighborVector
Definition UnitTestIotmTextMeshFixture.h:77
std::vector< SideAdjacencyGraph::IndexType > SimpleNeighborVector
Definition UnitTestIotmTextMeshFixture.h:78
size_t elemIndex
Definition UnitTestIotmTextMeshFixture.h:80
Adjacency(size_t elemIndex_, const NeighborVector &neighborIndices_)
Definition UnitTestIotmTextMeshFixture.h:83
NeighborVector neighborIndices
Definition UnitTestIotmTextMeshFixture.h:81
Adjacency(size_t elemIndex_, const SimpleNeighborVector &neighborIndices_)
Definition UnitTestIotmTextMeshFixture.h:88
Definition Iotm_TextMeshDataTypes.h:277
Topology topology
Definition Iotm_TextMeshDataTypes.h:280
std::string partName
Definition Iotm_TextMeshDataTypes.h:282
int proc
Definition Iotm_TextMeshDataTypes.h:278
EntityId identifier
Definition Iotm_TextMeshDataTypes.h:279
std::vector< EntityId > nodeIds
Definition Iotm_TextMeshDataTypes.h:281
Definition Iotm_TextMeshNodeset.h:41
Definition Iotm_TextMeshSidesetSplitter.h:39
Definition Iotm_TextMeshSidesetSplitter.h:64
Definition Iotm_TextMeshDataTypes.h:315
std::vector< ElementData< EntityId, Topology > > elementDataVec
Definition Iotm_TextMeshDataTypes.h:317
const std::set< int > & procs_for_node(const EntityId nodeId) const
Definition Iotm_TextMeshDataTypes.h:348
Definition UnitTestIotmTextMeshFixture.h:187
EntityIdVector connectivity
Definition UnitTestIotmTextMeshFixture.h:189
const Ioss::ElementTopology * topology
Definition UnitTestIotmTextMeshFixture.h:188
ElementInfo(const Ioss::ElementTopology *topology_, const EntityIdVector &connectivity_)
Definition UnitTestIotmTextMeshFixture.h:192
ElementInfo()
Definition UnitTestIotmTextMeshFixture.h:191
Definition UnitTestIotmTextMeshFixture.h:199
EntityIdSet ids
Definition UnitTestIotmTextMeshFixture.h:201
std::string blockName
Definition UnitTestIotmTextMeshFixture.h:200
Definition UnitTestIotmTextMeshFixture.h:106
bool operator()(const SideEntry &lhs, const SideEntry &rhs) const
Definition UnitTestIotmTextMeshFixture.h:107