star_rot_dirac.h

00001 /*
00002  *  Definition of Lorene class Star_rot_Dirac
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2005 Lap-Ming Lin & Jerome Novak
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 __STAR_ROT_DIRAC_H_ 
00027 #define __STAR_ROT_DIRAC_H_ 
00028 
00029 /*
00030  *
00031  * $Header: /cvsroot/Lorene/C++/Include/star_rot_dirac.h,v 1.7 2010/10/22 08:08:40 j_novak Exp $
00032  *
00033  */
00034 
00035 
00036 // Headers Lorene
00037 #include "star.h"
00038 
00039 
00045 class Star_rot_Dirac : public Star {
00046 
00047     // Data : 
00048     // -----
00049  protected:
00056        int spectral_filter ;
00057     
00058        double omega ;  
00059 
00060        // Quantities related to the conformal factor and lapse
00061        //----------------------------------
00062 
00063        Scalar psi4 ;   
00064        Scalar psi2 ;   
00065        Scalar qqq ;    
00066        Scalar ln_psi ; 
00067 
00068 
00069        // Fluid quantities
00070        //-----------------------------------------
00071 
00076        Vector j_euler ; 
00077        Scalar v2 ; 
00078 
00079        // Metric stuff 
00080        //-------------------------------------
00081 
00083        const Metric_flat& flat ; 
00084 
00085        Metric tgamma  ;  
00086        Sym_tensor aa ; 
00087        Sym_tensor taa ; 
00088        Scalar aa_quad ; 
00089 
00095        Sym_tensor_trans hh ; 
00096 
00097 
00098     // Derived data : 
00099     // ------------
00100     protected:
00101 
00102        // More to come later.....
00103        //----------------------------
00104 
00105        mutable double* p_angu_mom ; 
00106        mutable double* p_grv2 ; 
00107        mutable double* p_grv3 ; 
00108        mutable double* p_tsw ; 
00109        mutable double* p_r_circ ; 
00110        mutable double* p_rp_circ ; 
00111 
00112 
00113     // Constructors - Destructor
00114     // -------------------------
00115     public:
00116 
00126        Star_rot_Dirac(Map& mp_i, int nzet_i, const Eos& eos_i, int filter=0) ;  
00127 
00128        Star_rot_Dirac(const Star_rot_Dirac& ) ; 
00129 
00130 
00138        Star_rot_Dirac(Map& mp_i, const Eos& eos_i, FILE* fich) ;
00139 
00140     
00141        virtual ~Star_rot_Dirac() ;   
00142  
00143 
00144     // Memory management
00145     // -----------------
00146      protected:
00147 
00149        virtual void del_deriv() const ; 
00150     
00152        void set_der_0x0() const ; 
00153 
00157        virtual void del_hydro_euler() ;
00158 
00159 
00160     // Mutators / assignment
00161     // ---------------------
00162     public:
00163     
00165        void operator=(const Star_rot_Dirac& ) ; 
00166     
00167     // Accessors
00168     // ---------
00169     public:
00170        
00172        int spectral_filter_order() const {return spectral_filter;};
00173 
00177        double get_omega() const {return omega;} ;
00178 
00179 
00183        const Scalar& get_psi4() const {return psi4;} ;
00184 
00188        const Scalar& get_psi2() const {return psi2;} ;
00189 
00193        const Scalar& get_qqq() const {return qqq;} ;
00194 
00198        const Scalar& get_ln_psi() const {return ln_psi;} ;
00199 
00200 
00201        // Fluid stuff
00202        //------------------
00203 
00208        const Vector& get_j_euler() const {return j_euler;} ;
00209 
00213        const Scalar& get_v2() const {return v2;} ;
00214 
00215 
00216        //Metric stuff
00217        //-------------------
00221        const Metric get_tgamma() const {return tgamma;} ;
00222 
00223        // documentation comes later......
00224 
00228        const Sym_tensor get_aa() const {return aa;} ;
00229 
00233        const Sym_tensor get_taa() const {return taa;} ;
00234        
00238        const Scalar get_aa_quad() const {return aa_quad;} ;
00239        
00243        const Sym_tensor_trans get_hh() const {return hh;} ;
00244 
00245 
00246 
00247 
00248     // Outputs
00249     // -------
00250     public:
00251 
00252        virtual void sauve(FILE* ) const ;       
00253     
00254     protected:
00255 
00256        virtual ostream& operator>>(ostream& ) const ;
00257 
00258    
00259     // Global quantities
00260     //-------------------------
00261     public:
00262 
00263        virtual double mass_b() const ; 
00264        virtual double mass_g() const ; 
00265        virtual double angu_mom() const ; 
00266        virtual double grv2() const ;  
00267        virtual double grv3() const ; 
00268        virtual double tsw() const ; 
00269        virtual double aplat() const ; 
00270        virtual double r_circ() const ; 
00271        virtual double rp_circ() const ; 
00272 
00278        virtual double ellipt() const ;
00279 
00280 
00281 
00282 
00283     // Computational routines
00284     //--------------------------
00285     public:
00286 
00293        virtual void hydro_euler() ; 
00294 
00295        
00305        void update_metric() ;
00306 
00307 
00311        void equilibrium(double ent_c, double omega0, double fact_omega, 
00312             int nzadapt, const Tbl& ent_limit,
00313             const Itbl& icontrol, const Tbl& control,
00314             double mbar_wanted, double aexp_mass, 
00315             Tbl& diff)  ;
00316 
00321        void solve_logn_f(Scalar& ln_f_new) const ;
00322 
00327        void solve_logn_q(Scalar& ln_q_new) const ;
00328 
00333        void solve_qqq(Scalar& q_new) const ;
00334 
00339        void solve_shift(Vector& shift_new) const ;
00340 
00345        void solve_hij(Sym_tensor_trans& hij_new) const ;
00346               
00347 };
00348 
00349 #endif

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