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