| 81 | } |
| 82 | |
| 83 | void |
| 84 | Castro::ParticlePostRestart (const std::string& restart_file) |
| 85 | { |
| 86 | if (level == 0) |
| 87 | { |
| 88 | if (do_tracer_particles) |
| 89 | { |
| 90 | BL_ASSERT(TracerPC == nullptr); |
| 91 | |
| 92 | TracerPC = std::make_unique<AmrTracerParticleContainer>(parent); |
| 93 | |
| 94 | TracerPC->SetVerbose(particles::particle_verbose); |
| 95 | // |
| 96 | // We want to be able to add new particles on a restart. |
| 97 | // As well as the ability to write the particles out to an ascii file. |
| 98 | // |
| 99 | if (!particles::restart_from_nonparticle_chkfile) |
| 100 | { |
| 101 | TracerPC->Restart(parent->theRestartFile(), chk_tracer_particle_file); |
| 102 | } |
| 103 | |
| 104 | if (!particles::particle_restart_file.empty()) |
| 105 | { |
| 106 | TracerPC->InitFromAsciiFile(particles::particle_restart_file,0); |
| 107 | } |
| 108 | |
| 109 | if (!particles::particle_output_file.empty()) |
| 110 | { |
| 111 | TracerPC->WriteAsciiFile(particles::particle_output_file); |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | std::unique_ptr<MultiFab> |
| 118 | Castro::ParticleDerive(const std::string& name, |