| 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 |
#ifndef CatalystTestFixture_h |
| 8 |
#define CatalystTestFixture_h |
| 9 |
|
| 10 |
#include "IossApplication.h" |
| 11 |
#include "vtk_jsoncpp.h" |
| 12 |
#include <map> |
| 13 |
|
| 14 |
class CatalystTestFixture |
| 15 |
{ |
| 16 |
public: |
| 17 |
typedef std::vector<std::pair<std::string, int>> VarAndCompCountVec; |
| 18 |
typedef std::vector<std::string> StringVec; |
| 19 |
|
| 20 |
CatalystTestFixture(); |
| 21 |
~CatalystTestFixture(); |
| 22 |
|
| 23 |
void checkPhactoriStringValidParse(const std::string &phactoriSyntax, |
| 24 |
const Json::Value &parsedJSONResult); |
| 25 |
|
| 26 |
void checkPhactoriStringInvalidParse(const std::string &phactoriSyntax); |
| 27 |
|
| 28 |
void runPhactoriJSONTest(const std::string &jsonFile, const std::string &inputFile); |
| 29 |
|
| 30 |
void runPhactoriJSONTestTwoGrid(const std::string &jsonFile, const std::string &inputFileA, |
| 31 |
const std::string &inputFileB); |
| 32 |
|
| 33 |
void runPhactoriJSONTestTwoGridTwoPipe(const std::string &jsonFileA, |
| 34 |
const std::string &inputFileA, |
| 35 |
const std::string &jsonFileB, |
| 36 |
const std::string &inputFileB); |
| 37 |
|
| 38 |
void runParaViewGuiScriptTest(const std::string &pythonScript, const std::string &inputFile); |
| 39 |
|
| 40 |
void runCatalystLoggingTest(Ioss::PropertyManager *logging_properties, |
| 41 |
const std::string &jsonFile, const std::string &inputFile); |
| 42 |
|
| 43 |
void runCatalystMultiBlockMeshTest(const std::string &inputFile); |
| 44 |
|
| 45 |
void checkMeshOutputVariables(const std::string &inputFile, const VarAndCompCountVec &cellVars, |
| 46 |
const VarAndCompCountVec &pointVars, |
| 47 |
const VarAndCompCountVec &globalVars, const std::string &blockPath); |
| 48 |
|
| 49 |
void checkPartitionedDataSetCollectionStructure(const std::string &inputFile, |
| 50 |
const StringVec &partitions, int numCells, |
| 51 |
const StringVec &searchQueries); |
| 52 |
|
| 53 |
static bool isFileExists(const char *fileName); |
| 54 |
static void checkTestOutputFileExists(const char *fileName); |
| 55 |
static void checkTestOutputFileDoesNotExist(const char *fileName); |
| 56 |
|
| 57 |
Json::Value getDefaultPhactoriJSON(); |
| 58 |
|
| 59 |
Json::Value getDefaultCameraJSON(); |
| 60 |
Json::Value getDefaultImageSetJSON(); |
| 61 |
Json::Value getDefaultImageSetWithCameraJSON(); |
| 62 |
Json::Value getDefaultCameraParallelProjectionJSON(); |
| 63 |
Json::Value getDefaultOperationsJSON(); |
| 64 |
|
| 65 |
private: |
| 66 |
IossApplication ioapp; |
| 67 |
}; |
| 68 |
|
| 69 |
#endif |