16#include "OPALconfig.h"
26#include <gsl/gsl_errno.h>
33int run_opal(
char *[], std::string inputfile,
int restartStep,
34 int infoLevel,
int warnLevel, MPI_Comm comm)
36 std::string::size_type startExtension = inputfile.find_last_of(
'.');
37 std::string outputFileName = inputfile.substr(0,startExtension) +
".out";
38 std::ofstream output(outputFileName.c_str());
50 amrex::Initialize(comm);
66 throw new OpalException(
"run_opal",
"Could not open inputfile: " + inputfile);
72 if (restartStep > std::numeric_limits<int>::min()) {
78 if(is) parser->
run(is);
99 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)
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.
static void releaseTracker()
The base class for all OPAL exceptions.
void setDestination(std::ostream &dest)
static Communicate * Comm