sailfish.driver

Library functions and command-line access to the simulation driver.

Functions

append_timeseries(state)

Append to the driver state timeseries for post-processing.

first_not_none(*args)

init_logging()

Convenience method to enable logging to standard output.

keyed_event(item)

Return a key, val pair where the value string describes a recurrence rule.

keyed_value(item)

Return a key, val pair from a "key=val" string.

load_checkpoint(chkpt_file)

Load the simulation state from a pickle file.

load_user_config()

Initialize user extensions: setups and solvers outside the main codebase.

main()

General-purpose command line interface.

newest_chkpt_in_directory(directory_name)

run(setup_name[, quiet])

Run a simulation with no side-effects, and return the final state.

simulate(driver)

Main generator for running simulations.

update_dict_where_none(new_dict, old_dict[, ...])

Like dict.update, except key=value pairs in old_dict are only used to add / overwrite values in new_dict if they are None or missing.

update_where_none(new, old[, frozen])

Same as update_dict_where_none, except operates on (immutable) named tuple instances and returns a new named tuple.

write_checkpoint(number, outdir, state)

Write the simulation state to a file, as a pickle.

Classes

DriverArgs([setup_name, chkpt_file, ...])

Contains data used by the driver.

DriverState(iteration, driver, mesh, ...)

Contains the stateful variables in use by the simulate function.

Exceptions

ConfigurationError

An invalid runtime configuration

ExtensionError

An invalid extension was specified