00001 /* 00002 * Computation of the multiplication by (x-1)^2 in the external compactified 00003 * domain 00004 * 00005 * for: 00006 * - Valeur 00007 * - Mtbl_cf 00008 */ 00009 00010 /* 00011 * Copyright (c) 1999-2001 Eric Gourgoulhon 00012 * Copyright (c) 1999-2001 Philippe Grandclement 00013 * 00014 * This file is part of LORENE. 00015 * 00016 * LORENE is free software; you can redistribute it and/or modify 00017 * it under the terms of the GNU General Public License as published by 00018 * the Free Software Foundation; either version 2 of the License, or 00019 * (at your option) any later version. 00020 * 00021 * LORENE is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with LORENE; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 * 00030 */ 00031 00032 00033 char valeur_mult2_xm1_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $" ; 00034 00035 /* 00036 * $Id: valeur_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $ 00037 * $Log: valeur_mult2_xm1.C,v $ 00038 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon 00039 * LORENE 00040 * 00041 * Revision 2.3 2000/03/09 16:54:13 eric 00042 * Traitement du cas etat=ETATZERO 00043 * 00044 * Revision 2.2 1999/11/30 12:44:31 eric 00045 * Valeur::base est desormais du type Base_val et non plus Base_val*. 00046 * 00047 * Revision 2.1 1999/10/18 13:42:21 eric 00048 * Suppression de l'argument base dans les routines de derivation des mtbl_cf. 00049 * 00050 * Revision 2.0 1999/04/26 16:28:24 phil 00051 * *** empty log message *** 00052 * 00053 * 00054 * $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon Exp $ 00055 * 00056 */ 00057 00058 // Headers C 00059 #include <assert.h> 00060 00061 // Headers Lorene 00062 #include "mtbl_cf.h" 00063 #include "valeur.h" 00064 00065 // Local prototypes 00066 void _mult2_xm1_identite(Tbl*, int&) ; 00067 void _mult2_xm1_cheb(Tbl*, int&) ; 00068 00069 void Valeur::mult2_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->mult2_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::mult2_xm1_zec() 00097 { 00098 00099 // Routines de derivation 00100 static void (*_mult2_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 _mult2_xm1[i] = _mult2_xm1_identite ; 00107 } 00108 00109 // Les routines existantes cas UNSURR 00110 _mult2_xm1[R_CHEBU >> TRA_R] = _mult2_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 _mult2_xm1[base_r](t[l], base.b[l]) ; 00124 } 00125 00126 }
1.4.6