LORENE
valeur_mult_xp1.C
1/*
2 *
3 * Multiplication by (x+1)
4 *
5 * for:
6 * - Valeur
7 * - Mtbl_cf
8 */
9
10/*
11 * Copyright (c) 2021 Gaƫl Servignat
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// Headers C
33#include <cassert>
34
35// Headers Lorene
36#include "mtbl_cf.h"
37#include "valeur.h"
38
39// Local prototypes
40namespace Lorene {
41void _mult_xp1_identite(Tbl*, int&) ;
42void _mult_xp1_cheb(Tbl*, int&) ;
43
44
46
47 // Peut-etre ne rien faire ?
48 if (etat==ETATZERO) {
49 return ;
50 }
51
52 assert(etat==ETATQCQ) ;
53
54 // Calcul des coef.
55 coef() ;
56
57 // Division par (x-1) dans la ZEC
58 c_cf->mult_xp1_shell(lz) ;
60
61 base = c_cf->base ; // On remonte la base de sortie au niveau Valeur
62
63}
64
65
66/*
67 * Fonction membre de la classe Mtbl_cf pour la multiplication par (x+1)
68 * dans une coquille applique a this
69 *
70 */
71
73{
74
75 if (mg->get_type_r(lz) != FIN) {
76 cerr << "Mtbl_cf::mult_xp1_shell() : not called on a shell!" << endl ;
77 abort() ;
78 }
79
80 // Peut-etre ne rien faire ?
81 if (etat==ETATZERO) {
82 return ;
83 }
84
85 assert(etat==ETATQCQ) ;
86
87 _mult_xp1_cheb(t[lz], base.b[lz]) ;
88
89}
90
91}
Base_val base
Bases of the spectral expansions.
Definition mtbl_cf.h:210
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Definition mtbl_cf.h:202
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
void mult_xp1_shell(int i)
Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ).
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
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
void mult_xp1_shell(int index)
Applies the following operator to *this : \ Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ) \...
Lorene prototypes.
Definition app_hor.h:67