nakib/elphbolt

Improved input parser

nakib opened this issue · 4 comments

nakib commented

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 a self% is prepended to every Namelist member. After this step, this file can be directly read into self%<member>.

nakib commented

I think the associate construct can be used to remove the redundant declarations currently done in all the nml style input parsers.

nakib commented

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.