mtbl_cf_pde.C

00001 /*
00002  * Method Mtbl_cf::poisson_angu().
00003  *
00004  *  (see file mtbl_cf.h for documentation)
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 2003-2005 Eric Gourgoulhon & Jerome Novak
00010  *   Copyright (c) 2005 Michael Forot
00011  *
00012  *   This file is part of LORENE.
00013  *
00014  *   LORENE is free software; you can redistribute it and/or modify
00015  *   it under the terms of the GNU General Public License as published by
00016  *   the Free Software Foundation; either version 2 of the License, or
00017  *   (at your option) any later version.
00018  *
00019  *   LORENE is distributed in the hope that it will be useful,
00020  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  *   GNU General Public License for more details.
00023  *
00024  *   You should have received a copy of the GNU General Public License
00025  *   along with LORENE; if not, write to the Free Software
00026  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00027  *
00028  */
00029 
00030 
00031 char mtbl_cf_pde_C[] = "$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_pde.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $" ;
00032 
00033 /*
00034  * $Id: mtbl_cf_pde.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $
00035  * $Log: mtbl_cf_pde.C,v $
00036  * Revision 1.5  2009/10/23 12:56:19  j_novak
00037  * New base T_LEG_MI
00038  *
00039  * Revision 1.4  2009/10/13 19:44:41  j_novak
00040  * New base T_LEG_MP.
00041  *
00042  * Revision 1.3  2005/04/04 21:32:13  e_gourgoulhon
00043  * Added argument lambda to method poisson_angu
00044  * to deal with the generalized angular Poisson equation:
00045  *     Lap_ang u + lambda u = source.
00046  *
00047  * Revision 1.2  2004/12/17 13:35:03  m_forot
00048  * Add the case T_LEG
00049  *
00050  * Revision 1.1  2003/10/15 21:12:22  e_gourgoulhon
00051  * First version.
00052  *
00053  *
00054  * $Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_pde.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $
00055  *
00056  */
00057 
00058 
00059 // Headers Lorene
00060 #include "mtbl_cf.h"
00061 #include "base_val.h"
00062 #include "type_parite.h"
00063 
00064 
00065 // Prototypage des fonctions utilisees:
00066 void _poisangu_pas_prevu(Mtbl_cf *, int, double) ;
00067 void _poisangu_t_leg_p(Mtbl_cf *, int, double) ;
00068 void _poisangu_t_leg_i(Mtbl_cf *, int, double) ;
00069 void _poisangu_t_leg_pp(Mtbl_cf *, int, double) ;
00070 void _poisangu_t_leg_ip(Mtbl_cf *, int, double) ;
00071 void _poisangu_t_leg_pi(Mtbl_cf *, int, double) ;
00072 void _poisangu_t_leg_ii(Mtbl_cf *, int, double) ;
00073 void _poisangu_t_leg_mp(Mtbl_cf *, int, double) ;
00074 void _poisangu_t_leg_mi(Mtbl_cf *, int, double) ;
00075 void _poisangu_t_leg(Mtbl_cf *, int, double) ;
00076 
00077 //*****************************************************************************
00078 
00079 void Mtbl_cf::poisson_angu(double lambda) {
00080 
00081     // Routines de derivation
00082     static void (*poisangu[MAX_BASE])(Mtbl_cf *, int, double) ;
00083     static int nap = 0 ;
00084 
00085     // Premier appel
00086     if (nap==0) {
00087         nap = 1 ;
00088         for (int i=0 ; i<MAX_BASE ; i++) {
00089             poisangu[i] = _poisangu_pas_prevu ;
00090         }
00091         // Les routines existantes
00092         poisangu[T_LEG_P >> TRA_T] = _poisangu_t_leg_p ;
00093         poisangu[T_LEG_PP >> TRA_T] = _poisangu_t_leg_pp ;
00094         poisangu[T_LEG_I >> TRA_T] = _poisangu_t_leg_i ;
00095         poisangu[T_LEG_IP >> TRA_T] = _poisangu_t_leg_ip ;
00096         poisangu[T_LEG_PI >> TRA_T] = _poisangu_t_leg_pi ;
00097         poisangu[T_LEG_MP >> TRA_T] = _poisangu_t_leg_mp ;
00098         poisangu[T_LEG_MI >> TRA_T] = _poisangu_t_leg_mi ;
00099         poisangu[T_LEG >> TRA_T] = _poisangu_t_leg ;
00100     }
00101 
00102     // Boucle sur les zones
00103     for (int l=0 ; l<get_mg()->get_nzone() ; l++) {
00104         int base_t = (base.b[l] & MSQ_T) >> TRA_T ;
00105         poisangu[base_t](this, l, lambda) ;
00106     }
00107     
00108 }

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