Open YaqiWang opened 5 years ago
I just found a bug in an input file that I wrote. I repeatedly have this for NSFVKernels
:
u = u
v = v
And I found in one of the several blocks that I had:
u = v
v = v
It took me three hours to debug this exodiff haha with all the PETSc monitor options you can imagine: -snes_monitor_solution -ksp_view_pmat -snes_monitor_residual
. I didn't consider that the bug could be in my input file instead of in my code. Darn u
and v
look too similar. Anyway I think if I could have written that a level higher and applied to all NSFVKernels
that I probably would have been less likely to make this mistake. One can legitimately argue that this error becomes less likely with an action as well. (And yes I could have also done this with GlobalParams
...)
Right, did you add NSFV support in the NS actions? That will be my first thing to do, hehe.
Action would be ideal. Maybe we need an input file validation tool that does a machine-learning "one of these things is not like the other" check.
Reason
This small (one-line change) yet possibly controversial feature can be done really easily in
Parser
asThis basically allows users to put common parameters shared by for example materials under
[Materials]
block instead of repeatedly under their own sub-blocks. The feature is better than[GlobalParams]
because those params within[Materials]
can only been seen by materials. This limited scope can reduce the possibility of naming conflict among different types of objects.Lots of neutronics models can benefit from this feature because of a number of materials could exist with some common parameters.
Design
This is a completely new feature in the input file and there could be some implications. But conceptually I think this feature is good.
Impact
A new feature.