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
24char op_sxm1_C[] = "$Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_sxm1.C,v 1.2 2014/10/13 08:53:26 j_novak Exp $" ;
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.2 2014/10/13 08:53:26 j_novak Exp $
46 * $Log: op_sxm1.C,v $
47 * Revision 1.2 2014/10/13 08:53:26 j_novak
48 * Lorene classes and functions now belong to the namespace Lorene.
49 *
50 * Revision 1.1.1.1 2001/11/20 15:19:29 e_gourgoulhon
51 * LORENE
52 *
53 * Revision 2.2 1999/11/15 16:39:47 eric
54 * Tbl::dim est desormais un Dim_tbl et non plus un Dim_tbl*.
55 *
56 * Revision 2.1 1999/04/26 16:02:21 phil
57 * changement commentaire (!)
58 *
59 * Revision 2.0 1999/04/26 15:54:52 phil
60 * *** empty log message ***
61 *
62 *
63 * $Header: /cvsroot/Lorene/C++/Source/Non_class_members/Operators/op_sxm1.C,v 1.2 2014/10/13 08:53:26 j_novak Exp $
64 *
65 */
66
67//Lorene
68#include "tbl.h"
69
70// Prototypage
71#include "proto.h"
72
73 //-----------------------------------
74 // Routine qui ne fait rien --
75 //-----------------------------------
76
77namespace Lorene {
78void _sxm1_identite(Tbl * , int& ) {
79 return ;
80}
81
82 //-------------------------
83 // cas R_CHEB et R_CHEBU --
84 //-------------------------
85
86void _sxm1_cheb(Tbl* tb, int&)
87{
88
89 // Peut-etre rien a faire ?
90 if (tb->get_etat() == ETATZERO) {
91 return ;
92 }
93
94 // Pour le confort
95 int nr = (tb->dim).dim[0] ; // Nombre
96 int nt = (tb->dim).dim[1] ; // de points
97 int np = (tb->dim).dim[2] ; // physiques REELS
98 np = np - 2 ; // Nombre de points physiques
99
100 int ntnr = nt*nr ;
101
102 int k, j ;
103 for (k=0 ; k<np+1 ; k++) {
104 if (k==1) continue ; // On ne traite pas le coefficient de sin(0*phi)
105 for (j=0 ; j<nt ; j++) {
106
107 double* cf = tb->t + k*ntnr + j*nr ;
108
109 sxm1_1d_cheb(nr, cf) ; // division par (x-1)
110
111
112 } // Fin de la boucle sur theta
113 } // Fin de la boucle sur phi
114
115
116 // base de developpement
117 // inchangee
118}
119}
Lorene prototypes.
Definition app_hor.h:64