this structure summarizes the exit status of a function conforming to one of the generic material property interface.
More...
#include </home/runner/work/MFrontGenericInterfaceSupport/MFrontGenericInterfaceSupport/include/MGIS/MaterialProperty/OutputStatus.hxx>
|
| int | status |
| | exit status
|
|
int | c_error_number |
| | error number reported by the C library.
|
| int | bounds_status |
| | bounds status
|
|
char | msg [512] |
| | error message
|
this structure summarizes the exit status of a function conforming to one of the generic material property interface.
◆ bounds_status
| int mgis_mp_OutputStatus::bounds_status |
bounds status
This status has the following meaning:
- zero means that no argument was outside its bounds or its physical bounds.
- a negative value means that the evaluation failed because one argument went beyond its physical bounds, or beyond its bounds with the strict out of bounds policy. The absolute value gives the rank of this argument (here the rank starts at 1).
- a positive value means that one argument went beyond its bounds with the warning out of bounds policy: the result must be used with caution. The value gives the rank of this argument (here the rank starts at 1).
The result is checked as the arguments: its rank is the number of arguments plus one.
◆ status
| int mgis_mp_OutputStatus::status |
exit status
The exit status is zero if the result has been correctly evaluated.
If the exit status is 1, a result has been computed, but it must be used with caution. This is typically used to report that one argument was out of its bounds.
All negative values indicates that the result is not usable. For a material property, the returned value is nan, except for the exit statuses -3 and -4, for which the computed value is returned.
For a material property, a negative value has the following meaning:
- If the exit status is -1, an argument (or the result) was out of its physical bounds, or out of its bounds and a strict out of bounds policy is declared.
- If the exit status is -2, a C++ exception was thrown. If the exception was a child of std::exception, the content of the string returned by the what method is copied in the msg field. Otherwise, the msg field contains the "unknown exception" string.
- If the exit status is -3, an error occured in the C library, i.e. the errno value was set to a non zero value during the computation. The value of errno corresponding to the error is stored to in the c_error_number field of this structure. The string returned by strerrno is returned. Note that the errno value is always reset to the value it had before the call.
- If the exit status is -4, the computed value is invalid (either nan, inf, or -inf).
- If the exit status is -5, the number of arguments is invalid.
- If the exit status is -6, the parameters of the material property are invalid, for instance because the parameters file could not be read. The msg field contains the error message.
The documentation for this struct was generated from the following file: