<div dir="ltr">Hi Klaus, Norbert and Anshu,<div><br></div><div>Indeed I am relying upon "<span style="font-size:12.8000001907349px">gr_</span><span style="font-size:12.8000001907349px">ptKeepLostParticles" </span>being set to true, the logic in the two routines I modified above check the value of that option. So that is a bug that should be fixed. Removing that line, and using the two simple changes I proposed above, seem to lead to a crash, so clearly the solution is more along the lines of what Anshu and Norbert suggested.</div><div><div><br></div><div>Ideally I'd like a solution that uses the present machinery as much as possible, because I'd like to continue a rather expensive run that already used the existing machinery. Also, I'd like to continue using the sinks routines to apply gravity to the particles, rather than having to reinvent that code. At the present it looks like the sinks module only loops over the particles that are not marked as "lost," hence the approach where those particles are still included within the normal particles array. Since Christoph wrote the sinks module I've attempted to contact him directly.</div><div><br></div><div>In the future it would definitely be nice to have the ability to continue to evolve particles that leave the domain in the mainline code, there are many use cases I can think of where it would be valuable.</div></div><div><br></div><div>I'll let you guys know if I come up with a solution. Thanks for all your help!</div><div>- James</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 28, 2015 at 5:30 PM, Klaus Weide <span dir="ltr"><<a href="mailto:klaus@flash.uchicago.edu" target="_blank">klaus@flash.uchicago.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 27 Mar 2015, James Guillochon wrote:<br>
<br>
> Hi all, I'm using active particles in my calculation, and I would like to<br>
> continue to evolve the particle trajectories even once the particles have<br>
> left the domain. I see that particles that leave the domain can be saved<br>
> after they leave by enabling a flag, but it appears that their evolution at<br>
> this point is frozen. It looks like a few relatively simple changes in<br>
> Particles_advance may be able to continue their evolution, but I wasn't<br>
> sure if evolving these particles would cause issues.<br>
<br>
</span>James,<br>
<br>
Have you tried to set the keepLostParticles runtime parameter?<br>
<br>
I have just noticed an apparent bug in Grid/GridParticles/gr_ptInit.F90.<br>
That file contains the line<br>
<br>
call RuntimeParameters_get("keepLostParticles",gr_ptKeepLostParticles)<br>
<br>
but later on another line<br>
<br>
gr_ptKeepLostParticles=.false.<br>
<br>
that makes the runtime parameter ineffective.<br>
<br>
Does fixing this help with your problem?<br>
<span class="HOEnZb"><font color="#888888"><br>
Klaus<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">James Guillochon<br><span style="font-family:arial;font-size:small">Einstein Fellow at the Harvard-Smithsonian CfA</span><br><a href="mailto:jguillochon@cfa.harvard.edu" target="_blank">jguillochon@cfa.harvard.edu</a></div></div>
</div>