| 1 |
/* |
| 2 |
* Function Valeur::lapang for the computation of the angular Laplacian: |
| 3 |
* |
| 4 |
* d^2/dtheta^2 + cos(theta)/sin(theta) d/dtheta + 1/sin(theta) d^2/dphi^2 |
| 5 |
* |
| 6 |
*/ |
| 7 |
|
| 8 |
/* |
| 9 |
* Copyright (c) 1999-2001 Eric Gourgoulhon |
| 10 |
* Copyright (c) 1999-2001 Philippe Grandclement |
| 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 valeur_lapang_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_lapang.C,v 1.2 2014/10/13 08:53:50 j_novak Exp $" ; |
| 32 |
|
| 33 |
/* |
| 34 |
* $Id: valeur_lapang.C,v 1.2 2014/10/13 08:53:50 j_novak Exp $ |
| 35 |
* $Log: valeur_lapang.C,v $ |
| 36 |
* Revision 1.2 2014/10/13 08:53:50 j_novak |
| 37 |
* Lorene classes and functions now belong to the namespace Lorene. |
| 38 |
* |
| 39 |
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon |
| 40 |
* LORENE |
| 41 |
* |
| 42 |
* Revision 2.4 1999/11/30 12:44:22 eric |
| 43 |
* Valeur::base est desormais du type Base_val et non plus Base_val*. |
| 44 |
* |
| 45 |
* Revision 2.3 1999/11/23 16:17:37 eric |
| 46 |
* Reorganisation du calcul dans le cas ETATZERO. |
| 47 |
* |
| 48 |
* Revision 2.2 1999/11/19 09:32:40 eric |
| 49 |
* La valeur de retour est desormais const Valeur &. |
| 50 |
* |
| 51 |
* Revision 2.1 1999/10/18 13:42:09 eric |
| 52 |
* Suppression de l'argument base dans les routines de derivation des mtbl_cf. |
| 53 |
* |
| 54 |
* Revision 2.0 1999/04/26 16:43:22 phil |
| 55 |
* *** empty log message *** |
| 56 |
* |
| 57 |
* Revision 1.1 1999/04/26 16:42:30 phil |
| 58 |
* Initial revision |
| 59 |
* |
| 60 |
* |
| 61 |
* $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_lapang.C,v 1.2 2014/10/13 08:53:50 j_novak Exp $ |
| 62 |
* |
| 63 |
*/ |
| 64 |
|
| 65 |
|
| 66 |
// Headers Lorene |
| 67 |
#include "mtbl_cf.h" |
| 68 |
#include "valeur.h" |
| 69 |
|
| 70 |
|
| 71 |
namespace Lorene { |
| 72 |
const Valeur& Valeur::lapang() const { |
| 73 |
|
| 74 |
// Protection |
| 75 |
assert(etat != ETATNONDEF) ; |
| 76 |
|
| 77 |
// Peut-etre rien a faire ? |
| 78 |
if (p_lapang != 0x0) { |
| 79 |
return *p_lapang ; |
| 80 |
} |
| 81 |
|
| 82 |
// ... si, il faut bosser |
| 83 |
|
| 84 |
p_lapang = new Valeur(mg) ; |
| 85 |
|
| 86 |
if (etat == ETATZERO) { |
| 87 |
p_lapang->set_etat_zero() ; |
| 88 |
} |
| 89 |
else { |
| 90 |
assert(etat == ETATQCQ) ; |
| 91 |
p_lapang->set_etat_cf_qcq() ; |
| 92 |
Mtbl_cf* cfp = p_lapang->c_cf ; // Pointeur sur le Mtbl_cf qui vient d'etre |
| 93 |
// cree par le set_etat_cf_qcq() |
| 94 |
|
| 95 |
// Initialisation de *cfp : recopie des coef. de la fonction |
| 96 |
if (c_cf == 0x0) { |
| 97 |
coef() ; |
| 98 |
} |
| 99 |
*cfp = *c_cf ; |
| 100 |
|
| 101 |
cfp->lapang() ; // calcul |
| 102 |
|
| 103 |
p_lapang->base = cfp->base ; // On remonte la base de sortie au niveau Valeur |
| 104 |
} |
| 105 |
|
| 106 |
// Termine |
| 107 |
return *p_lapang ; |
| 108 |
|
| 109 |
} |
| 110 |
} |