| 1 |
// Copyright(C) 1999-2021 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 "CatalystTestFixture.h" |
| 8 |
#include "catch.hpp" |
| 9 |
|
| 10 |
TEST_CASE_METHOD(CatalystTestFixture, "CatalystCGNSVariableComponents", |
| 11 |
"[catalyst partitioned data set collection]") |
| 12 |
{ |
| 13 |
|
| 14 |
runCatalystMultiBlockMeshTest("aero_blunt_wedge_test3.cgns"); |
| 15 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_0.vtpc"); |
| 16 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_1.vtpc"); |
| 17 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_2.vtpc"); |
| 18 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_3.vtpc"); |
| 19 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_4.vtpc"); |
| 20 |
|
| 21 |
CatalystTestFixture::VarAndCompCountVec cellVariables = {{"density", 1}, {"pressure", 1}, |
| 22 |
{"temperature", 1}, {"velocity", 3}, |
| 23 |
{"object_id", 1}, {"cell_ids", 1}}; |
| 24 |
CatalystTestFixture::VarAndCompCountVec pointVariables = {{"cell_node_ids", 1}}; |
| 25 |
CatalystTestFixture::VarAndCompCountVec globalVariables; |
| 26 |
|
| 27 |
checkMeshOutputVariables("iossDatabaseCatalystMesh_time_4.vtpc", cellVariables, pointVariables, |
| 28 |
globalVariables, "/IOSS/structured_blocks"); |
| 29 |
} |
| 30 |
|
| 31 |
TEST_CASE_METHOD(CatalystTestFixture, "CatalystExodusVariableComponents", |
| 32 |
"[catalyst partitioned data set collection]") |
| 33 |
{ |
| 34 |
|
| 35 |
runCatalystMultiBlockMeshTest("block_crush_1.ex2"); |
| 36 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_0.vtpc"); |
| 37 |
checkTestOutputFileExists("iossDatabaseCatalystMesh_time_10.vtpc"); |
| 38 |
|
| 39 |
CatalystTestFixture::VarAndCompCountVec cellVariables = { |
| 40 |
{"vonmises", 1}, {"stress", 6}, {"object_id", 1}, {"ids", 1}}; |
| 41 |
CatalystTestFixture::VarAndCompCountVec pointVariables = { |
| 42 |
{"cetan", 1}, {"cftan", 1}, {"vel", 3}, {"displ", 3}, {"ids", 1}}; |
| 43 |
CatalystTestFixture::VarAndCompCountVec globalVariables = {{"momentum", 3}, {"kineticenergy", 1}}; |
| 44 |
|
| 45 |
checkMeshOutputVariables("iossDatabaseCatalystMesh_time_0.vtpc", cellVariables, pointVariables, |
| 46 |
globalVariables, "/IOSS/element_blocks"); |
| 47 |
} |
| 48 |
|
| 49 |
TEST_CASE_METHOD(CatalystTestFixture, "CatalystCGNSPartitionedDataSetCollectionStructure", |
| 50 |
"[catalyst partitioned data set collection]") |
| 51 |
{ |
| 52 |
|
| 53 |
runCatalystMultiBlockMeshTest("aero_blunt_wedge_test3.cgns"); |
| 54 |
StringVec partitions = {"blk-1"}; |
| 55 |
StringVec searchQueries = {"/IOSS/structured_blocks/blk-1"}; |
| 56 |
checkPartitionedDataSetCollectionStructure("iossDatabaseCatalystMesh_time_4.vtpc", partitions, 16, |
| 57 |
searchQueries); |
| 58 |
} |
| 59 |
|
| 60 |
TEST_CASE_METHOD(CatalystTestFixture, "CatalystExodusPartitionedDataSetCollectionStructure", |
| 61 |
"[catalyst partitioned data set collection]") |
| 62 |
{ |
| 63 |
|
| 64 |
runCatalystMultiBlockMeshTest("block_crush_1.ex2"); |
| 65 |
StringVec partitions = {"block_1", "block_2", "rigidbodyoutputpart"}; |
| 66 |
StringVec searchQueries = {"/IOSS/element_blocks/block_1", "/IOSS/element_blocks/block_2", |
| 67 |
"/IOSS/element_blocks/rigidbodyoutputpart"}; |
| 68 |
checkPartitionedDataSetCollectionStructure("iossDatabaseCatalystMesh_time_10.vtpc", partitions, |
| 69 |
132, searchQueries); |
| 70 |
} |