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
40 namespace Lorene {
41 void _mult_xp1_identite(Tbl*, int&) ;
42 void _mult_xp1_cheb(Tbl*, int&) ;
43 
44 
45 void Valeur::mult_xp1_shell(int lz) {
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) ;
59  set_etat_cf_qcq() ;
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 }
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition: valeur.h:312
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 coef() const
Computes the coeffcients of *this.
Definition: valeur_coef.C:151
Lorene prototypes.
Definition: app_hor.h:67
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Definition: mtbl_cf.h:202
void mult_xp1_shell(int i)
Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN )
void mult_xp1_shell(int index)
Applies the following operator to *this : \ Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ) \...
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition: mtbl_cf.h:206
Base_val base
Bases on which the spectral expansion is performed.
Definition: valeur.h:315
int * b
Array (size: nzone ) of the spectral basis in each domain.
Definition: base_val.h:334
Base_val base
Bases of the spectral expansions.
Definition: mtbl_cf.h:210
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition: valeur.h:305
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition: grilles.h:491
Tbl ** t
Array (size nzone ) of pointers on the Tbl &#39;s which contain the spectral coefficients in each domain...
Definition: mtbl_cf.h:215