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.20 2014/10/13 08:52:37 j_novak Exp $
37 * $Log: valeur.h,v $
38 * Revision 1.20 2014/10/13 08:52:37 j_novak
39 * Lorene classes and functions now belong to the namespace Lorene.
40 *
41 * Revision 1.19 2014/10/06 15:09:40 j_novak
42 * Modified #include directives to use c++ syntax.
43 *
44 * Revision 1.18 2013/06/05 15:06:10 j_novak
45 * Legendre bases are treated as standard bases, when the multi-grid
46 * (Mg3d) is built with BASE_LEG.
47 *
48 * Revision 1.17 2013/01/11 15:44:54 j_novak
49 * Addition of Legendre bases (part 2).
50 *
51 * Revision 1.16 2012/01/18 14:43:42 j_penner
52 * added a routine to return the computational coordinate xi as a Valeur
53 *
54 * Revision 1.15 2012/01/17 10:17:23 j_penner
55 * functions added: Heaviside
56 *
57 * Revision 1.14 2005/11/17 15:18:46 e_gourgoulhon
58 * Added Valeur + Mtbl and Valeur - Mtbl.
59 *
60 * Revision 1.13 2005/10/25 08:56:34 p_grandclement
61 * addition of std_spectral_base in the case of odd functions near the origin
62 *
63 * Revision 1.12 2004/11/23 12:46:04 f_limousin
64 * Add functiun filtre_tp(int nn, int nz1, int nz2).
65 *
66 * Revision 1.11 2004/08/24 09:14:40 p_grandclement
67 * Addition of some new operators, like Poisson in 2d... It now requieres the
68 * GSL library to work.
69 *
70 * Also, the way a variable change is stored by a Param_elliptic is changed and
71 * no longer uses Change_var but rather 2 Scalars. The codes using that feature
72 * will requiere some modification. (It should concern only the ones about monopoles)
73 *
74 * Revision 1.10 2004/07/06 13:36:27 j_novak
75 * Added methods for desaliased product (operator |) only in r direction.
76 *
77 * Revision 1.9 2004/03/22 13:12:44 j_novak
78 * Modification of comments to use doxygen instead of doc++
79 *
80 * Revision 1.8 2003/11/06 14:43:37 e_gourgoulhon
81 * Gave a name to const arguments in certain method prototypes (e.g.
82 * constructors) to correct a bug of DOC++.
83 *
84 * Revision 1.7 2003/10/19 19:48:31 e_gourgoulhon
85 * Introduced new method display_coef.
86 *
87 * Revision 1.6 2003/10/13 20:48:52 e_gourgoulhon
88 * Added new method get_base() (to prepare the encapsulation of the member
89 * base).
90 *
91 * Revision 1.5 2003/09/23 08:52:53 e_gourgoulhon
92 * Added Scalar as a friend class.
93 *
94 * Revision 1.4 2002/10/16 14:36:30 j_novak
95 * Reorganization of #include instructions of standard C++, in order to
96 * use experimental version 3 of gcc.
97 *
98 * Revision 1.3 2002/09/13 09:17:33 j_novak
99 * Modif. commentaires
100 *
101 * Revision 1.2 2002/06/17 14:05:17 j_novak
102 * friend functions are now also declared outside the class definition
103 *
104 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
105 * LORENE
106 *
107 * Revision 2.51 2001/05/29 16:11:58 eric
108 * Modif commentaires (mise en conformite Doc++ 3.4.7).
109 *
110 * Revision 2.50 2001/05/26 14:49:37 eric
111 * Ajout de l'operator% : produit de deux Valeur avec desaliasage.
112 *
113 * Revision 2.49 2001/01/16 15:09:13 keisuke
114 * Change the argument of the function smooth.
115 *
116 * Revision 2.48 2001/01/16 14:54:01 keisuke
117 * Ajout de la fonction smooth.
118 *
119 * Revision 2.47 2000/11/10 13:31:53 eric
120 * Ajout de la fonction equipot_outward.
121 *
122 * Revision 2.46 2000/09/11 13:52:39 eric
123 * Ajout des methodes mult_cp() et mult_sp() ainsi que des membres associes
124 * p_mult_cp et p_mult_sp
125 *
126 * Revision 2.45 2000/09/08 11:43:26 eric
127 * Modif commentaires.
128 *
129 * Revision 2.44 2000/09/08 10:07:02 eric
130 * Ajout des methodes set_base_r, etc...
131 *
132 * Revision 2.43 2000/08/04 11:53:59 eric
133 * Ajout de l'operateur (int l) et de la fonction set(int l) pour l'acces
134 * individuel aux Tbl.
135 *
136 * Revision 2.42 1999/12/29 13:19:51 eric
137 * Modif commentaires.
138 *
139 * Revision 2.41 1999/12/29 13:11:08 eric
140 * Ajout de la fonction val_point_jk.
141 *
142 * Revision 2.40 1999/12/20 16:35:47 eric
143 * Ajout de la fonction set_base.
144 *
145 * Revision 2.39 1999/12/10 16:19:40 eric
146 * Modif commentaires.
147 *
148 * Revision 2.38 1999/12/10 16:11:13 eric
149 * Fonction set: suppression de l'appel a set_etat_c_qcq() pour
150 * augmenter l'efficacite.
151 *
152 * Revision 2.37 1999/12/07 14:52:43 eric
153 * Changement ordre des arguments (phi,theta,xi) --> (xi,theta,phi)
154 * dans la routine val_point.
155 *
156 * Revision 2.36 1999/12/06 16:46:46 eric
157 * Ajout de la fonction val_point.
158 *
159 * Revision 2.35 1999/11/30 12:41:21 eric
160 * Le membre base est desormais un objet de type Base_val et non plus
161 * un pointeur vers une Base_val.
162 *
163 * Revision 2.34 1999/11/29 10:25:32 eric
164 * Ajout de Valeur/Mtbl et Mtbl / Valeur dans l'arithmetique.
165 *
166 * Revision 2.33 1999/11/29 10:05:47 eric
167 * Ajout de Valeur*Mtbl dans l'arithmetique.
168 *
169 * Revision 2.32 1999/11/23 16:15:24 eric
170 * Suppression du membre statique Valeur_Zero.
171 * Suppression du constructeur par defaut.
172 *
173 * Revision 2.31 1999/11/23 14:30:47 novak
174 * Ajout des membres mult_ct et mult_st
175 *
176 * Revision 2.30 1999/11/22 15:40:48 eric
177 * Ajout des operateurs set(l,k,j,i) et (l,k,j,i).
178 * Ajout de la fonction annule(int l).
179 *
180 * Revision 2.29 1999/11/19 11:21:48 eric
181 * Ajout du membre p_stdsdp et de la fonction correspondante stdsdp().
182 *
183 * Revision 2.28 1999/11/19 09:28:38 eric
184 * Les valeurs de retour des operateurs differentiels sont desormais
185 * const Valeur &
186 * et non plus Valeur.
187 * Le laplacien angulaire (lapang) a desormais le meme statut que les
188 * autres operateurs differentiels.
189 *
190 * Revision 2.27 1999/11/16 13:09:48 novak
191 * Ajout de mult_x et scost
192 *
193 * Revision 2.26 1999/11/09 15:24:08 phil
194 * ajout de la fonction mathematique calculant la racine cubique
195 *
196 * Revision 2.25 1999/10/29 15:14:33 eric
197 * Ajout de fonctions mathematiques (abs, norme, etc...).
198 *
199 * Revision 2.24 1999/10/27 08:48:46 eric
200 * La classe Cmp est desormais amie (pour que Cmp::del_t() puisse appeler
201 * Valeur::del_t()).
202 *
203 * Revision 2.23 1999/10/21 14:21:06 eric
204 * Constructeur par lecture de fichier.
205 *
206 * Revision 2.22 1999/10/20 15:38:52 eric
207 * *** empty log message ***
208 *
209 * Revision 2.21 1999/10/20 15:31:04 eric
210 * Ajout de l'arithmetique.
211 *
212 * Revision 2.20 1999/10/19 15:30:24 eric
213 * Ajout de la fonction affiche_seuil.
214 *
215 * Revision 2.19 1999/10/18 15:07:02 eric
216 * La fonction membre annule() est rebaptisee annule_hard().
217 * Introduction de la fonction membre annule(int, int).
218 *
219 * Revision 2.18 1999/10/18 13:39:38 eric
220 * Routines de derivation --> const
221 * Suppression de sxdsdx (non implemente).
222 *
223 * Revision 2.17 1999/10/13 15:49:57 eric
224 * Depoussierage.
225 * Documentation.
226 *
227 * Revision 2.16 1999/09/14 17:17:47 phil
228 * *** empty log message ***
229 *
230 * Revision 2.15 1999/09/14 17:15:38 phil
231 * ajout de Valeur operator* (double, const Valeur&)
232 *
233 * Revision 2.14 1999/09/13 14:53:26 phil
234 * *** empty log message ***
235 *
236 * Revision 2.13 1999/09/13 14:17:52 phil
237 * ajout de Valeur friend operator+ (Valeur, Valeur)
238 *
239 * Revision 2.12 1999/04/26 16:24:23 phil
240 * ajout de mult2_xm1_zec()
241 *
242 * Revision 2.11 1999/04/26 16:12:45 phil
243 * ajout de mult_xm1_zec()
244 *
245 * Revision 2.10 1999/04/26 15:48:11 phil
246 * ajout de sxm1_zec()
247 *
248 * Revision 2.9 1999/04/26 12:57:24 phil
249 * ajout de lapang()
250 *
251 * Revision 2.8 1999/04/13 16:44:55 phil
252 * ajout de ylm_i()
253 *
254 * Revision 2.7 1999/04/13 16:31:46 phil
255 * *** empty log message ***
256 *
257 * Revision 2.6 1999/04/13 16:26:08 phil
258 * ajout ylm
259 *
260 * Revision 2.5 1999/02/24 15:24:34 hyc
261 * *** empty log message ***
262 *
263 * Revision 2.4 1999/02/23 15:55:46 hyc
264 * *** empty log message ***
265 *
266 *
267 * $Header: /cvsroot/Lorene/C++/Include/valeur.h,v 1.20 2014/10/13 08:52:37 j_novak Exp $
268 *
269 */
270
271// Fichier includes
272#include <cstdio>
273
274#include "mtbl.h"
275#include "mtbl_cf.h"
276
277namespace Lorene {
278class Coord ;
279class Itbl ;
280
287class Valeur {
288
289 // Data :
290 // -----
291 private:
292 const Mg3d* mg ;
293
295 int etat ;
296
297 public:
299 mutable Mtbl* c ;
300
302 mutable Mtbl_cf* c_cf ;
303
306
307 // Derived data :
308 // ------------
309 private:
310 mutable Valeur* p_dsdx ;
311 mutable Valeur* p_d2sdx2 ;
312 mutable Valeur* p_sx ;
313 mutable Valeur* p_sx2 ;
314 mutable Valeur* p_mult_x ;
315
316 mutable Valeur* p_dsdt ;
317 mutable Valeur* p_d2sdt2 ;
318 mutable Valeur* p_ssint ;
319 mutable Valeur* p_scost ;
320 mutable Valeur* p_mult_ct ;
321 mutable Valeur* p_mult_st ;
322
323 mutable Valeur* p_dsdp ;
324 mutable Valeur* p_stdsdp ;
325 mutable Valeur* p_d2sdp2 ;
326 mutable Valeur* p_mult_cp ;
327 mutable Valeur* p_mult_sp ;
328
329 mutable Valeur* p_lapang ;
330
331 // Constructors - Destructor
332 // -------------------------
333
334 public:
335 explicit Valeur(const Mg3d& mgrid) ;
336 explicit Valeur(const Mg3d* p_mgrid) ;
337
339 Valeur(const Mg3d&, FILE* ) ;
340
341 Valeur(const Valeur& ) ;
342 ~Valeur() ;
343
344 // Assignement
345 // -----------
346 public:
347 void operator=(const Valeur& a) ;
348 void operator=(const Mtbl& mt) ;
349 void operator=(const Mtbl_cf& mtcf) ;
350 void operator=(double ) ;
351
352 // Access to individual elements
353 // -----------------------------
354 public:
363 Tbl& set(int l) {
364 assert(l < mg->get_nzone()) ;
365 assert(etat == ETATQCQ) ;
366 if (c == 0x0) {
367 coef_i() ;
368 }
369 if (c_cf != 0x0) {
370 delete c_cf ;
371 c_cf = 0 ;
372 }
373 return c->set(l) ;
374 };
375
376
381 const Tbl& operator()(int l) const {
382 assert(l < mg->get_nzone()) ;
383 assert(etat == ETATQCQ) ;
384 if (c == 0x0) {
385 coef_i() ;
386 }
387 return (*c)(l) ;
388 };
389
390
401 double& set(int l, int k, int j, int i) {
402 assert(l < mg->get_nzone()) ;
403 assert(etat == ETATQCQ) ;
404 if (c == 0x0) {
405 coef_i() ;
406 }
407 if (c_cf != 0x0) {
408 delete c_cf ;
409 c_cf = 0 ;
410 }
411 return c->set(l, k, j, i) ;
412 };
413
414
421 double operator()(int l, int k, int j, int i) const {
422 assert(etat != ETATNONDEF) ;
423 assert(l < mg->get_nzone()) ;
424 if (etat == ETATZERO) {
425 double zero = 0. ;
426 return zero ;
427 }
428 else{
429 if (c == 0x0) {
430 coef_i() ;
431 }
432 return (*c)(l, k, j, i) ;
433 }
434 };
435
445 double val_point(int l, double x, double theta, double phi) const ;
446
458 double val_point_jk(int l, double x, int j, int k) const ;
459
460
461 // Operations on coefficients
462 // --------------------------
463 public:
464 void coef() const ;
465 void coef_i() const ;
466 void ylm() ;
467 void ylm_i() ;
468
473 void val_propre_1d() ;
477 void val_propre_1d_i() ;
478
480 const Base_val& get_base() const {return base; } ;
481
483 void set_base(const Base_val& ) ;
484
488 void std_base_scal() ;
489
493 void std_base_scal_odd() ;
494
504 void set_base_r(int l, int base_r) ;
505
514 void set_base_t(int base_t) ;
515
524 void set_base_p(int base_p) ;
525
530 void filtre_tp(int nn, int nz1, int nz2) ;
531
532
533
534 // Differential operators
535 // ----------------------
536 public:
538 const Valeur& dsdx() const ;
540 const Valeur& d2sdx2() const ;
541
543 const Valeur& dsdt() const ;
545 const Valeur& d2sdt2() const ;
547 const Valeur& ssint() const ;
549 const Valeur& scost() const ;
551 const Valeur& mult_ct() const ;
553 const Valeur& mult_st() const ;
554
556 const Valeur& dsdp() const ;
558 const Valeur& stdsdp() const ;
560 const Valeur& d2sdp2() const ;
562 const Valeur& mult_cp() const ;
564 const Valeur& mult_sp() const ;
565
567 const Valeur& lapang() const ;
568
573 const Valeur& sx() const ;
574
579 const Valeur& sx2() const ;
580
585 const Valeur& mult_x() const ;
586
591 void sxm1_zec() ;
592
597 void mult_xm1_zec() ;
598
603 void mult2_xm1_zec() ;
604
609 void va_x() ;
610
611
612 // Outputs
613 // -------
614 public:
615 void sauve(FILE *) const ;
616
625 void display_coef(double threshold = 1.e-7, int precision = 4,
626 ostream& ostr = cout) const ;
627
637 void affiche_seuil(ostream& ostr, int type = 0, int precision = 4,
638 double threshold = 1.e-7) const ;
639
641 friend ostream& operator<<(ostream& , const Valeur& ) ;
642
643 // Memory management
644 // -----------------
645 private:
646 void nouveau() ;
647 void del_t() ;
648 void del_deriv() ;
649 void set_der_0x0() ;
650
651 // State manipulations
652 public:
653
659 void set_etat_nondef() ;
660
666 void set_etat_zero() ;
667
678 void set_etat_c_qcq() ;
679
690 void set_etat_cf_qcq() ;
691
700 void annule_hard() ;
701
707 void annule(int l) ;
708
719 void annule(int l_min, int l_max) ;
720
721
722 // Extraction of information
723 // -------------------------
724 public:
726 int get_etat() const {return etat ; };
727
729 const Mg3d* get_mg() const { return mg ; };
730
731 // Member arithmetics
732 // ------------------
733 public:
734 void operator+=(const Valeur& ) ;
735 void operator-=(const Valeur& ) ;
736 void operator*=(const Valeur& ) ;
737
738 // Miscellaneous
739 // -------------
740 public:
775 void equipot(double uu0, int nz_search, double precis, int nitermax,
776 int& niter, Itbl& l_iso, Tbl& xi_iso) const ;
777
811 void equipot_outward(double uu0, int nz_search, double precis,
812 int nitermax, int& niter, Itbl& l_iso,
813 Tbl& xi_iso) const ;
814
823 void smooth(int nzet, Valeur& uuva) const ;
824
825 friend class Cmp ;
826 friend class Scalar ;
827 friend void rotate_propre_pair (Valeur&, bool) ;
828 friend void rotate_propre_impair (Valeur&, bool) ;
829};
830ostream& operator<<(ostream& , const Valeur& ) ;
831
837Valeur operator+(const Valeur& ) ;
838Valeur operator-(const Valeur& ) ;
839Valeur operator+(const Valeur&, const Valeur& ) ;
840Valeur operator+(const Valeur&, const Mtbl& ) ;
841Valeur operator+(const Mtbl&, const Valeur& ) ;
842Valeur operator+(const Valeur&, double ) ;
843Valeur operator+(double, const Valeur& ) ;
844Valeur operator+(const Valeur&, int ) ;
845Valeur operator+(int, const Valeur& ) ;
846Valeur operator-(const Valeur&, const Valeur& ) ;
847Valeur operator-(const Valeur&, const Mtbl& ) ;
848Valeur operator-(const Mtbl&, const Valeur& ) ;
849Valeur operator-(const Valeur&, double ) ;
850Valeur operator-(double, const Valeur& ) ;
851Valeur operator-(const Valeur&, int ) ;
852Valeur operator-(int, const Valeur& ) ;
853Valeur operator*(const Valeur&, const Valeur& ) ;
854
856Valeur operator%(const Valeur&, const Valeur& ) ;
857
859Valeur operator|(const Valeur&, const Valeur& ) ;
860
861Valeur operator*(const Valeur&, double ) ;
862Valeur operator*(double, const Valeur& ) ;
863Valeur operator*(const Valeur&, int ) ;
864Valeur operator*(int, const Valeur& ) ;
865Valeur operator*(const Valeur& a, const Mtbl& b) ;
866Valeur operator*(const Mtbl& b, const Valeur& a) ;
867Valeur operator*(const Valeur& a, const Coord& c) ;
868Valeur operator*(const Coord& c, const Valeur& a) ;
869Valeur operator/(const Valeur& a, const Valeur& b) ;
870Valeur operator/(const Valeur&, double ) ;
871Valeur operator/(double, const Valeur& ) ;
872Valeur operator/(const Valeur&, int ) ;
873Valeur operator/(int, const Valeur& ) ;
874Valeur operator/(const Valeur& a, const Mtbl& b) ;
875Valeur operator/(const Mtbl& b, const Valeur& a) ;
876
877Valeur sin(const Valeur& ) ;
878Valeur cos(const Valeur& ) ;
879Valeur tan(const Valeur& ) ;
880Valeur asin(const Valeur& ) ;
881Valeur acos(const Valeur& ) ;
882Valeur atan(const Valeur& ) ;
883Valeur exp(const Valeur& ) ;
884Valeur Heaviside(const Valeur& ) ;
885Valeur log(const Valeur& ) ;
886Valeur log10(const Valeur& ) ;
887Valeur sqrt(const Valeur& ) ;
888Valeur pow(const Valeur& , int ) ;
889Valeur pow(const Valeur& , double ) ;
890Valeur abs(const Valeur& ) ;
891Valeur racine_cubique (const Valeur&) ;
892
898double totalmax(const Valeur& ) ;
899
905double totalmin(const Valeur& ) ;
906
913Tbl max(const Valeur& ) ;
914
921Tbl min(const Valeur& ) ;
922
929Tbl norme(const Valeur& ) ;
930
940Tbl diffrel(const Valeur& a, const Valeur& b) ;
941
951Tbl diffrelmax(const Valeur& a, const Valeur& b) ;
952
953
956}
957#endif
Bases of the spectral expansions.
Definition base_val.h:322
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Active physical coordinates and mapping derivatives.
Definition coord.h:90
Basic integer array class.
Definition itbl.h:122
Multi-domain grid.
Definition grilles.h:273
Coefficients storage for the multi-domain spectral method.
Definition mtbl_cf.h:186
Multi-domain array.
Definition mtbl.h:118
Tbl & set(int l)
Read/write of the Tbl in a given domain.
Definition mtbl.h:221
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
Basic array class.
Definition tbl.h:161
Values and coefficients of a (real-value) function.
Definition valeur.h:287
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:924
void operator-=(const Valeur &)
-= Valeur
void del_t()
Logical destructor.
Definition valeur.C:626
const Valeur & sx2() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
Definition valeur_sx2.C:114
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:712
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:882
const Tbl & operator()(int l) const
Read-only of the value in a given domain (configuration space).
Definition valeur.h:381
const Valeur & mult_ct() const
Returns applied to *this.
~Valeur()
Destructor.
Definition valeur.C:297
void val_propre_1d_i()
Inverse transformation of val_propre_1d.
friend void rotate_propre_impair(Valeur &, bool)
Friend fonction.
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:701
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:900
Valeur * p_dsdp
Pointer on .
Definition valeur.h:323
const Valeur & dsdp() const
Returns of *this.
Definition valeur_dsdp.C:98
void sxm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
Definition valeur_sx.C:110
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:480
Valeur * p_mult_sp
Pointer on .
Definition valeur.h:327
Valeur * p_mult_x
Pointer on .
Definition valeur.h:314
const Valeur & d2sdt2() const
Returns of *this.
Valeur * p_scost
Pointer on
Definition valeur.h:319
const Valeur & stdsdp() const
Returns of *this.
int get_etat() const
Returns the logical state.
Definition valeur.h:726
Valeur * p_sx2
Pointer on .
Definition valeur.h:313
void operator+=(const Valeur &)
+= Valeur
Valeur * p_d2sdx2
Pointer on .
Definition valeur.h:311
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition valeur.C:689
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Definition valeur.C:810
Valeur * p_dsdx
Pointer on .
Definition valeur.h:310
void nouveau()
Memory allocation.
Definition valeur.C:617
void ylm()
Computes the coefficients of *this.
Definition valeur_ylm.C:138
Valeur * p_d2sdt2
Pointer on .
Definition valeur.h:317
Mtbl * c
Values of the function at the points of the multi-grid
Definition valeur.h:299
Valeur * p_mult_cp
Pointer on .
Definition valeur.h:326
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:536
const Valeur & dsdt() const
Returns of *this.
void annule(int l)
Sets the Valeur to zero in a given domain.
Definition valeur.C:744
double operator()(int l, int k, int j, int i) const
Read-only of a particular element (configuration space).
Definition valeur.h:421
const Mg3d * mg
Multi-grid Mgd3 on which this is defined.
Definition valeur.h:292
Tbl & set(int l)
Read/write of the value in a given domain (configuration space).
Definition valeur.h:363
const Valeur & dsdx() const
Returns of *this.
friend void rotate_propre_pair(Valeur &, bool)
Friend fonction.
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:327
void std_base_scal_odd()
Sets the bases for spectral expansions (member base ) to the standard odd ones for a scalar.
Definition valeur.C:830
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:312
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:558
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition valeur.h:302
void coef() const
Computes the coeffcients of *this.
void operator*=(const Valeur &)
*= Valeur
const Valeur & mult_st() const
Returns applied to *this.
Valeur * p_ssint
Pointer on .
Definition valeur.h:318
void set_der_0x0()
Sets the pointers for derivatives to 0x0.
Definition valeur.C:665
const Valeur & scost() const
Returns of *this.
const Valeur & d2sdp2() const
Returns of *this.
Valeur * p_stdsdp
Pointer on .
Definition valeur.h:324
const Mg3d * get_mg() const
Returns the Mg3d on which the this is defined.
Definition valeur.h:729
double & set(int l, int k, int j, int i)
Read/write of a particular element (configuration space).
Definition valeur.h:401
void set_base_r(int l, int base_r)
Sets the expansion basis for r ( ) functions in a given domain.
Definition valeur.C:836
Valeur * p_dsdt
Pointer on .
Definition valeur.h:316
friend ostream & operator<<(ostream &, const Valeur &)
Display.
Definition valeur.C:496
void ylm_i()
Inverse of ylm()
const Valeur & d2sdx2() const
Returns of *this.
Valeur * p_lapang
Pointer on the angular Laplacian.
Definition valeur.h:329
Base_val base
Bases on which the spectral expansion is performed.
Definition valeur.h:305
void std_base_scal()
Sets the bases for spectral expansions (member base ) to the standard ones for a scalar.
Definition valeur.C:824
void annule_hard()
Sets the Valeur to zero in a hard way.
Definition valeur.C:723
Valeur * p_mult_ct
Pointer on .
Definition valeur.h:320
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Definition valeur.h:295
void set_base_t(int base_t)
Sets the expansion basis for functions in all domains.
Definition valeur.C:849
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:862
void set_etat_nondef()
Sets the logical state to ETATNONDEF (undefined).
Definition valeur.C:695
void mult2_xm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
void val_propre_1d()
Set the basis to the eigenvalues of .
Valeur * p_d2sdp2
Pointer on .
Definition valeur.h:325
const Valeur & mult_cp() const
Returns applied to *this.
Valeur * p_mult_st
Pointer on .
Definition valeur.h:321
const Valeur & mult_sp() const
Returns applied to *this.
void del_deriv()
Logical destructor of the derivatives.
Definition valeur.C:638
void sauve(FILE *) const
Save in a file.
Definition valeur.C:475
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:108
Cmp atan(const Cmp &)
Arctangent.
Definition cmp_math.C:195
Cmp sqrt(const Cmp &)
Square root.
Definition cmp_math.C:220
Cmp log10(const Cmp &)
Basis 10 logarithm.
Definition cmp_math.C:322
Cmp operator/(const Cmp &, const Cmp &)
Cmp / Cmp.
Definition cmp_arithm.C:457
Cmp operator%(const Cmp &, const Cmp &)
Cmp * Cmp with desaliasing.
Definition cmp_arithm.C:364
Cmp exp(const Cmp &)
Exponential.
Definition cmp_math.C:270
Cmp sin(const Cmp &)
Sine.
Definition cmp_math.C:69
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Definition cmp_math.C:504
Tbl norme(const Cmp &)
Sums of the absolute values of all the values of the Cmp in each domain.
Definition cmp_math.C:481
Cmp acos(const Cmp &)
Arccosine.
Definition cmp_math.C:169
Cmp asin(const Cmp &)
Arcsine.
Definition cmp_math.C:144
Cmp racine_cubique(const Cmp &)
Cube root.
Definition cmp_math.C:245
Tbl min(const Cmp &)
Minimum values of a Cmp in each domain.
Definition cmp_math.C:458
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition cmp_math.C:435
Cmp pow(const Cmp &, int)
Power .
Definition cmp_math.C:348
Cmp cos(const Cmp &)
Cosine.
Definition cmp_math.C:94
Cmp abs(const Cmp &)
Absolute value.
Definition cmp_math.C:410
Tbl diffrelmax(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (max version).
Definition cmp_math.C:539
Cmp operator+(const Cmp &)
Definition cmp_arithm.C:104
Cmp tan(const Cmp &)
Tangent.
Definition cmp_math.C:120
Cmp log(const Cmp &)
Neperian logarithm.
Definition cmp_math.C:296
Mtbl Heaviside(const Mtbl &)
Heaviside function.
Definition mtbl_math.C:317
double totalmin(const Mtbl &)
Minimum value of the Mtbl elements in all domain.
Definition mtbl_math.C:522
double totalmax(const Mtbl &)
Maximum value of the Mtbl elements in all domains.
Definition mtbl_math.C:494
Scalar operator|(const Scalar &, const Scalar &)
Scalar * Scalar with desaliasing only in r.
Lorene prototypes.
Definition app_hor.h:64