Consistency in Parthenon Hook Function Arguments
Opened this issue · 0 comments
PR #999 argued in favor of using MeshBlockData<Real> *mbd
function arguments for a newly added PostInitializaiton
hook. This inspired some discussion regarding consistency between hook function arguments.
For example, many hooks take MeshData<Real>
or MeshBlockData<Real>
arguments (which comes with the nicety that downstream users can template
on typename
to interface with both). However, the MeshBlock
variation of ProblemGenerator
is somewhat unique in that it takes *pmb
(the Mesh
variation takes as argument MeshData<Real>
).
Here, I propose that we try to enforce some form of consistency between hook function arguments. In the example above, I'd advocate for requiring the MeshBlock
variation of ProblemGenerator
s take MeshBlockData<Real>
as function argument. Of course, this would be a breaking change... requiring downstream users to update all their pgen.