LORENE
bhole_pseudo_viriel.C
1/*
2 * Copyright (c) 2000-2001 Philippe Grandclement
3 *
4 * This file is part of LORENE.
5 *
6 * LORENE is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * LORENE is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with LORENE; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21
22
23char bhole_pseudo_viriel_C[] = "$Header: /cvsroot/Lorene/C++/Source/Bhole_binaire/bhole_pseudo_viriel.C,v 1.5 2014/10/13 08:52:40 j_novak Exp $" ;
24
25/*
26 * $Id: bhole_pseudo_viriel.C,v 1.5 2014/10/13 08:52:40 j_novak Exp $
27 * $Log: bhole_pseudo_viriel.C,v $
28 * Revision 1.5 2014/10/13 08:52:40 j_novak
29 * Lorene classes and functions now belong to the namespace Lorene.
30 *
31 * Revision 1.4 2014/10/06 15:12:58 j_novak
32 * Modified #include directives to use c++ syntax.
33 *
34 * Revision 1.3 2005/08/29 15:10:14 p_grandclement
35 * Addition of things needed :
36 * 1) For BBH with different masses
37 * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
38 * WORKING YET !!!
39 *
40 * Revision 1.2 2003/10/03 15:58:44 j_novak
41 * Cleaning of some headers
42 *
43 * Revision 1.1.1.1 2001/11/20 15:19:28 e_gourgoulhon
44 * LORENE
45 *
46 * Revision 2.6 2000/12/15 13:52:38 phil
47 * modification critere sans les derivees
48 *
49 * Revision 2.5 2000/12/14 14:09:11 phil
50 * simplification
51 *
52 * Revision 2.4 2000/12/14 10:45:30 phil
53 * ATTENTION : PASSAGE DE PHI A PSI
54 *
55 * Revision 2.3 2000/11/15 18:27:08 phil
56 * retour ancienne version (avec signe)
57 *
58 * Revision 2.2 2000/11/15 15:13:44 phil
59 * *** empty log message ***
60 *
61 * Revision 2.1 2000/11/15 09:45:04 phil
62 * *** empty log message ***
63 *
64 * Revision 2.0 2000/11/15 09:43:49 phil
65 * *** empty log message ***
66 *
67 *
68 * $Header: /cvsroot/Lorene/C++/Source/Bhole_binaire/bhole_pseudo_viriel.C,v 1.5 2014/10/13 08:52:40 j_novak Exp $
69 *
70 */
71
72#include <cmath>
73
74// Lorene
75#include "tenseur.h"
76#include "bhole.h"
77
78namespace Lorene {
79double Bhole::viriel_seul () const{
80
81 int nz = mp.get_mg()->get_nzone() ;
82
83 Valeur** devel_psi (psi_auto().asymptot(1)) ;
84 Valeur** devel_n (n_auto().asymptot(1)) ;
85
86 double erreur = (2*(*devel_psi[1])(nz-1, 0, 0, 0)
87 + (*devel_n[1])(nz-1, 0, 0, 0))/fabs ((*devel_n[1])(nz-1, 0, 0, 0)) ;
88
89 return erreur ;
90}
91
92
93double Bhole_binaire::viriel () const{
94
95 int nz_un = hole1.mp.get_mg()->get_nzone() ;
96 int nz_deux = hole2.mp.get_mg()->get_nzone() ;
97
98 Valeur** devel_psi_un (hole1.psi_auto().asymptot(1)) ;
99 Valeur** devel_psi_deux (hole2.psi_auto().asymptot(1)) ;
100 Valeur** devel_n_un (hole1.n_auto().asymptot(1)) ;
101 Valeur** devel_n_deux (hole2.n_auto().asymptot(1)) ;
102
103 double res =
104 (2*(*devel_psi_un[1])(nz_un-1, 0, 0, 0)+
105 2*(*devel_psi_deux[1])(nz_deux-1, 0, 0, 0)+
106 (*devel_n_deux[1])(nz_deux-1, 0, 0, 0) +
107 (*devel_n_un[1])(nz_un-1, 0, 0, 0))
108 / fabs ((*devel_n_deux[1])(nz_deux-1, 0, 0, 0) +
109 (*devel_n_un[1])(nz_un-1, 0, 0, 0)) ;
110
111 return res ;
112}
113
114}
Bhole hole1
Black hole one.
Definition bhole.h:762
double viriel() const
Computes the viriel error, that is the difference between the ADM and the Komar masses,...
Bhole hole2
Black hole two.
Definition bhole.h:763
Tenseur psi_auto
Part of generated by the hole.
Definition bhole.h:290
Tenseur n_auto
Part of N generated by the hole.
Definition bhole.h:286
double viriel_seul() const
Computes the viriel error, that is the difference between the ADM and the Komar masses,...
Map_af & mp
Affine mapping.
Definition bhole.h:273
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition map.h:765
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
Values and coefficients of a (real-value) function.
Definition valeur.h:287
Lorene prototypes.
Definition app_hor.h:64