et_bin_bhns_extr.C

00001 /*
00002  *  Methods for the class Et_bin_bhns_extr
00003  *
00004  *    (see file et_bin_bhns_extr.h for documentation).
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2004-2005 Keisuke Taniguchi
00010  *
00011  *   This file is part of LORENE.
00012  *
00013  *   LORENE is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License version 2
00015  *   as published by the Free Software Foundation.
00016  *
00017  *   LORENE is distributed in the hope that it will be useful,
00018  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  *   GNU General Public License for more details.
00021  *
00022  *   You should have received a copy of the GNU General Public License
00023  *   along with LORENE; if not, write to the Free Software
00024  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *
00026  */
00027 
00028 char et_bin_bhns_extr_C[] = "$Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr.C,v 1.2 2005/02/28 23:09:38 k_taniguchi Exp $" ;
00029 
00030 /*
00031  * $Id: et_bin_bhns_extr.C,v 1.2 2005/02/28 23:09:38 k_taniguchi Exp $
00032  * $Log: et_bin_bhns_extr.C,v $
00033  * Revision 1.2  2005/02/28 23:09:38  k_taniguchi
00034  * Modification of some functions to include the case of the conformally flat
00035  * background metric.
00036  *
00037  * Revision 1.1  2004/11/30 20:48:19  k_taniguchi
00038  * *** empty log message ***
00039  *
00040  *
00041  * $Header: /cvsroot/Lorene/C++/Source/Etoile/et_bin_bhns_extr.C,v 1.2 2005/02/28 23:09:38 k_taniguchi Exp $
00042  *
00043  */
00044 
00045 // C headers
00046 #include <math.h>
00047 
00048 // Lorene headers
00049 #include "et_bin_bhns_extr.h"
00050 #include "etoile.h"
00051 
00052                 //--------------//
00053                 // Constructors //
00054                 //--------------//
00055 
00056 // Standard constructor
00057 // --------------------
00058 Et_bin_bhns_extr::Et_bin_bhns_extr(Map& mpi, int nzet_i, bool relat,
00059                    const Eos& eos_i, bool irrot,
00060                    const Base_vect& ref_triad_i,
00061                    bool kerrs, bool multi)
00062   : Etoile_bin(mpi, nzet_i, relat, eos_i, irrot, ref_triad_i),
00063     kerrschild(kerrs),
00064     multipole(multi)
00065 {}
00066 
00067 // Copy constructor
00068 // ----------------
00069 Et_bin_bhns_extr::Et_bin_bhns_extr(const Et_bin_bhns_extr& ns)
00070   : Etoile_bin(ns),
00071     kerrschild(ns.kerrschild),
00072     multipole(ns.multipole)
00073 {}
00074 
00075 // Constructor from a file
00076 // -----------------------
00077 Et_bin_bhns_extr::Et_bin_bhns_extr(Map& mpi, const Eos& eos_i,
00078                    const Base_vect& ref_triad_i, FILE* fich)
00079   : Etoile_bin(mpi, eos_i, ref_triad_i, fich)
00080 {
00081 
00082     // kerrschild is read in the file:
00083     fread(&kerrschild, sizeof(bool), 1, fich) ;
00084 
00085     // multipole is read in the file:
00086     fread(&multipole, sizeof(bool), 1, fich) ;
00087 
00088 }
00089 
00090                 //------------//
00091                 // Destructor //
00092                 //------------//
00093 
00094 Et_bin_bhns_extr::~Et_bin_bhns_extr()
00095 {}
00096 
00097                 //--------------//
00098                 //  Assignment  //
00099                 //--------------//
00100 
00101 // Assignment to another Et_bin_bhns_extr
00102 // --------------------------------------
00103 void Et_bin_bhns_extr::operator=(const Et_bin_bhns_extr& ns) {
00104 
00105     // Assignment of quantities common to the derived classes of Etoile_bin
00106     Etoile_bin::operator=(ns) ;
00107 
00108     // Assignment of proper quantities of class Et_bin_bhns_extr
00109     kerrschild = ns.kerrschild ;
00110     multipole = ns.multipole ;
00111 
00112 }
00113 
00114                 //--------------//
00115                 //    Outputs   //
00116                 //--------------//
00117 
00118 // Save in a file
00119 // --------------
00120 void Et_bin_bhns_extr::sauve(FILE* fich) const {
00121 
00122     Etoile_bin::sauve(fich) ;
00123 
00124     fwrite(&kerrschild, sizeof(bool), 1, fich) ;
00125 
00126     fwrite(&multipole, sizeof(bool), 1, fich) ;
00127 
00128 }

Generated on Tue Feb 7 01:35:16 2012 for LORENE by  doxygen 1.4.6