Skip to content

calibrationkey

ModelType module-attribute

ModelType = Union['MicromechanicalBase', 'ElasticityBase', 'YieldFunction']

CalibrationKey

Bases: tuple, ABC

Base class for user-defined calibration keys, defines the setup method for setting the value to the model.

experiment instance-attribute

experiment: 'Experiment'

Current experiment.

experiments instance-attribute

experiments: 'Experiment' | List['Experiment'] | Dict[str, 'Experiment']

Experiments.

__repr__

__repr__() -> str

__str__

__str__() -> str

get abstractmethod

get(model: ModelType) -> float

Get the value from the model.

parse classmethod

parse(key: 'CalibrationKey' | str) -> 'CalibrationKey' | str

Parse the calibration key from the form of module:qualname(key1,key2) to the calibration key object if it can be parsed, otherwise return the original key.

PARAMETER DESCRIPTION
key

The input string.

TYPE: CalibrationKey | str

RETURNS DESCRIPTION
CalibrationKey | str

The calibration key object or the input string.

setup abstractmethod

setup(model: ModelType, value: float)

Set the value to the model.

ExperimentDataMultiplierKey

Bases: CalibrationKey

Calibration key for the data multiplier of the experiment, must be a tuple of (experiment,parameter,).

experiment property

experiment: str

parameter property

parameter: str

get

get(
    model: ModelType,
    *,
    experiments: (
        "Experiment" | Iterable["Experiment"] | Dict[str, "Experiment"] | None
    ) = None
) -> float

setup

setup(model: ModelType, value: float)

ExperimentSpecificKey

Bases: CalibrationKey

A calibration key that is specific to an experiment, must be a tuple of (experiment name, parameter name), the experiment name can be a wildcard pattern.

experiment_name property

experiment_name: str

The experiment name.

parameter property

parameter: str

The parameter name.

get

get(model: ModelType) -> float

match

match() -> bool

Check if the experiment name matches the pattern.

setup

setup(model: ModelType, value: float)

FabricCoefficientKey

Bases: CalibrationKey

A calibration key for the fabric coefficient, must be a tuple of (parameter name,).

coefficient property

coefficient: str

The fabric coefficient.

get

get(model: ModelType) -> float

setup

setup(model: ModelType, value: float)

MaterialFabricCoefficientKey

Bases: CalibrationKey

A calibration key for the material fabric coefficient, must be a tuple of (material name, parameter name).

coefficient property

coefficient: str

The parameter name.

parameter property

parameter: str

The material name.

get

get(model: ModelType) -> float

setup

setup(model: ModelType, value: float)