Exawind / amr-wind

AMReX-based structured wind solver
https://exawind.github.io/amr-wind
Other
103 stars 78 forks source link

Check duplicate entries in input files #1072

Closed marchdf closed 1 month ago

marchdf commented 1 month ago

Summary

This checks that input values where duplicates can cause issues are not allowed.

For example, the issue in https://github.com/Exawind/amr-wind/issues/1071 was caused by a typo that had duplicate labels in the sampling types. This led to a netcdf error. This PR implements a bunch of checks where we expect duplicate entries to be a problem.

Pull request type

Please check the type of change introduced:

Checklist

This PR was tested by running:

moprak-nrel commented 1 month ago

Should we add the ParmParse identifier to the assert message? Might help diagnose the duplicate entry easily on a large input file. Fine with the message as is too.

marchdf commented 1 month ago

You have no idea what you are asking for @moprak-nrel

marchdf commented 1 month ago

Ok I made some better assert ;) what do you think?