Register equation types to session reader
Issue/feature addressed
The EqType
solver property defined in the session file, as in,
<SOLVERINFO>
<I PROPERTY="EQTYPE" VALUE="UnsteadyNavierStokes"/>
is not registered to the session reader. As a consequence, method SessionReader::verifySolverInfo
will not check validity of EqType
values.
Proposed solution
Although an error will eventually be raised from the IncNavierStokes
constructor, registering EqType
to the session reader would allow SessionReader::verifySolverInfo
to also check if the property is registered or not.
Implementation
EqType
property along with possible values are registered using SessionReader::RegisterEnumValue
method just like other solver properties are, see from instance Driver.cpp
.
With this patch, the following
<SOLVERINFO>
<I PROPERTY="EQTYPE" VALUE="NavierStokes"/>
will cause the session reader to error out with
Value 'NavierStokes' is not valid for property 'EqType'
Tests
Eventually, a test could check error status with bogus session file.
Notes
Please add any other information that could be useful for reviewers.
Checklist
-
Functions and classes, or changes to them, are documented. -
User guide/documentation is updated. -
Changelog is updated. -
Suitable tests added for new functionality. -
Newly added files are correctly formatted. -
License added to any new files. -
No extraneous files have been added (e.g. compiler output or test data files).
Merge request reports
Activity
added typeenhancement label
added 1 commit
- b4f8a165 - UnSteadynavierStokes -> UnsteadyNavierStokes in test
changed milestone to %v5.2.0
@tlestang This looks all fine to me. Do you want to apply the reformatting and we can get this one merged?
added 51 commits
-
f919bb09...fedf5314 - 49 commits from branch
master
- c6d19eef - Merge state of master branch before global reformatting
- e8b4129f - [formatting] Apply clang-format 11
-
f919bb09...fedf5314 - 49 commits from branch
added 7 commits
-
e8b4129f...2e6cbd65 - 6 commits from branch
master
- 2ce75e24 - Merge branch 'master' into register_eqtype
-
e8b4129f...2e6cbd65 - 6 commits from branch
Resolving the conflicts due to reformatting (6a3e03cf) with
- Merging last commit before reformatting in branch
- Applying clang-format on files modified since branching off master
Merging latest master with the "ours" strategygit merge origin/master -s ours
Edited by Thibault Lestangenabled an automatic merge when the pipeline for 2ce75e24 succeeds
added 13 commits
-
e8b4129f...07416772 - 12 commits from branch
master
- 84c8cb48 - Merge branch 'master' into 'register_eqtype'
-
e8b4129f...07416772 - 12 commits from branch