Lost Particles in Geometry

Report all good and bad behavior here
User avatar
Jaakko Leppänen
Site Admin
Posts: 2315
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Lost Particles in Geometry

Post by Jaakko Leppänen » Tue Feb 23, 2016 2:20 pm

The only way I can think of how this could happen is that the scattering cosine is slightly above 1.0 or slightly below -1.0. I guess this is possible because of limited floating point precision. If this is the case, then the problem should be fixed by adding lines:

Code: Select all

  if (mu > 1.0)
    mu = 1.0;
  else if (mu < -1.0)
    mu = -1.0;
at the beginning of azirot.c
- Jaakko

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: Lost Particles in Geometry

Post by jesse.johns » Fri Feb 26, 2016 2:12 am

I had went ahead and implemented something similar last week with a flag to count how many times it has to correct mu. They've run without issue, however, I haven't had an opportunity to see if the results compare well to other cases.

Thanks again for the troubleshooting help. I'll try to remember to report back.

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: Lost Particles in Geometry

Post by jesse.johns » Fri Feb 26, 2016 9:37 pm

The cases have finished and the maximum number of times that any one case had to bound mu is 3.

I haven't scrutinized the results much, but everything looks nominal. That doesn't mean there isn't something wrong with the input itself, which I'm beginning to question. The only thing I can think of is that I have many nest lattices which are translated (5 levels) and as you mentioned, round-off errors might be a culprit. I might try compiling without fastmath to see there are still crashes.

User avatar
Jaakko Leppänen
Site Admin
Posts: 2315
Joined: Thu Mar 18, 2010 10:43 pm
Security question 2: 0
Location: Espoo, Finland
Contact:

Re: Lost Particles in Geometry

Post by Jaakko Leppänen » Fri Feb 26, 2016 11:08 pm

Translations and other geometry features should not affect the value of mu, which comes directly from the scattering routine. Did you happen to print the values that exceed the boundaries?
- Jaakko

jesse.johns
Posts: 114
Joined: Wed Apr 20, 2011 5:19 am

Re: Lost Particles in Geometry

Post by jesse.johns » Sat Feb 27, 2016 1:09 am

... I tried but I put my print statement in the wrong block and just got non-sense. I'll give it another shot when I have the opportunity.

Post Reply