Skip to content
Snippets Groups Projects
Commit f2feaf56 authored by Julien Maurer's avatar Julien Maurer
Browse files

Merge branch 'Fix_FPE_ZeroField' into '23.0'

Fix FPE for zero magnetic field

See merge request atlas/athena!62796
parents 7a812c21 8516d213
No related branches found
No related tags found
No related merge requests found
...@@ -91,6 +91,7 @@ void cfnewpm(double *par, const double *xyzStart, double *xyzEnd, const double u ...@@ -91,6 +91,7 @@ void cfnewpm(double *par, const double *xyzStart, double *xyzEnd, const double u
/* at new point with new mag.field */ /* at new point with new mag.field */
constB = myMagFld.getMagFld(xyzEnd,CONTROL) * myMagFld.getCnvCst() ; constB = myMagFld.getMagFld(xyzEnd,CONTROL) * myMagFld.getCnvCst() ;
if(std::abs(constB)<0.001)constB=0.001; //Protection against zero field
dpar0[0] = 0.; dpar0[0] = 0.;
dpar0[1] = 0.; dpar0[1] = 0.;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment