op_mult2_xm1.C

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_mult2_xm1_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $" ;
00024 
00025 /*
00026  * $Id: op_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $
00027  * $Log: op_mult2_xm1.C,v $
00028  * Revision 1.1.1.1  2001/11/20 15:19:29  e_gourgoulhon
00029  * LORENE
00030  *
00031  * Revision 2.1  1999/11/15  16:38:39  eric
00032  * Tbl::dim est desormais un Dim_tbl et non plus un Dim_tbl*.
00033  *
00034  * Revision 2.0  1999/04/26  16:28:31  phil
00035  * *** empty log message ***
00036  *
00037  *
00038  * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_mult2_xm1.C,v 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon Exp $
00039  *
00040  */
00041 
00042 /* 
00043  * Ensemble des routines de base pour l'operateur (x-1) Id
00044  * (Utilisation interne)
00045  * 
00046  *  Prototype :
00047  *  ---------
00048  *  void _sxm1_XXXX(Tbl * tb, int& base)
00049  * 
00050  *  Entree/Sortie :
00051  *  -------------
00052  *  tb  pointeur sur le Tbl d'entree-sortie
00053  *
00054  *  Entree :
00055  *  ------
00056  *  base    base de travail
00057  * 
00058  */
00059  
00060  
00061  //Lorene
00062 #include "tbl.h"
00063 #include "type_parite.h"
00064 
00065 // Prototypage
00066 #include "proto.h"
00067 
00068 
00069         //------------------------------------
00070         // Routine qui ne fait rien    ---
00071         //------------------------------------
00072 
00073 void _mult2_xm1_identite(Tbl* , int& ) {
00074     return ; 
00075 }
00076 
00077             //-------------------------
00078             // cas R_CHEB et R_CHEBU --
00079             //-------------------------
00080 
00081 void _mult2_xm1_cheb(Tbl *tb, int& )
00082 {
00083 
00084     // Peut-etre rien a faire ?
00085     if (tb->get_etat() == ETATZERO) {
00086     return ;
00087     }
00088     
00089     // Pour le confort
00090     int nr = (tb->dim).dim[0] ;     // Nombre
00091     int nt = (tb->dim).dim[1] ;     //   de points
00092     int np = (tb->dim).dim[2] ;     //      physiques REELS
00093     np = np - 2 ;           // Nombre de points physiques
00094     
00095     int ntnr = nt*nr ; 
00096     
00097     double* trav = new double[nr] ;
00098     
00099     int k, j, i ; 
00100     for (k=0 ; k<np+1 ; k++) {
00101     if (k==1) continue ;    // On ne traite pas le coefficient de sin(0*phi) 
00102     for (j=0 ; j<nt ; j++) {
00103     
00104         double* cf = tb->t + k*ntnr + j*nr ;
00105         
00106         mult2_xm1_1d_cheb(nr, cf, trav) ;   // multiplication par (x-1)
00107 
00108         for (i=0; i<nr; i++) {
00109         cf[i] = trav[i] ; 
00110         }
00111         
00112     }   // Fin de la boucle sur theta
00113     }   // Fin de la boucle sur phi
00114     
00115    delete [] trav ; 
00116     
00117     // base de developpement
00118     // inchangee
00119 }
00120 

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