Debian Codegraph @

C++/Source/Valeur/valeur_mult_xm1.C

raw
1 /*
2 *
3 * Multiplication by (x-1) in the external compactified domain
4 *
5 * for:
6 * - Valeur
7 * - Mtbl_cf
8 */
9
10 /*
11 * Copyright (c) 1999-2001 Eric Gourgoulhon
12 *
13 * This file is part of LORENE.
14 *
15 * LORENE is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version.
19 *
20 * LORENE is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with LORENE; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 *
29 */
30
31
32 char valeur_mult_xm1_C[] = "$Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_mult_xm1.C,v 1.3 2014/10/13 08:53:51 j_novak Exp $" ;
33
34 /*
35 * $Id: valeur_mult_xm1.C,v 1.3 2014/10/13 08:53:51 j_novak Exp $
36 * $Log: valeur_mult_xm1.C,v $
37 * Revision 1.3 2014/10/13 08:53:51 j_novak
38 * Lorene classes and functions now belong to the namespace Lorene.
39 *
40 * Revision 1.2 2014/10/06 15:13:24 j_novak
41 * Modified #include directives to use c++ syntax.
42 *
43 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
44 * LORENE
45 *
46 * Revision 2.3 2000/03/09 16:54:23 eric
47 * Traitement du cas etat=ETATZERO
48 *
49 * Revision 2.2 1999/11/30 12:45:18 eric
50 * Valeur::base est desormais du type Base_val et non plus Base_val*.
51 *
52 * Revision 2.1 1999/10/18 13:42:33 eric
53 * Suppression de l'argument base dans les routines de derivation des mtbl_cf.
54 *
55 * Revision 2.0 1999/04/26 16:16:17 phil
56 * *** empty log message ***
57 *
58 *
59 * $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_mult_xm1.C,v 1.3 2014/10/13 08:53:51 j_novak Exp $
60 *
61 */
62
63 // Headers C
64 #include <cassert>
65
66 // Headers Lorene
67 #include "mtbl_cf.h"
68 #include "valeur.h"
69
70 // Local prototypes
71 namespace Lorene {
72 void _mult_xm1_identite(Tbl*, int&) ;
73 void _mult_xm1_cheb(Tbl*, int&) ;
74
75
76 void Valeur::mult_xm1_zec() {
77
78 // Peut-etre ne rien faire ?
79 if (etat==ETATZERO) {
80 return ;
81 }
82
83 assert(etat==ETATQCQ) ;
84
85 // Calcul des coef.
86 coef() ;
87
88 // Division par (x-1) dans la ZEC
89 c_cf->mult_xm1_zec() ;
90 set_etat_cf_qcq() ;
91
92 base = c_cf->base ; // On remonte la base de sortie au niveau Valeur
93
94 }
95
96
97 /*
98 * Fonction membre de la classe Mtbl_cf pour la multiplication par (x-1)
99 * dans la zone externe compactifiee applique a this
100 *
101 */
102
103 void Mtbl_cf::mult_xm1_zec()
104 {
105
106 // Routines de derivation
107 static void (*_mult_xm1[MAX_BASE])(Tbl *, int&) ;
108 static int nap = 0 ;
109
110 if (nap==0) {
111 nap = 1 ;
112 for (int i=0 ; i<MAX_BASE ; i++) {
113 _mult_xm1[i] = _mult_xm1_identite ;
114 }
115
116 // Les routines existantes cas UNSURR
117 _mult_xm1[R_CHEBU >> TRA_R] = _mult_xm1_cheb ;
118 }
119
120 // Peut-etre ne rien faire ?
121 if (etat==ETATZERO) {
122 return ;
123 }
124
125 assert(etat==ETATQCQ) ;
126
127 // Boucle sur les zones
128 for (int l=0 ; l<nzone ; l++) {
129 int base_r = (base.b[l] & MSQ_R) >> TRA_R ;
130 _mult_xm1[base_r](t[l], base.b[l]) ;
131 }
132
133 }
134 }