use lowercase for tags
Closed
use lowercase for tags
use lowercase for tags
I propose to use lower case for tags. It turns out that it is confusing that for same tags we use uppercase. So I propose
# Comments with additional info about data set
# Comments are ignored when reading by the parser
nx 24 # lattice
ny 28 # lattice
nz 32 # lattice
dx 1 # spacing
dy 1 # spacing
dz 1 # spacing
To maintain compatibility with the previous version, the parser will be CASE-INSENSITIVE for the listed above tags. I mean that in wtxt I can write it as:
NX 24 # lattice
NY 28 # lattice
NZ 32 # lattice
DX 1 # spacing
DY 1 # spacing
DZ 1 # spacing
but this I keep only for compatibility.
Note: This point I regard, as important because it turned out that keeping uppercase for tags like NX, DX introduces sometimes conflicts with W-SLDA, where NX, DX, ... are predefines.
When should I switch to lowercase variables? Will this break the current parser, or is it already case insensitive?
A few more suggestions:
- We should probably include a W-DATA version number in the
.wtxt
file. This could be in a comment so it does not break the original parser, or simply no explicit version implied version 0 (current version?). - If
datadim < 3
then don't requiredz
,nz
, etc. This allow one to distinguish between a 2D simulation (nodz
) and a 3D simulation with plane-waves. This will be the case ofwdata>=0.2.0
. - For variables and constants, I would recommend NOT doing an automatic conversion to lower-case... just for the special variables.
- We should probably include a W-DATA version number in the
mentioned in commit 26e38d10
mentioned in commit 769ce17a
mentioned in commit ee3e2153