snek5000#

API reference

Sub-packages

resources

resources for building

output

Manage outputs

solvers

Solver framework

util

Miscellaneous utilities

Modules

clusters

Cluster utilities

const

Calculate physical constants

info

Information classes

log

Logging A logger instance (variable logger).

magic

IPython magic extensions

make

Snakemake interface

operators

Operators

params

Runtime parameters Scripting interface for Nek5000 parameter file.

config

Utility for configuration files

Module Attributes

get_status(path_dir[, session_id, verbose])

Get status of a simulation run by verifying its contents.

load_for_restart([path_dir, use_start_from, ...])

Load params and Simul for a restart.

Functions

get_nek_source_root()

Path of Nek5000 source code.

get_snek_resource(resource_name)

Fetches path of a file from subpackage snek5000.resources.

load_simul([path_dir, session_id, reader])

Loads a simulation

snek5000.get_nek_source_root()[source]#

Path of Nek5000 source code.

snek5000.get_snek_resource(resource_name)[source]#

Fetches path of a file from subpackage snek5000.resources.

Parameters

resource_name (str) – Name of a file packaged in snek5000.resources

snek5000.get_status(path_dir, session_id=None, verbose=False)[source]#

Alias for snek5000.util.restart.get_status()

snek5000.load(path_dir='.', session_id=None, reader=True)#

Alias for load_simul()

snek5000.load_for_restart(path_dir='.', use_start_from=None, use_checkpoint=None, session_id=None, verify_contents=True, new_dir_results=False, only_check=False)[source]#

Alias for snek5000.util.restart.load_for_restart()

snek5000.load_params(path_dir='.')[source]#

Load a snek5000.params.Parameters instance from path_dir.

Parameters

path_dir (str or path-like) – Path to a simulation directory.

Returns

params

Return type

snek5000.params.Parameters

snek5000.load_simul(path_dir='.', session_id=None, reader=True)[source]#

Loads a simulation

Todo

Now only the parameters are loaded. Load state too.

Parameters
  • path_dir (str or path-like) – Path to a directory containing a simulation. If not provided the current directory is used.

  • session_id (int) – Indicate which session directory should be used to set sim.output.path_session. If not specified it would default to the session_id and path_session values last recorded in the params_simul.xml file

  • reader (bool or str) – By default (reader=True) invokes sim.output.phys_fields.init_reader(). If a string is provided, it is passed onto sim.output.phys_fields.change_reader(reader).

Hint

An common use case of session_id parameter is to load field files from old sessions using the sim.output.get_field_file method