fluidsimfoam.solvers#

Define and use solvers

base

Base class for the sim object

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.

fluidsimfoam.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

fluidsimfoam.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

fluidsimfoam.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