BOUT-dev
BOUT-dev copied to clipboard
Don't transform inputs from field aligned by default?
At the moment the default value of input:transform_from_field_aligned
is true
https://github.com/boutproject/BOUT-dev/blob/ab69d52f362dcaaddb22f3bd3b16aa7bab924d84/src/field/field_factory.cxx#L57-L58
I see two downsides:
- This setting gives initial values that are discontinuous between SOL and PFR in the divertor legs (if they have z-dependence)
- It is inconsistent with the behaviour when using FCI, as FCI cannot transform to/from field-aligned, so just skips this step.
There is also a comment in field_factory.cxx
https://github.com/boutproject/BOUT-dev/blob/ab69d52f362dcaaddb22f3bd3b16aa7bab924d84/src/field/field_factory.cxx#L315-L316
Should we change the default to false
for 5.0.0? I vote for yes.
Note: if we change this, don't forget to update the docs in https://github.com/boutproject/BOUT-dev/blob/next/manual/sphinx/user_docs/variable_init.rst.
false
is probably better, yes, but I am a bit worried about breaking old input files. Does it make sense to warn if the default value is used? Or to perhaps add it to the input file upgrader, setting it explicitly to true
if it doesn't exist?
Yes I think when this flag was introduced the default was chosen to be true as this kept backwards compatibility but I can't see any problem with just setting this flag true in the examples etc. and documenting the change.
Or to perhaps add it to the input file upgrader, setting it explicitly to
true
if it doesn't exist?
This sounds ideal to me :+1: