LORENE
map_et_poisson.C
1 /*
2  * Method of the class Map_et for the (iterative) resolution of the scalar
3  * Poisson equation.
4  *
5  * (see file map.h for the documentation).
6  *
7  */
8 
9 /*
10  * Copyright (c) 2004 Francois Limousin
11  * Copyright (c) 1999-2003 Eric Gourgoulhon
12  * Copyright (c) 2000-2001 Philippe Grandclement
13  *
14  * This file is part of LORENE.
15  *
16  * LORENE is free software; you can redistribute it and/or modify
17  * it under the terms of the GNU General Public License as published by
18  * the Free Software Foundation; either version 2 of the License, or
19  * (at your option) any later version.
20  *
21  * LORENE is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with LORENE; if not, write to the Free Software
28  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29  *
30  */
31 
32 
33 
34 
35 
36 /*
37  * $Id: map_et_poisson.C,v 1.12 2026/03/04 15:47:04 j_novak Exp $
38  * $Log: map_et_poisson.C,v $
39  * Revision 1.12 2026/03/04 15:47:04 j_novak
40  * Added 'verbose' flag (true by default) to limit the output of poisson solvers.
41  *
42  * Revision 1.11 2025/03/04 13:16:50 j_novak
43  * New complete versions of Map_af::poisson() and Map_et::poisson() for Scalar, not using Cmp.
44  *
45  * Revision 1.10 2024/06/24 14:10:51 j_novak
46  * Back to previous version.
47  *
48  * Revision 1.9 2023/05/26 15:42:30 g_servignat
49  * Added c_est_pas_fait() to poisson_angu(Cmp)
50  *
51  * Revision 1.8 2016/12/05 16:17:58 j_novak
52  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
53  *
54  * Revision 1.7 2014/10/13 08:53:05 j_novak
55  * Lorene classes and functions now belong to the namespace Lorene.
56  *
57  * Revision 1.6 2005/08/25 12:14:09 p_grandclement
58  * Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
59  *
60  * Revision 1.5 2005/04/04 21:31:31 e_gourgoulhon
61  * Added argument lambda to method poisson_angu
62  * to deal with the generalized angular Poisson equation:
63  * Lap_ang u + lambda u = source.
64  *
65  * Revision 1.4 2004/06/22 12:20:17 j_novak
66  * *** empty log message ***
67  *
68  * Revision 1.3 2004/05/25 14:28:01 f_limousin
69  * First version of method Map_et::poisson_angu().
70  *
71  * Revision 1.2 2003/10/15 21:11:26 e_gourgoulhon
72  * Added method poisson_angu.
73  *
74  * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
75  * LORENE
76  *
77  * Revision 1.7 2000/05/22 14:55:30 phil
78  * ajout du cas dzpuis = 3
79  *
80  * Revision 1.6 2000/03/30 09:18:37 eric
81  * Modifs affichage.
82  *
83  * Revision 1.5 2000/03/29 12:01:38 eric
84  * *** empty log message ***
85  *
86  * Revision 1.4 2000/03/29 11:48:09 eric
87  * Modifs affichage.
88  *
89  * Revision 1.3 2000/03/10 15:48:25 eric
90  * MODIFS IMPORTANTES:
91  * ssj est desormais traitee comme un Cmp (et non plus une Valeur) ce qui
92  * permet un traitement automatique du dzpuis associe.
93  * Traitement de dzpuis.
94  *
95  * Revision 1.2 2000/03/07 16:50:57 eric
96  * Possibilite d'avoir une source avec dzpuis = 2.
97  *
98  * Revision 1.1 1999/12/22 17:11:24 eric
99  * Initial revision
100  *
101  *
102  * $Header: /cvsroot/Lorene/C++/Source/Map/map_et_poisson.C,v 1.12 2026/03/04 15:47:04 j_novak Exp $
103  *
104  */
105 
106 // Header Lorene:
107 #include "cmp.h"
108 #include "scalar.h"
109 #include "param.h"
110 
111 //*****************************************************************************
112 
113 namespace Lorene {
114  void Map_et::poisson(const Scalar& source, Param& par, Scalar& uu, bool verbose) const {
115 
116  assert(source.get_etat() != ETATNONDEF) ;
117  assert(&source.get_mp() == this) ;
118 
119  assert( source.check_dzpuis(2) || source.check_dzpuis(4)
120  || source.check_dzpuis(3)) ;
121 
122  assert(&uu.get_mp() == this) ;
123  assert(uu.check_dzpuis(0)) ;
124 
125  int nz = mg->get_nzone() ;
126  int nzm1 = nz - 1 ;
127 
128  // Indicator of existence of a compactified external domain
129  bool zec = false ;
130  if (mg->get_type_r(nzm1) == UNSURR) {
131  zec = true ;
132  }
133 
134  //-------------------------------
135  // Computation of the prefactor a ---> Scalar apre
136  //-------------------------------
137 
138  Mtbl unjj = 1 + srdrdt*srdrdt + srstdrdp*srstdrdp ;
139 
140  Mtbl apre1(*mg) ;
141  apre1.set_etat_qcq() ;
142  for (int l=0; l<nz; l++) {
143  *(apre1.t[l]) = alpha[l]*alpha[l] ;
144  }
145 
146  apre1 = apre1 * dxdr * dxdr * unjj ;
147 
148  Scalar apre(*this) ;
149  apre = apre1 ;
150 
151  Tbl amax0 = max(apre1) ; // maximum values in each domain
152 
153  // The maximum values of a in each domain are put in a Mtbl
154  Mtbl amax1(*mg) ;
155  amax1.set_etat_qcq() ;
156  for (int l=0; l<nz; l++) {
157  *(amax1.t[l]) = amax0(l) ;
158  }
159 
160  Scalar amax(*this) ;
161  amax = amax1 ;
162 
163 
164  //-------------------
165  // Initializations
166  //-------------------
167 
168  int nitermax = par.get_int() ;
169  int& niter = par.get_int_mod() ;
170  double lambda = par.get_double() ;
171  double unmlambda = 1. - lambda ;
172  double precis = par.get_double(1) ;
173 
174  Scalar& ssj = par.get_scalar_mod() ;
175 
176  Scalar ssjm1 = ssj ;
177  Scalar ssjm2 = ssjm1 ;
178 
179  Valeur& vuu = uu.set_spectral_va() ;
180 
181  Valeur vuujm1(*mg) ;
182  if (uu.get_etat() == ETATZERO) {
183  vuujm1 = 1 ; // to take relative differences
184  vuujm1.set_base( vuu.base ) ;
185  }
186  else{
187  vuujm1 = vuu ;
188  }
189 
190  // Affine mapping for the Laplacian-tilde
191 
192  Map_af mpaff(*this) ;
193  Param par_nul ;
194 
195  if (verbose)
196  cout << "Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
197 
198 //==========================================================================
199 //==========================================================================
200 // Start of iteration
201 //==========================================================================
202 //==========================================================================
203 
204  Tbl tdiff(nz) ;
205  double diff ;
206  niter = 0 ;
207 
208  do {
209 
210  //====================================================================
211  // Computation of R(u) (the result is put in uu)
212  //====================================================================
213 
214 
215  //-----------------------
216  // First operations on uu
217  //-----------------------
218 
219  Valeur duudx = vuu.dsdx() ; // d/dx
220 
221  const Valeur& d2uudtdx = duudx.dsdt() ; // d^2/dxdtheta
222 
223  const Valeur& std2uudpdx = duudx.stdsdp() ; // 1/sin(theta) d^2/dxdphi
224 
225  //------------------
226  // Angular Laplacian
227  //------------------
228 
229  Valeur sxlapang = vuu ;
230 
231  sxlapang.ylm() ;
232 
233  sxlapang = sxlapang.lapang() ;
234 
235  sxlapang = sxlapang.sx() ; // Lap_ang(uu) /x in the nucleus
236  // Lap_ang(uu) in the shells
237  // Lap_ang(uu) /(x-1) in the ZEC
238 
239  //---------------------------------------------------------------
240  // Computation of
241  // [ 2 /(dRdx) ( A - 1 ) duu/dx + 1/R (B - 1) Lap_ang(uu) ] / x
242  //
243  // with A = 1/(dRdx) R/(x+beta_l/alpha_l) unjj
244  // B = [1/(dRdx) R/(x+beta_l/alpha_l)]^2 unjj
245  //
246  // The result is put in uu (via vuu)
247  //---------------------------------------------------------------
248 
249  Valeur varduudx = duudx ;
250 
251  if (zec) {
252  varduudx.annule(nzm1) ; // term in d/dx set to zero in the ZEC
253  }
254 
255  uu.set_etat_qcq() ;
256 
257  Base_val sauve_base = varduudx.base ;
258 
259  vuu = 2. * dxdr * ( rsxdxdr * unjj - 1.) * varduudx
260  + ( rsxdxdr*rsxdxdr * unjj - 1.) * xsr * sxlapang ;
261 
262  vuu.set_base(sauve_base) ;
263 
264  vuu = vuu.sx() ;
265 
266  //---------------------------------------
267  // Computation of R(u)
268  //
269  // The result is put in uu (via vuu)
270  //---------------------------------------
271 
272 
273  sauve_base = vuu.base ;
274 
275  vuu = xsr * vuu
276  + 2. * dxdr * ( sr2drdt * d2uudtdx
277  + sr2stdrdp * std2uudpdx ) ;
278 
279  vuu += dxdr * ( lapr_tp + dxdr * (
280  dxdr* unjj * d2rdx2
281  - 2. * ( sr2drdt * d2rdtdx + sr2stdrdp * sstd2rdpdx ) )
282  ) * duudx ;
283 
284  vuu.set_base(sauve_base) ;
285 
286  // Since the assignment is performed on vuu (uu.va), the treatment
287  // of uu.dzpuis must be performed by hand:
288 
289  uu.set_dzpuis(4) ;
290 
291  if (source.get_dzpuis() == 2) {
292  uu.dec_dzpuis(2) ; // uu.dzpuis: 4 -> 2
293  }
294 
295  if (source.get_dzpuis() == 3) {
296  uu.dec_dzpuis() ; //uu.dzpuis 4 -> 3
297  }
298 
299  //====================================================================
300  // Computation of the effective source s^J of the ``affine''
301  // Poisson equation
302  //====================================================================
303 
304  ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
305 
306  ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
307 
308  ssj.set_spectral_base(source.get_spectral_base()) ;
309 
310  //====================================================================
311  // Resolution of the ``affine'' Poisson equation
312  //====================================================================
313 
314  if ( source.get_dzpuis() == 0 ){
315  ssj.set_dzpuis( 4 ) ;
316  }
317  else {
318  ssj.set_dzpuis( source.get_dzpuis() ) ; // Choice of the resolution
319  // dzpuis = 2, 3 or 4
320  }
321 
322  assert( uu.check_dzpuis( ssj.get_dzpuis() ) ) ;
323 
324  mpaff.poisson(ssj, par_nul, uu) ;
325 
326  tdiff = diffrel(vuu, vuujm1) ;
327 
328  diff = max(tdiff) ;
329 
330  if (verbose) {
331  cout << " step " << niter << " : " ;
332  for (int l=0; l<nz; l++) {
333  cout << tdiff(l) << " " ;
334  }
335  cout << endl ;
336  }
337 
338  //=================================
339  // Updates for the next iteration
340  //=================================
341 
342  ssjm2 = ssjm1 ;
343  ssjm1 = ssj ;
344  vuujm1 = vuu ;
345 
346  niter++ ;
347 
348  } // End of iteration
349  while ( (diff > precis) && (niter < nitermax) ) ;
350 
351 //==========================================================================
352 //==========================================================================
353 // End of iteration
354 //==========================================================================
355 //==========================================================================
356 
357 }
358 
359 
360 
361 //*****************************************************************************
362 // VERSION WITH A TAU METHOD
363 //*****************************************************************************
364 
365 void Map_et::poisson_tau(const Scalar& source, Param& par, Scalar& uu) const {
366 
367  assert(source.get_etat() != ETATNONDEF) ;
368  assert(&source.get_mp() == this) ;
369 
370  assert( source.check_dzpuis(2) || source.check_dzpuis(4)
371  || source.check_dzpuis(3)) ;
372 
373  assert(&uu.get_mp() == this) ;
374  assert(uu.check_dzpuis(0)) ;
375 
376  int nz = mg->get_nzone() ;
377  int nzm1 = nz - 1 ;
378 
379  // Indicator of existence of a compactified external domain
380  bool zec = false ;
381  if (mg->get_type_r(nzm1) == UNSURR) {
382  zec = true ;
383  }
384 
385  //-------------------------------
386  // Computation of the prefactor a ---> Cmp apre
387  //-------------------------------
388 
389  Mtbl unjj = 1 + srdrdt*srdrdt + srstdrdp*srstdrdp ;
390 
391  Mtbl apre1(*mg) ;
392  apre1.set_etat_qcq() ;
393  for (int l=0; l<nz; l++) {
394  *(apre1.t[l]) = alpha[l]*alpha[l] ;
395  }
396 
397  apre1 = apre1 * dxdr * dxdr * unjj ;
398 
399  Scalar apre(*this) ;
400  apre = apre1 ;
401 
402  Tbl amax0 = max(apre1) ; // maximum values in each domain
403 
404  // The maximum values of a in each domain are put in a Mtbl
405  Mtbl amax1(*mg) ;
406  amax1.set_etat_qcq() ;
407  for (int l=0; l<nz; l++) {
408  *(amax1.t[l]) = amax0(l) ;
409  }
410 
411  Scalar amax(*this) ;
412  amax = amax1 ;
413 
414 
415  //-------------------
416  // Initializations
417  //-------------------
418 
419  int nitermax = par.get_int() ;
420  int& niter = par.get_int_mod() ;
421  double lambda = par.get_double() ;
422  double unmlambda = 1. - lambda ;
423  double precis = par.get_double(1) ;
424 
425  Scalar& ssj = par.get_scalar_mod() ;
426 
427  Scalar ssjm1 = ssj ;
428  Scalar ssjm2 = ssjm1 ;
429 
430  Valeur& vuu = uu.set_spectral_va() ;
431 
432  Valeur vuujm1(*mg) ;
433  if (uu.get_etat() == ETATZERO) {
434  vuujm1 = 1 ; // to take relative differences
435  vuujm1.set_base( vuu.base ) ;
436  }
437  else{
438  vuujm1 = vuu ;
439  }
440 
441  // Affine mapping for the Laplacian-tilde
442 
443  Map_af mpaff(*this) ;
444  Param par_nul ;
445 
446  cout << "Map_et::poisson_tau : relat. diff. u^J <-> u^{J-1} : " << endl ;
447 
448 //==========================================================================
449 //==========================================================================
450 // Start of iteration
451 //==========================================================================
452 //==========================================================================
453 
454  Tbl tdiff(nz) ;
455  double diff ;
456  niter = 0 ;
457 
458  do {
459 
460  //====================================================================
461  // Computation of R(u) (the result is put in uu)
462  //====================================================================
463 
464 
465  //-----------------------
466  // First operations on uu
467  //-----------------------
468 
469  Valeur duudx = vuu.dsdx() ; // d/dx
470 
471  const Valeur& d2uudtdx = duudx.dsdt() ; // d^2/dxdtheta
472 
473  const Valeur& std2uudpdx = duudx.stdsdp() ; // 1/sin(theta) d^2/dxdphi
474 
475  //------------------
476  // Angular Laplacian
477  //------------------
478 
479  Valeur sxlapang = vuu ;
480 
481  sxlapang.ylm() ;
482 
483  sxlapang = sxlapang.lapang() ;
484 
485  sxlapang = sxlapang.sx() ; // Lap_ang(uu) /x in the nucleus
486  // Lap_ang(uu) in the shells
487  // Lap_ang(uu) /(x-1) in the ZEC
488 
489  //---------------------------------------------------------------
490  // Computation of
491  // [ 2 /(dRdx) ( A - 1 ) duu/dx + 1/R (B - 1) Lap_ang(uu) ] / x
492  //
493  // with A = 1/(dRdx) R/(x+beta_l/alpha_l) unjj
494  // B = [1/(dRdx) R/(x+beta_l/alpha_l)]^2 unjj
495  //
496  // The result is put in uu (via vuu)
497  //---------------------------------------------------------------
498 
499  Valeur varduudx = duudx ;
500 
501  if (zec) {
502  varduudx.annule(nzm1) ; // term in d/dx set to zero in the ZEC
503  }
504 
505  uu.set_etat_qcq() ;
506 
507  Base_val sauve_base = varduudx.base ;
508 
509  vuu = 2. * dxdr * ( rsxdxdr * unjj - 1.) * varduudx
510  + ( rsxdxdr*rsxdxdr * unjj - 1.) * xsr * sxlapang ;
511 
512  vuu.set_base(sauve_base) ;
513 
514  vuu = vuu.sx() ;
515 
516  //---------------------------------------
517  // Computation of R(u)
518  //
519  // The result is put in uu (via vuu)
520  //---------------------------------------
521 
522 
523  sauve_base = vuu.base ;
524 
525  vuu = xsr * vuu
526  + 2. * dxdr * ( sr2drdt * d2uudtdx
527  + sr2stdrdp * std2uudpdx ) ;
528 
529  vuu += dxdr * ( lapr_tp + dxdr * (
530  dxdr* unjj * d2rdx2
531  - 2. * ( sr2drdt * d2rdtdx + sr2stdrdp * sstd2rdpdx ) )
532  ) * duudx ;
533 
534  vuu.set_base(sauve_base) ;
535 
536  // Since the assignment is performed on vuu (uu.va), the treatment
537  // of uu.dzpuis must be performed by hand:
538 
539  uu.set_dzpuis(4) ;
540 
541  if (source.get_dzpuis() == 2) {
542  uu.dec_dzpuis(2) ; // uu.dzpuis: 4 -> 2
543  }
544 
545  if (source.get_dzpuis() == 3) {
546  uu.dec_dzpuis() ; //uu.dzpuis 4 -> 3
547  }
548 
549  //====================================================================
550  // Computation of the effective source s^J of the ``affine''
551  // Poisson equation
552  //====================================================================
553 
554  ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
555 
556  ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
557 
558  ssj.set_spectral_base(source.get_spectral_base()) ;
559 
560  //====================================================================
561  // Resolution of the ``affine'' Poisson equation
562  //====================================================================
563 
564  if ( source.get_dzpuis() == 0 ){
565  ssj.set_dzpuis( 4 ) ;
566  }
567  else {
568  ssj.set_dzpuis( source.get_dzpuis() ) ; // Choice of the resolution
569  // dzpuis = 2, 3 or 4
570  }
571 
572  assert( uu.check_dzpuis( ssj.get_dzpuis() ) ) ;
573 
574  mpaff.poisson_tau(ssj, par_nul, uu) ;
575 
576  tdiff = diffrel(vuu, vuujm1) ;
577 
578  diff = max(tdiff) ;
579 
580 
581  cout << " step " << niter << " : " ;
582  for (int l=0; l<nz; l++) {
583  cout << tdiff(l) << " " ;
584  }
585  cout << endl ;
586 
587  //=================================
588  // Updates for the next iteration
589  //=================================
590 
591  ssjm2 = ssjm1 ;
592  ssjm1 = ssj ;
593  vuujm1 = vuu ;
594 
595  niter++ ;
596 
597  } // End of iteration
598  while ( (diff > precis) && (niter < nitermax) ) ;
599 
600 //==========================================================================
601 //==========================================================================
602 // End of iteration
603 //==========================================================================
604 //==========================================================================
605 }
606 
607 //=============================================================================
608 
609  // ---------------------------
610  // Cmp versions
611  // ---------------------------
612 
613 //=============================================================================
614 
615  void Map_et::poisson(const Cmp& source, Param& par, Cmp& uu, bool verbose) const {
616 
617  assert(source.get_etat() != ETATNONDEF) ;
618  assert(source.get_mp() == this) ;
619 
620  assert( source.check_dzpuis(2) || source.check_dzpuis(4)
621  || source.check_dzpuis(3)) ;
622 
623  assert(uu.get_mp() == this) ;
624  assert(uu.check_dzpuis(0)) ;
625 
626  int nz = mg->get_nzone() ;
627  int nzm1 = nz - 1 ;
628 
629  // Indicator of existence of a compactified external domain
630  bool zec = false ;
631  if (mg->get_type_r(nzm1) == UNSURR) {
632  zec = true ;
633  }
634 
635  //-------------------------------
636  // Computation of the prefactor a ---> Cmp apre
637  //-------------------------------
638 
639  Mtbl unjj = 1 + srdrdt*srdrdt + srstdrdp*srstdrdp ;
640 
641  Mtbl apre1(*mg) ;
642  apre1.set_etat_qcq() ;
643  for (int l=0; l<nz; l++) {
644  *(apre1.t[l]) = alpha[l]*alpha[l] ;
645  }
646 
647  apre1 = apre1 * dxdr * dxdr * unjj ;
648 
649  Cmp apre(*this) ;
650  apre = apre1 ;
651 
652  Tbl amax0 = max(apre1) ; // maximum values in each domain
653 
654  // The maximum values of a in each domain are put in a Mtbl
655  Mtbl amax1(*mg) ;
656  amax1.set_etat_qcq() ;
657  for (int l=0; l<nz; l++) {
658  *(amax1.t[l]) = amax0(l) ;
659  }
660 
661  Cmp amax(*this) ;
662  amax = amax1 ;
663 
664 
665  //-------------------
666  // Initializations
667  //-------------------
668 
669  int nitermax = par.get_int() ;
670  int& niter = par.get_int_mod() ;
671  double lambda = par.get_double() ;
672  double unmlambda = 1. - lambda ;
673  double precis = par.get_double(1) ;
674 
675  Cmp& ssj = par.get_cmp_mod() ;
676 
677  Cmp ssjm1 = ssj ;
678  Cmp ssjm2 = ssjm1 ;
679 
680  Valeur& vuu = uu.va ;
681 
682  Valeur vuujm1(*mg) ;
683  if (uu.get_etat() == ETATZERO) {
684  vuujm1 = 1 ; // to take relative differences
685  vuujm1.set_base( vuu.base ) ;
686  }
687  else{
688  vuujm1 = vuu ;
689  }
690 
691  // Affine mapping for the Laplacian-tilde
692 
693  Map_af mpaff(*this) ;
694  Param par_nul ;
695 
696  if (verbose)
697  cout << "Map_et::poisson : relat. diff. u^J <-> u^{J-1} : " << endl ;
698 
699 //==========================================================================
700 //==========================================================================
701 // Start of iteration
702 //==========================================================================
703 //==========================================================================
704 
705  Tbl tdiff(nz) ;
706  double diff ;
707  niter = 0 ;
708 
709  do {
710 
711  //====================================================================
712  // Computation of R(u) (the result is put in uu)
713  //====================================================================
714 
715 
716  //-----------------------
717  // First operations on uu
718  //-----------------------
719 
720  Valeur duudx = (uu.va).dsdx() ; // d/dx
721 
722  const Valeur& d2uudtdx = duudx.dsdt() ; // d^2/dxdtheta
723 
724  const Valeur& std2uudpdx = duudx.stdsdp() ; // 1/sin(theta) d^2/dxdphi
725 
726  //------------------
727  // Angular Laplacian
728  //------------------
729 
730  Valeur sxlapang = uu.va ;
731 
732  sxlapang.ylm() ;
733 
734  sxlapang = sxlapang.lapang() ;
735 
736  sxlapang = sxlapang.sx() ; // Lap_ang(uu) /x in the nucleus
737  // Lap_ang(uu) in the shells
738  // Lap_ang(uu) /(x-1) in the ZEC
739 
740  //---------------------------------------------------------------
741  // Computation of
742  // [ 2 /(dRdx) ( A - 1 ) duu/dx + 1/R (B - 1) Lap_ang(uu) ] / x
743  //
744  // with A = 1/(dRdx) R/(x+beta_l/alpha_l) unjj
745  // B = [1/(dRdx) R/(x+beta_l/alpha_l)]^2 unjj
746  //
747  // The result is put in uu (via vuu)
748  //---------------------------------------------------------------
749 
750  Valeur varduudx = duudx ;
751 
752  if (zec) {
753  varduudx.annule(nzm1) ; // term in d/dx set to zero in the ZEC
754  }
755 
756  uu.set_etat_qcq() ;
757 
758  Base_val sauve_base = varduudx.base ;
759 
760  vuu = 2. * dxdr * ( rsxdxdr * unjj - 1.) * varduudx
761  + ( rsxdxdr*rsxdxdr * unjj - 1.) * xsr * sxlapang ;
762 
763  vuu.set_base(sauve_base) ;
764 
765  vuu = vuu.sx() ;
766 
767  //---------------------------------------
768  // Computation of R(u)
769  //
770  // The result is put in uu (via vuu)
771  //---------------------------------------
772 
773 
774  sauve_base = vuu.base ;
775 
776  vuu = xsr * vuu
777  + 2. * dxdr * ( sr2drdt * d2uudtdx
778  + sr2stdrdp * std2uudpdx ) ;
779 
780  vuu += dxdr * ( lapr_tp + dxdr * (
781  dxdr* unjj * d2rdx2
782  - 2. * ( sr2drdt * d2rdtdx + sr2stdrdp * sstd2rdpdx ) )
783  ) * duudx ;
784 
785  vuu.set_base(sauve_base) ;
786 
787  // Since the assignment is performed on vuu (uu.va), the treatment
788  // of uu.dzpuis must be performed by hand:
789 
790  uu.set_dzpuis(4) ;
791 
792  if (source.get_dzpuis() == 2) {
793  uu.dec2_dzpuis() ; // uu.dzpuis: 4 -> 2
794  }
795 
796  if (source.get_dzpuis() == 3) {
797  uu.dec_dzpuis() ; //uu.dzpuis 4 -> 3
798  }
799 
800  //====================================================================
801  // Computation of the effective source s^J of the ``affine''
802  // Poisson equation
803  //====================================================================
804 
805  ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
806 
807  ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
808 
809  (ssj.va).set_base((source.va).base) ;
810 
811  //====================================================================
812  // Resolution of the ``affine'' Poisson equation
813  //====================================================================
814 
815  if ( source.get_dzpuis() == 0 ){
816  ssj.set_dzpuis( 4 ) ;
817  }
818  else {
819  ssj.set_dzpuis( source.get_dzpuis() ) ; // Choice of the resolution
820  // dzpuis = 2, 3 or 4
821  }
822 
823  assert( uu.check_dzpuis( ssj.get_dzpuis() ) ) ;
824 
825  mpaff.poisson(ssj, par_nul, uu) ;
826 
827  tdiff = diffrel(vuu, vuujm1) ;
828 
829  diff = max(tdiff) ;
830 
831  if (verbose) {
832  cout << " step " << niter << " : " ;
833  for (int l=0; l<nz; l++) {
834  cout << tdiff(l) << " " ;
835  }
836  cout << endl ;
837  }
838 
839  //=================================
840  // Updates for the next iteration
841  //=================================
842 
843  ssjm2 = ssjm1 ;
844  ssjm1 = ssj ;
845  vuujm1 = vuu ;
846 
847  niter++ ;
848 
849  } // End of iteration
850  while ( (diff > precis) && (niter < nitermax) ) ;
851 
852 //==========================================================================
853 //==========================================================================
854 // End of iteration
855 //==========================================================================
856 //==========================================================================
857 
858 }
859 
860 
861 
862 //*****************************************************************************
863 // VERSION WITH A TAU METHOD
864 //*****************************************************************************
865 
866 void Map_et::poisson_tau(const Cmp& source, Param& par, Cmp& uu) const {
867 
868  assert(source.get_etat() != ETATNONDEF) ;
869  assert(source.get_mp() == this) ;
870 
871  assert( source.check_dzpuis(2) || source.check_dzpuis(4)
872  || source.check_dzpuis(3)) ;
873 
874  assert(uu.get_mp() == this) ;
875  assert(uu.check_dzpuis(0)) ;
876 
877  int nz = mg->get_nzone() ;
878  int nzm1 = nz - 1 ;
879 
880  // Indicator of existence of a compactified external domain
881  bool zec = false ;
882  if (mg->get_type_r(nzm1) == UNSURR) {
883  zec = true ;
884  }
885 
886  //-------------------------------
887  // Computation of the prefactor a ---> Cmp apre
888  //-------------------------------
889 
890  Mtbl unjj = 1 + srdrdt*srdrdt + srstdrdp*srstdrdp ;
891 
892  Mtbl apre1(*mg) ;
893  apre1.set_etat_qcq() ;
894  for (int l=0; l<nz; l++) {
895  *(apre1.t[l]) = alpha[l]*alpha[l] ;
896  }
897 
898  apre1 = apre1 * dxdr * dxdr * unjj ;
899 
900  Cmp apre(*this) ;
901  apre = apre1 ;
902 
903  Tbl amax0 = max(apre1) ; // maximum values in each domain
904 
905  // The maximum values of a in each domain are put in a Mtbl
906  Mtbl amax1(*mg) ;
907  amax1.set_etat_qcq() ;
908  for (int l=0; l<nz; l++) {
909  *(amax1.t[l]) = amax0(l) ;
910  }
911 
912  Cmp amax(*this) ;
913  amax = amax1 ;
914 
915 
916  //-------------------
917  // Initializations
918  //-------------------
919 
920  int nitermax = par.get_int() ;
921  int& niter = par.get_int_mod() ;
922  double lambda = par.get_double() ;
923  double unmlambda = 1. - lambda ;
924  double precis = par.get_double(1) ;
925 
926  Cmp& ssj = par.get_cmp_mod() ;
927 
928  Cmp ssjm1 = ssj ;
929  Cmp ssjm2 = ssjm1 ;
930 
931  Valeur& vuu = uu.va ;
932 
933  Valeur vuujm1(*mg) ;
934  if (uu.get_etat() == ETATZERO) {
935  vuujm1 = 1 ; // to take relative differences
936  vuujm1.set_base( vuu.base ) ;
937  }
938  else{
939  vuujm1 = vuu ;
940  }
941 
942  // Affine mapping for the Laplacian-tilde
943 
944  Map_af mpaff(*this) ;
945  Param par_nul ;
946 
947  cout << "Map_et::poisson_tau : relat. diff. u^J <-> u^{J-1} : " << endl ;
948 
949 //==========================================================================
950 //==========================================================================
951 // Start of iteration
952 //==========================================================================
953 //==========================================================================
954 
955  Tbl tdiff(nz) ;
956  double diff ;
957  niter = 0 ;
958 
959  do {
960 
961  //====================================================================
962  // Computation of R(u) (the result is put in uu)
963  //====================================================================
964 
965 
966  //-----------------------
967  // First operations on uu
968  //-----------------------
969 
970  Valeur duudx = (uu.va).dsdx() ; // d/dx
971 
972  const Valeur& d2uudtdx = duudx.dsdt() ; // d^2/dxdtheta
973 
974  const Valeur& std2uudpdx = duudx.stdsdp() ; // 1/sin(theta) d^2/dxdphi
975 
976  //------------------
977  // Angular Laplacian
978  //------------------
979 
980  Valeur sxlapang = uu.va ;
981 
982  sxlapang.ylm() ;
983 
984  sxlapang = sxlapang.lapang() ;
985 
986  sxlapang = sxlapang.sx() ; // Lap_ang(uu) /x in the nucleus
987  // Lap_ang(uu) in the shells
988  // Lap_ang(uu) /(x-1) in the ZEC
989 
990  //---------------------------------------------------------------
991  // Computation of
992  // [ 2 /(dRdx) ( A - 1 ) duu/dx + 1/R (B - 1) Lap_ang(uu) ] / x
993  //
994  // with A = 1/(dRdx) R/(x+beta_l/alpha_l) unjj
995  // B = [1/(dRdx) R/(x+beta_l/alpha_l)]^2 unjj
996  //
997  // The result is put in uu (via vuu)
998  //---------------------------------------------------------------
999 
1000  Valeur varduudx = duudx ;
1001 
1002  if (zec) {
1003  varduudx.annule(nzm1) ; // term in d/dx set to zero in the ZEC
1004  }
1005 
1006  uu.set_etat_qcq() ;
1007 
1008  Base_val sauve_base = varduudx.base ;
1009 
1010  vuu = 2. * dxdr * ( rsxdxdr * unjj - 1.) * varduudx
1011  + ( rsxdxdr*rsxdxdr * unjj - 1.) * xsr * sxlapang ;
1012 
1013  vuu.set_base(sauve_base) ;
1014 
1015  vuu = vuu.sx() ;
1016 
1017  //---------------------------------------
1018  // Computation of R(u)
1019  //
1020  // The result is put in uu (via vuu)
1021  //---------------------------------------
1022 
1023 
1024  sauve_base = vuu.base ;
1025 
1026  vuu = xsr * vuu
1027  + 2. * dxdr * ( sr2drdt * d2uudtdx
1028  + sr2stdrdp * std2uudpdx ) ;
1029 
1030  vuu += dxdr * ( lapr_tp + dxdr * (
1031  dxdr* unjj * d2rdx2
1032  - 2. * ( sr2drdt * d2rdtdx + sr2stdrdp * sstd2rdpdx ) )
1033  ) * duudx ;
1034 
1035  vuu.set_base(sauve_base) ;
1036 
1037  // Since the assignment is performed on vuu (uu.va), the treatment
1038  // of uu.dzpuis must be performed by hand:
1039 
1040  uu.set_dzpuis(4) ;
1041 
1042  if (source.get_dzpuis() == 2) {
1043  uu.dec2_dzpuis() ; // uu.dzpuis: 4 -> 2
1044  }
1045 
1046  if (source.get_dzpuis() == 3) {
1047  uu.dec_dzpuis() ; //uu.dzpuis 4 -> 3
1048  }
1049 
1050  //====================================================================
1051  // Computation of the effective source s^J of the ``affine''
1052  // Poisson equation
1053  //====================================================================
1054 
1055  ssj = lambda * ssjm1 + unmlambda * ssjm2 ;
1056 
1057  ssj = ( source + uu + (amax - apre) * ssj ) / amax ;
1058 
1059  (ssj.va).set_base((source.va).base) ;
1060 
1061  //====================================================================
1062  // Resolution of the ``affine'' Poisson equation
1063  //====================================================================
1064 
1065  if ( source.get_dzpuis() == 0 ){
1066  ssj.set_dzpuis( 4 ) ;
1067  }
1068  else {
1069  ssj.set_dzpuis( source.get_dzpuis() ) ; // Choice of the resolution
1070  // dzpuis = 2, 3 or 4
1071  }
1072 
1073  assert( uu.check_dzpuis( ssj.get_dzpuis() ) ) ;
1074 
1075  mpaff.poisson_tau(ssj, par_nul, uu) ;
1076 
1077  tdiff = diffrel(vuu, vuujm1) ;
1078 
1079  diff = max(tdiff) ;
1080 
1081 
1082  cout << " step " << niter << " : " ;
1083  for (int l=0; l<nz; l++) {
1084  cout << tdiff(l) << " " ;
1085  }
1086  cout << endl ;
1087 
1088  //=================================
1089  // Updates for the next iteration
1090  //=================================
1091 
1092  ssjm2 = ssjm1 ;
1093  ssjm1 = ssj ;
1094  vuujm1 = vuu ;
1095 
1096  niter++ ;
1097 
1098  } // End of iteration
1099  while ( (diff > precis) && (niter < nitermax) ) ;
1100 
1101 //==========================================================================
1102 //==========================================================================
1103 // End of iteration
1104 //==========================================================================
1105 //==========================================================================
1106 }
1107 
1108 void Map_et::poisson_angu(const Scalar& source, Param& par, Scalar& uu,
1109  double lambda) const {
1110 
1111  if (lambda != double(0)) {
1112  cout <<
1113  "Map_et::poisson_angu : the case lambda != 0 is not treated yet !"
1114  << endl ;
1115  abort() ;
1116  }
1117 
1118  assert(source.get_mp() == *this) ;
1119  assert(uu.get_mp() == *this) ;
1120 
1121  int nz = mg->get_nzone() ;
1122  int nzm1 = nz - 1 ;
1123 
1124  int* nrm6 = new int[nz];
1125  for (int l=0; l<=nzm1; l++)
1126  nrm6[l] = mg->get_nr(l) - 6 ;
1127 
1128 //## // Indicator of existence of a compactified external domain
1129 // bool zec = false ;
1130 // if (mg->get_type_r(nzm1) == UNSURR) {
1131 // zec = true ;
1132 // }
1133 
1134  //-------------------
1135  // Initializations
1136  //-------------------
1137 
1138  int nitermax = par.get_int() ;
1139  int& niter = par.get_int_mod() ;
1140  double relax = par.get_double() ;
1141  double precis = par.get_double(1) ;
1142 
1143  Cmp& ssjcmp = par.get_cmp_mod() ;
1144 
1145  Scalar ssj (ssjcmp) ;
1146  Scalar ssjm1 (ssj) ;
1147 
1148  int dzpuis = source.get_dzpuis() ;
1149  ssj.set_dzpuis(dzpuis) ;
1150  uu.set_dzpuis(dzpuis) ;
1151  ssjm1.set_dzpuis(dzpuis) ;
1152 
1153  Valeur& vuu = uu.set_spectral_va() ;
1154 
1155  Valeur vuujm1(*mg) ;
1156  if (uu.get_etat() == ETATZERO) {
1157  vuujm1 = 1 ; // to take relative differences
1158  vuujm1.set_base( vuu.base ) ;
1159  }
1160  else{
1161  vuujm1 = vuu ;
1162  }
1163 
1164  // Affine mapping for the Laplacian-tilde
1165 
1166  Map_af mpaff(*this) ;
1167  Param par_nul ;
1168 
1169  cout << "Map_et::poisson angu : relat. diff. u^J <-> u^{J-1} : " << endl ;
1170 
1171 //==========================================================================
1172 //==========================================================================
1173 // Start of iteration
1174 //==========================================================================
1175 //==========================================================================
1176 
1177 
1178  Tbl tdiff(nz) ;
1179  double diff ;
1180  niter = 0 ;
1181 
1182  do {
1183 
1184  //====================================================================
1185  // Computation of R(u) (the result is put in uu)
1186  //====================================================================
1187 
1188  //-----------------------
1189  // First operations on uu
1190  //-----------------------
1191 
1192  Valeur duudx = (uu.set_spectral_va()).dsdx() ; // d/dx
1193 
1194  const Valeur& d2uudxdx = duudx.dsdx() ; // d^2/dxdx
1195 
1196 
1197  const Valeur& d2uudtdx = duudx.dsdt() ; // d^2/dxdtheta
1198 
1199  const Valeur& std2uudpdx = duudx.stdsdp() ; // 1/sin(theta) d^2/dxdphi
1200 
1201  //---------------------------------------
1202  // Computation of R(u)
1203  //
1204  // The result is put in uu (via vuu)
1205  //---------------------------------------
1206 
1207  Mtbl unjj = srdrdt*srdrdt + srstdrdp*srstdrdp ;
1208 
1209  Base_val sauve_base = vuu.base ;
1210 
1211  vuu = - d2uudxdx * dxdr * dxdr * unjj
1212  + 2. * dxdr * ( sr2drdt * d2uudtdx
1213  + sr2stdrdp * std2uudpdx ) ;
1214 
1215  vuu.set_base(sauve_base) ;
1216 
1217  vuu += dxdr * ( lapr_tp + dxdr * (
1218  dxdr * unjj * d2rdx2
1219  - 2. * ( sr2drdt * d2rdtdx + sr2stdrdp * sstd2rdpdx ) )
1220  ) * duudx ;
1221 
1222  vuu.set_base(sauve_base) ;
1223 
1224  uu.mult_r() ;
1225  uu.mult_r() ;
1226 
1227  //====================================================================
1228  // Computation of the effective source s^J of the ``affine''
1229  // Poisson equation
1230  //====================================================================
1231 
1232  uu.filtre_r(nrm6) ;
1233 // uu.filtre_phi(1) ;
1234 // uu.filtre_theta(1) ;
1235 
1236  ssj = source + uu ;
1237 
1238  ssj = (1-relax) * ssj + relax * ssjm1 ;
1239 
1240  (ssj.set_spectral_va()).set_base((source.get_spectral_va()).base) ;
1241 
1242 
1243  //====================================================================
1244  // Resolution of the ``affine'' Poisson equation
1245  //====================================================================
1246 
1247  mpaff.poisson_angu(ssj, par_nul, uu) ;
1248 
1249  tdiff = diffrel(vuu, vuujm1) ;
1250 
1251  diff = max(tdiff) ;
1252 
1253 
1254  cout << " step " << niter << " : " ;
1255  for (int l=0; l<nz; l++) {
1256  cout << tdiff(l) << " " ;
1257  }
1258  cout << endl ;
1259 
1260  //=================================
1261  // Updates for the next iteration
1262  //=================================
1263 
1264  vuujm1 = vuu ;
1265  ssjm1 = ssj ;
1266 
1267  niter++ ;
1268 
1269  } // End of iteration
1270  while ( (diff > precis) && (niter < nitermax) ) ;
1271 
1272 //==========================================================================
1273 //==========================================================================
1274 // End of iteration
1275 //==========================================================================
1276 //==========================================================================
1277 
1278  uu.set_dzpuis( source.get_dzpuis() ) ; // dzpuis unchanged
1279 
1280 }
1281 
1282 void Map_et::poisson_angu(const Cmp& , Param&, Cmp&, double) const {
1283  cout << "Map_et::poisson_angu(const Cmp&, Param&, Cmp&, double) pas fait" << endl; abort() ;
1284  }
1285 
1286 
1287 }
const Map * get_mp() const
Returns the mapping.
Definition: cmp.h:904
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
Definition: scalar.h:1359
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1694
const Valeur & dsdt() const
Returns of *this.
Definition: valeur_dsdt.C:115
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1683
const Valeur & dsdx() const
Returns of *this.
Definition: valeur_dsdx.C:114
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition: cmp.h:449
void filtre_r(int *nn)
Sets the n lasts coefficients in r to 0 in all domains.
Definition: scalar_manip.C:192
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
const Valeur & lapang() const
Returns the angular Laplacian of *this.
Definition: valeur_lapang.C:75
void dec_dzpuis()
Decreases by 1 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:157
Multi-domain array.
Definition: mtbl.h:118
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition: map.h:2876
Lorene prototypes.
Definition: app_hor.h:67
void ylm()
Computes the coefficients of *this.
Definition: valeur_ylm.C:141
int get_etat() const
Returns the logical state.
Definition: cmp.h:902
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1675
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:402
const Valeur & sx() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR ) ...
Definition: valeur_sx.C:113
Values and coefficients of a (real-value) function.
Definition: valeur.h:297
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Definition: scalar.h:569
void annule(int l)
Sets the Valeur to zero in a given domain.
Definition: valeur.C:747
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: scalar.C:359
void set_base(const Base_val &)
Sets the bases for spectral expansions (member base )
Definition: valeur.C:813
Tbl diffrel(const Cmp &a, const Cmp &b)
Relative difference between two Cmp (norme version).
Definition: cmp_math.C:507
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1667
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition: scalar.C:814
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Definition: param.C:1052
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
Definition: param.C:295
virtual void poisson(const Cmp &source, Param &par, Cmp &uu, bool verbose=true) const
Computes the solution of a scalar Poisson equation (Cmp version).
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1635
Base_val base
Bases on which the spectral expansion is performed.
Definition: valeur.h:315
int get_dzpuis() const
Returns dzpuis.
Definition: scalar.h:572
Parameter storage.
Definition: param.h:125
const Valeur & stdsdp() const
Returns of *this.
Definition: valeur_stdsdp.C:63
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:467
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Definition: param.C:433
Tbl max(const Cmp &)
Maximum values of a Cmp in each domain.
Definition: cmp_math.C:438
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1723
virtual void poisson(const Cmp &source, Param &par, Cmp &uu, bool verbose=true) const
Computes the solution of a scalar Poisson equation (Cmp version).
void dec2_dzpuis()
Decreases by 2 the value of dzpuis and changes accordingly the values of the Cmp in the external comp...
Definition: cmp_r_manip.C:183
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain...
Definition: map.h:1624
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: cmp.C:307
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: mtbl.C:302
Coord rsxdxdr
in the nucleus; \ in the shells; \ in the outermost compactified domain.
Definition: map.h:2952
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
Definition: scalar.C:803
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation using a Tau method (Cmp version).
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition: grilles.h:471
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined.
Definition: map.h:702
Bases of the spectral expansions.
Definition: base_val.h:325
Affine radial mapping.
Definition: map.h:2102
virtual void poisson_angu(const Scalar &source, Param &par, Scalar &uu, double lambda=0) const
Computes the solution of the generalized angular Poisson equation.
int get_dzpuis() const
Returns dzpuis.
Definition: cmp.h:906
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1706
Scalar & get_scalar_mod(int position=0) const
Returns the reference of a modifiable Scalar stored in the list.
Definition: param.C:1465
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Definition: cmp.C:718
void set_dzpuis(int)
Set a value to dzpuis.
Definition: cmp.C:657
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
Definition: param.C:364
Basic array class.
Definition: tbl.h:164
Valeur & set_spectral_va()
Returns va (read/write version)
Definition: scalar.h:619
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition: grilles.h:493
bool check_dzpuis(int dzi) const
Returns false if the last domain is compactified and *this is not zero in this domain and dzpuis is n...
Definition: scalar.C:879
Tbl ** t
Array (size nzone ) of pointers on the Tbl &#39;s.
Definition: mtbl.h:132
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1659
const Map & get_mp() const
Returns the mapping.
Definition: tensor.h:902
virtual void dec_dzpuis(int dec=1)
Decreases by dec units the value of dzpuis and changes accordingly the values of the Scalar in the co...
Valeur va
The numerical value of the Cmp.
Definition: cmp.h:467
const Valeur & get_spectral_va() const
Returns va (read only version)
Definition: scalar.h:616
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition: map.h:1715
virtual void poisson_tau(const Cmp &source, Param &par, Cmp &uu) const
Computes the solution of a scalar Poisson equation with a Tau method (Cmp version).