blob: e6d75c21eef7dff8f04b0ba6da33385fa669a817 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
Cactus Code Thorn NaNChecker
Authors : Thomas Radke (tradke@aei.mpg.de)
CVS info : $Header$
--------------------------------------------------------------------------
Purpose of the thorn:
This thorn can be used to analyze CCTK variables of real or complex data type
for NaN (Not-a-Number) and (on availability of finite(3)) infinite values.
It does this by registering a routine at CCTK_POSTSTEP which checks at every
NanChecker::check_every
iteration all the variables listed in
NaNChecker::check_vars
and - in case a NaN was found - performs an action as specified in
NaNChecker::action_if_found
Currently these actions can be to
* just print a level 1 warning message telling you where NaNs were found
and how many (for grid array variables).
For grid arrays it will also print level 2 warnings with the array index
(in fortran order) for all NaN elements. You can limit the number of
such warnings by setting the 'NanChecker::report_max' parameter.
* also set the CCTK termination flag so that Cactus will stop the evolution
loop and gracefully terminate at the next time possible (giving you the
choice of outputting the data from the last evolution timestep),
* print the warning message(s) and immediately terminate Cactus
by a call to CCTK_Abort()
|