et_rot_mag.h

00001 /*
00002  *  Definition of Lorene class Et_rot_mag
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2002 Emmanuel Marcq
00008  *   Copyright (c) 2002 Jerome Novak
00009  *
00010  *   This file is part of LORENE.
00011  *
00012  *   LORENE is free software; you can redistribute it and/or modify
00013  *   it under the terms of the GNU General Public License as published by
00014  *   the Free Software Foundation; either version 2 of the License, or
00015  *   (at your option) any later version.
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 
00029 #ifndef __ET_ROT_MAG_H_ 
00030 #define __ET_ROT_MAG_H_ 
00031 
00032 /*
00033  * $Id: et_rot_mag.h,v 1.16 2011/10/06 14:55:36 j_novak Exp $
00034  * $Log: et_rot_mag.h,v $
00035  * Revision 1.16  2011/10/06 14:55:36  j_novak
00036  * equation_of_state() is now virtual to be able to call to the magnetized
00037  * Eos_mag.
00038  *
00039  * Revision 1.15  2005/06/02 11:35:27  j_novak
00040  * Added members for sving to a file and reading from it.
00041  *
00042  * Revision 1.14  2004/03/22 13:12:41  j_novak
00043  * Modification of comments to use doxygen instead of doc++
00044  *
00045  * Revision 1.13  2002/10/11 11:47:35  j_novak
00046  * Et_rot_mag::MHD_comput is now virtual.
00047  * Use of standard constructor for Tenseur mtmp in Et_rot_mag::equilibrium_mag
00048  *
00049  * Revision 1.12  2002/10/09 07:54:29  j_novak
00050  * Et_rot_bifluid and Et_rot_mag inheritate virtually from Etoile_rot
00051  *
00052  * Revision 1.11  2002/08/02 15:07:41  j_novak
00053  * Member function determinant has been added to the class Metrique.
00054  * A better handling of spectral bases is now implemented for the class Tenseur.
00055  *
00056  * Revision 1.10  2002/06/05 15:15:59  j_novak
00057  * The case of non-adapted mapping is treated.
00058  * parmag.d and parrot.d have been merged.
00059  *
00060  * Revision 1.9  2002/06/03 13:23:16  j_novak
00061  * The case when the mapping is not adapted is now treated
00062  *
00063  * Revision 1.8  2002/06/03 13:00:45  e_marcq
00064  *
00065  * conduc parameter read in parmag.d
00066  *
00067  * Revision 1.7  2002/05/30 16:06:30  j_novak
00068  * added the right et_rot_mag.h
00069  *
00070  * Revision 1.6  2002/05/20 08:27:59  j_novak
00071  * *** empty log message ***
00072  *
00073  * Revision 1.5  2002/05/17 15:08:01  e_marcq
00074  *
00075  * Rotation progressive plug-in, units corrected, Q and a_j new member data
00076  *
00077  * Revision 1.4  2002/05/15 09:53:59  j_novak
00078  * First operational version
00079  *
00080  * Revision 1.3  2002/05/14 13:38:36  e_marcq
00081  *
00082  *
00083  * Unit update, new outputs
00084  *
00085  * Revision 1.1  2002/05/10 09:26:51  j_novak
00086  * Added new class Et_rot_mag for magnetized rotating neutron stars (under development)
00087  *
00088  *
00089  * $Header: /cvsroot/Lorene/C++/Include/et_rot_mag.h,v 1.16 2011/10/06 14:55:36 j_novak Exp $
00090  *
00091  */
00092 
00093 // Headers Lorene
00094 
00095 #include "etoile.h"
00096 
00097 // Local prototype (for determining the surface)
00098 Cmp prolonge_c1(const Cmp& uu, const int nzet) ;
00099 
00109 class Et_rot_mag : virtual public Etoile_rot {
00110   
00111   // Data : 
00112   // -----
00113  protected:
00114 
00115   Cmp A_t ; 
00116   Cmp A_phi; 
00117   Cmp j_t; 
00118   Cmp j_phi; 
00119 
00120   Tenseur E_em; 
00121 
00123   Tenseur Jp_em; 
00124 
00126   Tenseur Srr_em;
00127 
00129   Tenseur Spp_em; 
00130 
00135   double Q ;
00136   double a_j ; 
00137   int conduc ; 
00138 
00139   // Constructors - Destructor
00140   // -------------------------
00141  public:
00142 
00144   Et_rot_mag(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i, 
00145          const int cond); 
00146 
00147 
00148   Et_rot_mag(const Et_rot_mag& ) ;       
00149 
00150 
00158   Et_rot_mag(Map& mp_i, const Eos& eos_i, FILE* fich) ;         
00159 
00160   virtual ~Et_rot_mag() ;           
00161  
00162 
00163   // Memory management
00164   // -----------------
00165  protected:
00166 
00168   virtual void del_deriv() const ; 
00169     
00171   virtual void set_der_0x0() const ; 
00172 
00176   virtual void del_hydro_euler() ; 
00177     
00178 
00179   // Mutators / assignment
00180   // ---------------------
00181  public:
00182 
00184   void operator=(const Et_rot_mag&) ;   
00185 
00189   virtual void equation_of_state() ; 
00190     
00191   // Accessors
00192   // ---------
00193  public:
00195   bool is_conduct() const {return (conduc==1) ;} ;
00197   const Cmp& get_At() const {return A_t ; } ; 
00199   const Cmp& get_Aphi() const {return A_phi ;} ;
00201   const Cmp& get_jt() const {return j_t ; } ;
00203   const Cmp& get_jphi() const {return j_phi ;} ;
00205   const Tenseur& get_Eem() const {return E_em ; } ;
00206 
00210   const Tenseur& get_Jpem() const {return Jp_em ;} ;
00211 
00216   const Tenseur& get_Srrem() const {return Srr_em ; } ;
00217 
00221   const Tenseur& get_Sppem() const {return Spp_em ;} ;
00222 
00227   double get_Q() const {return Q ;} ;
00229   double get_a_j() const {return a_j ;} ;
00230 
00231   // Outputs
00232   // -------
00233  public:
00234   virtual void sauve(FILE* ) const ;        
00235    
00237   virtual ostream& operator>>(ostream& ) const ;    
00238 
00239   // Global quantities
00240   // -----------------
00241  public:
00242 
00243   Tenseur Elec() const ; 
00244   Tenseur Magn() const ; 
00245 
00246   void MHD_comput() ; 
00247   virtual double mass_g() const ;       
00248   virtual double angu_mom() const ;  
00249   virtual double grv2() const ; 
00250   virtual double tsw() const ; 
00251   double MagMom() const ; 
00252 
00253   double Q_comput() const; 
00254 
00258   double Q_int() const; 
00259 
00261   double GyroMag() const ; 
00262 
00274   virtual double grv3(ostream* ost = 0x0) const ;   
00275 
00285   virtual double mom_quad() const ; 
00286 
00287   // Computational routines
00288   // ----------------------
00289  public: 
00311   void magnet_comput(const int adapt_flag,
00312                  Cmp (*f_j)(const Cmp& x, const double),
00313               Param& par_poisson_At, Param& par_poisson_Avect) ;
00314     
00408   void equilibrium_mag(double ent_c, double omega0, double fact_omega, 
00409                int nzadapt, const Tbl& ent_limit, const Itbl& icontrol, 
00410                const Tbl& control, double mbar_wanted, double aexp_mass, 
00411                Tbl& diff, const double Q0, const double a_j0, 
00412                Cmp (*f_j)(const Cmp& x, const double), 
00413                Cmp (*M_j)(const Cmp& x,const double));
00414 
00415 };
00416 
00417 #endif
00418 

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