Closed WilkAndy closed 8 years ago
Could probably implement this in the constructor for PorousFlowFluidPropertiesBase that all of the fluid materials inherit from already? This is where _phase_num is read in from the input file
But it is also called in rel perm materials, so probably want a base class for the base class for all of these materials!
Yes, i think you're right, @cpgr (base class for base class). I don't want to do this right now because once everything is merged it'll be clearer exactly where to do it, and also we'll be able to more easily re-factor when we've got our test suite merged.
Agree - lets leave it until then
:+1:
Also
If PorousFlowFluidPropertiesBase inherited from the base class I suggested above you could also have a string member _phase that contains the stringified phase number. That would get rid of the twenty Moose::stringify calls.
Have you started this @WilkAndy? If not, I'll do it now
No, i haven't started. i'm working on something else (not porous flow) presently,
a
I've finished this, but will wait until #7010 is merged before I submit a PR so that I don't reintroduce the UO in the dictator name
Hey, that's cool, thanks @cpgr . I'm really enjoying this collaboration.
@dschwen points out that
if (_phase_num >= _dictator_UO.numPhases())
is called a lot in the level2 materials. He suggests having a base class that holds _phase_num and does the check once. Let's do this once the backlog is merged, @cpgr .