|
carputils
Doxygen code documentation for the python framework controlling openCARP
|
The core infrastructure of the model component classes. More...
Classes | |
| class | Modifier |
| Describes a parameter assigment modifier. More... | |
| class | AddModifier |
| Describes a parameter add modifier. More... | |
| class | MultModifier |
| Describes a parameter multiply modifier. More... | |
| class | AbstractModelComponent |
| Describes an abstract model component. More... | |
| class | ParameterSet |
| Describes a set of parameters that can be generated into a single string. More... | |
| class | ParameterSetMixin |
| A mixin to add a parameter set field to a model component class. More... | |
| class | RegionMixin |
| A mixin to add region fields to a model component class. More... | |
| class | SingleIDRegionMixin |
| A mixin to add fields for a single-ID region to a model component class. More... | |
| class | ModelMixin |
| More concrete version of the ParameterSetMixin for ep/mechanics models. More... | |
| class | DreamMixin |
| A mixin to extend model components with DREAM-specific parameter fields. More... | |
| class | AbstractIonicModel |
| class | ExternalIonicModel |
| Describes the passive ionic model configuration. More... | |
| class | AbstractMechanicsMaterial |
| class | AbstractPlugin |
| class | NoPlugin |
| Placeholder representing no plugin to be used. More... | |
Functions | |
| def | ensure_set (obj, attributes) |
| Check that the named attributes are not None on an object. More... | |
| def | optionlist (components) |
| Generate a list of command line options from the specified components. More... | |
| def | convert_param_dict (params) |
| convert parameter dict to comma separated string list More... | |
The core infrastructure of the model component classes.
model component Model components are some aspect of an openCARP simulation setup that can be mapped onto a particular part of the command line. These can be things like ionic model regions, conductivity regions and stimuli. param The tool used to generate the openCARP command line. param structure A structure in param that forms part of an array within the command line options and has attributes that can be set by dot notation e.g. -stim[0].name. field A single attribute of a param structure, e.g. 'name' in the stimulus example above. parameter set A set of options that are passed to openCARP as a single field in a single string in a p1=0,p2=4 format.
This module makes use of Python's multiple class inheritance functionality to combine features in a modular way. An important aspect of this is are the 'Mixin' classes - these are classes which are not intended to be used directly, but are intended to add additional functionality by being combined with other classes through multiple inheritance.
Multiple inheritance is used in the classes of this module in their __init__ initialiser methods and opt methods. Note the use of super in these methods
__init__, each class or Mixin processes the arguments it is responsible for, and passes the remaining arguments to the next class in the resolution order. opt similarly adds its own options on to the end of its parent class's options, allowing each Mixin to retain its own responsibilities. | def carputils.model.general.convert_param_dict | ( | params | ) |
convert parameter dict to comma separated string list
| def carputils.model.general.ensure_set | ( | obj, | |
| attributes | |||
| ) |
Check that the named attributes are not None on an object.
| def carputils.model.general.optionlist | ( | components | ) |
Generate a list of command line options from the specified components.