moose icon indicating copy to clipboard operation
moose copied to clipboard

Consolidate a number of redundant kernels

Open nmnobre opened this issue 11 months ago • 5 comments

Hey,

Reason

My initial motivation was simply to add a scalar coefficient input parameter to VectorTimeDerivative. The issue was I soon realised its scalar variable counterpart, i.e. TimeDerivative, doesn't accept such a parameter because CoefTimeDerivative exists. The natural solution would then be to just add sth like CoefVectorTimeDerivative... Net result: 4 source files + 4 include files + 4 documentation files for what is basically the same code.

Design

Instead, I suggest we consolidate everything under TimeDerivative{.C,.h,.md} by templating the class. I understand I might be breaking some MOOSE code/sqa guidelines, so that's why I want to run this by you (and CIVET) before doing the same to, e.g., (Vector)CoupledTimeDerivative or (Vector)Diffusion, etc...

Impact

Less code, increased maintainability.

nmnobre avatar Mar 13 '24 12:03 nmnobre