[Debian-astro-commits] [gyoto] 142/221: Adding 3+1 metric functions necessary for PolishDoughnut

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:41 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 5be938b22ea54e0c8405a0ce98e110cde922ca5b
Author: Frederic <frederic at MacFrederic.local>
Date:   Thu Dec 11 19:25:00 2014 +0100

    Adding 3+1 metric functions necessary for PolishDoughnut
---
 include/GyotoNumericalMetricLorene.h |  5 ++++-
 lib/NumericalMetricLorene.C          | 37 +++++++++++++++++++++++++++++++++++-
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/include/GyotoNumericalMetricLorene.h b/include/GyotoNumericalMetricLorene.h
index 5cc2b18..d20297d 100644
--- a/include/GyotoNumericalMetricLorene.h
+++ b/include/GyotoNumericalMetricLorene.h
@@ -96,7 +96,7 @@ class Gyoto::Metric::NumericalMetricLorene
   Lorene::Vector** getVsurf_tab() const;
   Lorene::Scalar** getLorentz_tab() const;
   Lorene::Valeur** getHor_tab() const;
-  double getRisco() const;
+  double getRms() const;
   double getRmb() const;
   void setLapse_tab(Lorene::Scalar* lapse, int ii);
   void setShift_tab(Lorene::Vector* shift, int ii);
@@ -104,6 +104,9 @@ class Gyoto::Metric::NumericalMetricLorene
   void setGamcon_tab(Lorene::Sym_tensor* gamcon, int ii);
   void setKij_tab(Lorene::Sym_tensor* kij, int ii);
   void setTimes(double time,int ii);
+
+  virtual double getSpecificAngularMomentum(double rr) const;
+  virtual double getPotential(double pos[4], double l_cst) const;  
   
   /**
    * Runge-Kutta integrator at order 4
diff --git a/lib/NumericalMetricLorene.C b/lib/NumericalMetricLorene.C
index 8f3db33..ce056ee 100644
--- a/lib/NumericalMetricLorene.C
+++ b/lib/NumericalMetricLorene.C
@@ -282,13 +282,48 @@ Scalar** NumericalMetricLorene::getLorentz_tab() const {
 Valeur** NumericalMetricLorene::getHor_tab() const {
   GYOTO_DEBUG << endl;
   return hor_tab_;}
-double NumericalMetricLorene::getRisco() const {
+double NumericalMetricLorene::getRms() const {
   GYOTO_DEBUG << endl;
   return risco_;}  
 double NumericalMetricLorene::getRmb() const {
   GYOTO_DEBUG << endl;
   return rmb_;}  
 
+
+double NumericalMetricLorene::getSpecificAngularMomentum(double rr) const {
+ double gtt_dr, gtph_dr, gphph_dr, l_ms, l_mb, gtt, gtph, gphph;
+
+  double pos[4]={0., rr, M_PI/2., 0.};
+
+  gtt_dr  =gmunu_up_dr(pos, 0, 0);      //upper index
+  gtph_dr =gmunu_up_dr(pos, 0, 3); 
+  gphph_dr=gmunu_up_dr(pos, 3, 3);
+  
+  gtt=gmunu(pos,0,0);
+  gtph=gmunu(pos,0,3); 
+  gphph=gmunu(pos,3,3);
+
+  l_ms = gtph_dr/gphph_dr + 
+         sqrt(gtph_dr/gphph_dr * gtph_dr/gphph_dr - gtt_dr/gphph_dr) ;
+  return l_ms;
+
+}
+
+double NumericalMetricLorene::getPotential(double pos[4], double l_cst) const {
+  
+  double gtt=gmunu(pos,0,0);
+  double gtph=gmunu(pos,0,3); 
+  double gphph=gmunu(pos,3,3);
+  
+  double  Omega = -(gtph + l_cst * gtt)/(gphph + l_cst * gtph) ;
+  
+  double  W = 0.5 * log(abs(-gtt - 2. * Omega * gtph - Omega*Omega * gphph)) 
+    - log(abs(-gtt - Omega * gtph)) ;
+  
+  return  W ;
+}
+
+
 void NumericalMetricLorene::setLapse_tab(Scalar* lapse, int ii) {
   GYOTO_DEBUG << endl;
   lapse_tab_[ii]=lapse;}

-- 
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