LORENE
strot_dirac_diff_global.C
1/*
2 * Methods for computing global quantities within the class Star_rot_Dirac_diff
3 *
4 * (see file star.h for documentation).
5 *
6 */
7
8/*
9 * Copyright (c) 2005 Motoyuki Saijo
10 *
11 * This file is part of LORENE.
12 *
13 * LORENE is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2
15 * as published by the Free Software Foundation.
16 *
17 * LORENE is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with LORENE; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 *
26 */
27
28char strot_dirac_diff_global_C[] = "$Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_global.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $" ;
29
30/*
31 * $Header: /cvsroot/Lorene/C++/Source/Star/strot_dirac_diff_global.C,v 1.3 2014/10/13 08:53:40 j_novak Exp $
32 *
33 */
34
35
36// C headers
37#include <cmath>
38
39// Lorene headers
40#include "star_rot_dirac_diff.h"
41
42
43 //---------------------//
44 // T/W //
45 //---------------------//
46
47namespace Lorene {
49
50 if (p_tsw == 0x0) { // a new computation is required
51
53
54 phi_kill.set(1).set_etat_zero() ;
55 phi_kill.set(2).set_etat_zero() ;
56 phi_kill.set(3) = 1. ;
57 phi_kill.set(3).std_spectral_base() ;
58 phi_kill.set(3).mult_rsint() ;
59
61 0, phi_kill, 0) ;
62
64
65 dens.std_spectral_base() ;
66
67 double tcin = 0.5 * dens.integrale() ;
68
70
71 dens2.std_spectral_base() ;
72
73 double mass_p = dens2.integrale() ;
74
75 p_tsw = new double( tcin / ( mass_p + tcin - mass_g() ) ) ;
76
77 }
78
79 return *p_tsw ;
80
81 cout << "T/W : " << p_tsw << '\n' ;
82
83}
84}
Time evolution with partial storage (*** under development ***).
Definition evolution.h:371
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Definition map.h:783
virtual const Sym_tensor & cov() const
Read-only access to the covariant representation.
Definition metric.C:280
virtual const Scalar & determinant() const
Returns the determinant.
Definition metric.C:392
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
virtual double tsw() const
Ratio T/W.
virtual double mass_g() const
Gravitational mass.
double * p_tsw
Ratio T/W.
Vector j_euler
Momentum density 3-vector with respect to the Eulerian observer.
Scalar ener
Total energy density in the fluid frame.
Definition star.h:193
Scalar gam_euler
Lorentz factor between the fluid and Eulerian observers.
Definition star.h:204
Metric gamma
3-metric
Definition star.h:235
Map & mp
Mapping associated with the star.
Definition star.h:180
Tensor field of valence 1.
Definition vector.h:188
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Tenseur contract(const Tenseur &, int id1, int id2)
Self contraction of two indices of a Tenseur .
Lorene prototypes.
Definition app_hor.h:64