25#include <gsl/gsl_errno.h>
32int 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());
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);
int run_opal(char *[], std::string inputfile, int restartStep, int infoLevel, int warnLevel, MPI_Comm comm)
void handleGSLErrors(const char *reason, const char *file, int, int)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
bool amr
Enable AMR if true.
void configure()
Configure all commands.
The global OPAL structure.
void storeInputFn(const std::string &fn)
store opals input filename
void setRestartRun(const bool &value=true)
set OPAL in restart mode
static void deleteInstance()
void setRestartFileName(std::string s)
store opals restart h5 format filename
static OpalData * getInstance()
void setRestartStep(int s)
store the location where to restart
static void clearDictionary()
A stream of input tokens.
The default parser for OPAL-9.
virtual void run() const
Read current stream.
The base class for all OPAL exceptions.
void setDestination(std::ostream &dest)
static Communicate * Comm