Step Solution Data (step_solution_data)¶
- class pypint.solutions.data_storage.step_solution_data.StepSolutionData(*args, **kwargs)[source]¶
Bases: builtins.object
Storage for the solution of a single time point.
- Finalization
- The attributes (value, time_point, error and residual can only be modified before calling finalize(). It is not intended and possible to definalize a once finalized StepSolutionData instance.
- Comparability
- It can be compared with respect to all numerical comparison operators. For all operators to evaluate to True it is necessary that dim and numeric_type are the same. Equality is given, if time_point, error and residual are the same as well as value with respect to numpy.array_equal(). The other comparison operators do not take value, error and residual into account and induce an order only with respect to time_point.
- Hashable
- It is not hashable due to its wrapping around numpy.ndarray.
- __init__(*args, **kwargs)[source]¶
Parameters: - value (numpy.ndarray) – Solution value. Size of the vector must equal the spacial dimension of the problem.
- time_point (float) – Time point of associated with the solution.
- error (Error or numpy.ndarray) – Error of the solution.
- residual (Residual or numpy.ndarray) – Residual of the solution. Same abundance of constrains apply as for the error.
Raises: Notes
The spacial dimension and the numerical type are derived from the given solution values. Thus, specifying ISolutionData.dim and ISolutionData.numeric_type is not recommended (in fact they are ignored).
- finalize()[source]¶
Locks this storage data instance.
Raises: ValueError – If it has already been locked.
- __weakref__¶
list of weak references to the object (if defined)
- error[source]¶
Accessor for the error.
Returns: error – or None if no error is given Return type: Error Raises: ValueError – If this storage data instance has been finalized. (only setter)
- finalized[source]¶
Accessor for the lock state.
Returns: finilized – True if it has been finalized before, False otherwise Return type: bool
- numeric_type[source]¶
Read-only accessor for the numerical type.
Returns: numeric_type Return type: numpy.dtype
- residual[source]¶
Accessor for the residual.
Returns: residual – or None if no residual is given Return type: Residual Raises: ValueError – If this storage data instance has been finalized. (only setter)