excised_slice.h

00001 /*
00002  *  Definition of Lorene class Excised slice
00003  *               
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2010 Nicolas Vasset
00008  */
00009 
00010 
00011 #ifndef __EXCISEDSLICE_H_ 
00012 #define __EXCISEDSLICE_H_ 
00013 
00014 
00015 // Headers Lorene
00016 #include "tensor.h"
00017 #include "metric.h"
00018 #include "spheroid.h"
00019 #include "excision_surf.h"
00020 #include "excision_hor.h"
00021 
00022 //---------------------------//
00023 //    Class Excised_slice    //
00024 //---------------------------//
00025 
00044 class Excised_slice {
00045 
00046   // Data : 
00047   // -----
00048  protected:
00049    const Map& mp ;      
00050   
00051   // Metric data
00052   // -----------------
00053   
00055    int type_hor;
00056 
00058    int field_set;
00059 
00061   Scalar lapse ; 
00062     
00063   // Conformal factor
00064   Scalar conf_fact;
00065 
00067   Vector shift ;
00068     
00072   Sym_tensor hij ;
00073 
00077   Sym_tensor hatA ; 
00078 
00082   Vector Xx ;
00083  
00084       
00085   // Derived data : 
00086   // ------------
00087  protected:
00088 
00089     
00091 
00092   mutable Spheroid* p_hor ;
00094   mutable double* p_adm_mass ; 
00095 
00099   mutable double* p_komar_angmom ;
00100 
00104   mutable double* p_virial_residue ;
00105     
00106 
00107     
00108 
00109 
00110   // Constructors - Destructor
00111   // -------------------------
00112  public:
00113     
00128   Excised_slice(const Map& mp_i, int hor_type, int scheme_type) ;           
00129     
00130     
00131   Excised_slice(const Excised_slice& ) ;    
00132 
00148   Excised_slice(const Map& mp_i, int hor_type, int scheme_type, FILE* fich) ;           
00149 
00150   virtual ~Excised_slice() ;            
00151 
00152     
00153   // Memory management
00154   // -----------------
00155  protected:
00157   virtual void del_deriv() const ; 
00158     
00160   virtual void set_der_0x0() const ; 
00161 
00162 
00163   // Mutators / assignment
00164   // ---------------------
00165  public:
00167   void operator=(const Excised_slice&) ;    
00168 
00186   void compute_stat_metric(double precis, double Omega_i, bool NorKappa_i, Scalar NoK_i, bool isCF_i=true, double relax=0.2, int mer_max = 2000, int mer_max2=200, bool isvoid = true) ; 
00187 
00193   void secmembre_kerr(Sym_tensor& source_hh);
00194  
00195  
00196   // Accessors
00197   // ---------
00198  public:
00200   const Map& get_mp() const {return mp; } ; 
00201 
00203   const int get_type_hor() const {return type_hor; };
00204   
00206 
00207   const int get_field_set() const {return field_set;};
00208 
00210   const Scalar& get_lapse() const {return lapse;} ;
00211     
00213   const Scalar& get_conf_fact() const {return conf_fact;};
00214 
00216   const Vector& get_shift() const {return shift;} ;
00217 
00219   const Sym_tensor& get_hij() const {return hij;} ;
00220 
00222   const Sym_tensor& get_hatA() const {return hatA;} ;
00223   
00225   const Vector& get_Xx() const {
00226     if (field_set==2) return Xx; 
00227     else if (field_set==1) cout <<"Error: the scheme used is the original FCF; this variable is irrelevant" << endl;
00228     else cout <<"error in the scheme definition; please check the class consistency" << endl;}
00229 
00231   int set_type_hor() {del_deriv() ; return type_hor ; } ;
00232   
00234   Scalar& set_lapse() {del_deriv() ; return lapse ; } ;
00235   
00237   Scalar& set_conf_fact() {del_deriv() ; return conf_fact ; } ;
00238   
00240   Vector& set_shift() {del_deriv() ; return shift ; } ;
00241   
00243   Sym_tensor& set_hij() {del_deriv() ; return hij ; } ;
00244   
00246   Sym_tensor& set_hatA() {del_deriv() ; return hatA ; } ;
00247 
00249   Vector& set_Xx() {del_deriv() ; return Xx ; } ; // Include an assert here!!!!
00250 
00251 
00252   // Outputs
00253   // -------
00254  public:
00255   virtual void sauve(FILE* ) const ;        
00256 
00257   void Einstein_errors();                     
00258 
00259  
00260   // Global quantities
00261   // -----------------
00262  public:
00263 
00264       
00269   Spheroid hor() ;
00270  
00272   double adm_mass() ; 
00273 
00277   double komar_angmom() ;
00278 
00282   double virial_residue() ; 
00283 
00284 };
00285 
00286 #endif

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