LORENE
valeur_sxm1_zec.C
1/*
2 * Operator
3 *
4 * f(x) |----> (f(x)-f(1))/(x-1)
5 *
6 * in the external compactified domain,
7 *
8 * for:
9 * - Valeur
10 * - Mtbl_cf
11 */
12
13/*
14 * Copyright (c) 1999-2001 Eric Gourgoulhon
15 *
16 * This file is part of LORENE.
17 *
18 * LORENE is free software; you can redistribute it and/or modify
19 * it under the terms of the GNU General Public License as published by
20 * the Free Software Foundation; either version 2 of the License, or
21 * (at your option) any later version.
22 *
23 * LORENE is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with LORENE; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 *
32 */
33
34
35
36
37/*
38 * $Id: valeur_sxm1_zec.C,v 1.4 2016/12/05 16:18:21 j_novak Exp $
39 * $Log: valeur_sxm1_zec.C,v $
40 * Revision 1.4 2016/12/05 16:18:21 j_novak
41 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
42 *
43 * Revision 1.3 2014/10/13 08:53:51 j_novak
44 * Lorene classes and functions now belong to the namespace Lorene.
45 *
46 * Revision 1.2 2014/10/06 15:13:24 j_novak
47 * Modified #include directives to use c++ syntax.
48 *
49 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
50 * LORENE
51 *
52 * Revision 2.3 2000/03/09 16:53:59 eric
53 * Traitement du cas etat=ETATZERO
54 *
55 * Revision 2.2 1999/11/30 12:46:10 eric
56 * Valeur::base est desormais du type Base_val et non plus Base_val*.
57 *
58 * Revision 2.1 1999/10/18 13:43:19 eric
59 * Suppression de l'argument base dans les routines de derivation des mtbl_cf.
60 *
61 * Revision 2.0 1999/04/26 15:54:59 phil
62 * *** empty log message ***
63 *
64 *
65 * $Header: /cvsroot/Lorene/C++/Source/Valeur/valeur_sxm1_zec.C,v 1.4 2016/12/05 16:18:21 j_novak Exp $
66 *
67 */
68
69// Headers C
70#include <cassert>
71
72// Headers Lorene
73#include "mtbl_cf.h"
74#include "valeur.h"
75
76// Local prototypes
77namespace Lorene {
78void _sxm1_identite(Tbl*, int&) ;
79void _sxm1_cheb(Tbl *, int&) ;
80
81// Version membre d'un Valeur
82// --------------------------
83
85
86 // Peut-etre ne rien faire ?
87 if (etat==ETATZERO) {
88 return ;
89 }
90
91 assert(etat==ETATQCQ) ;
92
93 // Calcul des coef.
94 coef() ;
95
96 // Division par (x-1) dans la ZEC
97 c_cf->sxm1_zec() ;
99
100 base = c_cf->base ; // On remonte la base de sortie au niveau Valeur
101
102}
103
104
105/*
106 * Fonction membre de la classe Mtbl_cf pour la division par (x-1)
107 * dans la zone externe compactifiee applique a this
108 * Par division par (x-1), il faut en fait entendre l'operateur
109 *
110 * f(x) |----> (f(x)-f(1))/(x-1)
111 *
112 *
113 */
114
116{
117
118// Routines de derivation
119static void (*_sxm1[MAX_BASE])(Tbl *, int&) ;
120static int nap = 0 ;
121
122 if (nap==0) {
123 nap = 1 ;
124 for (int i=0 ; i<MAX_BASE ; i++) {
125 _sxm1[i] = _sxm1_identite ;
126 }
127
128 // Les routines existantes cas UNSURR
129 _sxm1[R_CHEBU >> TRA_R] = _sxm1_cheb ;
130 }
131
132 // Peut-etre ne rien faire ?
133 if (etat==ETATZERO) {
134 return ;
135 }
136
137 assert(etat==ETATQCQ) ;
138
139 // Boucle sur les zones
140 for (int l=0 ; l<nzone ; l++) {
141 int base_r = (base.b[l] & MSQ_R) >> TRA_R ;
142 _sxm1[base_r](t[l], base.b[l]) ;
143 }
144
145}
146}
Base_val base
Bases of the spectral expansions.
Definition mtbl_cf.h:210
void sxm1_zec()
Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR ).
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition mtbl_cf.h:206
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's which contain the spectral coefficients in each domain.
Definition mtbl_cf.h:215
int nzone
Number of domains (zones).
Definition mtbl_cf.h:204
Basic array class.
Definition tbl.h:161
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
Definition valeur.C:715
void sxm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR ).
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition valeur.h:312
void coef() const
Computes the coeffcients of *this.
Base_val base
Bases on which the spectral expansion is performed.
Definition valeur.h:315
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition valeur.h:305
#define MAX_BASE
Nombre max. de bases differentes.
#define R_CHEBU
base de Chebychev ordinaire (fin), dev. en 1/r
#define MSQ_R
Extraction de l'info sur R.
#define TRA_R
Translation en R, used for a bitwise shift (in hex).
Lorene prototypes.
Definition app_hor.h:67