Skip to content
Snippets Groups Projects
Commit c3cbad74 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

elemental version of checkfield

parent 4b747e49
No related branches found
No related tags found
No related merge requests found
MODULE utility
IMPLICIT NONE
PUBLIC :: checkfield
PUBLIC :: checkfield, checkelem
CONTAINS
FUNCTION is_nan(x,str) RESULT(isn)
......@@ -62,4 +62,15 @@ CONTAINS
mlend= is_nan( REAL(sumfield),str).OR.is_inf( REAL(sumfield),str) &
.OR. is_nan(AIMAG(sumfield),str).OR.is_inf(AIMAG(sumfield),str)
END FUNCTION checkfield
FUNCTION checkelem(elem,str) RESULT(mlend)
use prec_const, ONLY: dp
IMPLICIT NONE
COMPLEX(dp), INTENT(IN) :: elem
CHARACTER(LEN=*), INTENT(IN) :: str
LOGICAL :: mlend
mlend= is_nan( REAL(elem),str).OR.is_inf( REAL(elem),str) &
.OR. is_nan(AIMAG(elem),str).OR.is_inf(AIMAG(elem),str)
END FUNCTION checkelem
END MODULE utility
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment