This module contains various methods to check for small, NaN or negative values, equal values or inf values. Interfaces are provided for functionality with real and complex variables.
interface to check for small values
Small value checks for a real variable/array/matrix. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | var | the real variable/array/matrix to check, modified on output |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance to check against |
Small value checks for a complex variable/array/matrix, with the real and imaginary parts checked separately. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout) | :: | var | the complex variable/array/matrix to check, modified on output |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance to check against |
interface to check for NaN values
Checks a given real value/array/matrix for NaN.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var | the real variable/array/matrix to check |
Checks a given complex value/array/matrix for NaN.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var | the complex variable/array/matrix to check |
interface to check for inf values
checks a given real value/array/matrix for infinity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var | the real variable/array/matrix to check |
checks a given complex value/array/matrix for infinity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var | the complex variable/array/matrix to check |
interface to check equality between values/arrays
Equality check between real values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
real(kind=dp), | intent(in) | :: | base | the value(s) to compare against |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Equality check between complex values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
complex(kind=dp), | intent(in) | :: | base | the value(s) to compare against |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
interface to check if values/arrays are zero
Checks if real values are zero
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Checks if complex values are zero
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | value | the complex value(s) to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
interface to check for negative values
Check if values are or contain negative numbers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
interface to check if an array is constant
Check if an array has constant values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | array(:) | the real array to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Checks a given real value/array/matrix for NaN.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var | the real variable/array/matrix to check |
Checks a given complex value/array/matrix for NaN.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var | the complex variable/array/matrix to check |
checks a given real value/array/matrix for infinity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | var | the real variable/array/matrix to check |
checks a given complex value/array/matrix for infinity.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | var | the complex variable/array/matrix to check |
Equality check between real values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
real(kind=dp), | intent(in) | :: | base | the value(s) to compare against |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Equality check between complex values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
complex(kind=dp), | intent(in) | :: | base | the value(s) to compare against |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Checks if real values are zero
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Checks if complex values are zero
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(in) | :: | value | the complex value(s) to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Check if values are or contain negative numbers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | value | the real value(s) to check |
Check if an array has constant values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | array(:) | the real array to check |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance |
Small value checks for a real variable/array/matrix. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout) | :: | var | the real variable/array/matrix to check, modified on output |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance to check against |
Small value checks for a complex variable/array/matrix, with the real and imaginary parts checked separately. Values that are smaller than the specified tolerance tol are set to zero. If tol is not present, DP_LIMIT is used as tolerance.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout) | :: | var | the complex variable/array/matrix to check, modified on output |
||
real(kind=dp), | intent(in), | optional | :: | tol | optional tolerance to check against |