25 #include <gsl/gsl_errno.h>
32 int run_opal(
char *[], std::string inputfile,
int restartStep,
35 std::string::size_type startExtension = inputfile.find_last_of(
'.');
36 std::string outputFileName = inputfile.substr(0,startExtension) +
".out";
37 std::ofstream output(outputFileName.c_str());
42 gmsg =
new Inform(
"OPAL ", output);
49 amrex::Initialize(comm);
65 throw new OpalException(
"run_opal",
"Could not open inputfile: " + inputfile);
77 if(is) parser->
run(is);
94 amrex::Finalize(
true);
The global OPAL structure.
static OpalData * getInstance()
static void clearDictionary()
static void deleteInstance()
void setRestartStep(int s)
store the location where to restart
int run_opal(char *[], std::string inputfile, int restartStep, int infoLevel, int warnLevel, MPI_Comm comm)
void setDestination(std::ostream &dest)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
void setRestartRun(const bool &value=true)
set OPAL in restart mode
void configure()
Configure all commands.
static Communicate * Comm
The base class for all OPAL exceptions.
void handleGSLErrors(const char *reason, const char *file, int, int)
The default parser for OPAL-9.
bool amr
Enable AMR if true.
b mention the algorithm in the References section The appropriate citation is
void storeInputFn(const std::string &fn)
store opals input filename
virtual void run() const
Read current stream.
A stream of input tokens.
void setRestartFileName(std::string s)
store opals restart h5 format filename