snek5000.solvers#

Solver framework

base

Nek5000 base solver

kth

KTH base solver

Functions

get_solver_package(name_solver)

Return name of the solver package by checking the snek5000.solvers entrypoint group.

get_solver_short_name(path_dir)

Detects short name of the solver from info_solver.xml if present or the path.

is_package(module)

Checks if a module is a package or not.

snek5000.solvers.is_package(module)[source]#

Checks if a module is a package or not. As of PEP 451 this information is also available on the module’s __spec__.submodule_search_locations attribute, which will not be None for packages.

Parameters

module (str or module) –

Return type

bool

snek5000.solvers.get_solver_package(name_solver)[source]#

Return name of the solver package by checking the snek5000.solvers entrypoint group.

Parameters

name_solver (str) – Short name of the solver

Return type

str

snek5000.solvers.get_solver_short_name(path_dir)[source]#

Detects short name of the solver from info_solver.xml if present or the path.

Parameters

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

Returns

short_name

Return type

str