valeur_lapang.C

00001 /*
00002  * Function Valeur::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 valeur_lapang_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_lapang.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $" ;
00032 
00033 /*
00034  * $Id: valeur_lapang.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $
00035  * $Log: valeur_lapang.C,v $
00036  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00037  * LORENE
00038  *
00039  * Revision 2.4  1999/11/30  12:44:22  eric
00040  * Valeur::base est desormais du type Base_val et non plus Base_val*.
00041  *
00042  * Revision 2.3  1999/11/23  16:17:37  eric
00043  * Reorganisation du calcul dans le cas ETATZERO.
00044  *
00045  * Revision 2.2  1999/11/19  09:32:40  eric
00046  * La valeur de retour est desormais const Valeur &.
00047  *
00048  * Revision 2.1  1999/10/18  13:42:09  eric
00049  * Suppression de l'argument base dans les routines de derivation des mtbl_cf.
00050  *
00051  * Revision 2.0  1999/04/26  16:43:22  phil
00052  * *** empty log message ***
00053  *
00054  * Revision 1.1  1999/04/26  16:42:30  phil
00055  * Initial revision
00056  *
00057  *
00058  * $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_lapang.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $
00059  *
00060  */
00061 
00062 
00063 // Headers Lorene
00064 #include "mtbl_cf.h"
00065 #include "valeur.h"
00066 
00067 
00068 const Valeur& Valeur::lapang() const {
00069     
00070     // Protection
00071     assert(etat != ETATNONDEF) ;
00072 
00073     // Peut-etre rien a faire ?
00074     if (p_lapang != 0x0) {
00075     return *p_lapang ;
00076     }
00077     
00078     // ... si, il faut bosser
00079 
00080     p_lapang = new Valeur(mg) ;
00081 
00082     if (etat == ETATZERO) {
00083     p_lapang->set_etat_zero() ; 
00084     }
00085     else {
00086     assert(etat == ETATQCQ) ; 
00087     p_lapang->set_etat_cf_qcq() ;
00088     Mtbl_cf* cfp = p_lapang->c_cf ; // Pointeur sur le Mtbl_cf qui vient d'etre
00089                     // cree par le set_etat_cf_qcq()
00090 
00091     // Initialisation de *cfp : recopie des coef. de la fonction
00092     if (c_cf == 0x0) {
00093         coef() ;
00094     }
00095     *cfp = *c_cf ;  
00096  
00097     cfp->lapang() ; // calcul 
00098     
00099     p_lapang->base = cfp->base ; // On remonte la base de sortie au niveau Valeur
00100     }
00101 
00102     // Termine
00103     return *p_lapang ;    
00104     
00105 }

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