diff options
author | schnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7> | 2005-04-09 13:54:39 +0000 |
---|---|---|
committer | schnetter <schnetter@b716e942-a2de-43ad-8f52-f3dfe468e4e7> | 2005-04-09 13:54:39 +0000 |
commit | 9f9d618e54f91e0eb54c9de197b597ff99ae4749 (patch) | |
tree | 0b7cfa4702dc8335d4660c202b3142e8dda52c80 /src/isnan.c | |
parent | 35d3fe85630895a4ae5ea02f944db946ef97a26e (diff) |
Add some functionality:
Conversion between 4 and 3+1 dimensions
Check for nans (isnan for Fortran)
Gram-Schmidt orthonormalisation
Calculate Riemann, Ricci, and Weyl tensors in 2, 3, and 4 dimensions
Calculate time derivatives
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinUtils/TGRtensor/trunk@21 b716e942-a2de-43ad-8f52-f3dfe468e4e7
Diffstat (limited to 'src/isnan.c')
-rw-r--r-- | src/isnan.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/isnan.c b/src/isnan.c new file mode 100644 index 0000000..a2feeb6 --- /dev/null +++ b/src/isnan.c @@ -0,0 +1,32 @@ +/* $Header$ */ + +#include <math.h> + +#include "cctk.h" + +int CCTK_FCALL CCTK_FNAME(TAT_isnan) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_ISNAN + return isnan(*x); +#else + return 0; +#endif +} + +int CCTK_FCALL CCTK_FNAME(TAT_isinf) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_ISINF + return isinf(*x); +#else + return 0; +#endif +} + +int CCTK_FCALL CCTK_FNAME(TAT_finite) (const CCTK_REAL * restrict const x) +{ +#ifdef HAVE_FINITE + return finite(*x); +#else + return 1; +#endif +} |