param_elliptic.h

00001 /*
00002  *  Definition of Lorene class Param_elliptic
00003  *
00004  */
00005 
00006 /*
00007  *   Copyright (c) 2003 Philippe Grandclement
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 __PARAM_ELLIPTIC_H_ 
00027 #define __PARAM_ELLIPTIC_H_ 
00028 
00029 /*
00030  * $Id: param_elliptic.h,v 1.20 2007/05/06 10:48:08 p_grandclement Exp $
00031  * $Log: param_elliptic.h,v $
00032  * Revision 1.20  2007/05/06 10:48:08  p_grandclement
00033  * Modification of a few operators for the vorton project
00034  *
00035  * Revision 1.19  2007/04/24 09:04:11  p_grandclement
00036  * Addition of an operator for the vortons
00037  *
00038  * Revision 1.18  2007/01/16 15:05:59  n_vasset
00039  * New constructor (taking a Scalar in mono-domain angular grid for
00040  * boundary) for function sol_elliptic_boundary
00041  *
00042  * Revision 1.17  2005/11/30 11:09:03  p_grandclement
00043  * Changes for the Bin_ns_bh project
00044  *
00045  * Revision 1.16  2005/08/26 14:02:38  p_grandclement
00046  * Modification of the elliptic solver that matches with an oscillatory exterior solution
00047  * small correction in Poisson tau also...
00048  *
00049  * Revision 1.15  2005/06/09 07:56:25  f_limousin
00050  * Implement a new function sol_elliptic_boundary() and
00051  * Vector::poisson_boundary(...) which solve the vectorial poisson
00052  * equation (method 6) with an inner boundary condition.
00053  *
00054  * Revision 1.14  2005/02/15 15:43:16  j_novak
00055  * First version of the block inversion for the vector Poisson equation (method 6).
00056  *
00057  * Revision 1.13  2004/12/23 16:30:14  j_novak
00058  * New files and class for the solution of the rr component of the tensor Poisson
00059  * equation.
00060  *
00061  * Revision 1.12  2004/08/24 09:14:40  p_grandclement
00062  * Addition of some new operators, like Poisson in 2d... It now requieres the
00063  * GSL library to work.
00064  *
00065  * Also, the way a variable change is stored by a Param_elliptic is changed and
00066  * no longer uses Change_var but rather 2 Scalars. The codes using that feature
00067  * will requiere some modification. (It should concern only the ones about monopoles)
00068  *
00069  * Revision 1.11  2004/06/22 08:49:57  p_grandclement
00070  * Addition of everything needed for using the logarithmic mapping
00071  *
00072  * Revision 1.10  2004/06/14 15:23:07  j_novak
00073  * Modif. comments.
00074  *
00075  * Revision 1.9  2004/06/14 15:07:10  j_novak
00076  * New methods for the construction of the elliptic operator appearing in
00077  * the vector Poisson equation (acting on eta).
00078  *
00079  * Revision 1.8  2004/05/14 08:51:00  p_grandclement
00080  * *** empty log message ***
00081  *
00082  * Revision 1.7  2004/05/10 15:28:21  j_novak
00083  * First version of functions for the solution of the r-component of the
00084  * vector Poisson equation.
00085  *
00086  * Revision 1.6  2004/03/23 14:54:45  j_novak
00087  * More documentation
00088  *
00089  * Revision 1.5  2004/03/17 15:58:47  p_grandclement
00090  * Slight modification of sol_elliptic_no_zec
00091  *
00092  * Revision 1.4  2004/03/05 09:18:48  p_grandclement
00093  * Addition of operator sec_order_r2
00094  *
00095  * Revision 1.3  2004/02/11 09:47:44  p_grandclement
00096  * Addition of a new elliptic solver, matching with the homogeneous solution
00097  * at the outer shell and not solving in the external domain (more details
00098  * coming soon ; check your local Lorene dealer...)
00099  *
00100  * Revision 1.2  2004/01/28 16:46:22  p_grandclement
00101  * Addition of the sol_elliptic_fixe_der_zero stuff
00102  *
00103  * Revision 1.1  2003/12/11 14:57:00  p_grandclement
00104  * I had forgotten the .h (sorry folks...)
00105  *
00106  * Revision 1.2  2001/12/11 06:44:41  e_gourgoulhon
00107  *
00108  * $Header: /cvsroot/Lorene/C++/Include/param_elliptic.h,v 1.20 2007/05/06 10:48:08 p_grandclement Exp $
00109  *
00110  */
00111 
00112 #include "map.h"
00113 #include "ope_elementary.h"
00114 #include "scalar.h"
00115 
00116 #define MAP_AFF 0 
00117 #define MAP_LOG 1 
00118 
00131 class Param_elliptic {
00132 
00133  protected:
00134   int type_map ; 
00135   const Map_af* mp_af ; 
00136   const Map_log* mp_log ; 
00137  
00138   Ope_elementary** operateurs ; 
00139   
00140   Scalar var_F ; 
00141   Scalar var_G ; 
00142 
00143   mutable Itbl done_F ; 
00144   mutable Itbl done_G ; 
00145   mutable Tbl val_F_plus ; 
00146   mutable Tbl val_F_minus ; 
00147   mutable Tbl val_dF_plus ; 
00148   mutable Tbl val_dF_minus ; 
00149   mutable Tbl val_G_plus ; 
00150   mutable Tbl val_G_minus ; 
00151   mutable Tbl val_dG_plus ; 
00152   mutable Tbl val_dG_minus ; 
00153 
00154  private:
00155   void compute_val_F(int, int, int) const ; 
00156   void compute_val_G(int) const ; 
00157 
00158  public:
00169   Param_elliptic (const Scalar&) ;
00170   ~Param_elliptic() ; 
00171   
00173   const Map_radial& get_mp() const ;
00174   double get_alpha (int) const ;
00175   double get_beta (int) const ;
00176   int get_type (int) const ;
00177 
00178  public:  
00187   void set_helmholtz_minus (int zone, double mas, Scalar& so) ;
00194   void set_poisson_pseudo_1d (Scalar& so) ;
00202   void set_helmholtz_minus_pseudo_1d (int zone, double mas, Scalar& so) ;
00203 
00212   void set_helmholtz_plus (int zone, double mas, Scalar& so) ; 
00213  
00217   void set_poisson_2d (const Scalar &, bool indic = false) ;  
00218   
00225   void set_helmholtz_minus_2d (int zone, double mas, const Scalar&) ; 
00226 
00236   void set_sec_order_r2 (int zone, double a, double b, double c) ;
00237   
00247   void set_sec_order (int zone, double a, double b, double c) ;
00248    
00255   void set_ope_vorton (int zone, Scalar& so) ;
00265   void set_poisson_vect_r(int zone, bool only_l_zero = false) ; 
00266 
00282   void set_poisson_vect_eta(int zone) ; 
00283 
00290   void set_poisson_tens_rr(int zone) ; 
00291 
00295   void inc_l_quant (int zone) ;
00296   
00300   void set_variable_F (const Scalar&) ;
00301 
00305   void set_variable_G (const Scalar&) ;
00306 
00311   double F_plus (int zone, int k, int j) const ;
00312 
00317   double F_minus (int zone, int k, int j) const ;
00318 
00324   double dF_plus (int zone, int k, int j) const ;
00325  
00331   double dF_minus (int zone, int k, int j) const ;
00332 
00337   double G_plus (int zone) const ;
00338 
00343   double G_minus (int zone) const ;
00344 
00350   double dG_plus (int zone) const ;
00351  
00357   double dG_minus (int zone) const ;
00358 
00359   // A lot of friend functions... Possiblement pas toutes utiles...
00360   friend Mtbl_cf elliptic_solver  (const Param_elliptic&, const Mtbl_cf&) ;
00361   friend Mtbl_cf elliptic_solver_boundary (const Param_elliptic&, const Mtbl_cf&, const Mtbl_cf& bound, double fact_dir, double fact_neu   ) ;
00362   friend Mtbl_cf elliptic_solver_no_zec  
00363     (const Param_elliptic&, const Mtbl_cf&, double) ;
00364   friend Mtbl_cf elliptic_solver_only_zec  
00365     (const Param_elliptic&, const Mtbl_cf&, double) ;
00366   friend Mtbl_cf elliptic_solver_sin_zec  
00367     (const Param_elliptic&, const Mtbl_cf&, double*, double*) ;
00368   friend Mtbl_cf elliptic_solver_fixe_der_zero  
00369     (double, const Param_elliptic&, const Mtbl_cf&) ;
00370 
00371   friend void Map_af::sol_elliptic(Param_elliptic&, const Scalar&, Scalar&) const ;
00372   friend void Map_af::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Mtbl_cf& , 
00373                         double , double ) const ;
00374   friend void Map_af::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Scalar& , 
00375                         double , double ) const ;
00376 
00377 
00378   friend void Map_af::sol_elliptic_no_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
00379   friend void Map_af::sol_elliptic_only_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
00380   friend void Map_af::sol_elliptic_sin_zec(Param_elliptic&, const Scalar&, Scalar&, double*, double*) const ;
00381   friend void Map_af::sol_elliptic_fixe_der_zero(double, Param_elliptic&, const Scalar&, Scalar&) const ;
00382 
00383   friend void Map_af::sol_elliptic_2d(Param_elliptic&, const Scalar&, Scalar&) const ;
00384   friend void Map_af::sol_elliptic_pseudo_1d(Param_elliptic&, const Scalar&, Scalar&) const ;
00385 
00386   friend void Map_log::sol_elliptic(Param_elliptic&, const Scalar&, Scalar&) const ;
00387   friend void Map_log::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Mtbl_cf&, 
00388                          double, double) const ;
00389  
00390  friend void Map_log::sol_elliptic_boundary(Param_elliptic&, const Scalar&, Scalar&, const Scalar&, 
00391                          double, double) const ;
00392 
00393 
00394   friend void Map_log::sol_elliptic_no_zec(Param_elliptic&, const Scalar&, Scalar&, double) const ;
00395 } ;
00396 
00397 #endif

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