CERN homepage INFN homepage
FLUKA: 2.2.2} Input alignment Previous Index Next

2.2.2} Input alignment

 ----------------------
 Be careful to properly align keywords and numbers. Format is not free, unless
 a command is issued at the beginning of input: see option GLOBAL or FREE.
 Even in the free format for the input file, the part of the input describing
 the geometry can still be written in fixed format (which is different from
 the general FLUKA input format, see Chap. 6}). There is the possibility of
 having free format also for the geometry part: this can also be activated
 using the GLOBAL command.

 In fixed format, in order to ensure proper alignment, a comment line showing
 a scale can be used anywhere in the input file, for instance:
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
In numerical fields, blanks are treated as zero. Therefore, numbers written with a decimal period and without an exponent (e.g. 1.2345) can be placed anywhere inside their respective format fields, For instance, the following two input lines are equally acceptable: BEAM 200. 0.2 1.5 1.2 0.7 1.0 PROTON
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
BEAM 200. 0.2 1.5 1.2 0.7 1.0PROTON If a number is written in exponential notation (e.g. 2.3E5) or in integer form (without decimal point), it must be aligned to the right of the field. Depending on the platform and the compiler, sometimes the number is correctly interpreted even if the alignment rule is not respected. However THIS IS NOT GUARANTEED AND THE RIGHT ALIGNMENT RULE SHOULD ALWAYS BE FOLLOWED. For instance in:
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
BEAM 2.E2 0.2 1.5 1.2 0.7 1. PROTON the first value might be interpreted as 2.E200. Another case is the following:
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
BEAM 200. 0.2 1.5 1.2 0.7 1 PROTON here the last numerical field would be interpreted as 1000000000. To avoid mistakes due to this kind of input errors, the present FLUKA versions now recognise such potential problems and the program is forced to stop. At the same time a message is printed on the standard output file, as shown here for the above example: *** The 6th field 1 of the following input card *** BEAM 200. 0.2 1.5 1.2 0.7 1 PROTON *** does not contain a valid formatted fortran real number!!! *** *** It is ambiguous and it could be read differently on different compilers *** *** depending how strictly the blank=0 formatted input rule is implemented *** Keywords (character strings such as BEAM and PROTON) must be aligned to the left of their field and must be in upper case. An exception is the continuation character & used in some commands, which can be placed anywhere within its 10-characters field. Non-numerical values of WHATs ("names") can be aligned anywhere within the corresponding fixed-format fields. Sometimes a special option requires a region or a particle number to be entered with a negative sign: in this case the equivalent name must also be entered preceded by a minus sign.

Previous Index Next