pyissm.model.classes.issmsettings
- class pyissm.model.classes.issmsettings(other=None)
Bases:
manage_stateISSM general settings class for ISSM.
This class contains general settings and configuration parameters for the ISSM framework. It controls output frequency, I/O behavior, memory management, solver settings, and other system-wide parameters that affect the overall behavior of ISSM simulations.
- Parameters:
other (any, optional) – Any other class object that contains common fields to inherit from. If values in
otherdiffer from default values, they will override the default values.
- results_on_nodes
List of output for which results will be output for all the nodes of each element. Use ‘all’ for all output on nodes.
- Type:
list, default=[]
- io_gather
I/O gathering strategy for result outputs.
- Type:
int, default=1
- lowmem
Is the memory limited? (0 or 1).
- Type:
int, default=0
- output_frequency
Number of time steps between two saves (e.g., 5 means that results are only saved every 5 time steps).
- Type:
int, default=1
- sb_coupling_frequency
Frequency at which StressBalance solver is coupled.
- Type:
int, default=1
- checkpoint_frequency
Frequency at which the runs are being recorded, allowing for a restart.
- Type:
int, default=0
- waitonlock
Maximum number of minutes to wait for batch results, or return 0 (default is 2^31-1).
- Type:
int, default=2147483647
- solver_residue_threshold
Throw an error if solver residue exceeds this value (NaN to deactivate).
- Type:
float, default=1e-6
Examples
>>> md.settings = pyissm.model.classes.issmsettings() >>> md.settings.output_frequency = 5 >>> md.settings.lowmem = 1 >>> md.settings.results_on_nodes = ['Vel', 'Thickness']
- __init__(other=None)
Initialize the instance with optional field inheritance.
- Parameters:
other (
object, optional) – Another instance to inherit field values from. If provided, any fields in the current instance that differ from the default values and exist in ‘other’ will be replaced with the values from ‘other’.
Notes
The inheritance process:
Iterates through all attributes of the current instance
Checks if the same attribute exists in the ‘other’ instance
Compares field values using _fields_equal()
If different, replaces the current value with the ‘other’ value
This enables the common ISSM pattern where classes can inherit configurations from existing instances while maintaining their default values for unspecified fields.
Methods
__init__([other])Initialize the instance with optional field inheritance.
check_consistency(md, solution, analyses)Check consistency of the [issmsettings] parameters.
issm_enum_string()Default ISSM C++ enum string used during marshalling.
marshall_class(fid, prefix[, md])Marshall [issmsettings.issmsettings] parameters to a binary file.
- check_consistency(md, solution, analyses)
Check consistency of the [issmsettings] parameters.
- Parameters:
md (
pyissm.model.Model) – The model object to check.solution (
str) – The solution name to check.analyses (list of
str) – List of analyses to check consistency for.
- Returns:
md – The model object with any consistency errors noted.
- Return type:
- marshall_class(fid, prefix, md=None)
Marshall [issmsettings.issmsettings] parameters to a binary file.
- Parameters:
fid (
file object) – The file object to write the binary data to.prefix (
str) – Prefix string used for data identification in the binary file.md (
pyissm.model.Model, optional) – ISSM model object needed in some cases.
- Return type:
None