70 #include "param_elliptic.h" 87 assert(mp_aff != 0x0) ;
112 assert(aaa.
get_etat() != ETATNONDEF) ;
115 bool ced = (mgrid.
get_type_r(nzm1) == UNSURR) ;
116 int n_shell = ced ? nz-2 : nzm1 ;
120 n_shell = (nz_bc < n_shell ? nz_bc : n_shell) ;
121 bool cedbc = (ced && (nz_bc == nzm1)) ;
124 assert(par_bc != 0x0) ;
128 int nt = mgrid.
get_nt(0) ;
129 int np = mgrid.
get_np(0) ;
157 int l_q, m_q, base_r ;
166 int nr = mgrid.
get_nr(lz) ;
171 for (
int k=0 ; k<np+1 ; k++) {
172 for (
int j=0 ; j<nt ; j++) {
175 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
180 for (
int i=0; i<nr; i++) {
181 sol_part_mu.
set(lz, k, j, i) = 0 ;
182 sol_part_x.
set(lz, k, j, i) = 0 ;
184 for (
int i=0; i<nr; i++) {
185 sol_hom2_mu.
set(lz, k, j, i) = 0 ;
186 sol_hom2_x.
set(lz, k, j, i) = 0 ;
197 for (
int lz=1; lz <= n_shell; lz++) {
198 int nr = mgrid.
get_nr(lz) ;
199 assert(mgrid.
get_nt(lz) == nt) ;
200 assert(mgrid.
get_np(lz) == np) ;
202 double ech = mp_aff->
get_beta()[lz] / alpha ;
206 for (
int k=0 ; k<np+1 ; k++) {
207 for (
int j=0 ; j<nt ; j++) {
210 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
215 for (
int lin=0; lin<nr; lin++)
216 for (
int col=0; col<nr; col++)
217 ope.
set(lin,col) = mxd(lin,col) + ech*md(lin,col)
219 for (
int lin=0; lin<nr; lin++)
220 for (
int col=0; col<nr; col++)
221 ope.
set(lin,col+nr) = (2-l_q*(l_q+1))*mid(lin,col) ;
222 for (
int lin=0; lin<nr; lin++)
223 for (
int col=0; col<nr; col++)
224 ope.
set(lin+nr,col) = -mid(lin,col) ;
225 for (
int lin=0; lin<nr; lin++)
226 for (
int col=0; col<nr; col++)
227 ope.
set(lin+nr,col+nr) = mxd(lin,col) + ech*md(lin,col) ;
231 for (
int col=0; col<2*nr; col++) {
232 ope.
set(ind0+nr-1, col) = 0 ;
233 ope.
set(ind1+nr-1, col) = 0 ;
235 ope.
set(ind0+nr-1, ind0) = 1 ;
236 ope.
set(ind1+nr-1, ind1) = 1 ;
242 for (
int lin=0; lin<nr; lin++)
244 for (
int lin=0; lin<nr; lin++)
247 sec.
set(ind0+nr-1) = 0 ;
248 sec.
set(ind1+nr-1) = 0 ;
250 for (
int i=0; i<nr; i++) {
251 sol_part_mu.
set(lz, k, j, i) = sol(i) ;
252 sol_part_x.
set(lz, k, j, i) = sol(i+nr) ;
255 sec.
set(ind0+nr-1) = 1 ;
257 for (
int i=0; i<nr; i++) {
258 sol_hom1_mu.
set(lz, k, j, i) = sol(i) ;
259 sol_hom1_x.
set(lz, k, j, i) = sol(i+nr) ;
261 sec.
set(ind0+nr-1) = 0 ;
262 sec.
set(ind1+nr-1) = 1 ;
264 for (
int i=0; i<nr; i++) {
265 sol_hom2_mu.
set(lz, k, j, i) = sol(i) ;
266 sol_hom2_x.
set(lz, k, j, i) = sol(i+nr) ;
276 if (cedbc) {
int lz = nzm1 ;
277 int nr = mgrid.
get_nr(lz) ;
278 assert(mgrid.
get_nt(lz) == nt) ;
279 assert(mgrid.
get_np(lz) == np) ;
284 for (
int k=0 ; k<np+1 ; k++) {
285 for (
int j=0 ; j<nt ; j++) {
288 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
292 for (
int lin=0; lin<nr; lin++)
293 for (
int col=0; col<nr; col++)
294 ope.
set(lin,col) = - md(lin,col) + 3*ms(lin,col) ;
295 for (
int lin=0; lin<nr; lin++)
296 for (
int col=0; col<nr; col++)
297 ope.
set(lin,col+nr) = (2-l_q*(l_q+1))*ms(lin,col) ;
298 for (
int lin=0; lin<nr; lin++)
299 for (
int col=0; col<nr; col++)
300 ope.
set(lin+nr,col) = -ms(lin,col) ;
301 for (
int lin=0; lin<nr; lin++)
302 for (
int col=0; col<nr; col++)
303 ope.
set(lin+nr,col+nr) = -md(lin,col) ;
308 for (
int col=0; col<2*nr; col++) {
309 ope.
set(ind0+nr-1, col) = 0 ;
310 ope.
set(ind1+nr-2, col) = 0 ;
311 ope.
set(ind1+nr-1, col) = 0 ;
313 for (
int col=0; col<nr; col++) {
314 ope.
set(ind0+nr-1, col+ind0) = 1 ;
315 ope.
set(ind1+nr-1, col+ind1) = 1 ;
317 ope.
set(ind1+nr-2, ind1+1) = 1 ;
323 for (
int lin=0; lin<nr; lin++)
325 for (
int lin=0; lin<nr; lin++)
328 sec.
set(ind0+nr-1) = 0 ;
329 sec.
set(ind1+nr-2) = 0 ;
330 sec.
set(ind1+nr-1) = 0 ;
332 for (
int i=0; i<nr; i++) {
333 sol_part_mu.
set(lz, k, j, i) = sol(i) ;
334 sol_part_x.
set(lz, k, j, i) = sol(i+nr) ;
337 sec.
set(ind1+nr-2) = 1 ;
339 for (
int i=0; i<nr; i++) {
340 sol_hom1_mu.
set(lz, k, j, i) = sol(i) ;
341 sol_hom1_x.
set(lz, k, j, i) = sol(i+nr) ;
351 int taille = 2*nz_bc ;
352 if (cedbc) taille-- ;
356 Tbl sec_membre(taille) ;
357 Matrice systeme(taille, taille) ;
358 int ligne ;
int colonne ;
361 double c_mu = (cedbc ? 0 : par_bc->
get_tbl_mod(0)(0) ) ;
362 double d_mu = (cedbc ? 0 : par_bc->
get_tbl_mod(0)(1) ) ;
363 double c_x = (cedbc ? 0 : par_bc->
get_tbl_mod(0)(2) ) ;
364 double d_x = (cedbc ? 0 : par_bc->
get_tbl_mod(0)(3) ) ;
365 Mtbl_cf dhom1_mu = sol_hom1_mu ;
366 Mtbl_cf dhom2_mu = sol_hom2_mu ;
367 Mtbl_cf dpart_mu = sol_part_mu ;
383 for (
int k=0 ; k<np+1 ; k++)
384 for (
int j=0 ; j<nt ; j++) {
386 if ((nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
394 int nr = mgrid.
get_nr(1) ;
407 systeme.
set(ligne, colonne) =
409 systeme.
set(ligne, colonne+1) =
415 systeme.
set(ligne, colonne) =
417 systeme.
set(ligne, colonne+1) =
425 for (
int zone=2 ; zone<nz_bc ; zone++) {
430 systeme.
set(ligne, colonne) =
432 systeme.
set(ligne, colonne+1) =
438 systeme.
set(ligne, colonne) =
440 systeme.
set(ligne, colonne+1) =
447 systeme.
set(ligne, colonne) =
449 systeme.
set(ligne, colonne+1) =
455 systeme.
set(ligne, colonne) =
457 systeme.
set(ligne, colonne+1) =
466 nr = mgrid.
get_nr(nz_bc) ;
467 double alpha = mp_aff->
get_alpha()[nz_bc] ;
471 systeme.
set(ligne, colonne) =
473 if (!cedbc) systeme.
set(ligne, colonne+1) =
479 systeme.
set(ligne, colonne) =
481 if (!cedbc) systeme.
set(ligne, colonne+1) =
489 systeme.
set(ligne, colonne) =
494 systeme.
set(ligne, colonne+1) =
523 for (
int i=0 ; i<nr ; i++) {
524 mmu.
set(0, k, j, i) = 0 ;
525 mw.
set(0, k, j, i) = 0 ;
528 for (
int i=0 ; i<nr ; i++) {
529 mmu.
set(1, k, j, i) = sol_part_mu(1, k, j, i)
530 + facteur(conte)*sol_hom1_mu(1, k, j, i)
531 + facteur(conte+1)*sol_hom2_mu(1, k, j, i);
532 mw.
set(1, k, j, i) = sol_part_x(1, k, j, i)
533 + facteur(conte)*sol_hom1_x(1, k, j, i)
534 + facteur(conte+1)*sol_hom2_x(1,k,j,i);
537 for (
int zone=2 ; zone<=n_shell ; zone++) {
539 for (
int i=0 ; i<nr ; i++) {
540 mmu.
set(zone, k, j, i) = sol_part_mu(zone, k, j, i)
541 + facteur(conte)*sol_hom1_mu(zone, k, j, i)
542 + facteur(conte+1)*sol_hom2_mu(zone, k, j, i) ;
544 mw.
set(zone, k, j, i) = sol_part_x(zone, k, j, i)
545 + facteur(conte)*sol_hom1_x(zone, k, j, i)
546 + facteur(conte+1)*sol_hom2_x(zone, k, j, i) ;
552 for (
int i=0 ; i<nr ; i++) {
553 mmu.
set(nzm1, k, j, i) = sol_part_mu(nzm1, k, j, i)
554 + facteur(conte)*sol_hom1_mu(nzm1, k, j, i) ;
556 mw.
set(nzm1, k, j, i) = sol_part_x(nzm1, k, j, i)
557 + facteur(conte)*sol_hom1_x(nzm1, k, j, i) ;
587 assert(mp_aff != 0x0) ;
594 bool ced = (mgrid.
get_type_r(nzm1) == UNSURR) ;
595 int n_shell = ced ? nz-2 : nzm1 ;
600 n_shell = (nz_bc < n_shell ? nz_bc : n_shell) ;
601 bool cedbc = (ced && (nz_bc == nzm1)) ;
604 assert(par_bc != 0x0) ;
608 int nt = mgrid.
get_nt(0) ;
609 int np = mgrid.
get_np(0) ;
611 int l_q, m_q, base_r;
630 for (
int lz=0; lz<nz; lz++) {
631 int nr = mgrid.
get_nr(lz);
632 for (
int k=0; k<np+1; k++)
633 for (
int j=0; j<nt; j++) {
635 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1))
637 for (
int i=0; i<nr; i++)
660 Scalar tilde_b2 = tilde_b;
663 assert (tilde_b.
get_etat() != ETATNONDEF) ;
664 assert (hh.
get_etat() != ETATNONDEF) ;
667 Scalar source_coq = tilde_b ;
671 source.set_spectral_va().ylm() ;
673 bool bnull = (tilde_b.
get_etat() == ETATZERO) ;
678 hoverr.set_spectral_va().ylm() ;
686 bool hnull = (hh.
get_etat() == ETATZERO) ;
693 bool need_calculation = true ;
694 if (par_mat != 0x0) {
695 bool param_new = false ;
700 if (par_mat->
get_int_mod(0) < nz_bc) param_new =
true ;
701 if (par_mat->
get_int_mod(1) != lmax) param_new =
true ;
707 for (
int l=1; l<= n_shell; l++) {
710 mp_aff->
get_alpha()[l]) > 2.e-15) param_new = true ;
723 int* nz_bc_new =
new int(nz_bc) ;
725 int* lmax_new =
new int(lmax) ;
727 int* type_t_new =
new int(mgrid.
get_type_t()) ;
729 int* type_p_new =
new int(mgrid.
get_type_p()) ;
734 for (
int l=0; l<nz; l++)
736 Tbl* palpha =
new Tbl(nz) ;
740 for (
int l=1; l<nzm1; l++)
744 else need_calculation = false ;
776 Itbl mat_done(lmax) ;
786 int nr = mgrid.
get_nr(lz) ;
790 if (need_calculation && (par_mat != 0x0)) mat_done.
annule_hard() ;
792 for (
int k=0 ; k<np+1 ; k++) {
793 for (
int j=0 ; j<nt ; j++) {
796 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
797 if (need_calculation) {
802 for (
int lin=0; lin<nr; lin++)
803 for (
int col=0; col<nr; col++)
804 ope.
set(lin,col) = md(lin,col) + 3*ms(lin,col) ;
805 for (
int lin=0; lin<nr; lin++)
806 for (
int col=0; col<nr; col++)
807 ope.
set(lin,col+nr) = -l_q*(l_q+1)*ms(lin,col) ;
808 for (
int lin=0; lin<nr; lin++)
809 for (
int col=0; col<nr; col++)
810 ope.
set(lin,col+2*nr) = 0 ;
811 for (
int lin=0; lin<nr; lin++)
812 for (
int col=0; col<nr; col++)
813 ope.
set(lin+nr,col) = -0.5*ms(lin,col) ;
814 for (
int lin=0; lin<nr; lin++)
815 for (
int col=0; col<nr; col++)
816 ope.
set(lin+nr,col+nr) = md(lin,col) + 3*ms(lin,col) ;
817 for (
int lin=0; lin<nr; lin++)
818 for (
int col=0; col<nr; col++)
819 ope.
set(lin+nr,col+2*nr) = (2. - l_q*(l_q+1))*ms(lin,col) ;
820 for (
int lin=0; lin<nr; lin++)
821 for (
int col=0; col<nr; col++)
822 ope.
set(lin+2*nr,col) = -0.5*md(lin,col)/double(l_q+1)
823 - 0.5*double(l_q+4)/double(l_q+1)*ms(lin,col) ;
824 for (
int lin=0; lin<nr; lin++)
825 for (
int col=0; col<nr; col++)
826 ope.
set(lin+2*nr,col+nr) = -2*ms(lin,col) ;
827 for (
int lin=0; lin<nr; lin++)
828 for (
int col=0; col<nr; col++)
829 ope.
set(lin+2*nr,col+2*nr) = (l_q+2)*md(lin,col)
830 + l_q*(l_q+2)*ms(lin,col) ;
833 for (
int col=0; col<3*nr; col++)
834 if (l_q>2) ope.
set(ind2+nr-2, col) = 0 ;
835 for (
int col=0; col<3*nr; col++) {
836 ope.
set(nr-1, col) = 0 ;
837 ope.
set(2*nr-1, col) = 0 ;
838 ope.
set(3*nr-1, col) = 0 ;
842 for (
int col=0; col<nr; col++) {
843 ope.
set(nr-1, col) = pari ;
844 ope.
set(2*nr-1, col+nr) = pari ;
845 ope.
set(3*nr-1, col+2*nr) = pari ;
850 ope.
set(nr-1, nr-1) = 1 ;
851 ope.
set(2*nr-1, 2*nr-1) = 1 ;
852 ope.
set(3*nr-1, 3*nr-1) = 1 ;
855 ope.
set(ind2+nr-2, ind2) = 1 ;
858 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
861 mat_done.
set(l_q) = 1 ;
865 const Matrice& oper = (par_mat == 0x0 ? ope :
870 for (
int lin=0; lin<2*nr; lin++)
872 for (
int lin=0; lin<nr; lin++)
873 sec.
set(2*nr+lin) = (*source.get_spectral_va().c_cf)
877 for (
int lin=0; lin<nr; lin++)
878 sec.
set(lin) = (*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) ;
879 for (
int lin=0; lin<nr; lin++)
880 sec.
set(lin+nr) = -0.5*(*hoverr.get_spectral_va().c_cf)
883 for (
int lin=0; lin<nr; lin++)
884 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
886 + (l_q+2)*(*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) ) ;
889 for (
int lin=0; lin<nr; lin++)
890 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
892 + (l_q+2)*(*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) )
893 + (*source.get_spectral_va().c_cf)(lz, k, j, lin) ;
896 if (l_q>2) sec.
set(ind2+nr-2) = 0 ;
897 sec.
set(3*nr-1) = 0 ;
899 for (
int i=0; i<nr; i++) {
900 sol_part_hrr.
set(lz, k, j, i) = sol(i) ;
901 sol_part_eta.
set(lz, k, j, i) = sol(i+nr) ;
902 sol_part_w.
set(lz, k, j, i) = sol(i+2*nr) ;
906 sec.
set(ind2+nr-2) = 1 ;
915 for (
int i=0; i<nr; i++) {
916 sol_hom3_hrr.
set(lz, k, j, i) = sol(i) ;
917 sol_hom3_eta.
set(lz, k, j, i) = sol(i+nr) ;
918 sol_hom3_w.
set(lz, k, j, i) = sol(i+2*nr) ;
930 for (
int lz=1; lz<= n_shell; lz++) {
931 if (need_calculation && (par_mat != 0x0)) mat_done.
annule_hard() ;
932 int nr = mgrid.
get_nr(lz) ;
937 double ech = mp_aff->
get_beta()[lz] / alpha ;
940 for (
int k=0 ; k<np+1 ; k++) {
941 for (
int j=0 ; j<nt ; j++) {
944 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
945 if (need_calculation) {
951 for (
int lin=0; lin<nr; lin++)
952 for (
int col=0; col<nr; col++)
953 ope.
set(lin,col) = mxd(lin,col) + ech*md(lin,col)
955 for (
int lin=0; lin<nr; lin++)
956 for (
int col=0; col<nr; col++)
957 ope.
set(lin,col+nr) = -l_q*(l_q+1)*mid(lin,col) ;
958 for (
int lin=0; lin<nr; lin++)
959 for (
int col=0; col<nr; col++)
960 ope.
set(lin,col+2*nr) = 0 ;
961 for (
int lin=0; lin<nr; lin++)
962 for (
int col=0; col<nr; col++)
963 ope.
set(lin+nr,col) = -0.5*mid(lin,col) ;
964 for (
int lin=0; lin<nr; lin++)
965 for (
int col=0; col<nr; col++)
966 ope.
set(lin+nr,col+nr) = mxd(lin,col) + ech*md(lin,col)
968 for (
int lin=0; lin<nr; lin++)
969 for (
int col=0; col<nr; col++)
970 ope.
set(lin+nr,col+2*nr) = (2. - l_q*(l_q+1))*mid(lin,col) ;
971 for (
int lin=0; lin<nr; lin++)
972 for (
int col=0; col<nr; col++)
973 ope.
set(lin+2*nr,col) =
974 -0.5/double(l_q+1)*(mxd(lin,col) + ech*md(lin,col)
975 + double(l_q+4)*mid(lin,col)) ;
976 for (
int lin=0; lin<nr; lin++)
977 for (
int col=0; col<nr; col++)
978 ope.
set(lin+2*nr,col+nr) = -2*mid(lin,col) ;
979 for (
int lin=0; lin<nr; lin++)
980 for (
int col=0; col<nr; col++)
981 ope.
set(lin+2*nr,col+2*nr) =
982 double(l_q+2)*(mxd(lin,col) + ech*md(lin,col)
983 + l_q*mid(lin,col)) ;
984 for (
int col=0; col<3*nr; col++) {
985 ope.
set(ind0+nr-1, col) = 0 ;
986 ope.
set(ind1+nr-1, col) = 0 ;
987 ope.
set(ind2+nr-1, col) = 0 ;
989 ope.
set(ind0+nr-1, ind0) = 1 ;
990 ope.
set(ind1+nr-1, ind1) = 1 ;
991 ope.
set(ind2+nr-1, ind2) = 1 ;
994 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
997 mat_done.
set(l_q) = 1 ;
1000 const Matrice& oper = (par_mat == 0x0 ? ope :
1005 for (
int lin=0; lin<2*nr; lin++)
1007 for (
int lin=0; lin<nr; lin++)
1012 for (
int lin=0; lin<nr; lin++)
1014 for (
int lin=0; lin<nr; lin++)
1018 for (
int lin=0; lin<nr; lin++)
1019 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
1024 for (
int lin=0; lin<nr; lin++)
1025 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
1031 sec.
set(ind0+nr-1) = 0 ;
1032 sec.
set(ind1+nr-1) = 0 ;
1033 sec.
set(ind2+nr-1) = 0 ;
1035 for (
int i=0; i<nr; i++) {
1036 sol_part_hrr.
set(lz, k, j, i) = sol(i) ;
1037 sol_part_eta.
set(lz, k, j, i) = sol(i+nr) ;
1038 sol_part_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1041 sec.
set(ind0+nr-1) = 1 ;
1043 for (
int i=0; i<nr; i++) {
1044 sol_hom1_hrr.
set(lz, k, j, i) = sol(i) ;
1045 sol_hom1_eta.
set(lz, k, j, i) = sol(i+nr) ;
1046 sol_hom1_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1048 sec.
set(ind0+nr-1) = 0 ;
1049 sec.
set(ind1+nr-1) = 1 ;
1051 for (
int i=0; i<nr; i++) {
1052 sol_hom2_hrr.
set(lz, k, j, i) = sol(i) ;
1053 sol_hom2_eta.
set(lz, k, j, i) = sol(i+nr) ;
1054 sol_hom2_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1056 sec.
set(ind1+nr-1) = 0 ;
1057 sec.
set(ind2+nr-1) = 1 ;
1059 for (
int i=0; i<nr; i++) {
1060 sol_hom3_hrr.
set(lz, k, j, i) = sol(i) ;
1061 sol_hom3_eta.
set(lz, k, j, i) = sol(i+nr) ;
1062 sol_hom3_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1072 if (cedbc) {
int lz = nzm1 ;
1073 if (need_calculation && (par_mat != 0x0)) mat_done.
annule_hard() ;
1074 int nr = mgrid.
get_nr(lz) ;
1078 double alpha = mp_aff->
get_alpha()[lz] ;
1081 for (
int k=0 ; k<np+1 ; k++) {
1082 for (
int j=0 ; j<nt ; j++) {
1085 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
1086 if (need_calculation) {
1091 for (
int lin=0; lin<nr; lin++)
1092 for (
int col=0; col<nr; col++)
1093 ope.
set(lin,col) = - md(lin,col) + 3*ms(lin,col) ;
1094 for (
int lin=0; lin<nr; lin++)
1095 for (
int col=0; col<nr; col++)
1096 ope.
set(lin,col+nr) = -l_q*(l_q+1)*ms(lin,col) ;
1097 for (
int lin=0; lin<nr; lin++)
1098 for (
int col=0; col<nr; col++)
1099 ope.
set(lin,col+2*nr) = 0 ;
1100 for (
int lin=0; lin<nr; lin++)
1101 for (
int col=0; col<nr; col++)
1102 ope.
set(lin+nr,col) = -0.5*ms(lin,col) ;
1103 for (
int lin=0; lin<nr; lin++)
1104 for (
int col=0; col<nr; col++)
1105 ope.
set(lin+nr,col+nr) = -md(lin,col) + 3*ms(lin,col) ;
1106 for (
int lin=0; lin<nr; lin++)
1107 for (
int col=0; col<nr; col++)
1108 ope.
set(lin+nr,col+2*nr) = (2. - l_q*(l_q+1))*ms(lin,col) ;
1109 for (
int lin=0; lin<nr; lin++)
1110 for (
int col=0; col<nr; col++)
1111 ope.
set(lin+2*nr,col) = 0.5*md(lin,col)/double(l_q+1)
1112 - 0.5*double(l_q+4)/double(l_q+1)*ms(lin,col) ;
1113 for (
int lin=0; lin<nr; lin++)
1114 for (
int col=0; col<nr; col++)
1115 ope.
set(lin+2*nr,col+nr) = -2*ms(lin,col) ;
1116 for (
int lin=0; lin<nr; lin++)
1117 for (
int col=0; col<nr; col++)
1118 ope.
set(lin+2*nr,col+2*nr) = -(l_q+2)*md(lin,col)
1119 + l_q*(l_q+2)*ms(lin,col) ;
1121 for (
int col=0; col<3*nr; col++) {
1122 ope.
set(ind0+nr-2, col) = 0 ;
1123 ope.
set(ind0+nr-1, col) = 0 ;
1124 ope.
set(ind1+nr-2, col) = 0 ;
1125 ope.
set(ind1+nr-1, col) = 0 ;
1126 ope.
set(ind2+nr-1, col) = 0 ;
1128 for (
int col=0; col<nr; col++) {
1129 ope.
set(ind0+nr-1, col+ind0) = 1 ;
1130 ope.
set(ind1+nr-1, col+ind1) = 1 ;
1131 ope.
set(ind2+nr-1, col+ind2) = 1 ;
1133 ope.
set(ind0+nr-2, ind0+1) = 1 ;
1134 ope.
set(ind1+nr-2, ind1+2) = 1 ;
1137 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
1140 mat_done.
set(l_q) = 1 ;
1143 const Matrice& oper = (par_mat == 0x0 ? ope :
1149 for (
int lin=0; lin<2*nr; lin++)
1151 for (
int lin=0; lin<nr; lin++)
1152 sec.
set(2*nr+lin) = (*source.get_spectral_va().c_cf)
1156 for (
int lin=0; lin<nr; lin++)
1157 sec.
set(lin) = (*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) ;
1158 for (
int lin=0; lin<nr; lin++)
1159 sec.
set(lin+nr) = -0.5*(*hoverr.get_spectral_va().c_cf)
1162 for (
int lin=0; lin<nr; lin++)
1163 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
1165 + (l_q+2)*(*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) ) ;
1168 for (
int lin=0; lin<nr; lin++)
1169 sec.
set(2*nr+lin) = -0.5/double(l_q+1)*(
1171 + (l_q+2)*(*hoverr.get_spectral_va().c_cf)(lz, k, j, lin) )
1172 + (*source.get_spectral_va().c_cf)(lz, k, j, lin) ;
1175 sec.
set(ind0+nr-2) = 0 ;
1176 sec.
set(ind0+nr-1) = 0 ;
1177 sec.
set(ind1+nr-1) = 0 ;
1178 sec.
set(ind1+nr-2) = 0 ;
1179 sec.
set(ind2+nr-1) = 0 ;
1181 for (
int i=0; i<nr; i++) {
1182 sol_part_hrr.
set(lz, k, j, i) = sol(i) ;
1183 sol_part_eta.
set(lz, k, j, i) = sol(i+nr) ;
1184 sol_part_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1187 sec.
set(ind0+nr-2) = 1 ;
1189 for (
int i=0; i<nr; i++) {
1190 sol_hom1_hrr.
set(lz, k, j, i) = sol(i) ;
1191 sol_hom1_eta.
set(lz, k, j, i) = sol(i+nr) ;
1192 sol_hom1_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1194 sec.
set(ind0+nr-2) = 0 ;
1195 sec.
set(ind1+nr-2) = 1 ;
1197 for (
int i=0; i<nr; i++) {
1198 sol_hom2_hrr.
set(lz, k, j, i) = sol(i) ;
1199 sol_hom2_eta.
set(lz, k, j, i) = sol(i+nr) ;
1200 sol_hom2_w.
set(lz, k, j, i) = sol(i+2*nr) ;
1211 int taille = 3*nz_bc ;
1212 if (cedbc) taille-- ;
1216 Tbl sec_membre(taille) ;
1217 Matrice systeme(taille, taille) ;
1218 int ligne ;
int colonne ;
1221 double chrr = (cedbc ? 0 : par_bc->
get_tbl_mod()(4) ) ;
1222 double dhrr = (cedbc ? 0 : par_bc->
get_tbl_mod()(5) ) ;
1223 double ceta = (cedbc ? 0 : par_bc->
get_tbl_mod()(6) ) ;
1224 double deta = (cedbc ? 0 : par_bc->
get_tbl_mod()(7) ) ;
1225 double cw = (cedbc ? 0 : par_bc->
get_tbl_mod()(8) ) ;
1226 double dw = (cedbc ? 0 : par_bc->
get_tbl_mod()(9) ) ;
1227 Mtbl_cf dhom1_hrr = sol_hom1_hrr ;
1228 Mtbl_cf dhom2_hrr = sol_hom2_hrr ;
1229 Mtbl_cf dhom3_hrr = sol_hom3_hrr ;
1230 Mtbl_cf dpart_hrr = sol_part_hrr ;
1231 Mtbl_cf dhom1_eta = sol_hom1_eta ;
1232 Mtbl_cf dhom2_eta = sol_hom2_eta ;
1233 Mtbl_cf dhom3_eta = sol_hom3_eta ;
1234 Mtbl_cf dpart_eta = sol_part_eta ;
1235 Mtbl_cf dhom1_w = sol_hom1_w ;
1236 Mtbl_cf dhom2_w = sol_hom2_w ;
1237 Mtbl_cf dhom3_w = sol_hom3_w ;
1238 Mtbl_cf dpart_w = sol_part_w ;
1246 Mtbl_cf d2hom1_hrr = dhom1_hrr ;
1247 Mtbl_cf d2hom2_hrr = dhom2_hrr ;
1248 Mtbl_cf d2hom3_hrr = dhom3_hrr;
1249 Mtbl_cf d2part_hrr = dpart_hrr ;
1250 d2hom1_hrr.
dsdx(); d2hom2_hrr.
dsdx(); d2hom3_hrr.
dsdx(); d2part_hrr.
dsdx();
1258 for (
int k=0 ; k<np+1 ; k++)
1259 for (
int j=0 ; j<nt ; j++) {
1261 if ((nullite_plm(j, nt, k, np, base) == 1) && (l_q > 1)) {
1269 int nr = mgrid.
get_nr(1);
1270 double alpha2 = mp_aff->
get_alpha()[1] ;
1273 const Coord& rr = (*mp_aff).r ;
1274 Scalar rrr(*mp_aff); rrr = rr;
1286 sec_membre.
set(ligne) += (*Bbb).val_in_bound_jk(1,j,k);
1293 systeme.
set(ligne, colonne) =
1295 systeme.
set(ligne, colonne+1) =
1297 systeme.
set(ligne, colonne+2) =
1309 systeme.
set(ligne, colonne) =
1311 systeme.
set(ligne, colonne+1) =
1313 systeme.
set(ligne, colonne+2) =
1319 systeme.
set(ligne, colonne) =
1321 systeme.
set(ligne, colonne+1) =
1323 systeme.
set(ligne, colonne+2) =
1329 systeme.
set(ligne, colonne) =
1331 systeme.
set(ligne, colonne+1) =
1333 systeme.
set(ligne, colonne+2) =
1341 for (
int zone=2 ; zone<nz_bc ; zone++) {
1342 nr = mgrid.
get_nr(zone) ;
1346 systeme.
set(ligne, colonne) =
1348 systeme.
set(ligne, colonne+1) =
1350 systeme.
set(ligne, colonne+2) =
1356 systeme.
set(ligne, colonne) =
1358 systeme.
set(ligne, colonne+1) =
1360 systeme.
set(ligne, colonne+2) =
1366 systeme.
set(ligne, colonne) =
1368 systeme.
set(ligne, colonne+1) =
1370 systeme.
set(ligne, colonne+2) =
1377 systeme.
set(ligne, colonne) =
1379 systeme.
set(ligne, colonne+1) =
1381 systeme.
set(ligne, colonne+2) =
1387 systeme.
set(ligne, colonne) =
1389 systeme.
set(ligne, colonne+1) =
1391 systeme.
set(ligne, colonne+2) =
1397 systeme.
set(ligne, colonne) =
1399 systeme.
set(ligne, colonne+1) =
1401 systeme.
set(ligne, colonne+2) =
1410 nr = mgrid.
get_nr(nz_bc) ;
1411 double alpha = mp_aff->
get_alpha()[nz_bc] ;
1415 systeme.
set(ligne, colonne) =
1417 systeme.
set(ligne, colonne+1) =
1419 if (!cedbc) systeme.
set(ligne, colonne+2) =
1425 systeme.
set(ligne, colonne) =
1427 systeme.
set(ligne, colonne+1) =
1429 if (!cedbc) systeme.
set(ligne, colonne+2) =
1435 systeme.
set(ligne, colonne) =
1437 systeme.
set(ligne, colonne+1) =
1439 if (!cedbc) systeme.
set(ligne, colonne+2) =
1446 systeme.
set(ligne, colonne) =
1453 systeme.
set(ligne, colonne+1) =
1460 systeme.
set(ligne, colonne+2) =
1494 for (
int i=0 ; i<nr ; i++) {
1495 mhrr.
set(0, k, j, i) = 0 ;
1496 meta.
set(0, k, j, i) = 0 ;
1497 mw.
set(0, k, j, i) = 0 ;
1499 for (
int zone=1 ; zone<=n_shell ; zone++) {
1500 nr = mgrid.
get_nr(zone) ;
1501 for (
int i=0 ; i<nr ; i++) {
1502 mhrr.
set(zone, k, j, i) = sol_part_hrr(zone, k, j, i)
1503 + facteur(conte)*sol_hom1_hrr(zone, k, j, i)
1504 + facteur(conte+1)*sol_hom2_hrr(zone, k, j, i)
1505 + facteur(conte+2)*sol_hom3_hrr(zone, k, j, i) ;
1507 meta.
set(zone, k, j, i) = sol_part_eta(zone, k, j, i)
1508 + facteur(conte)*sol_hom1_eta(zone, k, j, i)
1509 + facteur(conte+1)*sol_hom2_eta(zone, k, j, i)
1510 + facteur(conte+2)*sol_hom3_eta(zone, k, j, i) ;
1512 mw.
set(zone, k, j, i) = sol_part_w(zone, k, j, i)
1513 + facteur(conte)*sol_hom1_w(zone, k, j, i)
1514 + facteur(conte+1)*sol_hom2_w(zone, k, j, i)
1515 + facteur(conte+2)*sol_hom3_w(zone, k, j, i) ;
1520 nr = mgrid.
get_nr(nzm1) ;
1521 for (
int i=0 ; i<nr ; i++) {
1522 mhrr.
set(nzm1, k, j, i) = sol_part_hrr(nzm1, k, j, i)
1523 + facteur(conte)*sol_hom1_hrr(nzm1, k, j, i)
1524 + facteur(conte+1)*sol_hom2_hrr(nzm1, k, j, i) ;
1526 meta.
set(nzm1, k, j, i) = sol_part_eta(nzm1, k, j, i)
1527 + facteur(conte)*sol_hom1_eta(nzm1, k, j, i)
1528 + facteur(conte+1)*sol_hom2_eta(nzm1, k, j, i) ;
1530 mw.
set(nzm1, k, j, i) = sol_part_w(nzm1, k, j, i)
1531 + facteur(conte)*sol_hom1_w(nzm1, k, j, i)
1532 + facteur(conte+1)*sol_hom2_w(nzm1, k, j, i) ;
1562 void Sym_tensor_trans::sol_Dirac_l01_2(
const Scalar& hh,
Scalar& hrr,
Scalar& tilde_eta,
1572 assert(mp_aff != 0x0) ;
1585 int nt = mgrid.
get_nt(0) ;
1586 int np = mgrid.
get_np(0) ;
1588 Scalar source = hh ;
1590 Scalar source_coq = hh ;
1592 source_coq.set_spectral_va().ylm() ;
1593 Base_val base = source.get_spectral_base() ;
1595 int lmax = base.give_lmax(mgrid, 0) + 1;
1602 Mtbl_cf sol_part_hrr(mgrid, base) ; sol_part_hrr.annule_hard() ;
1603 Mtbl_cf sol_part_eta(mgrid, base) ; sol_part_eta.annule_hard() ;
1604 Mtbl_cf sol_hom1_hrr(mgrid, base) ; sol_hom1_hrr.annule_hard() ;
1605 Mtbl_cf sol_hom1_eta(mgrid, base) ; sol_hom1_eta.annule_hard() ;
1606 Mtbl_cf sol_hom2_hrr(mgrid, base) ; sol_hom2_hrr.annule_hard() ;
1607 Mtbl_cf sol_hom2_eta(mgrid, base) ; sol_hom2_eta.annule_hard() ;
1609 bool need_calculation = true ;
1614 int l_q, m_q, base_r ;
1615 Itbl mat_done(lmax) ;
1621 int nr = mgrid.
get_nr(lz) ;
1622 double alpha = mp_aff->
get_alpha()[lz] ;
1623 Matrice ope(2*nr, 2*nr) ;
1624 if (need_calculation && (par_mat != 0x0)) mat_done.annule_hard() ;
1626 for (
int k=0 ; k<np+1 ; k++) {
1627 for (
int j=0 ; j<nt ; j++) {
1629 base.give_quant_numbers(lz, k, j, m_q, l_q, base_r) ;
1630 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q < 2)) {
1631 if (need_calculation) {
1632 ope.set_etat_qcq() ;
1633 Diff_dsdx od(base_r, nr) ;
const Matrice& md = od.get_matrice() ;
1634 Diff_sx os(base_r, nr) ;
const Matrice& ms = os.get_matrice() ;
1636 for (
int lin=0; lin<nr; lin++)
1637 for (
int col=0; col<nr; col++)
1638 ope.set(lin,col) = md(lin,col) + 3*ms(lin,col) ;
1639 for (
int lin=0; lin<nr; lin++)
1640 for (
int col=0; col<nr; col++)
1641 ope.set(lin,col+nr) = -l_q*(l_q+1)*ms(lin,col) ;
1642 for (
int lin=0; lin<nr; lin++)
1643 for (
int col=0; col<nr; col++)
1644 ope.set(lin+nr,col) = -0.5*ms(lin,col) ;
1645 for (
int lin=0; lin<nr; lin++)
1646 for (
int col=0; col<nr; col++)
1647 ope.set(lin+nr,col+nr) = md(lin,col) + 3*ms(lin, col);
1650 for (
int col=0; col<2*nr; col++) {
1651 ope.set(nr-1, col) = 0 ;
1652 ope.set(2*nr-1, col) = 0 ;
1656 for (
int col=0; col<nr; col++) {
1657 ope.set(nr-1, col) = pari ;
1658 ope.set(2*nr-1, col+nr) = pari ;
1663 ope.set(nr-1, nr-1) = 1 ;
1664 ope.set(2*nr-1, 2*nr-1) = 1 ;
1668 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
1669 Matrice* pope =
new Matrice(ope) ;
1671 mat_done.set(l_q) = 1 ;
1675 const Matrice& oper = (par_mat == 0x0 ? ope :
1678 sec.set_etat_qcq() ;
1679 for (
int lin=0; lin<nr; lin++)
1680 sec.set(lin) = (*source.get_spectral_va().c_cf)(lz, k, j, lin) ;
1681 for (
int lin=0; lin<nr; lin++)
1682 sec.set(nr+lin) = -0.5*(*source.get_spectral_va().c_cf)
1688 for (
int col=0; col<nr; col++) {
1690 (*source_coq.get_spectral_va().c_cf)(lz, k, j, col) ;
1693 sec.set(nr-1) = h0 / 3. ;
1695 sec.set(2*nr-1) = 0 ;
1696 Tbl sol = oper.inverse(sec) ;
1697 for (
int i=0; i<nr; i++) {
1698 sol_part_hrr.set(lz, k, j, i) = sol(i) ;
1699 sol_part_eta.set(lz, k, j, i) = sol(i+nr) ;
1711 for (
int lz=1; lz<nz-1; lz++) {
1712 if (need_calculation && (par_mat != 0x0)) mat_done.annule_hard() ;
1713 int nr = mgrid.
get_nr(lz) ;
1716 assert(mgrid.
get_nt(lz) == nt) ;
1717 assert(mgrid.
get_np(lz) == np) ;
1718 double alpha = mp_aff->
get_alpha()[lz] ;
1719 double ech = mp_aff->
get_beta()[lz] / alpha ;
1720 Matrice ope(2*nr, 2*nr) ;
1722 for (
int k=0 ; k<np+1 ; k++) {
1723 for (
int j=0 ; j<nt ; j++) {
1725 base.give_quant_numbers(lz, k, j, m_q, l_q, base_r) ;
1726 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q < 2)) {
1727 if (need_calculation) {
1728 ope.set_etat_qcq() ;
1729 Diff_xdsdx oxd(base_r, nr) ;
const Matrice& mxd = oxd.get_matrice() ;
1730 Diff_dsdx od(base_r, nr) ;
const Matrice& md = od.get_matrice() ;
1731 Diff_id oid(base_r, nr) ;
const Matrice& mid = oid.get_matrice() ;
1733 for (
int lin=0; lin<nr; lin++)
1734 for (
int col=0; col<nr; col++)
1735 ope.set(lin,col) = mxd(lin,col) + ech*md(lin,col)
1737 for (
int lin=0; lin<nr; lin++)
1738 for (
int col=0; col<nr; col++)
1739 ope.set(lin,col+nr) = -l_q*(l_q+1)*mid(lin,col) ;
1740 for (
int lin=0; lin<nr; lin++)
1741 for (
int col=0; col<nr; col++)
1742 ope.set(lin+nr,col) = -0.5*mid(lin,col) ;
1743 for (
int lin=0; lin<nr; lin++)
1744 for (
int col=0; col<nr; col++)
1745 ope.set(lin+nr,col+nr) = mxd(lin,col) + ech*md(lin,col)
1748 for (
int col=0; col<2*nr; col++) {
1749 ope.set(ind0+nr-1, col) = 0 ;
1750 ope.set(ind1+nr-1, col) = 0 ;
1752 ope.set(ind0+nr-1, ind0) = 1 ;
1753 ope.set(ind1+nr-1, ind1) = 1 ;
1756 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
1757 Matrice* pope =
new Matrice(ope) ;
1759 mat_done.set(l_q) = 1 ;
1762 const Matrice& oper = (par_mat == 0x0 ? ope :
1765 sec.set_etat_qcq() ;
1766 for (
int lin=0; lin<nr; lin++)
1767 sec.set(lin) = (*source_coq.get_spectral_va().c_cf)
1769 for (
int lin=0; lin<nr; lin++)
1770 sec.set(nr+lin) = -0.5*(*source_coq.get_spectral_va().c_cf)
1772 sec.set(ind0+nr-1) = 0 ;
1773 sec.set(ind1+nr-1) = 0 ;
1774 Tbl sol = oper.inverse(sec) ;
1776 for (
int i=0; i<nr; i++) {
1777 sol_part_hrr.set(lz, k, j, i) = sol(i) ;
1778 sol_part_eta.set(lz, k, j, i) = sol(i+nr) ;
1781 sec.set(ind0+nr-1) = 1 ;
1782 sol = oper.inverse(sec) ;
1783 for (
int i=0; i<nr; i++) {
1784 sol_hom1_hrr.set(lz, k, j, i) = sol(i) ;
1785 sol_hom1_eta.set(lz, k, j, i) = sol(i+nr) ;
1787 sec.set(ind0+nr-1) = 0 ;
1788 sec.set(ind1+nr-1) = 1 ;
1789 sol = oper.inverse(sec) ;
1790 for (
int i=0; i<nr; i++) {
1791 sol_hom2_hrr.set(lz, k, j, i) = sol(i) ;
1792 sol_hom2_eta.set(lz, k, j, i) = sol(i+nr) ;
1803 if (need_calculation && (par_mat != 0x0)) mat_done.annule_hard() ;
1804 int nr = mgrid.
get_nr(lz) ;
1807 assert(mgrid.
get_nt(lz) == nt) ;
1808 assert(mgrid.
get_np(lz) == np) ;
1809 double alpha = mp_aff->
get_alpha()[lz] ;
1810 Matrice ope(2*nr, 2*nr) ;
1812 for (
int k=0 ; k<np+1 ; k++) {
1813 for (
int j=0 ; j<nt ; j++) {
1815 base.give_quant_numbers(lz, k, j, m_q, l_q, base_r) ;
1816 if ( (nullite_plm(j, nt, k, np, base) == 1) && (l_q < 2)) {
1817 if (need_calculation) {
1818 ope.set_etat_qcq() ;
1819 Diff_dsdx od(base_r, nr) ;
const Matrice& md = od.get_matrice() ;
1820 Diff_sx os(base_r, nr) ;
const Matrice& ms = os.get_matrice() ;
1822 for (
int lin=0; lin<nr; lin++)
1823 for (
int col=0; col<nr; col++)
1824 ope.set(lin,col) = - md(lin,col) + 3*ms(lin,col) ;
1825 for (
int lin=0; lin<nr; lin++)
1826 for (
int col=0; col<nr; col++)
1827 ope.set(lin,col+nr) = -l_q*(l_q+1)*ms(lin,col) ;
1828 for (
int lin=0; lin<nr; lin++)
1829 for (
int col=0; col<nr; col++)
1830 ope.set(lin+nr,col) = -0.5*ms(lin,col) ;
1831 for (
int lin=0; lin<nr; lin++)
1832 for (
int col=0; col<nr; col++)
1833 ope.set(lin+nr,col+nr) = -md(lin,col) + 3*ms(lin, col) ;
1836 for (
int col=0; col<2*nr; col++) {
1837 ope.set(ind0+nr-2, col) = 0 ;
1838 ope.set(ind0+nr-1, col) = 0 ;
1839 ope.set(ind1+nr-2, col) = 0 ;
1840 ope.set(ind1+nr-1, col) = 0 ;
1842 for (
int col=0; col<nr; col++) {
1843 ope.set(ind0+nr-1, col+ind0) = 1 ;
1844 ope.set(ind1+nr-1, col+ind1) = 1 ;
1846 ope.set(ind0+nr-2, ind0+1) = 1 ;
1847 ope.set(ind1+nr-2, ind1+1) = 1 ;
1850 if ((par_mat != 0x0) && (mat_done(l_q) == 0)) {
1851 Matrice* pope =
new Matrice(ope) ;
1853 mat_done.set(l_q) = 1 ;
1856 const Matrice& oper = (par_mat == 0x0 ? ope :
1859 sec.set_etat_qcq() ;
1860 for (
int lin=0; lin<nr; lin++)
1861 sec.set(lin) = (*source.get_spectral_va().c_cf)
1863 for (
int lin=0; lin<nr; lin++)
1864 sec.set(nr+lin) = -0.5*(*source.get_spectral_va().c_cf)
1866 sec.set(ind0+nr-2) = 0 ;
1867 sec.set(ind0+nr-1) = 0 ;
1868 sec.set(ind1+nr-2) = 0 ;
1869 sec.set(ind1+nr-1) = 0 ;
1870 Tbl sol = oper.inverse(sec) ;
1871 for (
int i=0; i<nr; i++) {
1872 sol_part_hrr.set(lz, k, j, i) = sol(i) ;
1873 sol_part_eta.set(lz, k, j, i) = sol(i+nr) ;
1876 sec.set(ind0+nr-2) = 1 ;
1877 sol = oper.inverse(sec) ;
1878 for (
int i=0; i<nr; i++) {
1879 sol_hom1_hrr.set(lz, k, j, i) = sol(i) ;
1880 sol_hom1_eta.set(lz, k, j, i) = sol(i+nr) ;
1882 sec.set(ind0+nr-2) = 0 ;
1883 sec.set(ind1+nr-2) = 1 ;
1884 sol = oper.inverse(sec) ;
1885 for (
int i=0; i<nr; i++) {
1886 sol_hom2_hrr.set(lz, k, j, i) = sol(i) ;
1887 sol_hom2_eta.set(lz, k, j, i) = sol(i+nr) ;
1894 int taille = 2*(nz-1) ;
1898 Tbl sec_membre(taille) ;
1899 Matrice systeme(taille, taille) ;
1900 int ligne ;
int colonne ;
1904 for (
int k=0 ; k<np+1 ; k++)
1905 for (
int j=0 ; j<nt ; j++) {
1906 base.give_quant_numbers(0, k, j, m_q, l_q, base_r) ;
1907 if ((nullite_plm(j, nt, k, np, base) == 1) && (l_q < 2)) {
1910 systeme.annule_hard() ;
1911 sec_membre.annule_hard() ;
1914 int nr = mgrid.
get_nr(0) ;
1916 sec_membre.set(ligne) = -sol_part_hrr.val_out_bound_jk(0, j, k) ;
1919 sec_membre.set(ligne) = -sol_part_eta.val_out_bound_jk(0, j, k) ;
1922 for (
int zone=1 ; zone<nz-1 ; zone++) {
1923 nr = mgrid.
get_nr(zone) ;
1927 systeme.set(ligne, colonne) =
1928 - sol_hom1_hrr.val_in_bound_jk(zone, j, k) ;
1929 systeme.set(ligne, colonne+1) =
1930 - sol_hom2_hrr.val_in_bound_jk(zone, j, k) ;
1932 sec_membre.set(ligne) += sol_part_hrr.val_in_bound_jk(zone, j, k) ;
1935 systeme.set(ligne, colonne) =
1936 - sol_hom1_eta.val_in_bound_jk(zone, j, k) ;
1937 systeme.set(ligne, colonne+1) =
1938 - sol_hom2_eta.val_in_bound_jk(zone, j, k) ;
1940 sec_membre.set(ligne) += sol_part_eta.val_in_bound_jk(zone, j, k) ;
1944 systeme.set(ligne, colonne) =
1945 sol_hom1_hrr.val_out_bound_jk(zone, j, k) ;
1946 systeme.set(ligne, colonne+1) =
1947 sol_hom2_hrr.val_out_bound_jk(zone, j, k) ;
1949 sec_membre.set(ligne) -= sol_part_hrr.val_out_bound_jk(zone, j, k) ;
1952 systeme.set(ligne, colonne) =
1953 sol_hom1_eta.val_out_bound_jk(zone, j, k) ;
1954 systeme.set(ligne, colonne+1) =
1955 sol_hom2_eta.val_out_bound_jk(zone, j, k) ;
1957 sec_membre.set(ligne) -= sol_part_eta.val_out_bound_jk(zone, j, k) ;
1963 nr = mgrid.
get_nr(nz-1) ;
1967 systeme.set(ligne, colonne) =
1968 - sol_hom1_hrr.val_in_bound_jk(nz-1, j, k) ;
1969 systeme.set(ligne, colonne+1) =
1970 - sol_hom2_hrr.val_in_bound_jk(nz-1, j, k) ;
1972 sec_membre.set(ligne) += sol_part_hrr.val_in_bound_jk(nz-1, j, k) ;
1975 systeme.set(ligne, colonne) =
1976 - sol_hom1_eta.val_in_bound_jk(nz-1, j, k) ;
1977 systeme.set(ligne, colonne+1) =
1978 - sol_hom2_eta.val_in_bound_jk(nz-1, j, k) ;
1980 sec_membre.set(ligne) += sol_part_eta.val_in_bound_jk(nz-1, j, k) ;
1986 Tbl facteur = systeme.inverse(sec_membre) ;
1992 for (
int i=0 ; i<nr ; i++) {
1993 mhrr.set(0, k, j, i) = sol_part_hrr(0, k, j, i) ;
1994 meta.set(0, k, j, i) = sol_part_eta(0, k, j, i) ;
1996 for (
int zone=1 ; zone<nz-1 ; zone++) {
1997 nr = mgrid.
get_nr(zone) ;
1998 for (
int i=0 ; i<nr ; i++) {
1999 mhrr.set(zone, k, j, i) = sol_part_hrr(zone, k, j, i)
2000 + facteur(conte)*sol_hom1_hrr(zone, k, j, i)
2001 + facteur(conte+1)*sol_hom2_hrr(zone, k, j, i) ;
2003 meta.set(zone, k, j, i) = sol_part_eta(zone, k, j, i)
2004 + facteur(conte)*sol_hom1_eta(zone, k, j, i)
2005 + facteur(conte+1)*sol_hom2_eta(zone, k, j, i) ;
2009 nr = mgrid.
get_nr(nz-1) ;
2010 for (
int i=0 ; i<nr ; i++) {
2011 mhrr.set(nz-1, k, j, i) = sol_part_hrr(nz-1, k, j, i)
2012 + facteur(conte)*sol_hom1_hrr(nz-1, k, j, i)
2013 + facteur(conte+1)*sol_hom2_hrr(nz-1, k, j, i) ;
2015 meta.set(nz-1, k, j, i) = sol_part_eta(nz-1, k, j, i)
2016 + facteur(conte)*sol_hom1_eta(nz-1, k, j, i)
2017 + facteur(conte+1)*sol_hom2_eta(nz-1, k, j, i) ;
int get_type_p() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the transformatio...
const Base_val & get_spectral_base() const
Returns the spectral bases of the Valeur va.
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
void add_tbl_mod(Tbl &ti, int position=0)
Adds the address of a new modifiable Tbl to the list.
void annule_domain(int l)
Sets the Tensor to zero in a given domain.
void annule_l(int l_min, int l_max, bool ylm_output=false)
Sets all the multipolar components between l_min and l_max to zero.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
const double * get_alpha() const
Returns the pointer on the array alpha.
int & set(int i)
Read/write of a particular element (index i ) (1D case)
void mult_r()
Multiplication by r everywhere; dzpuis is not changed.
int give_lmax(const Mg3d &mgrid, int lz) const
Returns the highest multipole for a given grid.
void ylm_i()
Inverse of ylm()
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void set_etat_cf_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl_cf c_c...
int get_n_matrice_mod() const
Returns the number of modifiable Matrice 's addresses in the list.
void give_quant_numbers(int, int, int, int &, int &, int &) const
Computes the various quantum numbers and 1d radial base.
void set_lu() const
Calculate the LU-representation, assuming the band-storage has been done.
Tbl & set(int l)
Read/write of the Tbl containing the coefficients in a given domain.
Tbl inverse(const Tbl &sec_membre) const
Solves the linear system represented by the matrix.
void ylm()
Computes the coefficients of *this.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
void annule_hard()
Sets the Itbl to zero in a hard way.
double & set(int i)
Read/write of a particular element (index i) (1D case)
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
Tensor field of valence 0 (or component of a tensorial field).
void coef_i() const
Computes the physical value of *this.
void add_matrice_mod(Matrice &ti, int position=0)
Adds the address of a new modifiable Matrice to the list.
void sol_Dirac_Abound(const Scalar &aaa, Scalar &tilde_mu, Scalar &x_new, Scalar bound_mu, const Param *par_bc)
Same resolution as sol_Dirac_A, but with inner boundary conditions added.
int get_type_t() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the equatorial pl...
Basic integer array class.
virtual void std_spectral_base()
Sets the spectral bases of the Valeur va to the standard ones for a scalar field. ...
Class for the elementary differential operator (see the base class Diff ).
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void clean_all()
Deletes all the objects stored as modifiables, i.e.
double val_out_bound_jk(int l, int j, int k) const
Computes the angular coefficient of index j,k of the field represented by *this at by means of the s...
void add_itbl_mod(Itbl &ti, int position=0)
Adds the address of a new modifiable Itbl to the list.
void annule_hard()
Sets the Scalar to zero in a hard way.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Class for the elementary differential operator Identity (see the base class Diff ).
double val_in_bound_jk(int l, int j, int k) const
Computes the angular coefficient of index j,k of the field represented by *this at by means of the s...
int get_n_int() const
Returns the number of stored int 's addresses.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
void sol_Dirac_l01(const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Param *par_mat) const
Solves the same system as Sym_tensor_trans::sol_Dirac_tilde_B but only for .
#define R_CHEBP
base de Cheb. paire (rare) seulement
int get_n_itbl_mod() const
Returns the number of modifiable Itbl 's addresses in the list.
const double * get_beta() const
Returns the pointer on the array beta.
Mtbl * c
Values of the function at the points of the multi-grid.
Tbl & get_tbl_mod(int position=0) const
Returns the reference of a modifiable Tbl stored in the list.
void sol_Dirac_BC2(const Scalar &bb, const Scalar &cc, const Scalar &hh, Scalar &hrr, Scalar &tilde_eta, Scalar &ww, Scalar bound_eta, double dir, double neum, double rhor, Param *par_bc, Param *par_mat)
Same resolution as sol_Dirac_tilde_B, but with inner boundary conditions added.
int get_nzone() const
Returns the number of domains.
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Itbl & get_itbl_mod(int position=0) const
Returns the reference of a stored modifiable Itbl .
void annule_hard()
Sets the logical state to ETATQCQ (undefined state).
int get_n_int_mod() const
Returns the number of modifiable int 's addresses in the list.
double & set(int j, int i)
Read/write of a particuliar element.
Active physical coordinates and mapping derivatives.
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void set_spectral_base(const Base_val &)
Sets the spectral bases of the Valeur va
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
int get_n_tbl_mod() const
Returns the number of modifiable Tbl 's addresses in the list.
Bases of the spectral expansions.
void annule_hard()
Sets the Mtbl_cf to zero in a hard way.
Class for the elementary differential operator (see the base class Diff ).
void mult_x()
The basis is transformed as with a multiplication by .
Coefficients storage for the multi-domain spectral method.
const Scalar & dsdr() const
Returns of *this .
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Matrice & get_matrice_mod(int position=0) const
Returns the reference of a modifiable Matrice stored in the list.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Valeur & set_spectral_va()
Returns va (read/write version)
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
Class for the elementary differential operator division by (see the base class Diff )...
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
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...
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
void div_r_dzpuis(int ced_mult_r)
Division by r everywhere but with the output flag dzpuis set to ced_mult_r .
void annule_hard()
Sets the Tbl to zero in a hard way.
virtual const Matrice & get_matrice() const
Returns the matrix associated with the operator.
void mult_r_dzpuis(int ced_mult_r)
Multiplication by r everywhere but with the output flag dzpuis set to ced_mult_r ...
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
const Valeur & get_spectral_va() const
Returns va (read only version)