00001 /* 00002 * Copyright (c) 1999-2001 Eric Gourgoulhon 00003 * 00004 * This file is part of LORENE. 00005 * 00006 * LORENE is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * LORENE is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with LORENE; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 00023 char op_mult_xm1_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_mult_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $" ; 00024 00025 /* 00026 * $Id: op_mult_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $ 00027 * $Log: op_mult_xm1.C,v $ 00028 * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon 00029 * LORENE 00030 * 00031 * Revision 2.2 1999/11/15 16:38:48 eric 00032 * Tbl::dim est desormais un Dim_tbl et non plus un Dim_tbl*. 00033 * 00034 * Revision 2.1 1999/04/26 16:19:38 phil 00035 * changement commentaire 00036 * 00037 * Revision 2.0 1999/04/26 16:16:24 phil 00038 * *** empty log message *** 00039 * 00040 * 00041 * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_mult_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $ 00042 * 00043 */ 00044 00045 /* 00046 * Ensemble des routines de base pour l'operateur (x-1) Id 00047 * (Utilisation interne) 00048 * 00049 * Prototype : 00050 * --------- 00051 * void _mult_xm1_XXXX(Tbl * tb, int& base) 00052 * 00053 * Entree/Sortie : 00054 * ------------- 00055 * tb pointeur sur le Tbl d'entree-sortie 00056 * 00057 * Entree : 00058 * ------ 00059 * base base de travail 00060 * 00061 */ 00062 00063 00064 //Lorene 00065 #include "tbl.h" 00066 #include "type_parite.h" 00067 00068 // Prototypage 00069 #include "proto.h" 00070 00071 00072 //------------------------------------ 00073 // Routine qui ne fait rien --- 00074 //------------------------------------ 00075 00076 void _mult_xm1_identite(Tbl* , int& ) { 00077 return ; 00078 } 00079 00080 //------------------------- 00081 // cas R_CHEB et R_CHEBU -- 00082 //------------------------- 00083 00084 void _mult_xm1_cheb(Tbl *tb, int& ) 00085 { 00086 00087 // Peut-etre rien a faire ? 00088 if (tb->get_etat() == ETATZERO) { 00089 return ; 00090 } 00091 00092 // Pour le confort 00093 int nr = (tb->dim).dim[0] ; // Nombre 00094 int nt = (tb->dim).dim[1] ; // de points 00095 int np = (tb->dim).dim[2] ; // physiques REELS 00096 np = np - 2 ; // Nombre de points physiques 00097 00098 int ntnr = nt*nr ; 00099 00100 double* trav = new double[nr] ; 00101 00102 int k, j, i ; 00103 for (k=0 ; k<np+1 ; k++) { 00104 if (k==1) continue ; // On ne traite pas le coefficient de sin(0*phi) 00105 for (j=0 ; j<nt ; j++) { 00106 00107 double* cf = tb->t + k*ntnr + j*nr ; 00108 00109 mult_xm1_1d_cheb(nr, cf, trav) ; // multiplication par (x-1) 00110 00111 for (i=0; i<nr; i++) { 00112 cf[i] = trav[i] ; 00113 } 00114 00115 } // Fin de la boucle sur theta 00116 } // Fin de la boucle sur phi 00117 00118 delete [] trav ; 00119 00120 // base de developpement 00121 // inchangee 00122 } 00123
1.4.6