| 1 |
/* |
| 2 |
* Method Mtbl_cf::poisson_angu(). |
| 3 |
* |
| 4 |
* (see file mtbl_cf.h for documentation) |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 2003-2005 Eric Gourgoulhon & Jerome Novak |
| 10 |
* Copyright (c) 2005 Michael Forot |
| 11 |
* |
| 12 |
* This file is part of LORENE. |
| 13 |
* |
| 14 |
* LORENE is free software; you can redistribute it and/or modify |
| 15 |
* it under the terms of the GNU General Public License as published by |
| 16 |
* the Free Software Foundation; either version 2 of the License, or |
| 17 |
* (at your option) any later version. |
| 18 |
* |
| 19 |
* LORENE is distributed in the hope that it will be useful, |
| 20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 22 |
* GNU General Public License for more details. |
| 23 |
* |
| 24 |
* You should have received a copy of the GNU General Public License |
| 25 |
* along with LORENE; if not, write to the Free Software |
| 26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 27 |
* |
| 28 |
*/ |
| 29 |
|
| 30 |
|
| 31 |
char mtbl_cf_pde_C[] = "$Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_pde.C,v 1.6 2014/10/13 08:53:08 j_novak Exp $" ; |
| 32 |
|
| 33 |
/* |
| 34 |
* $Id: mtbl_cf_pde.C,v 1.6 2014/10/13 08:53:08 j_novak Exp $ |
| 35 |
* $Log: mtbl_cf_pde.C,v $ |
| 36 |
* Revision 1.6 2014/10/13 08:53:08 j_novak |
| 37 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 38 |
* |
| 39 |
* Revision 1.5 2009/10/23 12:56:19 j_novak |
| 40 |
* New base T_LEG_MI |
| 41 |
* |
| 42 |
* Revision 1.4 2009/10/13 19:44:41 j_novak |
| 43 |
* New base T_LEG_MP. |
| 44 |
* |
| 45 |
* Revision 1.3 2005/04/04 21:32:13 e_gourgoulhon |
| 46 |
* Added argument lambda to method poisson_angu |
| 47 |
* to deal with the generalized angular Poisson equation: |
| 48 |
* Lap_ang u + lambda u = source. |
| 49 |
* |
| 50 |
* Revision 1.2 2004/12/17 13:35:03 m_forot |
| 51 |
* Add the case T_LEG |
| 52 |
* |
| 53 |
* Revision 1.1 2003/10/15 21:12:22 e_gourgoulhon |
| 54 |
* First version. |
| 55 |
* |
| 56 |
* |
| 57 |
* $Header: /cvsroot/Lorene/C++/Source/Mtbl_cf/mtbl_cf_pde.C,v 1.6 2014/10/13 08:53:08 j_novak Exp $ |
| 58 |
* |
| 59 |
*/ |
| 60 |
|
| 61 |
|
| 62 |
// Headers Lorene |
| 63 |
#include "mtbl_cf.h" |
| 64 |
#include "base_val.h" |
| 65 |
#include "type_parite.h" |
| 66 |
|
| 67 |
|
| 68 |
// Prototypage des fonctions utilisees: |
| 69 |
namespace Lorene { |
| 70 |
void _poisangu_pas_prevu(Mtbl_cf *, int, double) ; |
| 71 |
void _poisangu_t_leg_p(Mtbl_cf *, int, double) ; |
| 72 |
void _poisangu_t_leg_i(Mtbl_cf *, int, double) ; |
| 73 |
void _poisangu_t_leg_pp(Mtbl_cf *, int, double) ; |
| 74 |
void _poisangu_t_leg_ip(Mtbl_cf *, int, double) ; |
| 75 |
void _poisangu_t_leg_pi(Mtbl_cf *, int, double) ; |
| 76 |
void _poisangu_t_leg_ii(Mtbl_cf *, int, double) ; |
| 77 |
void _poisangu_t_leg_mp(Mtbl_cf *, int, double) ; |
| 78 |
void _poisangu_t_leg_mi(Mtbl_cf *, int, double) ; |
| 79 |
void _poisangu_t_leg(Mtbl_cf *, int, double) ; |
| 80 |
|
| 81 |
//***************************************************************************** |
| 82 |
|
| 83 |
void Mtbl_cf::poisson_angu(double lambda) { |
| 84 |
|
| 85 |
// Routines de derivation |
| 86 |
static void (*poisangu[MAX_BASE])(Mtbl_cf *, int, double) ; |
| 87 |
static int nap = 0 ; |
| 88 |
|
| 89 |
// Premier appel |
| 90 |
if (nap==0) { |
| 91 |
nap = 1 ; |
| 92 |
for (int i=0 ; i<MAX_BASE ; i++) { |
| 93 |
poisangu[i] = _poisangu_pas_prevu ; |
| 94 |
} |
| 95 |
// Les routines existantes |
| 96 |
poisangu[T_LEG_P >> TRA_T] = _poisangu_t_leg_p ; |
| 97 |
poisangu[T_LEG_PP >> TRA_T] = _poisangu_t_leg_pp ; |
| 98 |
poisangu[T_LEG_I >> TRA_T] = _poisangu_t_leg_i ; |
| 99 |
poisangu[T_LEG_IP >> TRA_T] = _poisangu_t_leg_ip ; |
| 100 |
poisangu[T_LEG_PI >> TRA_T] = _poisangu_t_leg_pi ; |
| 101 |
poisangu[T_LEG_MP >> TRA_T] = _poisangu_t_leg_mp ; |
| 102 |
poisangu[T_LEG_MI >> TRA_T] = _poisangu_t_leg_mi ; |
| 103 |
poisangu[T_LEG >> TRA_T] = _poisangu_t_leg ; |
| 104 |
} |
| 105 |
|
| 106 |
// Boucle sur les zones |
| 107 |
for (int l=0 ; l<get_mg()->get_nzone() ; l++) { |
| 108 |
int base_t = (base.b[l] & MSQ_T) >> TRA_T ; |
| 109 |
poisangu[base_t](this, l, lambda) ; |
| 110 |
} |
| 111 |
|
| 112 |
} |
| 113 |
} |