mtbl_cf_lapang.C

00001 /*
00002  * Function Mtbl_cf::lapang for the computation of the angular Laplacian:
00003  *
00004  *  d^2/dtheta^2 + cos(theta)/sin(theta) d/dtheta + 1/sin(theta) d^2/dphi^2
00005  *
00006  */
00007 
00008 /*
00009  *   Copyright (c) 1999-2001 Eric Gourgoulhon
00010  *   Copyright (c) 1999-2001 Philippe Grandclement
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_lapang_C[] = "$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_lapang.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $" ;
00032 
00033 /*
00034  * $Id: mtbl_cf_lapang.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $
00035  * $Log: mtbl_cf_lapang.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  2004/12/17 13:35:02  m_forot
00043  * Add the case T_LEG
00044  *
00045  * Revision 1.2  2003/09/16 12:11:59  j_novak
00046  * Added the base T_LEG_II.
00047  *
00048  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00049  * LORENE
00050  *
00051  * Revision 2.3  2000/10/04  14:55:45  eric
00052  * Ajout des bases T_LEG_IP et T_LEG_PI.
00053  *
00054  * Revision 2.2  1999/10/18  13:41:58  eric
00055  * Suppression de l'argument base dans les routines de derivation des mtbl_cf.
00056  *
00057  * Revision 2.1  1999/09/30  12:54:31  eric
00058  * *** empty log message ***
00059  *
00060  * Revision 2.0  1999/04/26  16:42:17  phil
00061  * *** empty log message ***
00062  *
00063  *
00064  * $Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_lapang.C,v 1.5 2009/10/23 12:56:19 j_novak Exp $
00065  *
00066  */
00067 
00068 
00069 // Headers Lorene
00070 #include "mtbl_cf.h"
00071 #include "base_val.h"
00072 #include "type_parite.h"
00073 
00074 
00075 // Prototypage des fonctions utilisees:
00076 void _lapang_pas_prevu(Mtbl_cf *, int) ;
00077 void _lapang_t_leg_p(Mtbl_cf *, int) ;
00078 void _lapang_t_leg_i(Mtbl_cf *, int) ;
00079 void _lapang_t_leg_pp(Mtbl_cf *, int) ;
00080 void _lapang_t_leg_ip(Mtbl_cf *, int) ;
00081 void _lapang_t_leg_pi(Mtbl_cf *, int) ;
00082 void _lapang_t_leg_ii(Mtbl_cf *, int) ;
00083 void _lapang_t_leg_mp(Mtbl_cf *, int) ;
00084 void _lapang_t_leg_mi(Mtbl_cf *, int) ;
00085 void _lapang_t_leg(Mtbl_cf *, int) ;
00086 
00087 //*****************************************************************************
00088 
00089 void Mtbl_cf::lapang()          // Version appliquee a this
00090 {
00091 
00092 // Routines de derivation
00093 static void (*_lapang[MAX_BASE])(Mtbl_cf *, int) ;
00094 static int nap = 0 ;
00095 
00096     // Premier appel
00097     if (nap==0) {
00098     nap = 1 ;
00099     for (int i=0 ; i<MAX_BASE ; i++) {
00100         _lapang[i] = _lapang_pas_prevu ;
00101     }
00102     // Les routines existantes
00103     _lapang[T_LEG_P >> TRA_T] = _lapang_t_leg_p ;
00104     _lapang[T_LEG_PP >> TRA_T] = _lapang_t_leg_pp ;
00105     _lapang[T_LEG_I >> TRA_T] = _lapang_t_leg_i ;
00106     _lapang[T_LEG_IP >> TRA_T] = _lapang_t_leg_ip ;
00107     _lapang[T_LEG_PI >> TRA_T] = _lapang_t_leg_pi ;
00108     _lapang[T_LEG_II >> TRA_T] = _lapang_t_leg_ii ;
00109     _lapang[T_LEG_MP >> TRA_T] = _lapang_t_leg_mp ;
00110     _lapang[T_LEG_MI >> TRA_T] = _lapang_t_leg_mi ;
00111     _lapang[T_LEG >> TRA_T] = _lapang_t_leg ;
00112     }
00113 
00114     // Boucle sur les zones
00115     for (int l=0 ; l<get_mg()->get_nzone() ; l++) {
00116     int base_t = (base.b[l] & MSQ_T) >> TRA_T ;
00117     _lapang[base_t](this, l) ;
00118     }
00119     
00120 }

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