valeur_sxm1_zec.C

00001 /*
00002  * Operator
00003  *
00004  *  f(x) |---->  (f(x)-f(1))/(x-1)
00005  *
00006  * in the external compactified domain,
00007  *
00008  * for:
00009  *   - Valeur
00010  *   - Mtbl_cf
00011  */
00012 
00013 /*
00014  *   Copyright (c) 1999-2001 Eric Gourgoulhon
00015  *
00016  *   This file is part of LORENE.
00017  *
00018  *   LORENE is free software; you can redistribute it and/or modify
00019  *   it under the terms of the GNU General Public License as published by
00020  *   the Free Software Foundation; either version 2 of the License, or
00021  *   (at your option) any later version.
00022  *
00023  *   LORENE is distributed in the hope that it will be useful,
00024  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00025  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00026  *   GNU General Public License for more details.
00027  *
00028  *   You should have received a copy of the GNU General Public License
00029  *   along with LORENE; if not, write to the Free Software
00030  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00031  *
00032  */
00033 
00034 
00035 char valeur_sxm1_zec_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_sxm1_zec.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $" ;
00036  
00037 /*
00038  * $Id: valeur_sxm1_zec.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $
00039  * $Log: valeur_sxm1_zec.C,v $
00040  * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
00041  * LORENE
00042  *
00043  * Revision 2.3  2000/03/09  16:53:59  eric
00044  * Traitement du cas etat=ETATZERO
00045  *
00046  * Revision 2.2  1999/11/30  12:46:10  eric
00047  * Valeur::base est desormais du type Base_val et non plus Base_val*.
00048  *
00049  * Revision 2.1  1999/10/18  13:43:19  eric
00050  * Suppression de l'argument base dans les routines de derivation des mtbl_cf.
00051  *
00052  * Revision 2.0  1999/04/26  15:54:59  phil
00053  * *** empty log message ***
00054  *
00055  *
00056  * $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_sxm1_zec.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $
00057  *
00058  */
00059 
00060 // Headers C
00061 #include <assert.h>
00062 
00063 // Headers Lorene
00064 #include "mtbl_cf.h"
00065 #include "valeur.h"
00066 
00067 // Local prototypes
00068 void _sxm1_identite(Tbl*, int&) ;
00069 void _sxm1_cheb(Tbl *, int&) ;
00070 
00071 // Version membre d'un Valeur
00072 // --------------------------
00073 
00074 void Valeur::sxm1_zec() {
00075 
00076     // Peut-etre ne rien faire ?
00077     if (etat==ETATZERO) {
00078     return ; 
00079     }
00080 
00081     assert(etat==ETATQCQ) ; 
00082 
00083     // Calcul des coef.
00084     coef() ;
00085     
00086     // Division par (x-1) dans la ZEC 
00087     c_cf->sxm1_zec() ;
00088     set_etat_cf_qcq() ;
00089 
00090     base = c_cf->base ; // On remonte la base de sortie au niveau Valeur
00091     
00092 }
00093 
00094 
00095 /*
00096  * Fonction membre de la classe Mtbl_cf pour la division par (x-1) 
00097  * dans la zone externe compactifiee applique a this
00098  * Par division par (x-1), il faut en fait entendre l'operateur
00099  * 
00100  *  f(x) |---->  (f(x)-f(1))/(x-1) 
00101  *
00102  *
00103  */
00104 
00105 void Mtbl_cf::sxm1_zec()       
00106 {
00107 
00108 // Routines de derivation
00109 static void (*_sxm1[MAX_BASE])(Tbl *, int&) ;
00110 static int nap = 0 ;
00111 
00112     if (nap==0) {
00113     nap = 1 ;
00114     for (int i=0 ; i<MAX_BASE ; i++) {
00115         _sxm1[i] = _sxm1_identite ;
00116     }
00117     
00118     // Les routines existantes cas UNSURR
00119     _sxm1[R_CHEBU >> TRA_R] = _sxm1_cheb ;
00120     }
00121 
00122     // Peut-etre ne rien faire ?
00123     if (etat==ETATZERO) {
00124     return ; 
00125     }
00126 
00127     assert(etat==ETATQCQ) ; 
00128 
00129     // Boucle sur les zones
00130     for (int l=0 ; l<nzone ; l++) {
00131     int base_r = (base.b[l] & MSQ_R) >> TRA_R ;
00132     _sxm1[base_r](t[l], base.b[l]) ;
00133     }
00134     
00135 }

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