valeur_mult_xm1.C

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

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