fluidsim.util.scripts.restart

Restart a fluidsim simulation (fluidsim.util.scripts.restart)

fluidsim.util.scripts.restart.create_parser()

Create the argument parser with default arguments

fluidsim.util.scripts.restart.restart(args=None, **defaults)

Restart a simulation

fluidsim.util.scripts.restart.main()

Entry point fluidsim-restart

class fluidsim.util.scripts.restart.Restarter[source]

Bases: RestarterABC

create_parser()[source]

Create the argument parser with default arguments

_get_params_simul_class(args)[source]

Create params object and Simul class

_set_params_time_stepping(params, args)[source]

Set time stepping parameters

_start_sim(sim, args)[source]

Start the new simulation

_check_params_time_stepping(params, path_file, args)[source]

Check time stepping parameters

Help message

usage: fluidsim-restart [-h] [-oc] [-oi] [--modify-params MODIFY_PARAMS]
                        [--new-dir-results] [--t_approx T_APPROX]
                        [--add-to-t_end ADD_TO_T_END]
                        [--add-to-it_end ADD_TO_IT_END] [--t_end T_END]
                        [--it_end IT_END] [--merge-missing-params]
                        [--max-elapsed MAX_ELAPSED]
                        path

Restart a fluidsim simulation

positional arguments:
  path                  Path of the directory or file from which to restart

options:
  -h, --help            show this help message and exit
  -oc, --only-check     Only check what should be done
  -oi, --only-init      Only run initialization phase
  --modify-params MODIFY_PARAMS
                        Code modifying the `params` object.
  --new-dir-results     Create a new directory for the new simulation
  --t_approx T_APPROX   Approximate time to choose the file from which to
                        restart
  --add-to-t_end ADD_TO_T_END
                        Time added to params.time_stepping.t_end
  --add-to-it_end ADD_TO_IT_END
                        Number of steps added to params.time_stepping.it_end
  --t_end T_END         params.time_stepping.t_end
  --it_end IT_END       params.time_stepping.it_end
  --merge-missing-params
                        Can be used to load old simulations carried out with
                        an old fluidsim version.
  --max-elapsed MAX_ELAPSED
                        Maximum elapsed time.

Functions

create_parser()

Create the argument parser with default arguments

Classes

Restarter()