carputils
Doxygen code documentation for the python framework controlling openCARP
|
Functions | |
def | carputils_root_dir () |
def | filename () |
Determine carputils settings file name. More... | |
def | assert_type (name, value, type, sequence=False) |
Raise an error if the value is not of the correct type. More... | |
def | load () |
Load the settings file. More... | |
def | default_settings (software_root=None, regression_ref=None, regression_pkg=['devtests'], regression_temp=None, meshalyzer_dir=None, mesh_dir=None, meshtool_dir=None, limpetgui_dir=None, opencarp_src=None, mpiexec=None, flavor=None, email=None, name=None, orcid=None) |
Determine the default configuration options for the settings.yaml file. More... | |
def | new (filename, args, kwargs) |
Generate a new settings file with the default settings. More... | |
def | update (filename) |
Update the keys in the settings file using the backwards compatability list. More... | |
def | yaml_format_seq (seq) |
Format a sequence in YAML syntax. More... | |
def | yaml_format_dict (seq) |
Format a dictionary in YAML syntax. More... | |
def | write_settings_yaml (fields, filename) |
Write the settings file with the provided fields. More... | |
Variables | |
dictionary | BACKWARDS_COMPAT_MAPPING |
list | BACKWARDS_COMPAT_REMOVED |
dictionary | VALIDATION_SINGLE |
dictionary | VALIDATION_SEQUENCE |
list | PATHS |
string | NOSETTINGS_TEMPLATE |
def carputils.settings.config.assert_type | ( | name, | |
value, | |||
type, | |||
sequence = False |
|||
) |
Raise an error if the value is not of the correct type.
name str Name of the variable, used for error messages value object Object to test type of type type Type to check value is sequence bool, optional If True, expect value to be a sequence of type
def carputils.settings.config.carputils_root_dir | ( | ) |
def carputils.settings.config.default_settings | ( | software_root = None , |
|
regression_ref = None , |
|||
regression_pkg = ['devtests'] , |
|||
regression_temp = None , |
|||
meshalyzer_dir = None , |
|||
mesh_dir = None , |
|||
meshtool_dir = None , |
|||
limpetgui_dir = None , |
|||
opencarp_src = None , |
|||
mpiexec = None , |
|||
flavor = None , |
|||
email = None , |
|||
name = None , |
|||
orcid = None |
|||
) |
Determine the default configuration options for the settings.yaml file.
software_root str, optional Default path for built software packages regression_ref str, optional Location of regression reference solution repositories regression_pkg list, optional Default packages to load tests from regression_temp str, optional Temporary location to store simulation results meshalyzer_dir str, optional Parent directory of meshalyzer executable meshtool_dir str, optional Parent directory of meshtool executable limpetgui_dir str, optional Parent directory of main.py executable opencarp_src str, optional Directory containing openCARP source files mesh_dir str, optional Default path to look for meshes flavor str, optional Default solver used (pt, petsc, direct, or ginkgo) email str, optional Email address consistent with your git configuration (.gitconfig) name str, optional User name consistent with your git configuration (.gitconfig) orcid str, optional ORCID of the user
Returns ------- dict The default settings
def carputils.settings.config.filename | ( | ) |
Determine carputils settings file name.
str The settings file path
def carputils.settings.config.load | ( | ) |
Load the settings file.
SettingsNamespace The loaded settings
def carputils.settings.config.new | ( | filename, | |
args, | |||
kwargs | |||
) |
Generate a new settings file with the default settings.
Extra arguments are passed through to default_settings
filename str The path of the settings file to generate
def carputils.settings.config.update | ( | filename | ) |
Update the keys in the settings file using the backwards compatability list.
filename str The path of the settings file to update
def carputils.settings.config.write_settings_yaml | ( | fields, | |
filename | |||
) |
Write the settings file with the provided fields.
fields dict Data to insert into configuration file template filename str Filename to write file to
def carputils.settings.config.yaml_format_dict | ( | seq | ) |
Format a dictionary in YAML syntax.
def carputils.settings.config.yaml_format_seq | ( | seq | ) |
Format a sequence in YAML syntax.
dictionary carputils.settings.config.BACKWARDS_COMPAT_MAPPING |
list carputils.settings.config.BACKWARDS_COMPAT_REMOVED |
string carputils.settings.config.NOSETTINGS_TEMPLATE |
list carputils.settings.config.PATHS |
dictionary carputils.settings.config.VALIDATION_SEQUENCE |
dictionary carputils.settings.config.VALIDATION_SINGLE |