matflow.param_classes.moose.MooseInputDeck#
- class matflow.param_classes.moose.MooseInputDeck(variables=None, **block_dat)#
Bases:
ParameterValueMoose input parametrisation.
Notes
We don’t attempt to parse value types (e.g. floats, ints); everything stays as a string.
Methods
Add variables to the input deck.
Write a list (from an element group) of parameter values to an HDF5 group.
Write this parameter value to an HDF5 group.
Generate from an existing input file, optionally with updates to the specified paths.
Generate from a string, like that found in a file.
Parse the contents of a MOOSE input deck file, returning the both the nested block structure, and any top-level variables.
Prepare this parameter value for serialisation as JSON.
Extract a parameter value from an HDF5 group.
Extract a parameter value from JSON data.
Serialise this parameter value as a dictionary.
Write the input file to disk.
Transform to a string.
Update paths within the input deck with the specified values.
- Parameters:
variables (dict | None) –
- add_variables(vars)#
Add variables to the input deck.
- classmethod dump_element_group_to_HDF5_group(objs, group)#
Write a list (from an element group) of parameter values to an HDF5 group.
- Parameters:
objs (list[Self]) –
group (HDF5Group) –
- dump_to_HDF5_group(group)#
Write this parameter value to an HDF5 group.
- Parameters:
group (HDF5Group) –
- classmethod from_file(path, updates=None)#
Generate from an existing input file, optionally with updates to the specified paths.
- classmethod from_string(string, updates=None)#
Generate from a string, like that found in a file.
- static parse_from_string(contents)#
Parse the contents of a MOOSE input deck file, returning the both the nested block structure, and any top-level variables.
- prepare_JSON_dump()#
Prepare this parameter value for serialisation as JSON.
- classmethod save_from_HDF5_group(group, param_id, workflow)#
Extract a parameter value from an HDF5 group.
- classmethod save_from_JSON(data, param_id, workflow)#
Extract a parameter value from JSON data.
- to_string()#
Transform to a string.