LORENE
map_radial_r_manip.C
1/*
2 * Member functions of the class Map_radial for various r manipulations
3 * of the Scalar's.
4 */
5
6/*
7 * Copyright (c) 1999-2003 Eric Gourgoulhon
8 * Copyright (c) 2000-2001 Philippe Grandclement
9 * Copyright (c) 2001 Jerome Novak
10 *
11 * This file is part of LORENE.
12 *
13 * LORENE is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * LORENE is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with LORENE; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 */
28
29
30char map_radial_r_manip_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_radial_r_manip.C,v 1.12 2014/10/13 08:53:06 j_novak Exp $" ;
31
32/*
33 * $Id: map_radial_r_manip.C,v 1.12 2014/10/13 08:53:06 j_novak Exp $
34 * $Log: map_radial_r_manip.C,v $
35 * Revision 1.12 2014/10/13 08:53:06 j_novak
36 * Lorene classes and functions now belong to the namespace Lorene.
37 *
38 * Revision 1.11 2005/05/25 16:11:04 j_novak
39 * Better handling of the case with no compactified domain.␓
40 *
41 * Revision 1.10 2004/10/11 15:09:03 j_novak
42 * The radial manipulation functions take Scalar as arguments, instead of Cmp.
43 * Added a conversion operator from Scalar to Cmp.
44 * The Cmp radial manipulation function make conversion to Scalar, call to the
45 * Map_radial version with a Scalar argument and back.
46 *
47 * Revision 1.9 2004/10/08 13:34:37 j_novak
48 * Scalar::div_r() does not need to pass through Cmp version anymore.
49 *
50 * Revision 1.8 2004/01/28 10:35:52 j_novak
51 * Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
52 *
53 * Revision 1.7 2004/01/27 09:33:48 j_novak
54 * New method Map_radial::div_r_zec
55 *
56 * Revision 1.6 2003/11/04 23:00:16 e_gourgoulhon
57 * Method div_tant is now defined in file map_radial_th_manip.C.
58 *
59 * Revision 1.5 2003/10/27 09:02:19 j_novak
60 * Corrected a bug in the case of null CED
61 *
62 * Revision 1.4 2003/10/17 15:07:29 j_novak
63 * The order of operations in div_tant() has been changed.
64 *
65 * Revision 1.3 2003/10/15 10:41:49 e_gourgoulhon
66 * Added new method div_tant.
67 *
68 * Revision 1.2 2002/08/13 08:02:45 j_novak
69 * Handling of spherical vector/tensor components added in the classes
70 * Mg3d and Tenseur. Minor corrections for the class Metconf.
71 *
72 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
73 * LORENE
74 *
75 * Revision 1.17 2001/10/29 15:34:35 novak
76 * Ajout de Map_radial::div_r
77 *
78 * Revision 1.16 2000/08/31 14:19:26 eric
79 * *** empty log message ***
80 *
81 * Revision 1.15 2000/08/31 13:04:05 eric
82 * Ajout de la fonction mult_rsint.
83 * Reecriture de div_rsint.
84 *
85 * Revision 1.14 2000/08/31 11:45:19 eric
86 * Suppression de assert (!((ci_ext.check_dzpuis(0)))) dans
87 * Map_radial::mult_r
88 *
89 * Revision 1.13 2000/07/20 14:21:27 eric
90 * Ajout de la fonction div_rsint.
91 *
92 * Revision 1.12 2000/05/22 15:12:27 phil
93 * *** empty log message ***
94 *
95 * Revision 1.11 2000/05/22 14:55:47 phil
96 * la fonction mult_r se contente de changer le dzpuis sans faire d'operation !
97 * /.
98 *
99 * Revision 1.10 2000/05/22 14:39:28 phil
100 * ajout de inc_dzpuis et dec_dzpuis
101 *
102 * Revision 1.9 2000/03/31 13:25:12 eric
103 * *** empty log message ***
104 *
105 * Revision 1.8 2000/03/31 13:11:08 eric
106 * Map_radial::mult_r : traitement ameliore dans la ZEC.
107 *
108 * Revision 1.7 1999/12/02 11:27:34 eric
109 * *** empty log message ***
110 *
111 * Revision 1.6 1999/12/02 11:04:05 eric
112 * Reorganisation complete de la routine mult_r.
113 * Appel de Valeur::mult_x().
114 *
115 * Revision 1.5 1999/11/30 16:26:26 eric
116 * *** empty log message ***
117 *
118 * Revision 1.4 1999/11/30 15:48:20 eric
119 * *** empty log message ***
120 *
121 * Revision 1.3 1999/11/30 15:31:06 eric
122 * *** empty log message ***
123 *
124 * Revision 1.2 1999/11/30 15:15:02 eric
125 * *** empty log message ***
126 *
127 * Revision 1.1 1999/11/30 14:22:50 eric
128 * Initial revision
129 *
130 *
131 * $Header: /cvsroot/Lorene/C++/Source/Map/map_radial_r_manip.C,v 1.12 2014/10/13 08:53:06 j_novak Exp $
132 *
133 */
134
135#include "cmp.h"
136#include "tensor.h"
137
138
139 //---------------------------//
140 // mult_r //
141 //---------------------------//
142
143namespace Lorene {
144void Map_radial::mult_r(Scalar& uu) const {
145
146 // Verifications d'usage :
147 assert(uu.get_etat() != ETATNONDEF) ;
148
149 // Nothing to do if the Scalar is null :
150 if (uu.get_etat() == ETATZERO) {
151 return ;
152 }
153
154 assert((uu.get_etat() == ETATQCQ)||(uu.get_etat() == ETATUN)) ;
155
156 uu.set_etat_qcq() ;
157
158 int nz = mg->get_nzone() ;
159 int nzm1 = nz-1 ;
160
161
162 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
163 // -------------
164
165 // Decomposition inner domains / external domain :
166 // ----------------------------------------------
167
168 Scalar uu_ext = uu ;
169 uu_ext.annule(0, nzm1-1) ;
170
171 uu.annule_domain(nzm1) ;
172
173 // Inner domains: multiplication by r :
174 // ----------------------------------
175 //Confort :
176 Valeur& val = uu.set_spectral_va() ;
177 assert(val.get_mg() == mg) ;
178
179 val = val.mult_x() ; // Multiplication by xi in the nucleus
180 // Identity in the shells
181
182 Base_val sauve_base = val.base ;
183 val = val / xsr ; // R/xi in the nucleus
184 // R in the shells
185 val.base = sauve_base ;
186
187 // External domain
188 // ---------------
189
190 Valeur& val_ext = uu_ext.set_spectral_va() ;
191 val_ext.sxm1_zec() ; // division par (x-1) dans l'espace des coefs.
192
193 sauve_base = val_ext.base ;
194 val_ext = xsr * val_ext ;
195 val_ext.base = sauve_base ;
196
197 // Recombination
198 // -------------
199
200 uu = uu + uu_ext ;
201
202 }
203 else{ // Case without ZEC
204 //-----------------
205 Valeur& val = uu.set_spectral_va() ;
206 val = val.mult_x() ; // Multiplication by xi in the nucleus
207 // Identity in the shells
208
209 Base_val sauve_base = val.base ;
210 val = val / xsr ; // R/xi in the nucleus
211 // R in the shells
212 val.base = sauve_base ;
213 }
214
215
216}
217
218
219void Map_radial::mult_r(Cmp& ci) const {
220
221 // Verifications d'usage :
222 assert(ci.get_etat() != ETATNONDEF) ;
223
224 // Nothing to do if the Cmp is null :
225 if (ci.get_etat() == ETATZERO) {
226 return ;
227 }
228
229 assert(ci.get_etat() == ETATQCQ) ;
230
231 int nz = mg->get_nzone() ;
232 int nzm1 = nz-1 ;
233
234
235 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
236 // -------------
237
238 // Decomposition inner domains / external domain :
239 // ----------------------------------------------
240
241 Cmp ci_ext = ci ;
242 ci_ext.annule(0, nzm1-1) ;
243
244 ci.annule(nzm1) ;
245
246 // Inner domains: multiplication by r :
247 // ----------------------------------
248 //Confort :
249 Valeur& val = ci.va ;
250 assert(val.get_mg() == mg) ;
251
252 val = val.mult_x() ; // Multiplication by xi in the nucleus
253 // Identity in the shells
254
255 Base_val sauve_base = val.base ;
256 val = val / xsr ; // R/xi in the nucleus
257 // R in the shells
258 val.base = sauve_base ;
259
260 // External domain
261 // ---------------
262
263 // On change juste le dzpuis !
264
265 //## assert (!((ci_ext.check_dzpuis(0)))) ;
266 // On fait just dec_dzpuis ...
267 ci_ext.set_dzpuis (ci.get_dzpuis()-1) ;
268
269 // Recombination
270 // -------------
271
272 ci = ci + ci_ext ;
273
274 }
275 else{ // Case without ZEC
276 //-----------------
277 Valeur& uu = ci.va ;
278 uu = uu.mult_x() ; // Multiplication by xi in the nucleus
279 // Identity in the shells
280
281 Base_val sauve_base = uu.base ;
282 uu = uu / xsr ; // R/xi in the nucleus
283 // R in the shells
284 uu.base = sauve_base ;
285 }
286
287
288}
289
290
291
292 //---------------------------//
293 // mult_r_zec //
294 //---------------------------//
295
297
298 // Verifications d'usage :
299 assert(ci.get_etat() != ETATNONDEF) ;
300
301 // Nothing to do if the Scalar is null :
302 if (ci.get_etat() == ETATZERO) {
303 return ;
304 }
305
306 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
307
308 ci.set_etat_qcq() ;
309
310 //Confort :
311 Valeur& uu = ci.set_spectral_va() ;
312 assert(uu.get_mg() == mg) ;
313
314 int nz = mg->get_nzone() ;
315 int nzm1 = nz-1 ;
316
317
318 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
319 // -------------
320
321 // On stocke tout sauf la ZEC
322
323 Valeur val = uu ;
324 val.annule(nzm1) ;
325
326 // On ne travaile que sur la ZEC :
327
328 Valeur val_ext = uu ;
329 val_ext.annule(0, nzm1-1) ;
330
331 val_ext.sxm1_zec() ; // division par (x-1) dans l'espace des coefs.
332
333 Base_val sauve_base = val_ext.base ;
334 val_ext = xsr * val_ext ;
335 val_ext.base = sauve_base ;
336
337 // Et on reconstruit le resultat ...
338 uu = val + val_ext ;
339
340 }
341 else{ // Case without ZEC
342 //-----------------
343
344 return ;
345
346 }
347
348
349}
350
351 //---------------------------//
352 // mult_rsint //
353 //---------------------------//
354
356
357 assert(ci.get_etat() != ETATNONDEF) ;
358
359 if (ci.get_etat() == ETATZERO) {
360 return ; // Nothing to do if the Scalar is null
361 }
362
363 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
364
365 ci.set_etat_qcq() ;
366
367 Valeur& val = ci.set_spectral_va() ;
368 assert(val.get_mg() == mg) ;
369
370 int nz = mg->get_nzone() ;
371 int nzm1 = nz-1 ;
372
373 // 1/ Multiplication by sin(theta)
374 // -------------------------------
375
376 val = val.mult_st() ; // Multiplication by sin(theta)
377
378 // 2/ Multiplication by r
379 // ----------------------
380
381 Scalar ci_ext(*this) ;
382
383 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
384 // -------------
385 // Decomposition inner domains / external domain :
386 // ----------------------------------------------
387
388 ci_ext = ci ;
389 ci_ext.annule(0, nzm1-1) ;
390 ci.annule_domain(nzm1) ;
391
392 // External domain
393 // ---------------
394 Valeur& val_ext = ci_ext.set_spectral_va() ;
395 assert(val_ext.get_mg() == mg) ;
396
397 val_ext.sxm1_zec() ; // Division by (xi-1)
398
399 Base_val sauve_base = val_ext.base ;
400 val_ext = val_ext * xsr ; // Multiplication by R(xi-1)
401 val_ext.base = sauve_base ;
402
403 }
404 else{ // Case without ZEC
405 //-----------------
406
407 ci_ext = 0 ;
408
409 }
410
411 // Inner domains:
412 // -------------
413 val = val.mult_x() ; // Multiplication by xi in the nucleus
414 // Identity in the shells
415
416 Base_val sauve_base = val.base ;
417 val = val / xsr ; // Multiplication by R/xi in the nucleus
418 // R in the shells
419 val.base = sauve_base ;
420
421 // Recombination
422 // -------------
423
424 ci = ci + ci_ext ;
425
426}
427
428
429
430 //---------------------------//
431 // div_rsint //
432 //---------------------------//
433
435
436 assert(ci.get_etat() != ETATNONDEF) ;
437
438 if (ci.get_etat() == ETATZERO) {
439 return ; // Nothing to do if the Scalar is null
440 }
441
442 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
443
444 ci.set_etat_qcq() ;
445
446 Valeur& val = ci.set_spectral_va() ;
447 assert(val.get_mg() == mg) ;
448
449 int nz = mg->get_nzone() ;
450 int nzm1 = nz-1 ;
451
452 // 1/ Division by sin(theta)
453 // -------------------------
454
455 val = val.ssint() ; // Division by sin(theta)
456
457
458 // 2/ Division by r
459 // ----------------
460
461 Scalar ci_ext(*this) ;
462
463 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
464 // -------------
465
466 // Decomposition inner domains / external domain :
467 // ----------------------------------------------
468
469 ci_ext = ci ;
470 ci_ext.annule(0, nzm1-1) ;
471 ci.annule_domain(nzm1) ;
472
473 // External domain
474 // ---------------
475 Valeur& val_ext = ci_ext.set_spectral_va() ;
476 assert(val_ext.get_mg() == mg) ;
477
478 val_ext = val_ext.mult_x() ; // Multiplication by (xi-1)
479
480 Base_val sauve_base = val_ext.base ;
481 val_ext = val_ext / xsr ; // Division by (xi-1)/R
482 val_ext.base = sauve_base ;
483
484 }
485 else{ // Case without ZEC
486 //-----------------
487
488 ci_ext = 0 ;
489
490 }
491
492 // Inner domains:
493 // -------------
494
495 val = val.sx() ; // Division by xi in the nucleus
496 // Identity in the shells
497
498 Base_val sauve_base = val.base ;
499 val = val * xsr ; // Multiplication by xi/R in the nucleus
500 // Multiplication by 1/R in the shells
501 val.base = sauve_base ;
502
503 // Recombination
504 // -------------
505
506 ci = ci + ci_ext ;
507
508}
509
510 //---------------------------//
511 // div_r //
512 //---------------------------//
513
514void Map_radial::div_r(Scalar& ci) const {
515
516 assert(ci.get_etat() != ETATNONDEF) ;
517
518 if (ci.get_etat() == ETATZERO) {
519 return ; // Nothing to do if the Scalar is null
520 }
521
522 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
523
524 ci.set_etat_qcq() ;
525
526 Valeur& val = ci.set_spectral_va() ;
527 assert(val.get_mg() == mg) ;
528
529 int nz = mg->get_nzone() ;
530 int nzm1 = nz-1 ;
531
532 Scalar ci_ext(*this) ;
533
534 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
535 // -------------
536
537 // Decomposition inner domains / external domain :
538 // ----------------------------------------------
539
540 ci_ext = ci ;
541 ci_ext.annule(0, nzm1-1) ;
542 ci.annule_domain(nzm1) ;
543
544 // External domain
545 // ---------------
546 Valeur& val_ext = ci_ext.set_spectral_va() ;
547 assert(val_ext.get_mg() == mg) ;
548
549 val_ext = val_ext.mult_x() ; // Multiplication by (xi-1)
550
551 Base_val sauve_base = val_ext.base ;
552 val_ext = val_ext / xsr ; // Division by (xi-1)/R
553 val_ext.base = sauve_base ;
554
555 }
556 else{ // Case without ZEC
557 //-----------------
558
559 ci_ext = 0 ;
560
561 }
562
563 // Inner domains:
564 // -------------
565
566 val = val.sx() ; // Division by xi in the nucleus
567 // Identity in the shells
568
569 Base_val sauve_base = val.base ;
570 val = val * xsr ; // Multiplication by xi/R in the nucleus
571 // Multiplication by 1/R in the shells
572 val.base = sauve_base ;
573
574 // Recombination
575 // -------------
576
577 ci = ci + ci_ext ;
578
579}
580
581 //---------------------------//
582 // div_r_zec //
583 //---------------------------//
584
586
587 // Verifications d'usage :
588 assert(uu.get_etat() != ETATNONDEF) ;
589
590 // Nothing to do if the Scalar is null :
591 if (uu.get_etat() == ETATZERO) {
592 return ;
593 }
594
595 assert((uu.get_etat() == ETATQCQ)||(uu.get_etat() == ETATUN)) ;
596
597 uu.set_etat_qcq() ;
598
599 //Confort :
600 const Valeur& vu = uu.get_spectral_va() ;
601 assert(vu.get_mg() == mg) ;
602
603 int nz = mg->get_nzone() ;
604 int nzm1 = nz-1 ;
605
606 if (mg->get_type_r(nzm1) == UNSURR) { // Case with ZEC
607 // -------------
608 // On stocke tout sauf la ZEC
609
610 Valeur val = vu ;
611 val.annule(nzm1) ;
612
613 // On ne travaile que sur la ZEC :
614
615 Valeur val_ext = vu ;
616 val_ext.annule(0, nzm1-1) ;
617
618 val_ext.mult_xm1_zec() ; // division par (x-1) dans l'espace des coefs.
619
620 Base_val sauve_base = val_ext.base ;
621 val_ext = val_ext / xsr ;
622 val_ext.base = sauve_base ;
623
624 // Et on reconstruit le resultat ...
625 uu.set_spectral_va() = val + val_ext ;
626
627 }
628 else{ // Case without ZEC
629 //-----------------
630
631 return ;
632
633 }
634
635
636}
637
638
639 //---------------------------//
640 // dec_dzpuis //
641 //---------------------------//
642
644
645 // Verifications d'usage :
646 assert(ci.get_etat() != ETATNONDEF) ;
647
648 int nz = mg->get_nzone() ;
649 int nzm1 = nz-1 ;
650
651 // Nothing to do if the Scalar is null or if there is no ZEC:
652 if (ci.get_etat() == ETATZERO) {
653 ci.set_dzpuis( ci.get_dzpuis() - 1 ) ;
654 return ;
655 }
656
657 if (mg->get_type_r(nzm1) != UNSURR)
658 return ;
659
660 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
661
662 ci.set_etat_qcq() ;
663
664 Valeur& uu = ci.set_spectral_va() ;
665 assert(uu.get_mg() == mg) ;
666
667
668 // Decomposition inner domains / external domain :
669 // ----------------------------------------------
670 Valeur uu_ext = uu ;
671 uu_ext.annule(0, nzm1-1) ;
672
673 uu.annule(nzm1) ;
674
675 // Computation in the external domain (division by r)
676 // ----------------------------------
677
678 uu_ext.mult_xm1_zec() ; // Multiplication by (xi-1) in the ZEC
679
680 Base_val sauve_base = uu_ext.base ;
681 uu_ext = uu_ext / xsr ; // u^2/(xi-1) in the ZEC
682 uu_ext.base = sauve_base ;
683
684 // Final result:
685 // ------------
686 uu = uu + uu_ext ;
687
688 ci.set_dzpuis( ci.get_dzpuis() - 1 ) ;
689
690}
691
692 //---------------------------//
693 // inc_dzpuis //
694 //---------------------------//
695
697
698 // Verifications d'usage :
699 assert(ci.get_etat() != ETATNONDEF) ;
700
701 int nz = mg->get_nzone() ;
702 int nzm1 = nz-1 ;
703
704 // Nothing to do if the Scalar is null or if there is no ZEC:
705 if (ci.get_etat() == ETATZERO) {
706 ci.set_dzpuis( ci.get_dzpuis() + 1 ) ;
707 return ;
708 }
709 if (mg->get_type_r(nzm1) != UNSURR) return ;
710
711 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
712
713 ci.set_etat_qcq() ;
714
715 Valeur& uu = ci.set_spectral_va() ;
716 assert(uu.get_mg() == mg) ;
717
718
719 // Decomposition inner domains / external domain :
720 // ----------------------------------------------
721 Valeur uu_ext = uu ;
722 uu_ext.annule(0, nzm1-1) ;
723
724 uu.annule(nzm1) ;
725
726 // Computation in the external domain (multiplication by r)
727 // ----------------------------------
728
729 uu_ext.sxm1_zec() ; // Division by (xi-1) in the ZEC
730
731 Base_val sauve_base = uu_ext.base ;
732 uu_ext = uu_ext * xsr ; // (xi-1)/u in the ZEC
733 uu_ext.base = sauve_base ;
734
735 // Final result:
736 // ------------
737 uu = uu + uu_ext ;
738
739 ci.set_dzpuis( ci.get_dzpuis() + 1 ) ;
740
741}
742
743
744 //---------------------------//
745 // dec2_dzpuis //
746 //---------------------------//
747
749
750 // Verifications d'usage :
751 assert(ci.get_etat() != ETATNONDEF) ;
752
753 int nz = mg->get_nzone() ;
754 int nzm1 = nz-1 ;
755
756 // Nothing to do if the Scalar is null or if there is no ZEC:
757 if (ci.get_etat() == ETATZERO) {
758 ci.set_dzpuis( ci.get_dzpuis() - 2 ) ;
759 return ;
760 }
761 if (mg->get_type_r(nzm1) != UNSURR) return ;
762
763 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
764
765 ci.set_etat_qcq() ;
766
767 Valeur& uu = ci.set_spectral_va() ;
768 assert(uu.get_mg() == mg) ;
769
770
771 // Decomposition inner domains / external domain :
772 // ----------------------------------------------
773 Valeur uu_ext = uu ;
774 uu_ext.annule(0, nzm1-1) ;
775
776 uu.annule(nzm1) ;
777
778 // Computation in the external domain (division by r^2)
779 // ----------------------------------
780
781 uu_ext.mult2_xm1_zec() ; // Multiplication by (xi-1)^2 in the ZEC
782
783 Base_val sauve_base = uu_ext.base ;
784 uu_ext = uu_ext / (xsr*xsr) ; // u^2/(xi-1)^2 in the ZEC
785 uu_ext.base = sauve_base ;
786
787 // Final result:
788 // ------------
789 uu = uu + uu_ext ;
790
791 ci.set_dzpuis( ci.get_dzpuis() - 2 ) ;
792
793}
794
795 //---------------------------//
796 // inc2_dzpuis //
797 //---------------------------//
798
800
801 // Verifications d'usage :
802 assert(ci.get_etat() != ETATNONDEF) ;
803
804 int nz = mg->get_nzone() ;
805 int nzm1 = nz-1 ;
806
807 // Nothing to do if the Scalar is null or if there is no ZEC:
808 if (ci.get_etat() == ETATZERO) {
809 ci.set_dzpuis( ci.get_dzpuis() + 2 ) ;
810 return ;
811 }
812 if (mg->get_type_r(nzm1) != UNSURR) return ;
813
814 assert((ci.get_etat() == ETATQCQ)||(ci.get_etat() == ETATUN)) ;
815
816 ci.set_etat_qcq() ;
817
818 Valeur& uu = ci.set_spectral_va() ;
819 assert(uu.get_mg() == mg) ;
820
821
822 // Decomposition inner domains / external domain :
823 // ----------------------------------------------
824 Valeur uu_ext = uu ;
825 uu_ext.annule(0, nzm1-1) ;
826
827 uu.annule(nzm1) ;
828
829 // Computation in the external domain (multiplication by r^2)
830 // ----------------------------------
831
832 uu_ext.sxm1_zec() ; // Division by (xi-1) in the ZEC
833 uu_ext.sxm1_zec() ; // Division by (xi-1) in the ZEC
834
835 Base_val sauve_base = uu_ext.base ;
836 uu_ext = uu_ext * (xsr*xsr) ; // (xi-1)^2/u^2 in the ZEC
837 uu_ext.base = sauve_base ;
838
839 // Final result:
840 // ------------
841 uu = uu + uu_ext ;
842
843 ci.set_dzpuis( ci.get_dzpuis() + 2 ) ;
844
845}
846
847}
Bases of the spectral expansions.
Definition base_val.h:322
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
int get_etat() const
Returns the logical state.
Definition cmp.h:899
Valeur va
The numerical value of the Cmp
Definition cmp.h:464
void annule(int l)
Sets the Cmp to zero in a given domain.
Definition cmp.C:348
int get_dzpuis() const
Returns dzpuis.
Definition cmp.h:903
void set_dzpuis(int)
Set a value to dzpuis.
Definition cmp.C:654
virtual void inc2_dzpuis(Scalar &) const
Increases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void mult_r_zec(Scalar &) const
Multiplication by r (in the compactified external domain only) of a Scalar.
virtual void mult_r(Scalar &uu) const
Multiplication by r of a Scalar, the dzpuis of uu is not changed.
virtual void div_rsint(Scalar &) const
Division by of a Scalar.
virtual void dec_dzpuis(Scalar &) const
Decreases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactified...
virtual void div_r_zec(Scalar &) const
Division by r (in the compactified external domain only) of a Scalar.
virtual void inc_dzpuis(Scalar &) const
Increases by 1 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void div_r(Scalar &) const
Division by r of a Scalar.
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1549
virtual void dec2_dzpuis(Scalar &) const
Decreases by 2 the value of dzpuis of a Scalar and changes accordingly its values in the compactifi...
virtual void mult_rsint(Scalar &) const
Multiplication by of a Scalar.
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
Definition map.h:676
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition grilles.h:474
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:387
int get_dzpuis() const
Returns dzpuis.
Definition scalar.h:557
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition scalar.C:353
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
Definition scalar.C:391
Valeur & set_spectral_va()
Returns va (read/write version)
Definition scalar.h:604
const Valeur & get_spectral_va() const
Returns va (read only version)
Definition scalar.h:601
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Definition scalar.h:554
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition scalar.C:808
Values and coefficients of a (real-value) function.
Definition valeur.h:287
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 )
void annule(int l)
Sets the Valeur to zero in a given domain.
Definition valeur.C:744
const Valeur & mult_x() const
Returns (r -sampling = RARE ) \ Id (r sampling = FIN ) \ (r -sampling = UNSURR )
const Valeur & ssint() const
Returns of *this.
const Valeur & mult_st() const
Returns applied to *this.
const Mg3d * get_mg() const
Returns the Mg3d on which the this is defined.
Definition valeur.h:729
Base_val base
Bases on which the spectral expansion is performed.
Definition valeur.h:305
void mult2_xm1_zec()
Applies the following operator to *this : \ Id (r sampling = RARE, FIN ) \ (r -sampling = UNSURR )
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
Definition tensor.C:666
Lorene prototypes.
Definition app_hor.h:64