32#include <gtest/gtest.h>
37#include <unordered_map>
41#if defined(_WIN32) && !defined(__MINGW32__)
43#define strcasecmp _stricmp
44#define strncasecmp _strnicmp
55#define ThrowRequireWithMsg(expr, message) \
58 std::ostringstream internal_throw_require_oss; \
59 internal_throw_require_oss << message; \
60 throw std::logic_error(internal_throw_require_oss.str()); \
55#define ThrowRequireWithMsg(expr, message) \ …
66using EntityId = int64_t;
83 using NeighborVector = std::vector<std::pair<int, SideAdjacencyGraph::IndexType>>;
102 fullNeighborVector.reserve(simpleNeighborVector.size());
104 for (
unsigned i = 0; i < simpleNeighborVector.size(); i++) {
105 fullNeighborVector.push_back(std::make_pair(
static_cast<int>(i), simpleNeighborVector[i]));
107 return fullNeighborVector;
115 if (lhs.first < rhs.first)
117 else if (lhs.first == rhs.first && lhs.second < rhs.second)
158 if (assembly !=
nullptr) {
172 "Non-assembly member: " << ge->
name()
173 <<
" in ASSEMBLY rank assembly: "
174 << assembly->
name());
226 std::string type = result.first;
227 std::string filename = result.second;
229 EXPECT_EQ(
"textmesh", type);
239 std::string header =
"textmesh:";
240 std::string meshDesc = header + textMeshDesc;
244 std::string
get_mesh_desc(
const std::string &textMeshDesc,
unsigned dimension)
246 std::stringstream dim;
247 dim <<
"|dimension:" << dimension;
249 std::string meshDesc =
get_mesh_desc(textMeshDesc) + dim.str();
244 std::string
get_mesh_desc(
const std::string &textMeshDesc,
unsigned dimension) {
…}
265 EXPECT_EQ(goldCount, count);
281 size_t count =
m_region->get_sidesets().size();
282 EXPECT_EQ(goldCount, count);
286 const std::vector<std::string> &subsetNames)
288 EXPECT_TRUE(
nullptr != sideset);
291 if (subsetNames.empty()) {
298 for (std::string subsetName : subsetNames) {
299 std::transform(subsetName.begin(), subsetName.end(), subsetName.begin(), ::toupper);
301 EXPECT_TRUE(
nullptr != sideBlock);
313 const std::vector<std::string> &subsets,
319 EXPECT_TRUE(
nullptr != sideset);
322 std::sort(elemSidePairs.begin(), elemSidePairs.end(),
SideEntryLess());
324 for (
const SideEntry &sideEntry : goldElemSidePairs) {
326 int side = sideEntry.second;
331 EXPECT_TRUE(side > 0);
334 EXPECT_TRUE(std::binary_search(elemSidePairs.begin(), elemSidePairs.end(), sideEntry,
342 size_t count =
m_region->get_nodesets().size();
343 EXPECT_EQ(goldCount, count);
350 EXPECT_TRUE(
nullptr != nodeset);
354 std::sort(nodeIds.begin(), nodeIds.end());
357 EXPECT_TRUE(std::binary_search(nodeIds.begin(), nodeIds.end(), node));
364 size_t count =
m_region->get_assemblies().size();
365 EXPECT_EQ(goldCount, count);
369 const std::vector<std::string> &goldMembers)
372 EXPECT_TRUE(
nullptr != assembly);
377 EXPECT_EQ(goldMembers.size(), leafMembers.size());
379 for (
size_t i = 0; i < goldMembers.size(); i++) {
380 const std::string &goldMember = goldMembers[i];
381 const std::string &leafMember = leafMembers[i];
382 EXPECT_EQ(0, strcasecmp(goldMember.c_str(), leafMember.c_str()))
383 <<
"Comparison failure for " << name <<
": " << goldMember <<
" <-> " << leafMember;
389 for (
const PartInfo &gold : golds) {
404 EXPECT_EQ(
id, gold.second);
414 const std::vector<double> &goldCoordinates)
453 std::vector<INT> entityProc;
458 for (
size_t i = 0; i < numSharings; ++i) {
459 int iossSharingProc = entityProc[i * 2 + 1];
461 if (iossSharingProc == sharingProc) {
469 template <
typename INT>
474 std::vector<INT> ids;
479 elemIds.push_back(
static_cast<EntityId>(
id));
495 template <
typename INT>
500 std::vector<INT> ids;
505 nodeIds.push_back(
static_cast<EntityId>(
id));
521 template <
typename INT>
527 std::vector<INT> elemSideVec;
528 sb->get_field_data(
"element_side", elemSideVec);
530 for (
unsigned i = 0; i < sb->entity_count(); i++) {
531 EntityId elem = elemSideVec[2 * i + 0];
532 int side = elemSideVec[2 * i + 1];
533 elemSides.push_back({elem, side});
550 template <
typename INT>
557 std::vector<INT> connectivity;
558 std::vector<INT> elemIds;
565 size_t elementCount = elemIds.size();
568 for (
size_t i = 0; i < elementCount; ++i) {
569 INT *conn = &connectivity[i * nodesPerElem];
570 auto id =
static_cast<EntityId>(elemIds[i]);
573 for (
int j = 0; j < nodesPerElem; j++) {
574 elemConn.push_back(conn[j]);
599 "Element with id " << elemId <<
" exists in more than one block!");
626 std::vector<INT> elemIds;
627 block->get_field_data(
"ids", elemIds);
628 count += elemIds.size();
644 template <
typename INT>
652 std::vector<INT> entityProc;
655 for (
size_t i = 0; i < numSharings; ++i) {
656 EntityId iossNodeId = entityProc[i * 2];
657 int iossSharingProc = entityProc[i * 2 + 1];
659 if (iossNodeId == nodeId && iossSharingProc == sharingProc) {
679 bool validTopology = info.
topology !=
nullptr &&
681 bool validConnectivitySize = info.
connectivity.size() != 0;
686 return validConnectivitySize && validNumNodes;
697 if (strcasecmp(block->name().c_str(), blockName.c_str()) == 0) {
713 if (strcasecmp(ns->name().c_str(), name.c_str()) == 0) {
729 if (strcasecmp(ss->name().c_str(), name.c_str()) == 0) {
745 if (strcasecmp(ass->name().c_str(), name.c_str()) == 0) {
756 const std::set<EntityId> &goldIds)
760 ASSERT_EQ(goldIds.size(), elemIds.size());
762 EXPECT_EQ(1u, goldIds.count(elemId));
780 std::string meshFileName = fileName;
786 EXPECT_EQ(
m_database->get_format(),
"TextMesh");
795 size_t pos = filename.find(
"%P");
796 if (pos != std::string::npos) {
799 std::string tmp(filename, 0, pos);
800 tmp += std::to_string(num_proc);
801 tmp += filename.substr(pos + 2);
806 std::pair<std::string, std::string>
810 std::string filename;
812 size_t colon = meshDesc.find(
':');
813 if (colon != std::string::npos && colon > 0) {
814 type = meshDesc.substr(0, colon);
815 filename = meshDesc.substr(colon + 1);
822 return std::make_pair(type, filename);
829 const std::vector<double> &coords)
838 for (
size_t nodeIndex = 0; nodeIndex <
goldNodeIds.size(); nodeIndex++) {
850 template <
typename T>
852 std::vector<T> &io_field_data)
854 size_t io_entity_count = 0;
859 return io_entity_count;
867 assert(node_blocks.size() == 1);
871 std::vector<INT> ids;
876 nodeIds.push_back(
static_cast<EntityId>(
id));
895 auto iter = std::find(ids.begin(), ids.end(), INT(nodeId));
896 return iter != ids.end();
916 const std::vector<double> &coordinates)
918 std::vector<double>::const_iterator coordIter = coordinates.begin();
919 for (
const EntityId &nodeId : nodeIds) {
927 std::vector<double> iossCoordinates;
930 assert(node_blocks.size() == 1);
938 size_t numIossNodes =
942 "Invalid coordinate data size");
955 return Data((*
this)[nodeId]);
959 const double *nodalCoords)
962 EXPECT_NEAR(goldCoords[i], nodalCoords[i], 1.0e-9) <<
error_message(nodeId, i);
968 std::stringstream message;
969 message <<
"Proc " <<
region.get_database()->util().parallel_rank() <<
", Node ID "
970 << nodeId <<
", coord index " << coordIndex;
971 return message.str();
1027 return elemData.
proc;
1034 for (
const EntityId &nodeId : elemData.
nodeIds) {
1035 const std::set<int> &procsForNode =
m_data.procs_for_node(nodeId);
1036 if (procsForNode.count(proc) > 0) {
1075 const std::vector<std::string> &selectedBlocks = {},
1079 m_data = parser.
parse(meshDesc);
1080 m_graph = std::make_shared<TextMeshGraph>(m_data);
1081 m_graph->create_graph(selectedBlocks, proc);
1086 EXPECT_EQ(
m_graph->size(), goldNeighbors.size());
1087 for (
size_t i = 0; i < goldNeighbors.size(); ++i) {
1088 const auto &graphNeighborIndices = (*m_graph)[goldNeighbors[i].elemIndex];
1089 const auto &goldNeighborIndices = goldNeighbors[i].neighborIndices;
1091 unsigned numActualGoldConnections = 0;
1092 for (
const auto &entry : goldNeighborIndices) {
1093 if (entry.second >= 0) {
1094 numActualGoldConnections++;
1098 EXPECT_EQ(numActualGoldConnections, graphNeighborIndices.connections.size());
1100 for (
const auto &entry : goldNeighborIndices) {
1101 int side = entry.first + 1;
1104 if (neighborElemIndex >= 0) {
1105 EXPECT_LT(0, graphNeighborIndices.sideReference[side - 1]);
1106 EXPECT_TRUE(graphNeighborIndices.has_any_connection(side, neighborElemIndex));
1109 EXPECT_EQ(0, graphNeighborIndices.sideReference[side - 1]);
1110 EXPECT_FALSE(graphNeighborIndices.has_any_connection(side));
MPI_Comm Ioss_MPI_Comm
Definition Ioss_CodeTypes.h:61
IOSS_NODISCARD constexpr T * Data(std::vector< T > &vec)
Definition Ioss_Utils.h:58
Iotm::text_mesh::TextMeshParser< EntityId, TopologyMapping > TextMeshParser
Definition UnitTestIotmTextMeshFixture.h:74
Iotm::text_mesh::SideAdjacencyGraph< EntityId, Topology > SideAdjacencyGraph
Definition UnitTestIotmTextMeshFixture.h:75
Iotm::text_mesh::Coordinates< EntityId > Coordinates
Definition UnitTestIotmTextMeshFixture.h:73
Iotm::text_mesh::SideBlockInfo SideBlockInfo
Definition UnitTestIotmTextMeshFixture.h:76
std::set< EntityId > EntityIdSet
Definition UnitTestIotmTextMeshFixture.h:68
#define ThrowRequireWithMsg(expr, message)
Definition UnitTestIotmTextMeshFixture.h:55
Iotm::text_mesh::SplitType SplitType
Definition UnitTestIotmTextMeshFixture.h:79
Iotm::TopologyMapEntry Topology
Definition UnitTestIotmTextMeshFixture.h:64
Iotm::IossTopologyMapping TopologyMapping
Definition UnitTestIotmTextMeshFixture.h:65
Iotm::text_mesh::ElementData< EntityId, Topology > ElementData
Definition UnitTestIotmTextMeshFixture.h:70
Iotm::text_mesh::SidesetData< EntityId, Topology > SidesetData
Definition UnitTestIotmTextMeshFixture.h:71
std::vector< EntityId > EntityIdVector
Definition UnitTestIotmTextMeshFixture.h:67
Iotm::text_mesh::NodesetData< EntityId > NodesetData
Definition UnitTestIotmTextMeshFixture.h:72
std::pair< EntityId, int > SideEntry
Definition UnitTestIotmTextMeshFixture.h:77
std::vector< SideEntry > SideVector
Definition UnitTestIotmTextMeshFixture.h:78
Iotm::text_mesh::TextMeshData< EntityId, Topology > TextMeshData
Definition UnitTestIotmTextMeshFixture.h:69
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
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 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:250
IOSS_NODISCARD Field get_field(const std::string &field_name) const
Get a field from the entity's field manager.
Definition Ioss_GroupingEntity.h:454
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:443
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:465
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:203
static IOSS_NODISCARD Ioss_MPI_Comm comm_world()
Definition Ioss_ParallelUtils.h:40
IOSS_NODISCARD int parallel_rank() const
Definition Ioss_ParallelUtils.C:216
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
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
Definition Iotm_TextMeshTopologyMapping.h:33
Definition Iotm_TextMeshDataTypes.h:213
Definition Iotm_TextMeshAdjacencyGraph.h:92
int64_t IndexType
Definition Iotm_TextMeshAdjacencyGraph.h:94
static constexpr int ANY_PROC
Definition Iotm_TextMeshAdjacencyGraph.h:96
SideAdjacencyGraph()
Definition Iotm_TextMeshAdjacencyGraph.h:205
Definition Iotm_TextMeshUtils.h:565
TextMeshData< EntityId, Topology > parse(const std::string &meshDescription)
Definition Iotm_TextMeshUtils.h:578
Definition UnitTestIotmTextMeshFixture.h:128
std::vector< std::string > get_unique_leaf_members(const std::string &name)
Definition UnitTestIotmTextMeshFixture.h:136
AssemblyTreeGraph()=delete
void traverse_tree(const Ioss::Assembly *assembly)
Definition UnitTestIotmTextMeshFixture.h:155
AssemblyTreeGraph(const AssemblyTreeGraph &)=delete
AssemblyTreeGraph(Ioss::Region *region)
Definition UnitTestIotmTextMeshFixture.h:133
std::unordered_map< const Ioss::Assembly *, bool > m_visitedAssemblies
Definition UnitTestIotmTextMeshFixture.h:183
std::vector< std::string > m_leafMembers
Definition UnitTestIotmTextMeshFixture.h:184
Ioss::Region * m_region
Definition UnitTestIotmTextMeshFixture.h:182
Definition UnitTestIotmTextMeshFixture.h:826
const Ioss::Region & region
Definition UnitTestIotmTextMeshFixture.h:974
const double * get_nodal_coordinates(const EntityId &nodeId) const
Definition UnitTestIotmTextMeshFixture.h:953
void verify()
Definition UnitTestIotmTextMeshFixture.h:836
const std::vector< double > & operator[](const EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:947
std::unordered_map< EntityId, std::vector< double > > m_nodalCoords
Definition UnitTestIotmTextMeshFixture.h:980
void fill_coordinates_from_ioss()
Definition UnitTestIotmTextMeshFixture.h:925
void fill_coordinate_map(const EntityIdVector &nodeIds, const std::vector< double > &coordinates)
Definition UnitTestIotmTextMeshFixture.h:915
CoordinateVerifier(const Ioss::Region &r, const EntityIdVector &ids, const std::vector< double > &coords)
Definition UnitTestIotmTextMeshFixture.h:828
std::string error_message(const EntityId &nodeId, unsigned coordIndex)
Definition UnitTestIotmTextMeshFixture.h:966
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:851
const unsigned spatialDim
Definition UnitTestIotmTextMeshFixture.h:976
void verify_num_nodes()
Definition UnitTestIotmTextMeshFixture.h:909
const std::vector< double > & goldCoordinates
Definition UnitTestIotmTextMeshFixture.h:979
size_t db_api_int_size() const
Definition UnitTestIotmTextMeshFixture.h:862
EntityIdVector get_node_ids_impl() const
Definition UnitTestIotmTextMeshFixture.h:864
bool is_valid_node_impl(EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:892
bool is_valid_node(EntityId nodeId) const
Definition UnitTestIotmTextMeshFixture.h:899
EntityIdVector get_node_ids() const
Definition UnitTestIotmTextMeshFixture.h:882
const EntityIdVector & goldNodeIds
Definition UnitTestIotmTextMeshFixture.h:978
void verify_nodal_coordinates(const EntityId &nodeId, const double *goldCoords, const double *nodalCoords)
Definition UnitTestIotmTextMeshFixture.h:958
Definition UnitTestIotmTextMeshFixture.h:188
SideVector get_element_side_pairs_from_sideset_impl(const Ioss::SideSet *ss) const
Definition UnitTestIotmTextMeshFixture.h:522
void verify_elements_on_block(const Ioss::ElementBlock *block, const std::set< EntityId > &goldIds)
Definition UnitTestIotmTextMeshFixture.h:755
EntityIdVector get_node_ids_from_nodeset_impl(const Ioss::NodeSet *ns) const
Definition UnitTestIotmTextMeshFixture.h:496
ElementInfo get_element_info_from_block_impl(EntityId elemId, const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:551
unsigned m_spatialDimension
Definition UnitTestIotmTextMeshFixture.h:983
EntityIdVector get_node_ids_from_nodeset(const Ioss::NodeSet *ns) const
Definition UnitTestIotmTextMeshFixture.h:511
SideVector get_element_side_pairs_from_sideset(const Ioss::SideSet *ss) const
Definition UnitTestIotmTextMeshFixture.h:540
std::pair< std::string, unsigned > PartNameId
Definition UnitTestIotmTextMeshFixture.h:190
std::string get_mesh_desc(const std::string &textMeshDesc)
Definition UnitTestIotmTextMeshFixture.h:237
void fill_mesh(const std::string &meshDesc)
Definition UnitTestIotmTextMeshFixture.h:222
Ioss::SideSet * get_sideset(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:721
std::pair< std::string, std::string > get_database_type_and_filename(const std::string &meshDesc)
Definition UnitTestIotmTextMeshFixture.h:807
size_t get_node_sharing_count(int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:436
void verify_shared_nodes(const EntityIdVector &nodeIds, int sharingProc)
Definition UnitTestIotmTextMeshFixture.h:253
void verify_num_sidesets(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:278
size_t get_element_count_impl() const
Definition UnitTestIotmTextMeshFixture.h:618
Ioss::DatabaseIO * m_database
Definition UnitTestIotmTextMeshFixture.h:985
bool node_is_shared_with_proc_impl(EntityId nodeId, int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:645
size_t get_element_count() const
Definition UnitTestIotmTextMeshFixture.h:634
void verify_num_elements(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:262
void verify_sideset_subset(const Ioss::SideSet *sideset, const unsigned id, const std::vector< std::string > &subsetNames)
Definition UnitTestIotmTextMeshFixture.h:285
Ioss::NodeSet * get_nodeset(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:705
void verify_num_nodesets(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:339
void filename_substitution(std::string &filename)
Definition UnitTestIotmTextMeshFixture.h:790
void verify_block(Ioss::ElementBlock *block)
Definition UnitTestIotmTextMeshFixture.h:753
EntityIdVector get_element_ids_from_block_impl(const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:470
void create_database(const std::string &fileName, const std::string &meshType)
Definition UnitTestIotmTextMeshFixture.h:775
bool is_valid_element(const ElementInfo &info) const
Definition UnitTestIotmTextMeshFixture.h:677
int get_parallel_size()
Definition UnitTestIotmTextMeshFixture.h:218
IossTopologyMapping m_topologyMapping
Definition UnitTestIotmTextMeshFixture.h:987
TextMeshFixture(unsigned spatialDimension)
Definition UnitTestIotmTextMeshFixture.h:210
int get_parallel_rank()
Definition UnitTestIotmTextMeshFixture.h:220
void verify_single_sideset(const std::string &name, const unsigned id, const SideVector &goldElemSidePairs)
Definition UnitTestIotmTextMeshFixture.h:306
void verify_single_nodeset(const std::string &name, const unsigned id, const EntityIdVector &goldNodeIds)
Definition UnitTestIotmTextMeshFixture.h:346
~TextMeshFixture()
Definition UnitTestIotmTextMeshFixture.h:216
void verify_single_assembly(const std::string &name, const unsigned id, const std::vector< std::string > &goldMembers)
Definition UnitTestIotmTextMeshFixture.h:368
void create_ioss_region()
Definition UnitTestIotmTextMeshFixture.h:766
ElementInfo get_element_info(EntityId elemId) const
Definition UnitTestIotmTextMeshFixture.h:608
Ioss::ElementBlock * get_element_block(const std::string &blockName) const
Definition UnitTestIotmTextMeshFixture.h:689
void verify_single_element(EntityId elemId, const std::string &textMeshTopologyName, const EntityIdVector &nodeIds)
Definition UnitTestIotmTextMeshFixture.h:268
void verify_num_assemblies(size_t goldCount)
Definition UnitTestIotmTextMeshFixture.h:361
size_t get_node_sharing_count_impl(int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:446
Ioss::PropertyManager m_propertyManager
Definition UnitTestIotmTextMeshFixture.h:984
void setup_text_mesh(const std::string &textMeshDesc)
Definition UnitTestIotmTextMeshFixture.h:420
Ioss::Region * m_region
Definition UnitTestIotmTextMeshFixture.h:986
ElementInfo get_element_info_impl(EntityId elemId) const
Definition UnitTestIotmTextMeshFixture.h:584
void verify_coordinates(const EntityIdVector &goldNodeIds, const std::vector< double > &goldCoordinates)
Definition UnitTestIotmTextMeshFixture.h:413
Ioss_MPI_Comm get_comm() const
Definition UnitTestIotmTextMeshFixture.h:235
bool node_is_shared_with_proc(EntityId nodeId, int sharingProc) const
Definition UnitTestIotmTextMeshFixture.h:667
EntityIdVector get_element_ids_from_block(const Ioss::ElementBlock *block) const
Definition UnitTestIotmTextMeshFixture.h:485
Ioss::Assembly * get_assembly(const std::string &name) const
Definition UnitTestIotmTextMeshFixture.h:737
std::string get_topology_name(const std::string &textMeshTopologyName)
Definition UnitTestIotmTextMeshFixture.h:425
void verify_part_ids(const std::vector< PartNameId > &golds)
Definition UnitTestIotmTextMeshFixture.h:397
size_t db_api_int_size() const
Definition UnitTestIotmTextMeshFixture.h:430
void verify_single_sideset(const std::string &name, const unsigned id, const std::vector< std::string > &subsets, const SideVector &goldElemSidePairs)
Definition UnitTestIotmTextMeshFixture.h:312
std::string get_mesh_desc(const std::string &textMeshDesc, unsigned dimension)
Definition UnitTestIotmTextMeshFixture.h:244
void verify_part_membership(const std::vector< PartInfo > golds)
Definition UnitTestIotmTextMeshFixture.h:387
void verify_nodes_on_element(const ElementInfo &info, const EntityIdVector &goldNodeIds)
Definition UnitTestIotmTextMeshFixture.h:408
TestTextMesh1d()
Definition UnitTestIotmTextMeshFixture.h:1009
TestTextMesh2d()
Definition UnitTestIotmTextMeshFixture.h:1003
EntityId get_element_id(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1062
TextMeshGraph(const TextMeshData &data)
Definition UnitTestIotmTextMeshFixture.h:1020
int get_element_proc(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1024
bool element_has_any_node_on_proc(const size_t elemIndex, int proc) const override
Definition UnitTestIotmTextMeshFixture.h:1030
const std::vector< EntityId > & get_element_node_ids(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1050
const std::string & get_element_block_name(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1044
const Topology & get_element_topology(const size_t elemIndex) const override
Definition UnitTestIotmTextMeshFixture.h:1056
const TextMeshData & m_data
Definition UnitTestIotmTextMeshFixture.h:1069
size_t get_num_elements() const override
Definition UnitTestIotmTextMeshFixture.h:1022
TextMeshData m_data
Definition UnitTestIotmTextMeshFixture.h:1116
void verify_side_adjacency(const std::vector< Adjacency > &goldNeighbors)
Definition UnitTestIotmTextMeshFixture.h:1084
void dump_graph(std::ostream &out=std::cout)
Definition UnitTestIotmTextMeshFixture.h:1072
void setup_text_mesh_graph(const std::string &meshDesc, const std::vector< std::string > &selectedBlocks={}, int proc=SideAdjacencyGraph::ANY_PROC)
Definition UnitTestIotmTextMeshFixture.h:1074
std::shared_ptr< TextMeshGraph > m_graph
Definition UnitTestIotmTextMeshFixture.h:1117
TestTextMeshGraph()
Definition UnitTestIotmTextMeshFixture.h:1015
Definition UnitTestIotmTextMeshFixture.h:995
TestTextMesh()
Definition UnitTestIotmTextMeshFixture.h:997
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:55
Definition UnitTestIotmTextMeshFixture.h:125
A namespace for the textmesh database format.
Definition Iotm_DatabaseIO.C:95
TopologyMapEntry Topology
Definition Iotm_TextMesh.h:34
int64_t EntityId
Definition Iotm_TextMesh.h:33
TestTextMesh TestTextMeshSkin
Definition UnitTestIotmTextMeshFixture.h:1120
NeighborVector get_full_neighbor_vector(const SimpleNeighborVector &simpleNeighborVector)
Definition UnitTestIotmTextMeshFixture.h:99
std::vector< std::pair< int, SideAdjacencyGraph::IndexType > > NeighborVector
Definition UnitTestIotmTextMeshFixture.h:83
std::vector< SideAdjacencyGraph::IndexType > SimpleNeighborVector
Definition UnitTestIotmTextMeshFixture.h:84
size_t elemIndex
Definition UnitTestIotmTextMeshFixture.h:86
Adjacency(size_t elemIndex_, const NeighborVector &neighborIndices_)
Definition UnitTestIotmTextMeshFixture.h:89
NeighborVector neighborIndices
Definition UnitTestIotmTextMeshFixture.h:87
Adjacency(size_t elemIndex_, const SimpleNeighborVector &neighborIndices_)
Definition UnitTestIotmTextMeshFixture.h:94
Definition Iotm_TextMeshDataTypes.h:276
Topology topology
Definition Iotm_TextMeshDataTypes.h:279
std::string partName
Definition Iotm_TextMeshDataTypes.h:281
int proc
Definition Iotm_TextMeshDataTypes.h:277
EntityId identifier
Definition Iotm_TextMeshDataTypes.h:278
std::vector< EntityId > nodeIds
Definition Iotm_TextMeshDataTypes.h:280
Definition Iotm_TextMeshNodeset.h:40
Definition Iotm_TextMeshSidesetSplitter.h:45
Definition Iotm_TextMeshSideset.h:43
Definition Iotm_TextMeshDataTypes.h:314
Definition UnitTestIotmTextMeshFixture.h:193
EntityIdVector connectivity
Definition UnitTestIotmTextMeshFixture.h:195
const Ioss::ElementTopology * topology
Definition UnitTestIotmTextMeshFixture.h:194
ElementInfo(const Ioss::ElementTopology *topology_, const EntityIdVector &connectivity_)
Definition UnitTestIotmTextMeshFixture.h:198
ElementInfo()
Definition UnitTestIotmTextMeshFixture.h:197
Definition UnitTestIotmTextMeshFixture.h:205
EntityIdSet ids
Definition UnitTestIotmTextMeshFixture.h:207
std::string blockName
Definition UnitTestIotmTextMeshFixture.h:206
Definition UnitTestIotmTextMeshFixture.h:112
bool operator()(const SideEntry &lhs, const SideEntry &rhs) const
Definition UnitTestIotmTextMeshFixture.h:113