-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Add API to get fluid properties #17446
Labels
C: Modules
P: normal
A defect affecting operation with a low possibility of significantly affects.
T: task
An enhancement to the software.
Comments
aprilnovak
added
P: normal
A defect affecting operation with a low possibility of significantly affects.
T: task
An enhancement to the software.
labels
Mar 29, 2021
Let's go with the other option, i.e. creating a class for this, so the design would be:
The c-tor will save the reference to the MOOSE object, which we will then use to get the object name when reporting errors. The impact on code interested in using this will be:
|
aprilnovak
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 2, 2021
…pe is attempting to downcast. Refs idaholab#17446
aprilnovak
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 2, 2021
…pe is attempting to downcast. Refs idaholab#17446
aprilnovak
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 2, 2021
…pe is attempting to downcast. Refs idaholab#17446
loganharbour
pushed a commit
to aprilnovak/moose
that referenced
this issue
Apr 5, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446
loganharbour
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 5, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446
loganharbour
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 5, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446
loganharbour
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 5, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446 and idaholab#17512
loganharbour
added a commit
to aprilnovak/moose
that referenced
this issue
Apr 5, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446 and idaholab#17512
loganharbour
added a commit
to loganharbour/moose
that referenced
this issue
Apr 13, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446 and idaholab#17512
aeslaughter
pushed a commit
to aeslaughter/moose
that referenced
this issue
Jun 2, 2021
Co-authored-by: April Novak <novak@berkeley.edu> refs idaholab#17446 and idaholab#17512
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C: Modules
P: normal
A defect affecting operation with a low possibility of significantly affects.
T: task
An enhancement to the software.
Reason
There are a number of different base classes in the fluid properties module that the fluid property user objects derive from - such as
SinglePhaseFluidProperties
andTwoPhaseFluidProperties
. Various MOOSE apps may place specific requirements on which of these fluid property options are valid - for instance, Pronghorn restricts fluid properties to those deriving fromSinglePhaseFluidProperties
. However, to fully check that a user does not try to use a different fluid property base in Pronghorn, we need to downcast aFluidProperties *
userobject in each and every Pronghorn class that uses fluid properties to make sure that the correct type was provided:This is tedious and open to errors if you forget to perform this check in new classes. Further, the downcasting makes us use pointers, whereas MOOSE would like all MOOSE-based apps to use references whenever possible.
Design
Add a free function like
getFluidProperties<T>("name")
that automatically checks whether the correct fluid property type has been provided by the user, and error if not.Impact
Better error checking and protecting Pronghorn users from accidentally using fluid properties that are incompatible with Pronghorn. Benefits to all other applications using fluid properties as well.
The text was updated successfully, but these errors were encountered: