LORENE
op_sxm1.C
1 /*
2  * Copyright (c) 1999-2001 Eric Gourgoulhon
3  * Copyright (c) 1999-2001 Philippe Grandclement
4  *
5  * This file is part of LORENE.
6  *
7  * LORENE is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * LORENE is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with LORENE; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  *
21  */
22 
23 
24 
25 
26 /*
27  * Ensemble des routines de base pour l'operateur 1/(x-1) Id
28  * (Utilisation interne)
29  *
30  * Prototype :
31  * ---------
32  * void _sxm1_XXXX(Tbl * tb, int& base)
33  *
34  * Entree/Sortie :
35  * -------------
36  * tb pointeur sur le Tbl d'entree-sortie
37  *
38  * Entree :
39  * ------
40  * base base de travail
41  *
42  */
43 
44 /*
45  * $Id: op_sxm1.C,v 1.3 2016/12/05 16:18:08 j_novak Exp $
46  * $Log: op_sxm1.C,v $
47  * Revision 1.3 2016/12/05 16:18:08 j_novak
48  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
49  *
50  * Revision 1.2 2014/10/13 08:53:26 j_novak
51  * Lorene classes and functions now belong to the namespace Lorene.
52  *
53  * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon
54  * LORENE
55  *
56  * Revision 2.2 1999/11/15 16:39:47 eric
57  * Tbl::dim est desormais un Dim_tbl et non plus un Dim_tbl*.
58  *
59  * Revision 2.1 1999/04/26 16:02:21 phil
60  * changement commentaire (!)
61  *
62  * Revision 2.0 1999/04/26 15:54:52 phil
63  * *** empty log message ***
64  *
65  *
66  * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_sxm1.C,v 1.3 2016/12/05 16:18:08 j_novak Exp $
67  *
68  */
69 
70 //Lorene
71 #include "tbl.h"
72 
73 // Prototypage
74 #include "proto.h"
75 
76  //-----------------------------------
77  // Routine qui ne fait rien --
78  //-----------------------------------
79 
80 namespace Lorene {
81 void _sxm1_identite(Tbl * , int& ) {
82  return ;
83 }
84 
85  //-------------------------
86  // cas R_CHEB et R_CHEBU --
87  //-------------------------
88 
89 void _sxm1_cheb(Tbl* tb, int&)
90 {
91 
92  // Peut-etre rien a faire ?
93  if (tb->get_etat() == ETATZERO) {
94  return ;
95  }
96 
97  // Pour le confort
98  int nr = (tb->dim).dim[0] ; // Nombre
99  int nt = (tb->dim).dim[1] ; // de points
100  int np = (tb->dim).dim[2] ; // physiques REELS
101  np = np - 2 ; // Nombre de points physiques
102 
103  int ntnr = nt*nr ;
104 
105  int k, j ;
106  for (k=0 ; k<np+1 ; k++) {
107  if (k==1) continue ; // On ne traite pas le coefficient de sin(0*phi)
108  for (j=0 ; j<nt ; j++) {
109 
110  double* cf = tb->t + k*ntnr + j*nr ;
111 
112  sxm1_1d_cheb(nr, cf) ; // division par (x-1)
113 
114 
115  } // Fin de la boucle sur theta
116  } // Fin de la boucle sur phi
117 
118 
119  // base de developpement
120  // inchangee
121 }
122 }
Lorene prototypes.
Definition: app_hor.h:67