| 1 |
// Copyright(C) 1999-2020 National Technology & Engineering Solutions |
| 2 |
// of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with |
| 3 |
// NTESS, the U.S. Government retains certain rights in this software. |
| 4 |
// |
| 5 |
// See packages/seacas/LICENSE for details |
| 6 |
|
| 7 |
#include <Ioss_Compare.h> |
| 8 |
#include <Ioss_CopyDatabase.h> |
| 9 |
#include <Ioss_DatabaseIO.h> |
| 10 |
#include <Ioss_ElementBlock.h> |
| 11 |
#include <Ioss_IOFactory.h> |
| 12 |
#include <Ioss_MeshCopyOptions.h> |
| 13 |
#include <Ioss_NodeBlock.h> |
| 14 |
#include <Ioss_StructuredBlock.h> |
| 15 |
#include <catalyst/Iocatalyst_CatalystManager.h> |
| 16 |
#include <catalyst/Iocatalyst_DatabaseIO.h> |
| 17 |
#include <catalyst_tests/Iocatalyst_DatabaseIOTest.h> |
| 18 |
|
| 19 |
TEST_F(Iocatalyst_DatabaseIOTest, WriteThreeElementBlocksWith24Cells) |
| 20 |
{ |
| 21 |
Iocatalyst::BlockMesh bmOne; |
| 22 |
setBlockMeshSize(2, 2, 2); |
| 23 |
addBlockMesh(bmOne); |
| 24 |
|
| 25 |
Iocatalyst::BlockMesh bmTwo; |
| 26 |
setOrigin(2, 0, 0); |
| 27 |
setBlockMeshSize(2, 2, 2); |
| 28 |
addBlockMesh(bmTwo); |
| 29 |
|
| 30 |
Iocatalyst::BlockMesh bmThree; |
| 31 |
setOrigin(4, 0, 0); |
| 32 |
setBlockMeshSize(2, 2, 2); |
| 33 |
addBlockMesh(bmThree); |
| 34 |
|
| 35 |
runUnstructuredTest("test_eb_3_cells_24"); |
| 36 |
} |
| 37 |
|
| 38 |
TEST_F(Iocatalyst_DatabaseIOTest, WriteOneElementBlockWith8Cells) |
| 39 |
{ |
| 40 |
Iocatalyst::BlockMesh bm; |
| 41 |
setBlockMeshSize(2, 2, 2); |
| 42 |
addBlockMesh(bm); |
| 43 |
runUnstructuredTest("test_eb_1_cells_8"); |
| 44 |
} |
| 45 |
|
| 46 |
TEST_F(Iocatalyst_DatabaseIOTest, WriteOneElementBlockWith300Cells) |
| 47 |
{ |
| 48 |
Iocatalyst::BlockMesh bm; |
| 49 |
setBlockMeshSize(10, 10, 3); |
| 50 |
addBlockMesh(bm); |
| 51 |
runUnstructuredTest("test_eb_1_cells_300"); |
| 52 |
} |
| 53 |
|
| 54 |
TEST_F(Iocatalyst_DatabaseIOTest, WriteThreeElementBlocksWith835Cells) |
| 55 |
{ |
| 56 |
Iocatalyst::BlockMesh bmOne; |
| 57 |
setBlockMeshSize(5, 15, 3); |
| 58 |
addBlockMesh(bmOne); |
| 59 |
|
| 60 |
Iocatalyst::BlockMesh bmTwo; |
| 61 |
setOrigin(5, 0, 0); |
| 62 |
setBlockMeshSize(8, 14, 4); |
| 63 |
addBlockMesh(bmTwo); |
| 64 |
|
| 65 |
Iocatalyst::BlockMesh bmThree; |
| 66 |
setOrigin(13, 0, 0); |
| 67 |
setBlockMeshSize(3, 6, 9); |
| 68 |
addBlockMesh(bmThree); |
| 69 |
|
| 70 |
runUnstructuredTest("test_eb_3_cells_835"); |
| 71 |
} |
| 72 |
|
| 73 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_ENABLE_FIELD_RECOGNITION_ON) |
| 74 |
{ |
| 75 |
Iocatalyst::BlockMesh bm; |
| 76 |
setBlockMeshSize(2, 2, 2); |
| 77 |
|
| 78 |
bm.addTransientCellField("foo_x", 2); |
| 79 |
bm.addTransientCellField("foo_y", 3); |
| 80 |
bm.addTransientCellField("foo_z", 4); |
| 81 |
|
| 82 |
addBlockMesh(bm); |
| 83 |
|
| 84 |
Ioss::PropertyManager iossProp; |
| 85 |
iossProp.add(Ioss::Property("ENABLE_FIELD_RECOGNITION", "ON")); |
| 86 |
Ioss::DatabaseIO *exo_d = |
| 87 |
writeAndGetExodusDatabaseOnRead("test_eb_1_enable_field_recog", iossProp); |
| 88 |
|
| 89 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 90 |
|
| 91 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 92 |
|
| 93 |
if (cat_d == nullptr) { |
| 94 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 95 |
} |
| 96 |
Ioss::Region cat_reg(cat_d); |
| 97 |
|
| 98 |
Ioss::Region exo_reg(exo_d); |
| 99 |
|
| 100 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 101 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 102 |
|
| 103 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 104 |
|
| 105 |
bool exo_foo_exists = exo_elemBlock->field_exists("foo"); |
| 106 |
bool cat_foo_exists = cat_elemBlock->field_exists("foo"); |
| 107 |
EXPECT_TRUE(exo_foo_exists); |
| 108 |
EXPECT_TRUE(cat_foo_exists); |
| 109 |
if (exo_foo_exists && cat_foo_exists) |
| 110 |
EXPECT_TRUE(exo_elemBlock->get_field("foo") == cat_elemBlock->get_field("foo")); |
| 111 |
|
| 112 |
// Check field data for equality |
| 113 |
auto cat_field = cat_elemBlock->get_fieldref("foo"); |
| 114 |
std::vector<std::byte> dcBuffer(cat_field.get_size()); |
| 115 |
cat_elemBlock->get_field_data("foo", Data(dcBuffer), dcBuffer.size()); |
| 116 |
|
| 117 |
exo_reg.begin_state(1); |
| 118 |
auto exo_field = exo_elemBlock->get_fieldref("foo"); |
| 119 |
std::vector<std::byte> deBuffer(exo_field.get_size()); |
| 120 |
exo_elemBlock->get_field_data("foo", Data(deBuffer), deBuffer.size()); |
| 121 |
EXPECT_EQ(dcBuffer, deBuffer); |
| 122 |
|
| 123 |
// Check foo_x doesn't exist |
| 124 |
bool exo_foo_x_exists = exo_elemBlock->field_exists("foo_x"); |
| 125 |
bool cat_foo_x_exists = cat_elemBlock->field_exists("foo_x"); |
| 126 |
EXPECT_FALSE(exo_foo_x_exists); |
| 127 |
EXPECT_FALSE(cat_foo_x_exists); |
| 128 |
} |
| 129 |
|
| 130 |
// Sanity Test |
| 131 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_ENABLE_FIELD_RECOGNITION_OFF) |
| 132 |
{ |
| 133 |
Iocatalyst::BlockMesh bm; |
| 134 |
setBlockMeshSize(2, 2, 2); |
| 135 |
|
| 136 |
bm.addTransientCellField("foo_x", 2); |
| 137 |
bm.addTransientCellField("foo_y", 3); |
| 138 |
bm.addTransientCellField("foo_z", 4); |
| 139 |
|
| 140 |
addBlockMesh(bm); |
| 141 |
|
| 142 |
Ioss::PropertyManager iossProp; |
| 143 |
iossProp.add(Ioss::Property("ENABLE_FIELD_RECOGNITION", "OFF")); |
| 144 |
Ioss::DatabaseIO *exo_d = |
| 145 |
writeAndGetExodusDatabaseOnRead("test_eb_1_enable_field_recog", iossProp); |
| 146 |
|
| 147 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 148 |
|
| 149 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 150 |
|
| 151 |
if (cat_d == nullptr) { |
| 152 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 153 |
} |
| 154 |
Ioss::Region cat_reg(cat_d); |
| 155 |
|
| 156 |
Ioss::Region exo_reg(exo_d); |
| 157 |
|
| 158 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 159 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 160 |
|
| 161 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 162 |
|
| 163 |
bool exo_foo_x_exists = exo_elemBlock->field_exists("foo_x"); |
| 164 |
bool cat_foo_x_exists = cat_elemBlock->field_exists("foo_x"); |
| 165 |
EXPECT_TRUE(exo_foo_x_exists); |
| 166 |
EXPECT_TRUE(cat_foo_x_exists); |
| 167 |
if (exo_foo_x_exists && cat_foo_x_exists) |
| 168 |
EXPECT_TRUE(exo_elemBlock->get_field("foo_x") == cat_elemBlock->get_field("foo_x")); |
| 169 |
} |
| 170 |
|
| 171 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_IGNORE_REALN_FIELDS_ON) |
| 172 |
{ |
| 173 |
Iocatalyst::BlockMesh bm; |
| 174 |
setBlockMeshSize(2, 2, 2); |
| 175 |
|
| 176 |
bm.addTransientCellField("foo_1", 2); |
| 177 |
bm.addTransientCellField("foo_2", 3); |
| 178 |
bm.addTransientCellField("foo_3", 4); |
| 179 |
|
| 180 |
addBlockMesh(bm); |
| 181 |
|
| 182 |
Ioss::PropertyManager iossProp; |
| 183 |
iossProp.add(Ioss::Property("IGNORE_REALN_FIELDS", "ON")); |
| 184 |
Ioss::DatabaseIO *exo_d = |
| 185 |
writeAndGetExodusDatabaseOnRead("test_eb_1_ignore_realn_fields", iossProp); |
| 186 |
|
| 187 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 188 |
|
| 189 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 190 |
|
| 191 |
if (cat_d == nullptr) { |
| 192 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 193 |
} |
| 194 |
Ioss::Region cat_reg(cat_d); |
| 195 |
|
| 196 |
Ioss::Region exo_reg(exo_d); |
| 197 |
|
| 198 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 199 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 200 |
|
| 201 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 202 |
|
| 203 |
bool exo_foo_1_exists = exo_elemBlock->field_exists("foo_1"); |
| 204 |
bool cat_foo_1_exists = cat_elemBlock->field_exists("foo_1"); |
| 205 |
EXPECT_TRUE(exo_foo_1_exists); |
| 206 |
EXPECT_TRUE(cat_foo_1_exists); |
| 207 |
if (exo_foo_1_exists && cat_foo_1_exists) |
| 208 |
EXPECT_TRUE(exo_elemBlock->get_field("foo_1") == cat_elemBlock->get_field("foo_1")); |
| 209 |
} |
| 210 |
|
| 211 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_IGNORE_REALN_FIELDS_OFF) |
| 212 |
{ |
| 213 |
Iocatalyst::BlockMesh bm; |
| 214 |
setBlockMeshSize(2, 2, 2); |
| 215 |
|
| 216 |
bm.addTransientCellField("foo_1", 3); |
| 217 |
bm.addTransientCellField("foo_2", 2); |
| 218 |
bm.addTransientCellField("foo_3", 4); |
| 219 |
|
| 220 |
addBlockMesh(bm); |
| 221 |
|
| 222 |
Ioss::PropertyManager iossProp; |
| 223 |
iossProp.add(Ioss::Property("IGNORE_REALN_FIELDS", "OFF")); |
| 224 |
Ioss::DatabaseIO *exo_d = |
| 225 |
writeAndGetExodusDatabaseOnRead("test_eb_1_ignore_realn_fields_off", iossProp); |
| 226 |
|
| 227 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 228 |
|
| 229 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 230 |
|
| 231 |
if (cat_d == nullptr) { |
| 232 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 233 |
} |
| 234 |
Ioss::Region cat_reg(cat_d); |
| 235 |
|
| 236 |
Ioss::Region exo_reg(exo_d); |
| 237 |
|
| 238 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 239 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 240 |
|
| 241 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 242 |
|
| 243 |
bool exo_foo_exists = exo_elemBlock->field_exists("foo"); |
| 244 |
bool cat_foo_exists = cat_elemBlock->field_exists("foo"); |
| 245 |
EXPECT_TRUE(exo_foo_exists); |
| 246 |
EXPECT_TRUE(cat_foo_exists); |
| 247 |
if (exo_foo_exists && cat_foo_exists) |
| 248 |
EXPECT_TRUE(exo_elemBlock->get_field("foo") == cat_elemBlock->get_field("foo")); |
| 249 |
|
| 250 |
// Check field data for equality |
| 251 |
auto cat_field = cat_elemBlock->get_fieldref("foo"); |
| 252 |
std::vector<std::byte> dcBuffer(cat_field.get_size()); |
| 253 |
cat_elemBlock->get_field_data("foo", Data(dcBuffer), dcBuffer.size()); |
| 254 |
|
| 255 |
exo_reg.begin_state(1); |
| 256 |
auto exo_field = exo_elemBlock->get_fieldref("foo"); |
| 257 |
std::vector<std::byte> deBuffer(exo_field.get_size()); |
| 258 |
exo_elemBlock->get_field_data("foo", Data(deBuffer), deBuffer.size()); |
| 259 |
EXPECT_EQ(dcBuffer, deBuffer); |
| 260 |
} |
| 261 |
|
| 262 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_FIELD_SUFFIX_SEPARATOR) |
| 263 |
{ |
| 264 |
Iocatalyst::BlockMesh bm; |
| 265 |
setBlockMeshSize(2, 2, 2); |
| 266 |
|
| 267 |
bm.addTransientCellField("foo_x", 2); |
| 268 |
bm.addTransientCellField("foo_y", 3); |
| 269 |
bm.addTransientCellField("foo_z", 4); |
| 270 |
bm.addTransientCellField("bar:x", 5); |
| 271 |
bm.addTransientCellField("bar:y", 6); |
| 272 |
bm.addTransientCellField("bar:z", 7); |
| 273 |
|
| 274 |
addBlockMesh(bm); |
| 275 |
|
| 276 |
Ioss::PropertyManager iossProp; |
| 277 |
iossProp.add(Ioss::Property("FIELD_SUFFIX_SEPARATOR", ":")); |
| 278 |
|
| 279 |
Ioss::DatabaseIO *exo_d = writeAndGetExodusDatabaseOnRead("test_eb_1_field_suf_sep", iossProp); |
| 280 |
|
| 281 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 282 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 283 |
|
| 284 |
if (cat_d == nullptr) { |
| 285 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 286 |
} |
| 287 |
Ioss::Region cat_reg(cat_d); |
| 288 |
|
| 289 |
Ioss::Region exo_reg(exo_d); |
| 290 |
|
| 291 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 292 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 293 |
|
| 294 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 295 |
|
| 296 |
bool exo_foo_x_exists = exo_elemBlock->field_exists("foo_x"); |
| 297 |
bool cat_foo_x_exists = cat_elemBlock->field_exists("foo_x"); |
| 298 |
EXPECT_TRUE(exo_foo_x_exists); |
| 299 |
EXPECT_TRUE(cat_foo_x_exists); |
| 300 |
if (exo_foo_x_exists && cat_foo_x_exists) |
| 301 |
EXPECT_TRUE(exo_elemBlock->get_field("foo_x") == cat_elemBlock->get_field("foo_x")); |
| 302 |
|
| 303 |
bool exo_bar_exists = exo_elemBlock->field_exists("bar"); |
| 304 |
bool cat_bar_exists = cat_elemBlock->field_exists("bar"); |
| 305 |
EXPECT_TRUE(exo_bar_exists); |
| 306 |
EXPECT_TRUE(cat_bar_exists); |
| 307 |
if (exo_bar_exists && cat_bar_exists) |
| 308 |
EXPECT_TRUE(exo_elemBlock->get_field("bar") == cat_elemBlock->get_field("bar")); |
| 309 |
|
| 310 |
// Check bar field data for equality |
| 311 |
auto cat_field = cat_elemBlock->get_fieldref("bar"); |
| 312 |
std::vector<std::byte> dcBuffer(cat_field.get_size()); |
| 313 |
cat_elemBlock->get_field_data("bar", Data(dcBuffer), dcBuffer.size()); |
| 314 |
|
| 315 |
exo_reg.begin_state(1); |
| 316 |
auto exo_field = exo_elemBlock->get_fieldref("bar"); |
| 317 |
std::vector<std::byte> deBuffer(exo_field.get_size()); |
| 318 |
exo_elemBlock->get_field_data("bar", Data(deBuffer), deBuffer.size()); |
| 319 |
EXPECT_EQ(dcBuffer, deBuffer); |
| 320 |
} |
| 321 |
|
| 322 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_FIELD_STRIP_TRAILING_UNDERSCORE) |
| 323 |
{ |
| 324 |
Iocatalyst::BlockMesh bm; |
| 325 |
setBlockMeshSize(2, 2, 2); |
| 326 |
|
| 327 |
bm.addTransientCellField("foo_x", 2); |
| 328 |
bm.addTransientCellField("foo_y", 3); |
| 329 |
bm.addTransientCellField("foo_z", 4); |
| 330 |
|
| 331 |
addBlockMesh(bm); |
| 332 |
|
| 333 |
Ioss::PropertyManager iossProp; |
| 334 |
iossProp.add(Ioss::Property("FIELD_STRIP_TRAILING_UNDERSCORE", "ON")); |
| 335 |
iossProp.add(Ioss::Property("FIELD_SUFFIX_SEPARATOR", "")); |
| 336 |
|
| 337 |
Ioss::DatabaseIO *exo_d = |
| 338 |
writeAndGetExodusDatabaseOnRead("test_eb_1_field_strip_tr_unders", iossProp); |
| 339 |
|
| 340 |
Iocatalyst::BlockMeshSet::IOSSparams iop("cat", EXODUS_DATABASE_TYPE, iossProp); |
| 341 |
|
| 342 |
Ioss::DatabaseIO *cat_d = bmSet.getCatalystDatabase(iop); |
| 343 |
|
| 344 |
if (cat_d == nullptr) { |
| 345 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize on read"; |
| 346 |
} |
| 347 |
Ioss::Region cat_reg(cat_d); |
| 348 |
|
| 349 |
Ioss::Region exo_reg(exo_d); |
| 350 |
|
| 351 |
auto cat_elemBlock = cat_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 352 |
auto exo_elemBlock = exo_reg.get_element_block(bmSet.getUnstructuredBlockName(bm.getID())); |
| 353 |
|
| 354 |
checkEntityContainerZeroCopyFields(cat_reg.get_element_blocks()); |
| 355 |
|
| 356 |
bool exo_foo_exists = exo_elemBlock->field_exists("foo"); |
| 357 |
bool cat_foo_exists = cat_elemBlock->field_exists("foo"); |
| 358 |
EXPECT_TRUE(exo_foo_exists); |
| 359 |
EXPECT_TRUE(cat_foo_exists); |
| 360 |
if (exo_foo_exists && cat_foo_exists) |
| 361 |
EXPECT_TRUE(exo_elemBlock->get_field("foo") == cat_elemBlock->get_field("foo")); |
| 362 |
|
| 363 |
// Check field data for equality |
| 364 |
auto cat_field = cat_elemBlock->get_fieldref("foo"); |
| 365 |
std::vector<std::byte> dcBuffer(cat_field.get_size()); |
| 366 |
cat_elemBlock->get_field_data("foo", Data(dcBuffer), dcBuffer.size()); |
| 367 |
|
| 368 |
exo_reg.begin_state(1); |
| 369 |
auto exo_field = exo_elemBlock->get_fieldref("foo"); |
| 370 |
std::vector<std::byte> deBuffer(exo_field.get_size()); |
| 371 |
exo_elemBlock->get_field_data("foo", Data(deBuffer), deBuffer.size()); |
| 372 |
EXPECT_EQ(dcBuffer, deBuffer); |
| 373 |
} |
| 374 |
|
| 375 |
// Read from file. Can. Or available exodus file in test suite. |
| 376 |
TEST_F(Iocatalyst_DatabaseIOTest, Exodus_Prop_SURFACE_SPLIT_TYPE) |
| 377 |
{ |
| 378 |
Iocatalyst::BlockMesh bm; |
| 379 |
setBlockMeshSize(2, 2, 2); |
| 380 |
|
| 381 |
addBlockMesh(bm); |
| 382 |
|
| 383 |
// If write and read have same split type, we can handle. Else no. |
| 384 |
Ioss::PropertyManager iossProp; |
| 385 |
iossProp.add(Ioss::Property("SURFACE_SPLIT_TYPE", "BLOCK")); |
| 386 |
|
| 387 |
std::string exoFile = "can.ex2"; |
| 388 |
|
| 389 |
conduit_cpp::Node c_node = getConduitFromExodusFile(exoFile, iossProp); |
| 390 |
|
| 391 |
Ioss::DatabaseIO *cat_d = getCatalystDatabaseFromConduit(c_node, iossProp); |
| 392 |
if (cat_d == nullptr) { |
| 393 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize"; |
| 394 |
} |
| 395 |
|
| 396 |
Ioss::Region cat_reg(cat_d); |
| 397 |
|
| 398 |
Ioss::SideSetContainer cat_sideSets = cat_reg.get_sidesets(); |
| 399 |
checkEntityContainerZeroCopyFields(cat_sideSets); |
| 400 |
|
| 401 |
EXPECT_TRUE(cat_sideSets.empty()) << "Cat sidesets not empty when different SURFACE_SPLIT_TYPE"; |
| 402 |
|
| 403 |
Ioss::PropertyManager iossProp_s; |
| 404 |
iossProp_s.add(Ioss::Property("SURFACE_SPLIT_TYPE", "TOPOLOGY")); |
| 405 |
cat_d = getCatalystDatabaseFromConduit(c_node, iossProp_s); |
| 406 |
|
| 407 |
if (cat_d == nullptr) { |
| 408 |
EXPECT_TRUE(false) << "Catalyst db unable to initialize"; |
| 409 |
} |
| 410 |
|
| 411 |
Ioss::Region cat_reg_same(cat_d); |
| 412 |
|
| 413 |
cat_sideSets = cat_reg_same.get_sidesets(); |
| 414 |
|
| 415 |
EXPECT_TRUE(!cat_sideSets.empty()) << "Cat sidesets empty when identical SURFACE_SPLIT_TYPE"; |
| 416 |
} |