bin_ns_ncp.h

00001 /*
00002  *  Definition of Lorene class Bin_ns_ncp
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2002  Limousin Francois
00008  *
00009  *   This file is part of LORENE.
00010  *
00011  *   LORENE is free software; you can redistribute it and/or modify
00012  *   it under the terms of the GNU General Public License version 2
00013  *   as published by the Free Software Foundation.
00014  *
00015  *   LORENE is distributed in the hope that it will be useful,
00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *   GNU General Public License for more details.
00019  *
00020  *   You should have received a copy of the GNU General Public License
00021  *   along with LORENE; if not, write to the Free Software
00022  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  */
00025 
00026 #ifndef __BIN_NS_NCP_H_ 
00027 #define __BIN_NS_NCP_H_ 
00028 
00029 /*
00030  * $Id: bin_ns_ncp.h,v 1.6 2004/01/14 15:48:03 f_limousin Exp $
00031  * $Log: bin_ns_ncp.h,v $
00032  * Revision 1.6  2004/01/14 15:48:03  f_limousin
00033  * Initial revision
00034  *
00035  * Revision 1.5  2003/06/20 14:06:54  f_limousin
00036  * Add a new argument conf_flat for the constructors and a new function fait_decouple().
00037  *
00038  * Revision 1.4  2003/03/03 19:07:55  f_limousin
00039  * Suppress the member ref_triad.
00040  *
00041  * Revision 1.3  2003/02/12 18:52:53  f_limousin
00042  * Change the arguments of the standard constructor.
00043  *
00044  * Revision 1.2  2003/01/20 09:38:59  f_limousin
00045  * Modification of the standard constructor
00046  *
00047  * Revision 1.1  2003/01/14 14:13:25  f_limousin
00048  * Binary NS with Nonconformally flat metric.
00049  *
00050  * Revision 1.2  2001/12/11 06:44:41  e_gourgoulhon
00051  * template files
00052  *
00053  * $Header: /cvsroot/Lorene/C++/Include/bin_ns_ncp.h,v 1.6 2004/01/14 15:48:03 f_limousin Exp $
00054  *
00055  */
00056 
00057 // Lorene headers
00058 #include "et_bin_ncp.h"
00059 #include "binaire.h"
00060 
00066 class Bin_ns_ncp {
00067 
00068     // Data : 
00069     // -----
00070     protected:
00071 
00073     Et_bin_ncp star1 ;
00074      
00076     Et_bin_ncp star2 ;
00077     
00082     Et_bin_ncp* et[2] ; 
00083     
00087     double omega ;
00088     
00091     double x_axe ;
00092 
00093 
00094     // Derived data : 
00095     // ------------
00096     protected:
00098     mutable double* p_mass_adm ; 
00099 
00101     mutable double* p_mass_kom ; 
00102 
00104     mutable Tbl* p_angu_mom ; 
00105 
00107     mutable double* p_total_ener ; 
00108 
00110     mutable double* p_virial ; 
00111 
00113     mutable double* p_virial_gb ; 
00114 
00116     mutable double* p_virial_fus ; 
00117     
00119     mutable double* p_ham_constr ;
00120     
00122     mutable Tbl* p_mom_constr ;
00123 
00124     
00125 
00126     // Constructors - Destructor
00127     // -------------------------
00128     public:
00145     Bin_ns_ncp(Map& mp1, int nzet1, const Eos& eos1, int irrot1, 
00146            Map& mp2, int nzet2, const Eos& eos2, int irrot2,
00147            int relat, int conf_flat, const Metrique& flat1, const Metrique& flat2,
00148            const Tenseur_sym &source1, const Tenseur_sym &source2) ;            
00149 
00150 
00151     Bin_ns_ncp(const Bin_ns_ncp& ) ;        
00152 
00162     Bin_ns_ncp(Map& mp1, const Eos& eos1, Map& mp2, const Eos& eos2, 
00163         const Metrique& flat1, const Metrique& flat2, FILE* fich) ;         
00164 
00165     ~Bin_ns_ncp() ;         
00166  
00167 
00168 
00169     // Memory management
00170     // -----------------
00171     protected:
00172         
00174     void del_deriv() const ; 
00175     
00177     void set_der_0x0() const ; 
00178 
00179 
00180     // Mutators / assignment
00181     // ---------------------
00182     public:
00184     void operator=(const Bin_ns_ncp&) ; 
00185     
00187     Et_bin_ncp& set(int i) 
00188         { assert( (i==1) || (i==2) ); 
00189           del_deriv() ; 
00190           return *et[i-1] ;} ; 
00191 
00193     double& set_omega() {return omega; } ; 
00194 
00196     double& set_x_axe() {return x_axe; } ; 
00197     
00198 
00199     // Accessors
00200     // ---------
00201     public:
00203     const Et_bin_ncp& operator()(int i) const 
00204         { assert( (i==1) || (i==2) ); 
00205           return *et[i-1] ;} ; 
00206 
00208     double get_omega() const {return omega; } ; 
00209     
00211     double get_x_axe() const {return x_axe; } ; 
00212 
00216     double separation() const ; 
00217 
00218 
00219     // Outputs
00220     // -------
00221     public:
00222     void sauve(FILE *) const ;      
00223     
00225     friend ostream& operator<<(ostream& , const Bin_ns_ncp& ) ; 
00226 
00228     void display_poly(ostream& ) const ; 
00229 
00233     void write_global(ostream& ) const  ;
00234 
00235       private:
00237     ostream& operator>>(ostream& ) const ;    
00238 
00239 
00240     // Computational routines
00241     // ----------------------
00242     public:
00243 
00245         double mass_adm() const ;
00246 
00248         double mass_kom() const ;
00249     
00257         const Tbl& angu_mom() const ;   
00258 
00267         double total_ener() const ; 
00268 
00273         double virial() const ; 
00274 
00280         double virial_gb() const ;  
00281 
00289         double virial_fus() const ; 
00290 
00298         double ham_constr() const ; 
00299 
00306         const Tbl& mom_constr() const ; 
00307 
00334     void orbit(double fact_omeg_min, double fact_omeg_max, double& xgg1, 
00335            double& xgg2) ;
00336        
00340     void analytical_omega() ; 
00341 
00346     void analytical_shift() ; 
00347 
00353     void compare(FILE*) ;
00354 
00359     void compare(const Binaire&) ;
00360 
00367     void fait_decouple () ;
00368  
00369 };
00370 ostream& operator<<(ostream& , const Bin_ns_ncp& ) ;    
00371 
00372 #endif

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