[Debian-astro-commits] [gyoto] 16/221: PolishDoughnut: still cleaning

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit 4925c06002b51049873f8a7b2581d514579931f1
Author: Frederic <frederic at MacFrederic.local>
Date:   Fri Sep 12 12:26:17 2014 +0200

    PolishDoughnut: still cleaning
---
 lib/PolishDoughnut.C | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lib/PolishDoughnut.C b/lib/PolishDoughnut.C
index f011ef6..b27b9cb 100644
--- a/lib/PolishDoughnut.C
+++ b/lib/PolishDoughnut.C
@@ -510,6 +510,7 @@ double PolishDoughnut::emissionSynchro_komissarov_direction(
     *Z0;
 
   if (emis_synch!=emis_synch) {
+    cout << "stuff emission= " << nuc << " " << nuem << " " << tt << " " << nn << " " << Z0 << endl;
     throwError("In PolishDoughnut::emissionSynchro_komissarov_direction: "
 	       "emissivity is nan");
   }
@@ -1279,7 +1280,13 @@ void PolishDoughnut::radiativeQ(double Inu[], // output
 
   double nuc = GYOTO_ELEMENTARY_CHARGE_CGS*bnorm
     /(2.*M_PI*GYOTO_ELECTRON_MASS_CGS*GYOTO_C_CGS);
-  //  cout << "bnorm= " << bnorm << endl;
+
+  if (bnorm < 1e-5){
+    // too low magnetic field leads to nan in emission
+    // synchrotron is anyway vanishingly small
+    for (size_t ii=0; ii<nbnu; ++ii) {Inu[ii]=0.;Taunu[ii]=1.;}
+    return;
+  }
 
   //cout << "r, ne, npl, nuc= " << rr << " " << number_density << " " << number_density_PL << " " << nuc << endl;
   //cout << "ne, delta, npl= " << number_density << " " << deltaPL_ << " " << number_density_PL << endl;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list