1. The Enzo Project
  2. Untitled project
  3. enzo-dev
  4. Pull requests

Pull requests

#221 Merged
Repository
enzo-tip
Branch
week-of-code
Repository
enzo-dev
Branch
week-of-code

Updated 'How to Add a New Baryon Field' Documentation

Author
  1. meecegr
Reviewers
Description

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.

Comments (6)

  1. dcollins4096

    Looks good.

    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.

    1. Brian O'shea

      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.

      1. dcollins4096

        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?

        1. meecegr author

          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.