LORENE
et_bin_bhns_extr.C
1 /*
2  * Methods for the class Et_bin_bhns_extr
3  *
4  * (see file et_bin_bhns_extr.h for documentation).
5  *
6  */
7 
8 /*
9  * Copyright (c) 2004-2005 Keisuke Taniguchi
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 
28 
29 
30 /*
31  * $Id: et_bin_bhns_extr.C,v 1.5 2016/12/05 16:17:52 j_novak Exp $
32  * $Log: et_bin_bhns_extr.C,v $
33  * Revision 1.5 2016/12/05 16:17:52 j_novak
34  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
35  *
36  * Revision 1.4 2014/10/13 08:52:54 j_novak
37  * Lorene classes and functions now belong to the namespace Lorene.
38  *
39  * Revision 1.3 2014/10/06 15:13:07 j_novak
40  * Modified #include directives to use c++ syntax.
41  *
42  * Revision 1.2 2005/02/28 23:09:38 k_taniguchi
43  * Modification of some functions to include the case of the conformally flat
44  * background metric.
45  *
46  * Revision 1.1 2004/11/30 20:48:19 k_taniguchi
47  * *** empty log message ***
48  *
49  *
50  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr.C,v 1.5 2016/12/05 16:17:52 j_novak Exp $
51  *
52  */
53 
54 // C headers
55 #include <cmath>
56 
57 // Lorene headers
58 #include "et_bin_bhns_extr.h"
59 #include "etoile.h"
60 
61  //--------------//
62  // Constructors //
63  //--------------//
64 
65 // Standard constructor
66 // --------------------
67 namespace Lorene {
68 Et_bin_bhns_extr::Et_bin_bhns_extr(Map& mpi, int nzet_i, bool relat,
69  const Eos& eos_i, bool irrot,
70  const Base_vect& ref_triad_i,
71  bool kerrs, bool multi)
72  : Etoile_bin(mpi, nzet_i, relat, eos_i, irrot, ref_triad_i),
73  kerrschild(kerrs),
74  multipole(multi)
75 {}
76 
77 // Copy constructor
78 // ----------------
80  : Etoile_bin(ns),
81  kerrschild(ns.kerrschild),
82  multipole(ns.multipole)
83 {}
84 
85 // Constructor from a file
86 // -----------------------
88  const Base_vect& ref_triad_i, FILE* fich)
89  : Etoile_bin(mpi, eos_i, ref_triad_i, fich)
90 {
91 
92  // kerrschild is read in the file:
93  fread(&kerrschild, sizeof(bool), 1, fich) ;
94 
95  // multipole is read in the file:
96  fread(&multipole, sizeof(bool), 1, fich) ;
97 
98 }
99 
100  //------------//
101  // Destructor //
102  //------------//
103 
105 {}
106 
107  //--------------//
108  // Assignment //
109  //--------------//
110 
111 // Assignment to another Et_bin_bhns_extr
112 // --------------------------------------
114 
115  // Assignment of quantities common to the derived classes of Etoile_bin
117 
118  // Assignment of proper quantities of class Et_bin_bhns_extr
119  kerrschild = ns.kerrschild ;
120  multipole = ns.multipole ;
121 
122 }
123 
124  //--------------//
125  // Outputs //
126  //--------------//
127 
128 // Save in a file
129 // --------------
130 void Et_bin_bhns_extr::sauve(FILE* fich) const {
131 
132  Etoile_bin::sauve(fich) ;
133 
134  fwrite(&kerrschild, sizeof(bool), 1, fich) ;
135 
136  fwrite(&multipole, sizeof(bool), 1, fich) ;
137 
138 }
139 }
virtual void sauve(FILE *) const
Save in a file.
Definition: etoile_bin.C:562
Lorene prototypes.
Definition: app_hor.h:67
Equation of state base class.
Definition: eos.h:209
Et_bin_bhns_extr(Map &mp_i, int nzet_i, bool relat, const Eos &eos_i, bool irrot, const Base_vect &ref_triad_i, bool kerrs, bool multi)
Standard constructor.
Base class for coordinate mappings.
Definition: map.h:682
Class for stars in binary system.
Definition: etoile.h:817
bool kerrschild
Indicator of the background metric: true for the Kerr-Shild metric, false for the conformally flat on...
Vectorial bases (triads) with respect to which the tensorial components are defined.
Definition: base_vect.h:105
virtual ~Et_bin_bhns_extr()
Destructor.
virtual void sauve(FILE *) const
Save in a file.
Class for a neutron star in black hole - neutron star binary systems.
bool multipole
Indicator of the boundary condition: true for the multipole falloff condition, false for the one...
void operator=(const Etoile_bin &)
Assignment to another Etoile_bin.
Definition: etoile_bin.C:485
void operator=(const Et_bin_bhns_extr &)
Assignment to another Et_bin_bhns_extr.