IOSS 2.0
Loading...
Searching...
No Matches
IossApplication.h
Go to the documentation of this file.
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 Ioss_Application_h
8#define Ioss_Application_h
9
10#include <string>
11#include <vector>
12
13namespace Ioss {
14 class Region;
15 class PropertyManager;
16} // namespace Ioss
17
19{
20public:
21 IossApplication(int argc, char **argv);
22
24
26
28
30
32 void setPrintIOSSRegionReport(bool status);
33
36
39
42
44 void setForceCGNSOutput(bool status);
45
47 void setForceExodusOutput(bool status);
48
50 std::string getIOSSInputDBType();
51 void setIOSSInputDBType(const std::string &dbType);
52
55 void setPhactoriInputScript(const std::string &scriptFilePath);
56
58
60 std::string getPhactoriInputJSON(int ndx);
61 void addPhactoriInputJSON(const std::string &jsonFilePath);
62
65 void setParaViewExportedScript(const std::string &exportedScriptFilePath);
66
69 void setCatalystStartTimeStep(int timeStep);
70
73 void setCatalystStopTimeStep(int timeStep);
74
77
78 std::string &getFileName(int ndx);
80 void addFileName(const std::string &name);
81
84
85private:
86 int getMyRank();
88 bool isRankZero();
89 bool isSerial();
90 bool decomposedMeshExists(int ndx);
94 void printMessage(const std::string &message);
95 void printErrorMessage(const std::string &message);
100
106 void callCatalystIOSSDatabaseOnRankMultiGrid(bool sendAllGridsToOnePipeline);
109 void processCommandLine(int argc, char **argv);
110 void initializeMPI(int argc, char **argv);
116 void getStartStopTimeSteps(int numTimeSteps, int &startTimeStep, int &stopTimeStep);
117 std::string getIOSSDatabaseTypeFromFile(int ndx);
118 std::string getIOSSDatabaseType(int ndx);
119 std::string getCatalystDatabaseType(int ndx);
120 std::string getFileSuffix(int ndx);
121 std::string getParallelFileName(int ndx);
142 std::string iossInputDBType;
146 std::vector<std::string> fileName;
147 std::vector<std::string> phctriInptJSONFilePathList;
148 std::string copyOutputDatabaseName = "iossDatabaseCopy";
149 std::string outputCatalystMeshFileName = "iossDatabaseCatalystMesh";
150 std::string iossReportFileName = "IossRegionReport";
151 const std::string applicationName = "ioss2catalyst";
152 std::vector<Ioss::Region *> inputIOSSRegion;
154
155#if defined(__APPLE__)
156 const char *CATALYST_PLUGIN_DYNAMIC_LIBRARY = "libcatalystioss.dylib";
157#else
158 const char *CATALYST_PLUGIN_DYNAMIC_LIBRARY = "libcatalystioss.so";
159#endif
160};
161
162#endif
Definition IossApplication.h:19
void addFileName(const std::string &name)
Ioss::Region * getInputIOSSRegion(int ndx)
bool forceExodusOutputON()
void exitApplicationFailure()
bool outputCatalystMeshFilePerProcON()
std::string getIOSSInputDBType()
void setOutputCatalystMeshOneFile(bool status)
void checkForOnlyOneCatalystOutputType()
bool sendMultipleGridsToTheSamePipeline
Definition IossApplication.h:141
bool printIOSSReport
Definition IossApplication.h:129
bool useParaViewExportedScript
Definition IossApplication.h:135
void callCatalystIOSSDatabaseOnRankOneGrid()
void setCatalystStartTimeStep(int timeStep)
void setPrintIOSSRegionReport(bool status)
const char * CATALYST_PLUGIN_DYNAMIC_LIBRARY
Definition IossApplication.h:158
void printMessage(const std::string &message)
std::vector< std::string > phctriInptJSONFilePathList
Definition IossApplication.h:147
int getNumberOfPhactoriInputJSONs()
std::string getCatalystDatabaseType(int ndx)
std::string paraViewExportedScriptFilePath
Definition IossApplication.h:145
std::string getParallelFileName(int ndx)
std::string getIOSSDatabaseType(int ndx)
void addAdditionalProperties(Ioss::PropertyManager *outputProperties)
const std::string applicationName
Definition IossApplication.h:151
std::vector< Ioss::Region * > inputIOSSRegion
Definition IossApplication.h:152
Ioss::PropertyManager * additionalProperties
Definition IossApplication.h:153
bool printIOSSRegionReportON()
void printIOSSRegionReportsForRank()
std::string getIOSSDatabaseTypeFromFile(int ndx)
int numRanks
Definition IossApplication.h:124
void setOutputCatalystMeshFilePerProc(bool status)
void setForceExodusOutput(bool status)
void addPhactoriInputJSON(const std::string &jsonFilePath)
bool forceExodusOutput
Definition IossApplication.h:137
void printErrorMessage(const std::string &message)
void setAdditionalProperties(Ioss::PropertyManager *additionalProperties)
int applicationExitCode
Definition IossApplication.h:140
void setForceCGNSOutput(bool status)
bool outputCatalystMeshOneFileON()
std::string getPhactoriInputJSON(int ndx)
int getNumberOfFileNames()
void checkForOnlyOneCatalystOutputPath()
bool usePhactoriInputJSON
Definition IossApplication.h:134
bool writeCatalystMeshOneFile
Definition IossApplication.h:131
bool copyDatabase
Definition IossApplication.h:130
void setOutputCopyOfInputDatabase(bool status)
int catalystStopTimeStep
Definition IossApplication.h:128
void setSendMultipleGridsToTheSamePipeline(bool onOffFlag)
bool useCatalystStopTimeStepON()
bool useCatalystStartTimeStepON()
bool usePhactoriInputScript
Definition IossApplication.h:133
bool usePhactoriInputScriptON()
std::string getParaViewExportedScript()
int getApplicationExitCode()
Ioss::PropertyManager * getAdditionalProperties()
std::string copyOutputDatabaseName
Definition IossApplication.h:148
bool useCatalystStartTimeStep
Definition IossApplication.h:125
void exitApplication()
int getCatalystStartTimeStep()
bool forceCGNSOutput
Definition IossApplication.h:136
bool useParaViewExportedScriptON()
void setPhactoriInputScript(const std::string &scriptFilePath)
void SetUpDefaultProperties(Ioss::PropertyManager *outputProperties)
void initializeMPI(int argc, char **argv)
void setCatalystStopTimeStep(int timeStep)
std::string getPhactoriDefaultJSON()
std::string getPhactoriInputScript()
void copyInputIOSSDatabaseOnRank()
void exitApplicationSuccess()
IossApplication(int argc, char **argv)
std::string iossInputDBType
Definition IossApplication.h:142
bool hasCommandLineArguments
Definition IossApplication.h:139
std::string outputCatalystMeshFileName
Definition IossApplication.h:149
void setIOSSInputDBType(const std::string &dbType)
void printUsageMessage()
bool writeCatalystMeshFilePerProc
Definition IossApplication.h:132
std::string phactoriInputJSONFilePath
Definition IossApplication.h:144
void runApplication()
bool useIOSSInputDBTypeON()
int myRank
Definition IossApplication.h:123
bool usePhactoriInputJSONON()
int getCatalystStopTimeStep()
void openInputIOSSDatabases()
std::string & getFileName(int ndx)
bool useCatalystStopTimeStep
Definition IossApplication.h:127
void processCommandLine(int argc, char **argv)
bool outputCopyOfInputDatabaseON()
void callCatalystIOSSDatabaseOnRankMultiGrid(bool sendAllGridsToOnePipeline)
std::string iossReportFileName
Definition IossApplication.h:150
int getNumberOfInputIOSSRegions()
void openInputIOSSDatabase(int ndx)
std::vector< std::string > fileName
Definition IossApplication.h:146
std::string getFileSuffix(int ndx)
void getStartStopTimeSteps(int numTimeSteps, int &startTimeStep, int &stopTimeStep)
void callCatalystIOSSDatabaseOnRank()
std::string phactoriInputScriptFilePath
Definition IossApplication.h:143
void initMPIRankAndSize()
void setParaViewExportedScript(const std::string &exportedScriptFilePath)
bool decomposedMeshExists(int ndx)
bool sendMultipleGridsToTheSamePipelineON()
bool forceCGNSOutputON()
int catalystStartTimeStep
Definition IossApplication.h:126
bool useIOSSInputDBType
Definition IossApplication.h:138
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
A grouping entity that contains other grouping entities.
Definition Ioss_Region.h:93
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40