7#ifndef IOSS_IOVS_CATALYST_MANAGER_H
8#define IOSS_IOVS_CATALYST_MANAGER_H
10#include "iocatalyst_export.h"
12#include <catalyst.hpp>
24 inline static const std::string ARGS =
"args";
25 inline static const std::string CATALYST =
"catalyst";
26 inline static const std::string CATALYST_BLOCK_PARSE_INPUT_DECK_NAME =
27 "CATALYST_BLOCK_PARSE_INPUT_DECK_NAME";
28 inline static const std::string CATALYST_BLOCK_PARSE_JSON_STRING =
29 "CATALYST_BLOCK_PARSE_JSON_STRING";
30 inline static const std::string CATALYST_DEBUG_LEVEL =
"CATALYST_DEBUG_LEVEL";
31 inline static const std::string CATALYST_ENABLE_LOGGING =
"CATALYST_ENABLE_LOGGING";
32 inline static const std::string CATALYST_OUTPUT_DIRECTORY =
"CATALYST_OUTPUT_DIRECTORY";
33 inline static const std::string CATALYST_OUTPUT_DEFAULT =
"CatalystOutput";
34 inline static const std::string CATALYST_INPUT_NAME =
"CATALYST_INPUT_NAME";
35 inline static const std::string CATALYST_INPUT_DEFAULT =
"input";
36 inline static const std::string CATALYST_MULTI_INPUT_PIPELINE_NAME =
37 "CATALYST_MULTI_INPUT_PIPELINE_NAME";
38 inline static const std::string CATALYST_SCRIPT =
"CATALYST_SCRIPT";
39 inline static const std::string CATALYST_SCRIPT_EXTRA_FILE =
"CATALYST_SCRIPT_EXTRA_FILE";
40 inline static const std::string CHANNELS =
"channels";
41 inline static const std::string CYCLE =
"cycle";
42 inline static const std::string DATA =
"data";
43 inline static const std::string PHACTORI_JSON_SCRIPT =
"PHACTORI_JSON_SCRIPT";
44 inline static const std::string PIPELINES =
"pipelines";
45 inline static const std::string FILENAME =
"filename";
46 inline static const std::string FS =
"/";
47 inline static const std::string IOSS =
"ioss";
48 inline static const std::string SCRIPTS =
"scripts";
49 inline static const std::string STATE =
"state";
50 inline static const std::string TIME =
"time";
51 inline static const std::string TIMESTEP =
"timestep";
52 inline static const std::string TYPE =
"type";
62 conduit_cpp::Node getInitializeConduit();
66 pState getPipelineState(CatalystPipelineID
id);
75 catalystPipelineID = 0;
76 enableLogging =
false;
78 catalystOutputDirectory = CATALYST_OUTPUT_DEFAULT;
79 catalystInputName = CATALYST_INPUT_DEFAULT;
80 enableCatalystMultiInputPipeline =
false;
81 pipelineState = pExecute;
108 void addScriptProps(conduit_cpp::Node &n,
const CatalystProps &p);
109 void addExecuteProps(conduit_cpp::Node &n,
const CatalystProps &p,
int state,
double time);
110 void addExecuteData(conduit_cpp::Node &n,
const std::string &channelName,
int state,
111 double time, conduit_cpp::Node &data);
115 conduit_cpp::Node &data);
120 catalystOutputIDNumber = 0;
122 managerState = mInit;
127 return getCatScriptPath(p) + FILENAME;
150 void incrementOutputCounts();
153 std::map<CatalystPipelineID, CatalystProps>
catPipes;
Definition Iocatalyst_CatalystManager.h:17
mState
Definition Iocatalyst_CatalystManager.h:21
@ mExecute
Definition Iocatalyst_CatalystManager.h:21
mState managerState
Definition Iocatalyst_CatalystManager.h:154
std::string getCatScriptArgsPath(const CatalystProps &p)
Definition Iocatalyst_CatalystManager.h:130
void reset()
Definition Iocatalyst_CatalystManager.h:118
mState getManagerState()
Definition Iocatalyst_CatalystManager.h:64
unsigned int CatalystPipelineID
Definition Iocatalyst_CatalystManager.h:19
pState
Definition Iocatalyst_CatalystManager.h:22
@ pExecute
Definition Iocatalyst_CatalystManager.h:22
CatalystManager & operator=(const CatalystManager &)=delete
std::string getCatScriptFnamePath(const CatalystProps &p)
Definition Iocatalyst_CatalystManager.h:125
CatalystManager(const CatalystManager &)=delete
CatalystPipelineID catalystOutputIDNumber
Definition Iocatalyst_CatalystManager.h:152
std::map< CatalystPipelineID, CatalystProps > catPipes
Definition Iocatalyst_CatalystManager.h:153
std::string getCatStatePath()
Definition Iocatalyst_CatalystManager.h:137
std::string getCatChannelsPath()
Definition Iocatalyst_CatalystManager.h:139
std::string getCatScriptPath(const CatalystProps &p)
Definition Iocatalyst_CatalystManager.h:132
static CatalystManager & getInstance()
Definition Iocatalyst_CatalystManager.h:54
std::string getCatalystPythonDriverPath()
Definition Iocatalyst_CatalystManager.h:60
Definition Ioss_ParallelUtils.h:32
A collection of Ioss::Property objects.
Definition Ioss_PropertyManager.h:36
A namespace for the Catalyst 2.0 database format.
Definition Iocatalyst_CatalystLogging.C:13
Definition Iocatalyst_CatalystManager.h:72
std::string catalystInputDeckName
Definition Iocatalyst_CatalystManager.h:98
std::string catalystBlockJSON
Definition Iocatalyst_CatalystManager.h:96
std::string catalystOutputDirectory
Definition Iocatalyst_CatalystManager.h:99
std::string catalystInputName
Definition Iocatalyst_CatalystManager.h:95
std::string catalystMultiInputPipelineName
Definition Iocatalyst_CatalystManager.h:89
int state
Definition Iocatalyst_CatalystManager.h:92
CatalystProps()
Definition Iocatalyst_CatalystManager.h:73
bool enableCatalystMultiInputPipeline
Definition Iocatalyst_CatalystManager.h:88
std::string catalystPythonFilename
Definition Iocatalyst_CatalystManager.h:90
conduit_cpp::Node data
Definition Iocatalyst_CatalystManager.h:91
CatalystPipelineID catalystPipelineID
Definition Iocatalyst_CatalystManager.h:86
double time
Definition Iocatalyst_CatalystManager.h:93
int debugLevel
Definition Iocatalyst_CatalystManager.h:101
std::string catalystScriptExtraFile
Definition Iocatalyst_CatalystManager.h:97
pState pipelineState
Definition Iocatalyst_CatalystManager.h:87
bool enableLogging
Definition Iocatalyst_CatalystManager.h:100