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