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

AD: Support primary input parsing through file and strings #643

Merged
merged 10 commits into from
Jan 22, 2021

Conversation

andrew-platt
Copy link
Collaborator

This pull request is ready for merging.

Feature or improvement description
This PR changes the method that the AD15 primary input file is handled. The file is now read into a data structure using the ProcessComFile, then parsed using the ParseVar commands. This also allows direct passing of the AD15 primary input file data structure to avoid IO.

Passing of other files in AD15 is not yet enabled. So those files (FVW, blade files, airfoil tables, etc) are still read. Similar changes would be required to enable passing those files. This PR is being submitted now with only the passing of the primary AD15 file so as to not get too far out of sync with the rest of the code base. The other passing of other files may be added at a later date.

Impacted areas of the software
This only affects the handling of the AD15 primary input file. No other code should be affected, and no test cases should be affected by this change.

Additional supporting information
This is part of a larger effort of the Integration task within the ATLANTIS-WEIS program.

Testing
No additional testing is added with this PR.

Copy link
Contributor

@ebranlard ebranlard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. 320 lines of code less to parse an input file, and the possibility to read to read it from the fileinfo, with better error handling, that's definitely worth it!

One thing I would consider (for this pull request or another), is that when an input is missing, provide a link to the user as to where to find the latest format. Maybe the dev branch of readthedocs api_change (but that might not be easy to read), or the dev-branch of r-test (not ideal neither, but would definitely be up to date). Up to you!

@andrew-platt
Copy link
Collaborator Author

Good point. It can be really hard for an outside user to know where the latest input file is located. I'm not sure where we would want to point them to. I wonder if we could get the git hash for the r-test the build was linked to, and maybe a generic location (r-test/dev?) for when it gets compiled without git (we do something similar for the git hash that appears at the startup of OpenFAST).

Copy link
Collaborator

@rafmudaf rafmudaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @andrew-platt good work!

@rafmudaf rafmudaf changed the title passing of AD15 primary file AD: Support primary input parsing through file and strings Jan 22, 2021
@andrew-platt andrew-platt merged commit ea03fc5 into OpenFAST:dev Jan 22, 2021
@andrew-platt andrew-platt deleted the f/AD15_InputFileHandling branch January 22, 2021 20:36
@rafmudaf rafmudaf mentioned this pull request May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants