set_small_values_to_zero Interface

public interface set_small_values_to_zero

interface to check for small values


Contents


Module Procedures

private elemental subroutine small_values_real(var, tol)

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.

Arguments

TypeIntentOptionalAttributesName
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

private elemental subroutine small_values_complex(var, tol)

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.

Arguments

TypeIntentOptionalAttributesName
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