This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfdf.Standard
95 lines (65 loc) · 3.17 KB
/
fdf.Standard
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
FDF Standard. Version 0.6.6, September 2007
Input lines are parsed and a token list is created. A token is:
* Any number of characters enclosed in a matching pair
of quotes (",',`). Embedded strings are not considered tokens.
The quotes are removed by the parsing routine.
* A string of characters from the set [A-Z,a-z,0-9] of
alphanumeric characters plus $%&@_.-*/^+~ (and any adjacent
unmatched quotes, as in apostrophes)
* The character '<' by itself.
Examples:
MeshCutoff < "File.fdf" 3 tokens: MeshCutoff, <, File.fdf
System_Name Devil's staircase 3 tokens: System_Name, Devil's, staircase
%block AtomicCoordinates %dump < coords.dat 5 tokens
The characters '#', ';', and '!' signal the beginning of a comment. Any
remaining characters on the line are discarded.
Labels and directives (%block, %include, %endblock) are case-insensitive.
Labels are also punctuation-insensitive, by which it is understood that
the characters '.', '_', and '-' are removed before any comparison is made.
Label [ Value ]
This line assigns an optional Value to Label. Value could be
a token or a sequence of tokens not including '<'.
'Numerical' routines such as fdf_integer will only use the first
token, but fdf_string will return the whole list.
%block Label
...
...
...
# Optional comments
%endblock [ Label ]
This construct specifies a block of data that is to be read
by the calling program after a call to fdf_block. The contents
of the block are dumped to fdf_out. %block and %endblock must
be the first tokens in their respective lines.
%block Label < Filename [ %dump ]
Opens Filename in order to read the block. If %dump appears
at the *end* of the line, the contents of Filename are dumped
to fdf_out.
%include Filename # Comments
Opens Filename and continues reading from it.
Label < Filename # Comments
Opens Filename and continues reading from it, ONLY if searching
for Label.
There is a maximum number of files that can be opened at the
same time for fdf processing.
* Debugging and logging.
By default, all the fdf requests are logged, printing the final value
extracted (if it is the default value, it is identified as such).
In MPI operation, only the master node does the logging, unless the
"output-level" is set to a value >= 2. This can be done directly in
the fdf file:
fdf-output 2 # Turn on logging for all nodes
fdf-output 0 # Turn off logging completely
No debugging is done, unless the "debug-level" is set to a value greater
than zero. The most meaningful way to use this feature is to set the
debugging level before the fdf data structures are built. This can be
achieved by calling the routine fdf_setdebug with the appropriate level
and file name *before* the call to fdf_init. This gives full control
over the behavior.
Alternatively, if the library is compiled with the pre-processor symbol
FDF_DEBUG defined, it will set the debug level to 2 (exhaustive) for all
nodes in the system. (It will also set the output level to 2 (all nodes)).
If the debugging level (>=2) is only specified in the fdf file itself,
the library will provide a print-out of the final data structure generated
(in all nodes).
fdf-debug 2