Open nakib opened 1 year ago
I think the associate
construct can be used to remove the redundant declarations currently done in all the nml style input parsers.
This would definitely be more elegant than the first idea and is also in the functional style (like let
in Lisp).
After exhausting all functional and object oriented options, I think the following is the way to go: https://github.com/nakib/nml4types/
But the above still won't work for types containing allocatable components.
The current input file parser based on
namelist
requires an intermediate variable before reading into the fields of a data type. Need a better method.One option could be to internally generate an
internal_input.nml
file where aself%
is prepended to every Namelist member. After this step, this file can be directly read intoself%<member>
.