Do not set AddParticleAttributes when initializing a run.

#208 Merged
  1. Nathan Goldbaum

This fixes an issue where particle attributes might be zeroed out when restarting a simulation.

See the description for PR 203 for more details.

Comments (7)

  1. Brian OShea

    Small suggestion: if AddParticleAttributes is now a completely internal parameter, does it make sense to remove it from WriteParameterFile as well?

    1. Nathan Goldbaum author

      I'm not sure I understand - are you saying that I should make it a completely internal parameter? The value of the parameter is still read in inside ReadParameterFile, we just don't check if it's set in that file anymore.

        1. Nathan Goldbaum author

          Then how would I restart a simulation to include star particle creation? Would I no longer set it inside of the data dump's parameter file?

  2. Brian OShea

    One more suggestion: update the docs to:

    1) remove any mention of AddParticleAttributes from the "Particle parameters" page and 2) to explain that star particles can be turned on after the simulation is initialized in the "Star formation and feedback" page.

  3. Devin Silvia

    Not to nitpick, but NumberOfParticleAttributes is an internal parameter but is still included in the docs. Should AddParticleAttributes be left in the docs but changed to "(internal)" explaining that it gets set to true when Enzo realizes it needs to set up particle attributes to allow for stars?

    Edit: I realized that NumberOfParticleAttributes is slightly different in that it gets written to the parameter file just never read from a parameter file. Given that, yes, it probably make sense to remove AddParticleAttributes from the docs completely since the user never really needs to know about it.

    I think this looks good!