LORENE
valeur.h
1/*
2 * Definition of Lorene class Valeur
3 *
4 */
5
6/*
7 * Copyright (c) 1999-2000 Jean-Alain Marck
8 * Copyright (c) 1999-2003 Eric Gourgoulhon
9 * Copyright (c) 1999-2001 Philippe Grandclement
10 * Copyright (c) 1999-2001 Jerome Novak
11 * Copyright (c) 2001 Keisuke Taniguchi
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#ifndef __VALEUR_H_
33#define __VALEUR_H_
34
35/*
36 * $Id: valeur.h,v 1.23 2023/05/24 09:52:02 g_servignat Exp $
37 * $Log: valeur.h,v $
38 * Revision 1.23 2023/05/24 09:52:02 g_servignat
39 * Added multiplication by \xi in a given shell, and dealiasing product in angular direction only
40 *
41 * Revision 1.22 2021/11/24 13:12:17 g_servignat
42 * Addition of new method mult_xm1_shell(int) to multiply by (\xi +1) in a given shell.
43 *
44 * Revision 1.21 2021/11/22 15:19:45 j_novak
45 * Addition of new method mult_xm1_shell(int) to multiply by (\xi -1) in a
46 * given shell.
47 *
48 * Revision 1.20 2014/10/13 08:52:37 j_novak
49 * Lorene classes and functions now belong to the namespace Lorene.
50 *
51 * Revision 1.19 2014/10/06 15:09:40 j_novak
52 * Modified #include directives to use c++ syntax.
53 *
54 * Revision 1.18 2013/06/05 15:06:10 j_novak
55 * Legendre bases are treated as standard bases, when the multi-grid
56 * (Mg3d) is built with BASE_LEG.
57 *
58 * Revision 1.17 2013/01/11 15:44:54 j_novak
59 * Addition of Legendre bases (part 2).
60 *
61 * Revision 1.16 2012/01/18 14:43:42 j_penner
62 * added a routine to return the computational coordinate xi as a Valeur
63 *
64 * Revision 1.15 2012/01/17 10:17:23 j_penner
65 * functions added: Heaviside
66 *
67 * Revision 1.14 2005/11/17 15:18:46 e_gourgoulhon
68 * Added Valeur + Mtbl and Valeur - Mtbl.
69 *
70 * Revision 1.13 2005/10/25 08:56:34 p_grandclement
71 * addition of std_spectral_base in the case of odd functions near the origin
72 *
73 * Revision 1.12 2004/11/23 12:46:04 f_limousin
74 * Add functiun filtre_tp(int nn, int nz1, int nz2).
75 *
76 * Revision 1.11 2004/08/24 09:14:40 p_grandclement
77 * Addition of some new operators, like Poisson in 2d... It now requieres the
78 * GSL library to work.
79 *
80 * Also, the way a variable change is stored by a Param_elliptic is changed and
81 * no longer uses Change_var but rather 2 Scalars. The codes using that feature
82 * will requiere some modification. (It should concern only the ones about monopoles)
83 *
84 * Revision 1.10 2004/07/06 13:36:27 j_novak
85 * Added methods for desaliased product (operator |) only in r direction.
86 *
87 * Revision 1.9 2004/03/22 13:12:44 j_novak
88 * Modification of comments to use doxygen instead of doc++
89 *
90 * Revision 1.8 2003/11/06 14:43:37 e_gourgoulhon
91 * Gave a name to const arguments in certain method prototypes (e.g.
92 * constructors) to correct a bug of DOC++.
93 *
94 * Revision 1.7 2003/10/19 19:48:31 e_gourgoulhon
95 * Introduced new method display_coef.
96 *
97 * Revision 1.6 2003/10/13 20:48:52 e_gourgoulhon
98 * Added new method get_base() (to prepare the encapsulation of the member
99 * base).
100 *
101 * Revision 1.5 2003/09/23 08:52:53 e_gourgoulhon
102 * Added Scalar as a friend class.
103 *
104 * Revision 1.4 2002/10/16 14:36:30 j_novak
105 * Reorganization of #include instructions of standard C++, in order to
106 * use experimental version 3 of gcc.
107 *
108 * Revision 1.3 2002/09/13 09:17:33 j_novak
109 * Modif. commentaires
110 *
111 * Revision 1.2 2002/06/17 14:05:17 j_novak
112 * friend functions are now also declared outside the class definition
113 *
114 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
115 * LORENE
116 *
117 * Revision 2.51 2001/05/29 16:11:58 eric
118 * Modif commentaires (mise en conformite Doc++ 3.4.7).
119 *
120 * Revision 2.50 2001/05/26 14:49:37 eric
121 * Ajout de l'operator% : produit de deux Valeur avec desaliasage.
122 *
123 * Revision 2.49 2001/01/16 15:09:13 keisuke
124 * Change the argument of the function smooth.
125 *
126 * Revision 2.48 2001/01/16 14:54:01 keisuke
127 * Ajout de la fonction smooth.
128 *
129 * Revision 2.47 2000/11/10 13:31:53 eric
130 * Ajout de la fonction equipot_outward.
131 *
132 * Revision 2.46 2000/09/11 13:52:39 eric
133 * Ajout des methodes mult_cp() et mult_sp() ainsi que des membres associes
134 * p_mult_cp et p_mult_sp
135 *
136 * Revision 2.45 2000/09/08 11:43:26 eric
137 * Modif commentaires.
138 *
139 * Revision 2.44 2000/09/08 10:07:02 eric
140 * Ajout des methodes set_base_r, etc...
141 *
142 * Revision 2.43 2000/08/04 11:53:59 eric
143 * Ajout de l'operateur (int l) et de la fonction set(int l) pour l'acces
144 * individuel aux Tbl.
145 *
146 * Revision 2.42 1999/12/29 13:19:51 eric
147 * Modif commentaires.
148 *
149 * Revision 2.41 1999/12/29 13:11:08 eric
150 * Ajout de la fonction val_point_jk.
151 *
152 * Revision 2.40 1999/12/20 16:35:47 eric
153 * Ajout de la fonction set_base.
154 *
155 * Revision 2.39 1999/12/10 16:19:40 eric
156 * Modif commentaires.
157 *
158 * Revision 2.38 1999/12/10 16:11:13 eric
159 * Fonction set: suppression de l'appel a set_etat_c_qcq() pour
160 * augmenter l'efficacite.
161 *
162 * Revision 2.37 1999/12/07 14:52:43 eric
163 * Changement ordre des arguments (phi,theta,xi) --> (xi,theta,phi)
164 * dans la routine val_point.
165 *
166 * Revision 2.36 1999/12/06 16:46:46 eric
167 * Ajout de la fonction val_point.
168 *
169 * Revision 2.35 1999/11/30 12:41:21 eric
170 * Le membre base est desormais un objet de type Base_val et non plus
171 * un pointeur vers une Base_val.
172 *
173 * Revision 2.34 1999/11/29 10:25:32 eric
174 * Ajout de Valeur/Mtbl et Mtbl / Valeur dans l'arithmetique.
175 *
176 * Revision 2.33 1999/11/29 10:05:47 eric
177 * Ajout de Valeur*Mtbl dans l'arithmetique.
178 *
179 * Revision 2.32 1999/11/23 16:15:24 eric
180 * Suppression du membre statique Valeur_Zero.
181 * Suppression du constructeur par defaut.
182 *
183 * Revision 2.31 1999/11/23 14:30:47 novak
184 * Ajout des membres mult_ct et mult_st
185 *
186 * Revision 2.30 1999/11/22 15:40:48 eric
187 * Ajout des operateurs set(l,k,j,i) et (l,k,j,i).
188 * Ajout de la fonction annule(int l).
189 *
190 * Revision 2.29 1999/11/19 11:21:48 eric
191 * Ajout du membre p_stdsdp et de la fonction correspondante stdsdp().
192 *
193 * Revision 2.28 1999/11/19 09:28:38 eric
194 * Les valeurs de retour des operateurs differentiels sont desormais
195 * const Valeur &
196 * et non plus Valeur.
197 * Le laplacien angulaire (lapang) a desormais le meme statut que les
198 * autres operateurs differentiels.
199 *
200 * Revision 2.27 1999/11/16 13:09:48 novak
201 * Ajout de mult_x et scost
202 *
203 * Revision 2.26 1999/11/09 15:24:08 phil
204 * ajout de la fonction mathematique calculant la racine cubique
205 *
206 * Revision 2.25 1999/10/29 15:14:33 eric
207 * Ajout de fonctions mathematiques (abs, norme, etc...).
208 *
209 * Revision 2.24 1999/10/27 08:48:46 eric
210 * La classe Cmp est desormais amie (pour que Cmp::del_t() puisse appeler
211 * Valeur::del_t()).
212 *
213 * Revision 2.23 1999/10/21 14:21:06 eric
214 * Constructeur par lecture de fichier.
215 *
216 * Revision 2.22 1999/10/20 15:38:52 eric
217 * *** empty log message ***
218 *
219 * Revision 2.21 1999/10/20 15:31:04 eric
220 * Ajout de l'arithmetique.
221 *
222 * Revision 2.20 1999/10/19 15:30:24 eric
223 * Ajout de la fonction affiche_seuil.
224 *
225 * Revision 2.19 1999/10/18 15:07:02 eric
226 * La fonction membre annule() est rebaptisee annule_hard().
227 * Introduction de la fonction membre annule(int, int).
228 *
229 * Revision 2.18 1999/10/18 13:39:38 eric
230 * Routines de derivation --> const
231 * Suppression de sxdsdx (non implemente).
232 *
233 * Revision 2.17 1999/10/13 15:49:57 eric
234 * Depoussierage.
235 * Documentation.
236 *
237 * Revision 2.16 1999/09/14 17:17:47 phil
238 * *** empty log message ***
239 *
240 * Revision 2.15 1999/09/14 17:15:38 phil
241 * ajout de Valeur operator* (double, const Valeur&)
242 *
243 * Revision 2.14 1999/09/13 14:53:26 phil
244 * *** empty log message ***
245 *
246 * Revision 2.13 1999/09/13 14:17:52 phil
247 * ajout de Valeur friend operator+ (Valeur, Valeur)
248 *
249 * Revision 2.12 1999/04/26 16:24:23 phil
250 * ajout de mult2_xm1_zec()
251 *
252 * Revision 2.11 1999/04/26 16:12:45 phil
253 * ajout de mult_xm1_zec()
254 *
255 * Revision 2.10 1999/04/26 15:48:11 phil
256 * ajout de sxm1_zec()
257 *
258 * Revision 2.9 1999/04/26 12:57:24 phil
259 * ajout de lapang()
260 *
261 * Revision 2.8 1999/04/13 16:44:55 phil
262 * ajout de ylm_i()
263 *
264 * Revision 2.7 1999/04/13 16:31:46 phil
265 * *** empty log message ***
266 *
267 * Revision 2.6 1999/04/13 16:26:08 phil
268 * ajout ylm
269 *
270 * Revision 2.5 1999/02/24 15:24:34 hyc
271 * *** empty log message ***
272 *
273 * Revision 2.4 1999/02/23 15:55:46 hyc
274 * *** empty log message ***
275 *
276 *
277 * $Header: /cvsroot/Lorene/C++/Include/valeur.h,v 1.23 2023/05/24 09:52:02 g_servignat Exp $
278 *
279 */
280
281// Fichier includes
282#include <cstdio>
283
284#include "mtbl.h"
285#include "mtbl_cf.h"
286
287namespace Lorene {
288class Coord ;
289class Itbl ;
290
296
297class Valeur {
298
299 // Data :
300 // -----
301 private:
302 const Mg3d* mg ;
303
305 int etat ;
306
307 public:
309 mutable Mtbl* c ;
310
312 mutable Mtbl_cf* c_cf ;
313
316
317 // Derived data :
318 // ------------
319 private:
320 mutable Valeur* p_dsdx ;
321 mutable Valeur* p_d2sdx2 ;
322 mutable Valeur* p_sx ;
323 mutable Valeur* p_sx2 ;
324 mutable Valeur* p_mult_x ;
325
326 mutable Valeur* p_dsdt ;
327 mutable Valeur* p_d2sdt2 ;
328 mutable Valeur* p_ssint ;
329 mutable Valeur* p_scost ;
330 mutable Valeur* p_mult_ct ;
331 mutable Valeur* p_mult_st ;
332
333 mutable Valeur* p_dsdp ;
334 mutable Valeur* p_stdsdp ;
335 mutable Valeur* p_d2sdp2 ;
336 mutable Valeur* p_mult_cp ;
337 mutable Valeur* p_mult_sp ;
338
339 mutable Valeur* p_lapang ;
340
341 // Constructors - Destructor
342 // -------------------------
343
344 public:
345 explicit Valeur(const Mg3d& mgrid) ;
346 explicit Valeur(const Mg3d* p_mgrid) ;
347
349 Valeur(const Mg3d&, FILE* ) ;
350
351 Valeur(const Valeur& ) ;
352 ~Valeur() ;
353
354 // Assignement
355 // -----------
356 public:
357 void operator=(const Valeur& a) ;
358 void operator=(const Mtbl& mt) ;
359 void operator=(const Mtbl_cf& mtcf) ;
360 void operator=(double ) ;
361
362 // Access to individual elements
363 // -----------------------------
364 public:
373 Tbl& set(int l) {
374 assert(l < mg->get_nzone()) ;
375 assert(etat == ETATQCQ) ;
376 if (c == 0x0) {
377 coef_i() ;
378 }
379 if (c_cf != 0x0) {
380 delete c_cf ;
381 c_cf = 0 ;
382 }
383 return c->set(l) ;
384 };
385
386
391 const Tbl& operator()(int l) const {
392 assert(l < mg->get_nzone()) ;
393 assert(etat == ETATQCQ) ;
394 if (c == 0x0) {
395 coef_i() ;
396 }
397 return (*c)(l) ;
398 };
399
400
411 double& set(int l, int k, int j, int i) {
412 assert(l < mg->get_nzone()) ;
413 assert(etat == ETATQCQ) ;
414 if (c == 0x0) {
415 coef_i() ;
416 }
417 if (c_cf != 0x0) {
418 delete c_cf ;
419 c_cf = 0 ;
420 }
421 return c->set(l, k, j, i) ;
422 };
423
424
431 double operator()(int l, int k, int j, int i) const {
432 assert(etat != ETATNONDEF) ;
433 assert(l < mg->get_nzone()) ;
434 if (etat == ETATZERO) {
435 double zero = 0. ;
436 return zero ;
437 }
438 else{
439 if (c == 0x0) {
440 coef_i() ;
441 }
442 return (*c)(l, k, j, i) ;
443 }
444 };
445
455 double val_point(int l, double x, double theta, double phi) const ;
456
468 double val_point_jk(int l, double x, int j, int k) const ;
469
470
471 // Operations on coefficients
472 // --------------------------
473 public:
474 void coef() const ;
475 void coef_i() const ;
476 void ylm() ;
477 void ylm_i() ;
478
483 void val_propre_1d() ;
487 void val_propre_1d_i() ;
488
490 const Base_val& get_base() const {return base; } ;
491
493 void set_base(const Base_val& ) ;
494
498 void std_base_scal() ;
499
503 void std_base_scal_odd() ;
504
514 void set_base_r(int l, int base_r) ;
515
524 void set_base_t(int base_t) ;
525
534 void set_base_p(int base_p) ;
535
540 void filtre_tp(int nn, int nz1, int nz2) ;
541
542
543
544 // Differential operators
545 // ----------------------
546 public:
548 const Valeur& dsdx() const ;
550 const Valeur& d2sdx2() const ;
551
553 const Valeur& dsdt() const ;
555 const Valeur& d2sdt2() const ;
557 const Valeur& ssint() const ;
559 const Valeur& scost() const ;
561 const Valeur& mult_ct() const ;
563 const Valeur& mult_st() const ;
564
566 const Valeur& dsdp() const ;
568 const Valeur& stdsdp() const ;
570 const Valeur& d2sdp2() const ;
572 const Valeur& mult_cp() const ;
574 const Valeur& mult_sp() const ;
575
577 const Valeur& lapang() const ;
578
583 const Valeur& sx() const ;
584
589 const Valeur& sx2() const ;
590
595 const Valeur& mult_x() const ;
596
601 void sxm1_zec() ;
602
609 void mult_xm1_shell(int index) ;
610
617 void mult_xp1_shell(int index) ;
618
625 void mult_x_shell(int index) ;
626
631 void mult_xm1_zec() ;
632
637 void mult2_xm1_zec() ;
638
643 void va_x() ;
644
645
646 // Outputs
647 // -------
648 public:
649 void sauve(FILE *) const ;
650
659 void display_coef(double threshold = 1.e-7, int precision = 4,
660 ostream& ostr = cout) const ;
661
671 void affiche_seuil(ostream& ostr, int type = 0, int precision = 4,
672 double threshold = 1.e-7) const ;
673
675 friend ostream& operator<<(ostream& , const Valeur& ) ;
676
677 // Memory management
678 // -----------------
679 private:
680 void nouveau() ;
681 void del_t() ;
682 void del_deriv() ;
683 void set_der_0x0() ;
684
685 // State manipulations
686 public:
687
693 void set_etat_nondef() ;
694
700 void set_etat_zero() ;
701
712 void set_etat_c_qcq() ;
713
724 void set_etat_cf_qcq() ;
725
734 void annule_hard() ;
735
741 void annule(int l) ;
742
753 void annule(int l_min, int l_max) ;
754
755
756 // Extraction of information
757 // -------------------------
758 public:
760 int get_etat() const {return etat ; };
761
763 const Mg3d* get_mg() const { return mg ; };
764
765 // Member arithmetics
766 // ------------------
767 public:
768 void operator+=(const Valeur& ) ;
769 void operator-=(const Valeur& ) ;
770 void operator*=(const Valeur& ) ;
771
772 // Miscellaneous
773 // -------------
774 public:
809 void equipot(double uu0, int nz_search, double precis, int nitermax,
810 int& niter, Itbl& l_iso, Tbl& xi_iso) const ;
811
845 void equipot_outward(double uu0, int nz_search, double precis,
846 int nitermax, int& niter, Itbl& l_iso,
847 Tbl& xi_iso) const ;
848
857 void smooth(int nzet, Valeur& uuva) const ;
858
859 friend class Cmp ;
860 friend class Scalar ;
861 friend void rotate_propre_pair (Valeur&, bool) ;
862 friend void rotate_propre_impair (Valeur&, bool) ;
863};
864ostream& operator<<(ostream& , const Valeur& ) ;
865
871Valeur operator+(const Valeur& ) ;
872Valeur operator-(const Valeur& ) ;
873Valeur operator+(const Valeur&, const Valeur& ) ;
874Valeur operator+(const Valeur&, const Mtbl& ) ;
875Valeur operator+(const Mtbl&, const Valeur& ) ;
876Valeur operator+(const Valeur&, double ) ;
877Valeur operator+(double, const Valeur& ) ;
878Valeur operator+(const Valeur&, int ) ;
879Valeur operator+(int, const Valeur& ) ;
880Valeur operator-(const Valeur&, const Valeur& ) ;
881Valeur operator-(const Valeur&, const Mtbl& ) ;
882Valeur operator-(const Mtbl&, const Valeur& ) ;
883Valeur operator-(const Valeur&, double ) ;
884Valeur operator-(double, const Valeur& ) ;
885Valeur operator-(const Valeur&, int ) ;
886Valeur operator-(int, const Valeur& ) ;
887Valeur operator*(const Valeur&, const Valeur& ) ;
888
890Valeur operator%(const Valeur&, const Valeur& ) ;
891
893Valeur operator&(const Valeur&, const Valeur& ) ;
894
896Valeur operator|(const Valeur&, const Valeur& ) ;
897
898Valeur operator*(const Valeur&, double ) ;
899Valeur operator*(double, const Valeur& ) ;
900Valeur operator*(const Valeur&, int ) ;
901Valeur operator*(int, const Valeur& ) ;
902Valeur operator*(const Valeur& a, const Mtbl& b) ;
903Valeur operator*(const Mtbl& b, const Valeur& a) ;
904Valeur operator*(const Valeur& a, const Coord& c) ;
905Valeur operator*(const Coord& c, const Valeur& a) ;
906Valeur operator/(const Valeur& a, const Valeur& b) ;
907Valeur operator/(const Valeur&, double ) ;
908Valeur operator/(double, const Valeur& ) ;
909Valeur operator/(const Valeur&, int ) ;
910Valeur operator/(int, const Valeur& ) ;
911Valeur operator/(const Valeur& a, const Mtbl& b) ;
912Valeur operator/(const Mtbl& b, const Valeur& a) ;
913
914Valeur sin(const Valeur& ) ;
915Valeur cos(const Valeur& ) ;
916Valeur tan(const Valeur& ) ;
917Valeur asin(const Valeur& ) ;
918Valeur acos(const Valeur& ) ;
919Valeur atan(const Valeur& ) ;
920Valeur exp(const Valeur& ) ;
921Valeur Heaviside(const Valeur& ) ;
922Valeur log(const Valeur& ) ;
923Valeur log10(const Valeur& ) ;
924Valeur sqrt(const Valeur& ) ;
925Valeur pow(const Valeur& , int ) ;
926Valeur pow(const Valeur& , double ) ;
927Valeur abs(const Valeur& ) ;
928Valeur racine_cubique (const Valeur&) ;
929
935double totalmax(const Valeur& ) ;
936
942double totalmin(const Valeur& ) ;
943
950Tbl max(const Valeur& ) ;
951
958Tbl min(const Valeur& ) ;
959
966Tbl norme(const Valeur& ) ;
967
977Tbl diffrel(const Valeur& a, const Valeur& b) ;
978
988Tbl diffrelmax(const Valeur& a, const Valeur& b) ;
989
990
992
993}
994#endif
Bases of the spectral expansions.
Definition base_val.h:325
Active physical coordinates and mapping derivatives.
Definition coord.h:90
Basic integer array class.
Definition itbl.h:122
Multi-domain grid.
Definition grilles.h:279
Coefficients storage for the multi-domain spectral method.
Definition mtbl_cf.h:196
Multi-domain array.
Definition mtbl.h:118
Basic array class.
Definition tbl.h:161
Values and coefficients of a (real-value) function.
Definition valeur.h:297
void filtre_tp(int nn, int nz1, int nz2)
Sets the n lasts coefficients in to 0 in the domain nz1 to nz2 when expressed in spherical harmonics...
Definition valeur.C:927
void operator-=(const Valeur &)
-= Valeur
void del_t()
Logical destructor.
Definition valeur.C:629
const Valeur & sx2() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ).
Definition valeur_sx2.C:117
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 equipot(double uu0, int nz_search, double precis, int nitermax, int &niter, Itbl &l_iso, Tbl &xi_iso) const
Determines an equipotential surface of the field represented by *this (inward search).
double val_point(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
Definition valeur.C:885
const Tbl & operator()(int l) const
Read-only of the value in a given domain (configuration space).
Definition valeur.h:391
const Valeur & mult_ct() const
Returns applied to *this.
~Valeur()
Destructor.
Definition valeur.C:300
void val_propre_1d_i()
Inverse transformation of val_propre_1d.
void equipot_outward(double uu0, int nz_search, double precis, int nitermax, int &niter, Itbl &l_iso, Tbl &xi_iso) const
Determines an equipotential surface of the field represented by *this (outward search).
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c ).
Definition valeur.C:704
double val_point_jk(int l, double x, int j, int k) const
Computes the value of the field represented by *this at an arbitrary point in , but collocation point...
Definition valeur.C:903
Valeur * p_dsdp
Pointer on .
Definition valeur.h:333
const Valeur & dsdp() const
Returns of *this.
void sxm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR ).
friend ostream & operator<<(ostream &, const Valeur &)
Display.
Definition valeur.C:499
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ).
Definition valeur_sx.C:113
void mult_xm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR ).
const Base_val & get_base() const
Return the bases for spectral expansions (member base ).
Definition valeur.h:490
Valeur * p_mult_sp
Pointer on .
Definition valeur.h:337
Valeur * p_mult_x
Pointer on .
Definition valeur.h:324
const Valeur & d2sdt2() const
Returns of *this.
Valeur * p_scost
Pointer on .
Definition valeur.h:329
const Valeur & stdsdp() const
Returns of *this.
int get_etat() const
Returns the logical state.
Definition valeur.h:760
Valeur * p_sx2
Pointer on .
Definition valeur.h:323
void operator+=(const Valeur &)
+= Valeur
Valeur * p_d2sdx2
Pointer on .
Definition valeur.h:321
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition valeur.C:692
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base ).
Definition valeur.C:813
friend class Scalar
Friend class.
Definition valeur.h:860
Valeur * p_dsdx
Pointer on .
Definition valeur.h:320
Valeur(const Mg3d &mgrid)
Constructor.
Definition valeur.C:203
void nouveau()
Memory allocation.
Definition valeur.C:620
void ylm()
Computes the coefficients of *this.
Definition valeur_ylm.C:141
Valeur * p_d2sdt2
Pointer on .
Definition valeur.h:327
friend void rotate_propre_pair(Valeur &, bool)
Friend fonction.
Mtbl * c
Values of the function at the points of the multi-grid.
Definition valeur.h:309
Valeur * p_mult_cp
Pointer on .
Definition valeur.h:336
void display_coef(double threshold=1.e-7, int precision=4, ostream &ostr=cout) const
Displays the spectral coefficients and the associated basis functions.
Definition valeur.C:539
const Valeur & dsdt() const
Returns of *this.
void annule(int l)
Sets the Valeur to zero in a given domain.
Definition valeur.C:747
void mult_x_shell(int index)
Applies the following operator to *this : \ Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ) \...
double operator()(int l, int k, int j, int i) const
Read-only of a particular element (configuration space).
Definition valeur.h:431
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
Definition valeur.h:302
void mult_xm1_shell(int index)
Applies the following operator to *this : \ Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ) \...
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
Definition valeur.h:373
const Valeur & dsdx() const
Returns of *this.
const Valeur & mult_x() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ).
void operator=(const Valeur &a)
Assignement to another Valeur.
Definition valeur.C:330
void std_base_scal_odd()
Sets the bases for spectral expansions (member base ) to the standard odd ones for a scalar.
Definition valeur.C:833
void va_x()
Returns (r -sampling = RARE ) \ (r sampling = FIN ) \ (r -sampling = UNSURR ).
Definition valeur_x.C:43
Valeur * p_sx
Pointer on .
Definition valeur.h:322
const Valeur & ssint() const
Returns of *this.
void coef_i() const
Computes the physical value of *this.
void affiche_seuil(ostream &ostr, int type=0, int precision=4, double threshold=1.e-7) const
Prints only the values greater than a given threshold.
Definition valeur.C:561
friend void rotate_propre_impair(Valeur &, bool)
Friend fonction.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition valeur.h:312
void coef() const
Computes the coeffcients of *this.
friend class Cmp
Friend class.
Definition valeur.h:859
void operator*=(const Valeur &)
*= Valeur
const Valeur & mult_st() const
Returns applied to *this.
Valeur * p_ssint
Pointer on .
Definition valeur.h:328
void set_der_0x0()
Sets the pointers for derivatives to 0x0.
Definition valeur.C:668
const Valeur & scost() const
Returns of *this.
const Valeur & d2sdp2() const
Returns of *this.
Valeur * p_stdsdp
Pointer on .
Definition valeur.h:334
const Mg3d * get_mg() const
Returns the Mg3d on which the this is defined.
Definition valeur.h:763
double & set(int l, int k, int j, int i)
Read/write of a particular element (configuration space).
Definition valeur.h:411
void set_base_r(int l, int base_r)
Sets the expansion basis for r ( ) functions in a given domain.
Definition valeur.C:839
Valeur * p_dsdt
Pointer on .
Definition valeur.h:326
void ylm_i()
Inverse of ylm().
const Valeur & d2sdx2() const
Returns of *this.
Valeur * p_lapang
Pointer on the angular Laplacian.
Definition valeur.h:339
Base_val base
Bases on which the spectral expansion is performed.
Definition valeur.h:315
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
Definition valeur.C:827
void annule_hard()
Sets the Valeur to zero in a hard way.
Definition valeur.C:726
Valeur * p_mult_ct
Pointer on .
Definition valeur.h:330
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition valeur.h:305
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
Definition valeur.C:852
const Valeur & lapang() const
Returns the angular Laplacian of *this.
void smooth(int nzet, Valeur &uuva) const
Changes the function *this as a smooth one when there exists a discontinuity between the nucleus and ...
void set_base_p(int base_p)
Sets the expansion basis for functions in all domains.
Definition valeur.C:865
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Definition valeur.C:698
void mult2_xm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR ).
void mult_xp1_shell(int index)
Applies the following operator to *this : \ Id (r sampling = RARE, UNSURR ) \ (r -sampling = FIN ) \...
void val_propre_1d()
Set the basis to the eigenvalues of .
Valeur * p_d2sdp2
Pointer on .
Definition valeur.h:335
const Valeur & mult_cp() const
Returns applied to *this.
Valeur * p_mult_st
Pointer on .
Definition valeur.h:331
const Valeur & mult_sp() const
Returns applied to *this.
void del_deriv()
Logical destructor of the derivatives.
Definition valeur.C:641
void sauve(FILE *) const
Save in a file.
Definition valeur.C:478
Base_val operator*(const Base_val &, const Base_val &)
This operator is used when calling multiplication or division of Valeur .
Cmp operator-(const Cmp &)
- Cmp
Definition cmp_arithm.C:111
Cmp atan(const Cmp &)
Arctangent.
Definition cmp_math.C:198
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:223
Cmp log10(const Cmp &)
Basis 10 logarithm.
Definition cmp_math.C:325
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Definition cmp_arithm.C:460
Cmp operator%(const Cmp &, const Cmp &)
Cmp * Cmp with desaliasing.
Definition cmp_arithm.C:367
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:273
Cmp sin(const Cmp &)
Sine.
Definition cmp_math.C:72
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Definition cmp_math.C:507
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Definition cmp_math.C:484
Cmp acos(const Cmp &)
Arccosine.
Definition cmp_math.C:172
Cmp asin(const Cmp &)
Arcsine.
Definition cmp_math.C:147
Cmp racine_cubique(const Cmp &)
Cube root.
Definition cmp_math.C:248
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Definition cmp_math.C:461
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition cmp_math.C:438
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:351
Cmp cos(const Cmp &)
Cosine.
Definition cmp_math.C:97
Cmp abs(const Cmp &)
Absolute value.
Definition cmp_math.C:413
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Definition cmp_math.C:542
Cmp operator+(const Cmp &)
Definition cmp_arithm.C:107
Cmp tan(const Cmp &)
Tangent.
Definition cmp_math.C:123
Cmp log(const Cmp &)
Neperian logarithm.
Definition cmp_math.C:299
Mtbl Heaviside(const Mtbl &)
Heaviside function.
Definition mtbl_math.C:320
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
Definition mtbl_math.C:525
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
Definition mtbl_math.C:497
Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
Valeur operator&(const Valeur &, const Valeur &)
Valeur * Valeur with desaliasing only in \theta and \phi direction.
Lorene prototypes.
Definition app_hor.h:67
Coord phi
coordinate centered on the grid
Definition map.h:732
Coord x
x coordinate centered on the grid
Definition map.h:738