Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved input parser #89

Open
nakib opened this issue Feb 20, 2023 · 4 comments
Open

Improved input parser #89

nakib opened this issue Feb 20, 2023 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@nakib
Copy link
Owner

nakib commented Feb 20, 2023

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 nakib added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 20, 2023
@nakib
Copy link
Owner Author

nakib commented Aug 28, 2023

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

@nakib
Copy link
Owner Author

nakib commented Aug 28, 2023

This would definitely be more elegant than the first idea and is also in the functional style (like let in Lisp).

@nakib
Copy link
Owner Author

nakib commented Jan 28, 2024

After exhausting all functional and object oriented options, I think the following is the way to go: https://github.com/nakib/nml4types/

@nakib
Copy link
Owner Author

nakib commented Mar 2, 2024

But the above still won't work for types containing allocatable components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: Next
Development

No branches or pull requests

1 participant