File bout++.cxx

Defines

BUILDFLAG1_(x)
BUILDFLAG(x)
GLOBALORIGIN
INDIRECT1_BOUTMAIN(a)
INDIRECT0_BOUTMAIN(...)
STRINGIFY(a)
BOUT_NO_USING_NAMESPACE_BOUTGLOBALS

Functions

void bout_signal_handler(int sig)

Signal handler - handles all signals.

std::string time_to_hms(BoutReal t)

Write a time in h:mm:ss.s format.

char get_spin()

Produce a spinning bar character.

int BoutInitialise(int &argc, char **&argv)

Initialise BOUT++

Inputs

The command-line arguments argc and argv are passed by reference, and pointers to these will be stored in various places in BOUT++.

Outputs

Any non-zero return value should halt the simulation. If the return value is less than zero, the exit status from BOUT++ is 0, otherwise it is the return value of BoutInitialise.

int bout_run(Solver *solver, rhsfunc physics_run)

Run the given solver. This function is only used for old-style physics models with standalone C functions The main() function in boutmain.hxx calls this function to set up the RHS function and add bout_monitor.

int BoutFinalise(bool write_settings = true)

BOUT++ finalisation. This should be called at the end of the program.

Frees memory, flushes buffers, and closes files. If BOUT++ initialised MPI or external libraries, then these are also finalised.

If write_settings is true, output the settings, showing which options were used. This overwrites the file written during initialisation (BOUT.settings by default)

Variables

const char DEFAULT_DIR[] = "data"
BoutReal simtime = {0.0}
int iteration = {0}
bool user_requested_exit = false
namespace bout

SNB model