00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __BINARY_H_
00027 #define __BINARY_H_
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #include "star.h"
00062
00069 class Binary {
00070
00071
00072
00073 protected:
00074
00076 Star_bin star1 ;
00077
00079 Star_bin star2 ;
00080
00085 Star_bin* et[2] ;
00086
00090 double omega ;
00091
00094 double x_axe ;
00095
00096
00097
00098
00099 protected:
00101 mutable double* p_mass_adm ;
00102
00104 mutable double* p_mass_kom ;
00105
00107 mutable Tbl* p_angu_mom ;
00108
00110 mutable double* p_total_ener ;
00111
00113 mutable double* p_virial ;
00114
00116 mutable double* p_ham_constr ;
00117
00119 mutable Tbl* p_mom_constr ;
00120
00121
00122
00123
00124
00125 public:
00141 Binary(Map& mp1, int nzet1, const Eos& eos1, int irrot1,
00142 Map& mp2, int nzet2, const Eos& eos2, int irrot2,
00143 int conf_flat) ;
00144
00145
00146 Binary(const Binary& ) ;
00147
00157 Binary(Map& mp1, const Eos& eos1, Map& mp2, const Eos& eos2,
00158 FILE* fich) ;
00159
00160 ~Binary() ;
00161
00162
00163
00164
00165
00166 protected:
00167
00169 void del_deriv() const ;
00170
00172 void set_der_0x0() const ;
00173
00174
00175
00176
00177 public:
00179 void operator=(const Binary&) ;
00180
00182 Star_bin& set(int i)
00183 { assert( (i==1) || (i==2) );
00184 del_deriv() ;
00185 return *et[i-1] ;} ;
00186
00188 double& set_omega() {return omega; } ;
00189
00191 double& set_x_axe() {return x_axe; } ;
00192
00193
00194
00195
00196 public:
00198 const Star_bin& operator()(int i) const
00199 { assert( (i==1) || (i==2) );
00200 return *et[i-1] ;} ;
00201
00203 double get_omega() const {return omega; } ;
00204
00206 double get_x_axe() const {return x_axe; } ;
00207
00211 double separation() const ;
00212
00213
00214
00215
00216 public:
00217 void sauve(FILE *) const ;
00218
00220 friend ostream& operator<<(ostream& , const Binary& ) ;
00221
00223 void display_poly(ostream& ) const ;
00224
00228 void write_global(ostream& ) const ;
00229
00230 private:
00232 ostream& operator>>(ostream& ) const ;
00233
00234
00235
00236
00237 public:
00238
00240 double mass_adm() const ;
00241
00243 double mass_adm_vol() const ;
00244
00246 double mass_kom() const ;
00247
00249 double mass_kom_vol() const ;
00250
00258 const Tbl& angu_mom() const ;
00259
00268 double total_ener() const ;
00269
00272 double virial() const ;
00273
00276 double ham_constr() const ;
00277
00280 const Tbl& mom_constr() const ;
00281
00308 void orbit(double fact_omeg_min, double fact_omeg_max, double& xgg1,
00309 double& xgg2) ;
00310
00314 void analytical_omega() ;
00315
00320 void analytical_shift() ;
00321
00330 void fait_decouple () ;
00331
00333 void dirac_gauge() ;
00334
00336 void helical() ;
00337
00338
00339 };
00340 ostream& operator<<(ostream& , const Binary& ) ;
00341
00342 #endif