Since the old documentation was very sparse, I have added a more detailed description of how to add a new Baryon Field in Enzo. I have also added some information about field conservation.
I like that you focus on putting the code into InitializeUniformGrid. Do you have a minute to make the bit on "How To Add A Test Problem" explicitly say "Call Initialize Uniform Grid First." Presently the docs go through the details of adding the FieldType array, but I think we should make InitializeUniformGrid a necessary and sufficient part of a new problem type. Not a blocker for this PR.
Just to clarify: you're asking Greg to edit the "How to add a test problem" docs in a second PR, correct? If so, I'm on board with that, and it ought to be straightforward to do.
That's correct. I think it's relevant to the current PR, since if a user adds the new BaryonField to InitializeUniformGrid but then tries to run a problem that doesn't actually call it.
Actually, the current PR should say something about ensuring that InitializeUniformGrid is in fact called in their problem type. Could you add a line to that effect?
I can make add some information about calling InitializeUniformGrid. I
agree that it would make sense to have a note about it in the 'How To Add a
New Baryon Field' doc as well as in the 'Adding a new test problem' doc. I
will add a note that while users can in theory reimplement the field
initialization stuff from InitializeUniformGrid in their own code, a call
to InitializeUniformGrid is cleaner and simpler.