KADATH
domain_nucleus_affecte_tau.cpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "headcpp.hpp"
21 
22 #include "spheric.hpp"
23 #include "scalar.hpp"
24 #include "tensor_impl.hpp"
25 #include "tensor.hpp"
26 namespace Kadath {
27 void Domain_nucleus::affecte_tau_val_domain_vr (Val_domain& so, const Array<double>& values, int& conte) const {
28 
29  so.allocate_coef() ;
30  *so.cf = 0. ;
31  Index pos_cf (nbr_coefs) ;
32 
33  // Positions of the Galerkin basis
34  Index pos_gal_t (nbr_coefs) ;
35  Index pos_gal_r (nbr_coefs) ;
36  Index pos_gal_rt (nbr_coefs) ;
37  double fact_t, fact_r, fact_rt ;
38 
39 
40  // Case k=0 ; j<=1
41  {
42  pos_cf.set(2) = 0 ;
43  int baset = (*so.get_base().bases_1d[1]) (0) ;
44  assert (baset==COS_EVEN) ;
45  for (int j=0 ; j<2 ; j++) {
46  int baser = (*so.get_base().bases_1d[0]) (j, 0) ;
47  pos_cf.set(1) = j ;
48  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
49  for (int i=0 ; i<nbr_coefs(0)-1 ; i++) {
50  pos_cf.set(0) = i ;
51  so.cf->set(pos_cf) += values(conte) ;
52  conte ++ ;
53  }
54  }
55  }
56 
57  // Case k=0 ; j!=0
58  {
59  pos_cf.set(2) = 0 ;
60  int baset = (*so.get_base().bases_1d[1]) (0) ;
61  assert (baset==COS_EVEN) ;
62  for (int j=2 ; j<nbr_coefs(1) ; j++) {
63  int baser = (*so.get_base().bases_1d[0]) (j, 0) ;
64  pos_cf.set(1) = j ;
65  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
66  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
67  pos_cf.set(0) = i ;
68  pos_gal_r = pos_cf ;
69  pos_gal_r.set(0) = 0 ;
70  switch (baser) {
71  case CHEB_ODD :
72  fact_r = - (2*i+1) * pow(-1, i) ;
73  break ;
74  case LEG_ODD : {
75  fact_r = -1. ;
76  for (int t=0 ; t<i ; t++)
77  fact_r *= -double(2*t+3)/double(2*t+2) ;
78  }
79  break ;
80  default :
81  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_cart" << endl ;
82  abort() ;
83  }
84  so.cf->set(pos_cf) += values(conte) ;
85  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
86  conte ++ ;
87  }
88  }
89  }
90 
91 
92 
93  // Next ones
94  for (int k=2 ; k<nbr_coefs(2)-1 ; k++) {
95 
96 
97  int mquant = (k%2==0) ? int(k/2) : int((k-1)/2) ;
98  pos_cf.set(2) = k ;
99  int baset = (*so.get_base().bases_1d[1]) (k) ;
100 
101  if (mquant%2==0) {
102  assert (baset=COS_EVEN) ;
103  for (int j=1 ; j<nbr_coefs(1) ; j++) {
104  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
105  pos_cf.set(1) = j ;
106  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
107  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
108  pos_cf.set(0) = i ;
109  pos_gal_r = pos_cf ;
110  pos_gal_r.set(0) = 0 ;
111  pos_gal_t = pos_cf ;
112  pos_gal_t.set(1) = 0 ;
113  pos_gal_rt = pos_cf ;
114  pos_gal_rt.set(0) = 0 ;
115  pos_gal_rt.set(1) = 0 ;
116  switch (baser) {
117  case CHEB_ODD :
118  fact_r = -pow(-1, i)*(2*i+1) ;
119  fact_t = -1. ;
120  fact_rt = pow(-1, i)*(2*i+1) ;
121  break ;
122  case LEG_ODD : {
123  double l0 = 1 ;
124  for (int t=0 ; t<i ; t++)
125  l0 *= -double(2*t+3)/double(2*t+2) ;
126  fact_r = - l0 ;
127  fact_t = -1. ;
128  fact_rt = l0 ;
129  }
130  break ;
131  default :
132  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_cart" << endl ;
133  abort() ;
134  }
135 
136  so.cf->set(pos_cf) += values(conte) ;
137  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
138  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
139  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
140  conte ++ ;
141  }
142  }
143  }
144 
145  if (mquant%2==1) {
146  assert (baset=SIN_ODD) ;
147  for (int j=0; j<nbr_coefs(1)-1 ; j++) {
148  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
149  pos_cf.set(1) = j ;
150  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
151  for (int i=1 ; i<nbr_coefs(0) ; i++) {
152  pos_cf.set(0) = i ;
153  pos_gal_r = pos_cf ;
154  pos_gal_r.set(0) = 0 ;
155  switch (baser) {
156  case CHEB_EVEN :
157  fact_r = - pow(-1, i) ;
158  break ;
159  case LEG_EVEN : {
160  fact_r = -1. ;
161  for (int t=0 ; t<i ; t++)
162  fact_r *= -double(2*t+1)/double(2*t+2) ;
163  }
164  break ;
165  default :
166  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vr" << endl ;
167  abort() ;
168  }
169 
170  so.cf->set(pos_cf) += values(conte) ;
171  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
172  conte ++ ;
173  }
174  }
175  }
176  }
177 }
178 
179 
180 void Domain_nucleus::affecte_tau_val_domain_vt (Val_domain& so, const Array<double>& values, int& conte) const {
181 
182  so.allocate_coef() ;
183  *so.cf = 0. ;
184  Index pos_cf (nbr_coefs) ;
185 
186  // Positions of the Galerkin basis
187  Index pos_gal_t (nbr_coefs) ;
188  Index pos_gal_r (nbr_coefs) ;
189  Index pos_gal_rt (nbr_coefs) ;
190  double fact_t, fact_r, fact_rt ;
191 
192 
193  // Case k=0 ; j>1
194  {
195  pos_cf.set(2) = 0 ;
196  int baset = (*so.get_base().bases_1d[1]) (0) ;
197  assert (baset==SIN_EVEN) ;
198  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
199  int baser = (*so.get_base().bases_1d[0]) (j, 0) ;
200  pos_cf.set(1) = j ;
201  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
202  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
203  pos_cf.set(0) = i ;
204  pos_gal_r = pos_cf ;
205  pos_gal_r.set(0) = 0 ;
206  switch (baser) {
207  case CHEB_ODD :
208  fact_r = - (2*i+1) * pow(-1, i) ;
209  break ;
210  case LEG_ODD : {
211  fact_r = -1. ;
212  for (int t=0 ; t<i ; t++)
213  fact_r *= -double(2*t+3)/double(2*t+2) ;
214  }
215  break ;
216  default :
217  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vt" << endl ;
218  abort() ;
219  }
220  so.cf->set(pos_cf) += values(conte) ;
221  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
222  conte ++ ;
223  }
224  }
225  }
226 
227 
228  // Case k==2 ; j==0
229  if (nbr_coefs(2)-1>2)
230  {
231  pos_cf.set(2) = 2 ;
232  int baset = (*so.get_base().bases_1d[1]) (2) ;
233  assert (baset==COS_ODD) ;
234  int baser = (*so.get_base().bases_1d[0]) (0, 2) ;
235  pos_cf.set(1) = 0 ;
236  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
237  for (int i=0 ; i<nbr_coefs(0) ; i++) {
238  pos_cf.set(0) = i ;
239  so.cf->set(pos_cf) += values(conte) ;
240  conte ++ ;
241  }
242  }
243 
244  // Case k==2 ; j!=0
245  if (nbr_coefs(2)-1>2)
246  {
247  pos_cf.set(2) = 2 ;
248  int baset = (*so.get_base().bases_1d[1]) (2) ;
249  assert (baset=COS_ODD) ;
250  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
251  int baser = (*so.get_base().bases_1d[0]) (j, 2) ;
252  pos_cf.set(1) = j ;
253  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
254  for (int i=1 ; i<nbr_coefs(0) ; i++) {
255  pos_cf.set(0) = i ;
256  pos_gal_r = pos_cf ;
257  pos_gal_r.set(0) = 0 ;
258  switch (baser) {
259  case CHEB_EVEN :
260  fact_r = - pow(-1, i) ;
261  break ;
262  case LEG_EVEN : {
263  fact_r = -1. ;
264  for (int t=0 ; t<i ; t++)
265  fact_r *= -double(2*t+1)/double(2*t+2) ;
266  }
267  break ;
268  default :
269  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vt" << endl ;
270  abort() ;
271  }
272 
273  so.cf->set(pos_cf) += values(conte) ;
274  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
275  conte ++ ;
276  }
277  }
278  }
279 
280 
281  // Case k==3 ; j==0
282  if (nbr_coefs(2)-1>3)
283  {
284  pos_cf.set(2) = 3 ;
285  int baset = (*so.get_base().bases_1d[1]) (3) ;
286  assert (baset==COS_ODD) ;
287  int baser = (*so.get_base().bases_1d[0]) (0, 3) ;
288  pos_cf.set(1) = 0 ;
289  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
290  for (int i=0 ; i<nbr_coefs(0) ; i++) {
291  pos_cf.set(0) = i ;
292  so.cf->set(pos_cf) += values(conte) ;
293  conte ++ ;
294  }
295  }
296 
297  // Case k==3 ; j!=0
298  if (nbr_coefs(2)-1>3)
299  {
300  pos_cf.set(2) = 3 ;
301  int baset = (*so.get_base().bases_1d[1]) (3) ;
302  assert (baset=COS_ODD) ;
303  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
304  int baser = (*so.get_base().bases_1d[0]) (j, 3) ;
305  pos_cf.set(1) = j ;
306  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
307  for (int i=1 ; i<nbr_coefs(0) ; i++) {
308  pos_cf.set(0) = i ;
309  pos_gal_r = pos_cf ;
310  pos_gal_r.set(0) = 0 ;
311  switch (baser) {
312  case CHEB_EVEN :
313  fact_r = - pow(-1, i) ;
314  break ;
315  case LEG_EVEN : {
316  fact_r = -1. ;
317  for (int t=0 ; t<i ; t++)
318  fact_r *= -double(2*t+1)/double(2*t+2) ;
319  }
320  break ;
321  default :
322  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vt" << endl ;
323  abort() ;
324  }
325 
326  so.cf->set(pos_cf) += values(conte) ;
327  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
328  conte ++ ;
329  }
330  }
331  }
332 
333 
334 
335  // Next ones
336  for (int k=4 ; k<nbr_coefs(2)-1 ; k++) {
337 
338  int mquant = (k%2==0) ? int(k/2) : int((k-1)/2) ;
339  pos_cf.set(2) = k ;
340  int baset = (*so.get_base().bases_1d[1]) (k) ;
341 
342  if (mquant%2==0) {
343  assert (baset=SIN_EVEN) ;
344  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
345  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
346  pos_cf.set(1) = j ;
347  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
348  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
349  pos_cf.set(0) = i ;
350  pos_gal_r = pos_cf ;
351  pos_gal_r.set(0) = 0 ;
352  switch (baser) {
353  case CHEB_ODD :
354  fact_r = - (2*i+1) * pow(-1, i) ;
355  break ;
356  case LEG_ODD : {
357  fact_r = -1. ;
358  for (int t=0 ; t<i ; t++)
359  fact_r *= -double(2*t+3)/double(2*t+2) ;
360  }
361  break ;
362  default :
363  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vt" << endl ;
364  abort() ;
365  }
366  so.cf->set(pos_cf) += values(conte) ;
367  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
368  conte ++ ;
369  }
370  }}
371 
372 
373  if (mquant%2==1) {
374  assert (baset=COS_ODD) ;
375  for (int j=1; j<nbr_coefs(1)-1 ; j++) {
376  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
377  pos_cf.set(1) = j ;
378  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
379  for (int i=1 ; i<nbr_coefs(0) ; i++) {
380  pos_cf.set(0) = i ;
381  pos_gal_r = pos_cf ;
382  pos_gal_r.set(0) = 0 ;
383  pos_gal_t = pos_cf ;
384  pos_gal_t.set(1) = 0 ;
385  pos_gal_rt = pos_cf ;
386  pos_gal_rt.set(0) = 0 ;
387  pos_gal_rt.set(1) = 0 ;
388  switch (baser) {
389  case CHEB_EVEN :
390  fact_r = -pow(-1, i) ;
391  fact_t = -1. ;
392  fact_rt = pow(-1, i) ;
393  break ;
394  case LEG_EVEN : {
395  double l0 = 1 ;
396  for (int t=0 ; t<i ; t++)
397  l0 *= -double(2*t+1)/double(2*t+2) ;
398  fact_r = - l0 ;
399  fact_t = -1. ;
400  fact_rt = l0 ;
401  }
402  break ;
403  default :
404  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vt" << endl ;
405  abort() ;
406  }
407  so.cf->set(pos_cf) += values(conte) ;
408  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
409  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
410  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
411  conte ++ ;
412  }
413  }
414  }
415  }
416 }
417 
418 
419 void Domain_nucleus::affecte_tau_val_domain_vp (Val_domain& so, const Array<double>& values, int& conte) const {
420 
421  so.allocate_coef() ;
422  *so.cf = 0. ;
423  Index pos_cf (nbr_coefs) ;
424 
425  // Positions of the Galerkin basis
426  Index pos_gal_t (nbr_coefs) ;
427  Index pos_gal_r (nbr_coefs) ;
428  Index pos_gal_rt (nbr_coefs) ;
429  double fact_t, fact_r, fact_rt ;
430 
431  // k = 0 ; j==0
432  {
433  pos_cf.set(2) = 0 ;
434  int baset = (*so.get_base().bases_1d[1]) (0) ;
435  assert (baset==SIN_ODD) ;
436  int baser = (*so.get_base().bases_1d[0]) (0, 0) ;
437  pos_cf.set(1) = 0 ;
438  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
439  for (int i=0 ; i<nbr_coefs(0)-1 ; i++) {
440  pos_cf.set(0) = i ;
441  so.cf->set(pos_cf) += values(conte) ;
442  conte ++ ;
443  }
444  }
445 
446  // Case k==0 ; j!=0
447  {
448  pos_cf.set(2) = 0 ;
449  int baset = (*so.get_base().bases_1d[1]) (0) ;
450  assert (baset=SIN_ODD) ;
451  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
452  int baser = (*so.get_base().bases_1d[0]) (j, 0) ;
453  pos_cf.set(1) = j ;
454  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
455  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
456  pos_cf.set(0) = i ;
457  pos_gal_r = pos_cf ;
458  pos_gal_r.set(0) = 0 ;
459  switch (baser) {
460  case CHEB_ODD :
461  fact_r = - (2*i+1) * pow(-1, i) ;
462  break ;
463  case LEG_ODD : {
464  fact_r = -1. ;
465  for (int t=0 ; t<i ; t++)
466  fact_r *= -double(2*t+3)/double(2*t+2) ;
467  }
468  break ;
469  default :
470  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
471  abort() ;
472  }
473  so.cf->set(pos_cf) += values(conte) ;
474  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
475  conte ++ ;
476  }
477  }
478  }
479 
480 
481  // Case k==2 ; j==0
482  if (nbr_coefs(2)-1>2)
483  {
484  pos_cf.set(2) = 2 ;
485  int baset = (*so.get_base().bases_1d[1]) (2) ;
486  assert (baset==COS_EVEN) ;
487  int baser = (*so.get_base().bases_1d[0]) (0, 2) ;
488  pos_cf.set(1) = 0 ;
489  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
490  for (int i=0 ; i<nbr_coefs(0) ; i++) {
491  pos_cf.set(0) = i ;
492  so.cf->set(pos_cf) += values(conte) ;
493  conte ++ ;
494  }
495  }
496 
497  // Case k==2 ; j!=0
498  if (nbr_coefs(2)-1>2)
499  {
500  pos_cf.set(2) = 2 ;
501  int baset = (*so.get_base().bases_1d[1]) (2) ;
502  assert (baset=COS_EVEN) ;
503  for (int j=1 ; j<nbr_coefs(1) ; j++) {
504  int baser = (*so.get_base().bases_1d[0]) (j, 2) ;
505  pos_cf.set(1) = j ;
506  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
507  for (int i=1 ; i<nbr_coefs(0) ; i++) {
508  pos_cf.set(0) = i ;
509  pos_gal_r = pos_cf ;
510  pos_gal_r.set(0) = 0 ;
511  switch (baser) {
512  case CHEB_EVEN :
513  fact_r = - pow(-1, i) ;
514  break ;
515  case LEG_EVEN : {
516  fact_r = -1. ;
517  for (int t=0 ; t<i ; t++)
518  fact_r *= -double(2*t+1)/double(2*t+2) ;
519  }
520  break ;
521  default :
522  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
523  abort() ;
524  }
525 
526  so.cf->set(pos_cf) += values(conte) ;
527  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
528  conte ++ ;
529  }
530  }
531  }
532 
533 
534  // Case k==3 ; j==0
535  if (nbr_coefs(2)-1>3)
536  {
537  pos_cf.set(2) = 3 ;
538  int baset = (*so.get_base().bases_1d[1]) (3) ;
539  assert (baset==COS_EVEN) ;
540  int baser = (*so.get_base().bases_1d[0]) (0, 3) ;
541  pos_cf.set(1) = 0 ;
542  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
543  for (int i=0 ; i<nbr_coefs(0) ; i++) {
544  pos_cf.set(0) = i ;
545  so.cf->set(pos_cf) += values(conte) ;
546  conte ++ ;
547  }
548  }
549 
550  // Case k==3 ; j!=0
551  if (nbr_coefs(2)-1>3)
552  {
553  pos_cf.set(2) = 3 ;
554  int baset = (*so.get_base().bases_1d[1]) (3) ;
555  assert (baset=COS_EVEN) ;
556  for (int j=1 ; j<nbr_coefs(1) ; j++) {
557  int baser = (*so.get_base().bases_1d[0]) (j, 3) ;
558  pos_cf.set(1) = j ;
559  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
560  for (int i=1 ; i<nbr_coefs(0) ; i++) {
561  pos_cf.set(0) = i ;
562  pos_gal_r = pos_cf ;
563  pos_gal_r.set(0) = 0 ;
564  switch (baser) {
565  case CHEB_EVEN :
566  fact_r = - pow(-1, i) ;
567  break ;
568  case LEG_EVEN : {
569  fact_r = -1. ;
570  for (int t=0 ; t<i ; t++)
571  fact_r *= -double(2*t+1)/double(2*t+2) ;
572  }
573  break ;
574  default :
575  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
576  abort() ;
577  }
578 
579  so.cf->set(pos_cf) += values(conte) ;
580  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
581  conte ++ ;
582  }
583  }
584  }
585  // k = 4; j==0
586  if (nbr_coefs(2)-1>4)
587  {
588  pos_cf.set(2) = 4 ;
589  int baset = (*so.get_base().bases_1d[1]) (4) ;
590  assert (baset==SIN_ODD) ;
591  int baser = (*so.get_base().bases_1d[0]) (0, 4) ;
592  pos_cf.set(1) = 0 ;
593  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
594  for (int i=0 ; i<nbr_coefs(0)-1 ; i++) {
595  pos_cf.set(0) = i ;
596  so.cf->set(pos_cf) += values(conte) ;
597  conte ++ ;
598  }
599  }
600 
601  // Case k==4 ; j!=0
602  if (nbr_coefs(2)-1>4)
603  {
604  pos_cf.set(2) = 4 ;
605  int baset = (*so.get_base().bases_1d[1]) (4) ;
606  assert (baset=SIN_ODD) ;
607  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
608  int baser = (*so.get_base().bases_1d[0]) (j, 4) ;
609  pos_cf.set(1) = j ;
610  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
611  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
612  pos_cf.set(0) = i ;
613  pos_gal_r = pos_cf ;
614  pos_gal_r.set(0) = 0 ;
615  switch (baser) {
616  case CHEB_ODD :
617  fact_r = - (2*i+1) * pow(-1, i) ;
618  break ;
619  case LEG_ODD : {
620  fact_r = -1. ;
621  for (int t=0 ; t<i ; t++)
622  fact_r *= -double(2*t+3)/double(2*t+2) ;
623  }
624  break ;
625  default :
626  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
627  abort() ;
628  }
629  so.cf->set(pos_cf) += values(conte) ;
630  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
631  conte ++ ;
632  }
633  }
634  }
635 
636  // k = 5; j==0
637  if (nbr_coefs(2)-1>5)
638  {
639  pos_cf.set(2) = 5 ;
640  int baset = (*so.get_base().bases_1d[1]) (5) ;
641  assert (baset==SIN_ODD) ;
642  int baser = (*so.get_base().bases_1d[0]) (0, 5) ;
643  pos_cf.set(1) = 0 ;
644  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
645  for (int i=0 ; i<nbr_coefs(0)-1 ; i++) {
646  pos_cf.set(0) = i ;
647  so.cf->set(pos_cf) += values(conte) ;
648  conte ++ ;
649  }
650  }
651 
652  // Case k==5 ; j!=0
653  if (nbr_coefs(2)-1>5)
654  {
655  pos_cf.set(2) = 5 ;
656  int baset = (*so.get_base().bases_1d[1]) (5) ;
657  assert (baset=SIN_ODD) ;
658  for (int j=1 ; j<nbr_coefs(1)-1 ; j++) {
659  int baser = (*so.get_base().bases_1d[0]) (j, 5) ;
660  pos_cf.set(1) = j ;
661  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
662  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
663  pos_cf.set(0) = i ;
664  pos_gal_r = pos_cf ;
665  pos_gal_r.set(0) = 0 ;
666  switch (baser) {
667  case CHEB_ODD :
668  fact_r = - (2*i+1) * pow(-1, i) ;
669  break ;
670  case LEG_ODD : {
671  fact_r = -1. ;
672  for (int t=0 ; t<i ; t++)
673  fact_r *= -double(2*t+3)/double(2*t+2) ;
674  }
675  break ;
676  default :
677  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
678  abort() ;
679  }
680  so.cf->set(pos_cf) += values(conte) ;
681  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
682  conte ++ ;
683  }
684 
685  }
686  }
687 
688  // Next ones
689  for (int k=6 ; k<nbr_coefs(2)-1 ; k++) {
690 
691  int mquant = (k%2==0) ? int(k/2) : int((k-1)/2) ;
692  pos_cf.set(2) = k ;
693  int baset = (*so.get_base().bases_1d[1]) (k) ;
694 
695  if (mquant%2==0) {
696  assert (baset=SIN_ODD) ;
697  for (int j=0 ; j<nbr_coefs(1)-1 ; j++) {
698  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
699  pos_cf.set(1) = j ;
700  assert ((baser==CHEB_ODD) || (baser==LEG_ODD)) ;
701  for (int i=1 ; i<nbr_coefs(0)-1 ; i++) {
702  pos_cf.set(0) = i ;
703  pos_gal_r = pos_cf ;
704  pos_gal_r.set(0) = 0 ;
705  switch (baser) {
706  case CHEB_ODD :
707  fact_r = - (2*i+1) * pow(-1, i) ;
708  break ;
709  case LEG_ODD : {
710  fact_r = -1. ;
711  for (int t=0 ; t<i ; t++)
712  fact_r *= -double(2*t+3)/double(2*t+2) ;
713  }
714  break ;
715  default :
716  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
717  abort() ;
718  }
719  so.cf->set(pos_cf) += values(conte) ;
720  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
721  conte ++ ;
722  }
723  }
724  }
725 
726  if (mquant%2==1) {
727  assert (baset=COS_EVEN) ;
728  for (int j=1; j<nbr_coefs(1) ; j++) {
729  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
730  pos_cf.set(1) = j ;
731  assert ((baser==CHEB_EVEN) || (baser==LEG_EVEN)) ;
732  for (int i=1 ; i<nbr_coefs(0) ; i++) {
733  pos_cf.set(0) = i ;
734  pos_gal_r = pos_cf ;
735  pos_gal_r.set(0) = 0 ;
736  pos_gal_t = pos_cf ;
737  pos_gal_t.set(1) = 0 ;
738  pos_gal_rt = pos_cf ;
739  pos_gal_rt.set(0) = 0 ;
740  pos_gal_rt.set(1) = 0 ;
741  switch (baser) {
742  case CHEB_EVEN :
743  fact_r = -pow(-1, i) ;
744  fact_t = -1. ;
745  fact_rt = pow(-1, i) ;
746  break ;
747  case LEG_EVEN : {
748  double l0 = 1 ;
749  for (int t=0 ; t<i ; t++)
750  l0 *= -double(2*t+1)/double(2*t+2) ;
751  fact_r = - l0 ;
752  fact_t = -1. ;
753  fact_rt = l0 ;
754  }
755  break ;
756  default :
757  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain_vp" << endl ;
758  abort() ;
759  }
760  so.cf->set(pos_cf) += values(conte) ;
761  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
762  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
763  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
764  conte ++ ;
765  }
766  }
767  }
768  }
769 }
770 
771 void Domain_nucleus::affecte_tau_val_domain (Val_domain& so, int mlim, int llim, const Array<double>& values, int& conte) const {
772 
773  int kmin = 2*mlim+2 ;
774  int lquant ;
775 
776  so.allocate_coef() ;
777  *so.cf = 0. ;
778  Index pos_cf (nbr_coefs) ;
779 
780  // Positions of the Galerkin basis
781  Index pos_gal_t (nbr_coefs) ;
782  Index pos_gal_r (nbr_coefs) ;
783  Index pos_gal_rt (nbr_coefs) ;
784  double fact_t, fact_r, fact_rt ;
785 
786  // Loop on phi :
787  for (int k=0 ; k<nbr_coefs(2)-1 ; k++)
788  if (k!=1) {
789  pos_cf.set(2) = k ;
790  // Loop on theta
791  int baset = (*so.get_base().bases_1d[1]) (k) ;
792  for (int j=0 ; j<nbr_coefs(1) ; j++) {
793  int baser = (*so.get_base().bases_1d[0]) (j, k) ;
794  pos_cf.set(1) = j ;
795  // Loop on r :
796  for (int i=0 ; i<nbr_coefs(0) ; i++) {
797  pos_cf.set(0) = i ;
798  switch (baset) {
799  case COS_EVEN :
800  lquant = 2*j ;
801  // No galerkin :
802  if ((k<kmin) && (lquant<=llim)) {
803  so.cf->set(pos_cf) += values(conte) ;
804  conte ++ ;
805  }
806  else if (k<kmin) {
807  if (i!=0) {
808  // Galerkin base in r only
809  pos_gal_r = pos_cf ;
810  pos_gal_r.set(0) = 0 ;
811  switch (baser) {
812  case CHEB_EVEN :
813  fact_r = - pow(-1, i) ;
814  break ;
815  case LEG_EVEN : {
816  fact_r = -1. ;
817  for (int t=0 ; t<i ; t++)
818  fact_r *= -double(2*t+1)/double(2*t+2) ;
819  }
820  break ;
821  default :
822  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
823  abort() ;
824  }
825 
826  so.cf->set(pos_cf) += values(conte) ;
827  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
828  conte ++ ;
829  }
830  }
831  else if ((j!=0) && (i!=0)) {
832  // Need to use two_dimensional Galerkin basis (aouch !)
833  pos_gal_r = pos_cf ;
834  pos_gal_r.set(0) = 0 ;
835  pos_gal_t = pos_cf ;
836  pos_gal_t.set(1) = 0 ;
837  pos_gal_rt = pos_cf ;
838  pos_gal_rt.set(0) = 0 ;
839  pos_gal_rt.set(1) = 0 ;
840  switch (baser) {
841  case CHEB_EVEN :
842  fact_r = -pow(-1, i) ;
843  fact_t = -1. ;
844  fact_rt = pow(-1, i) ;
845  break ;
846  case LEG_EVEN : {
847  double l0 = 1 ;
848  for (int t=0 ; t<i ; t++)
849  l0 *= -double(2*t+1)/double(2*t+2) ;
850  fact_r = - l0 ;
851  fact_t = -1. ;
852  fact_rt = l0 ;
853  }
854  break ;
855  default :
856  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
857  abort() ;
858  }
859  so.cf->set(pos_cf) += values(conte) ;
860  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
861  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
862  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
863  conte ++ ;
864  }
865  break ;
866  case COS_ODD:
867  lquant = 2*j+1 ;
868  if ((j!=nbr_coefs(1)-1) && (i!=nbr_coefs(0)-1)) {
869  if ((k<kmin) && (lquant<=llim+1)) {
870  so.cf->set(pos_cf) += values(conte) ;
871  conte ++ ;
872  }
873  else {
874  if ((k<kmin) && (i!=0)) {
875  pos_gal_r = pos_cf ;
876  pos_gal_r.set(0) = 0 ;
877  switch (baser) {
878  case CHEB_ODD :
879  fact_r = - (2*i+1) * pow(-1, i) ;
880  break ;
881  case LEG_ODD : {
882  fact_r = -1. ;
883  for (int t=0 ; t<i ; t++)
884  fact_r *= -double(2*t+3)/double(2*t+2) ;
885  }
886  break ;
887  default :
888  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
889  abort() ;
890  }
891  so.cf->set(pos_cf) += values(conte) ;
892  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
893  conte ++ ;
894  }
895  else if ((j!=0) && (i!=0)) {
896  // Need to use two_dimensional Galerkin basis (aouch !)
897  pos_gal_r = pos_cf ;
898  pos_gal_r.set(0) = 0 ;
899  pos_gal_t = pos_cf ;
900  pos_gal_t.set(1) = 0 ;
901  pos_gal_rt = pos_cf ;
902  pos_gal_rt.set(0) = 0 ;
903  pos_gal_rt.set(1) = 0 ;
904  switch (baser) {
905  case CHEB_ODD :
906  fact_r = -pow(-1, i)*(2*i+1) ;
907  fact_t = -1. ;
908  fact_rt = pow(-1, i)*(2*i+1) ;
909  break ;
910  case LEG_ODD : {
911  double l0 = 1 ;
912  for (int t=0 ; t<i ; t++)
913  l0 *= -double(2*t+3)/double(2*t+2) ;
914  fact_r = - l0 ;
915  fact_t = -1. ;
916  fact_rt = l0 ;
917  }
918  break ;
919  default :
920  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
921  abort() ;
922  }
923  so.cf->set(pos_cf) += values(conte) ;
924  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
925  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
926  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
927  conte ++ ;
928  }
929  }
930  }
931  break ;
932  case SIN_EVEN:
933  lquant = 2*j ;
934  if ((j!=0) && (j!=nbr_coefs(1)-1)) {
935  if ((k<kmin+2) && (lquant<=llim)) {
936  so.cf->set(pos_cf) += values(conte) ;
937  conte ++ ;
938  }
939  else {
940  if ((k<kmin+2) && (i!=0)) {
941  // Galerkin base in r only
942  pos_gal_r = pos_cf ;
943  pos_gal_r.set(0) = 0 ;
944  switch (baser) {
945  case CHEB_EVEN :
946  fact_r = - pow(-1, i) ;
947  break ;
948  case LEG_EVEN : {
949  fact_r = -1. ;
950  for (int t=0 ; t<i ; t++)
951  fact_r *= -double(2*t+1)/double(2*t+2) ;
952  }
953  break ;
954  default :
955  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
956  abort() ;
957  }
958  so.cf->set(pos_cf) += values(conte) ;
959  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
960  conte ++ ;
961  }
962 
963  else //Double Galerkin
964  if ((j!=1) && (i!=0)) {
965  // Need to use two_dimensional Galerkin basis (aouch !)
966  pos_gal_r = pos_cf ;
967  pos_gal_r.set(0) = 0 ;
968  pos_gal_t = pos_cf ;
969  pos_gal_t.set(1) = 1 ;
970  pos_gal_rt = pos_cf ;
971  pos_gal_rt.set(0) = 0 ;
972  pos_gal_rt.set(1) = 1 ;
973  switch (baser) {
974  case CHEB_EVEN :
975  fact_r = -pow(-1, i) ;
976  fact_t = -j ;
977  fact_rt = pow(-1, i)*j ;
978  break ;
979  case LEG_EVEN : {
980  double l0 = 1 ;
981  for (int t=0 ; t<i ; t++)
982  l0 *= -double(2*t+1)/double(2*t+2) ;
983  fact_r = - l0 ;
984  fact_t = -j ;
985  fact_rt = l0*j ;
986  }
987  break ;
988  default :
989  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
990  abort() ;
991  }
992  so.cf->set(pos_cf) += values(conte) ;
993  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
994  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
995  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
996  conte ++ ;
997  }
998  }
999  }
1000  break ;
1001  case SIN_ODD:
1002  lquant = 2*j+1 ;
1003  if ((j!=nbr_coefs(1)-1) && (i!=nbr_coefs(0)-1)) {
1004  if ((k<kmin+2) && (lquant<=llim+1)) {
1005  so.cf->set(pos_cf) += values(conte) ;
1006  conte ++ ;
1007  }
1008  else {
1009  if ((k<kmin+2) && (i!=0)) {
1010  pos_gal_r = pos_cf ;
1011  pos_gal_r.set(0) = 0 ;
1012  switch (baser) {
1013  case CHEB_ODD :
1014  fact_r = - (2*i+1) * pow(-1, i) ;
1015  break ;
1016  case LEG_ODD : {
1017  fact_r = -1. ;
1018  for (int t=0 ; t<i ; t++)
1019  fact_r *= -double(2*t+3)/double(2*t+2) ;
1020  }
1021  break ;
1022  default :
1023  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
1024  abort() ;
1025  }
1026  so.cf->set(pos_cf) += values(conte) ;
1027  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
1028  conte ++ ;
1029  }
1030  else if ((j!=0) && (i!=0)) {
1031  // Need to use two_dimensional Galerkin basis (aouch !)
1032  pos_gal_r = pos_cf ;
1033  pos_gal_r.set(0) = 0 ;
1034  pos_gal_t = pos_cf ;
1035  pos_gal_t.set(1) = 0 ;
1036  pos_gal_rt = pos_cf ;
1037  pos_gal_rt.set(0) = 0 ;
1038  pos_gal_rt.set(1) = 0 ;
1039  switch (baser) {
1040  case CHEB_ODD :
1041  fact_r = -pow(-1, i)*(2*i+1) ;
1042  fact_t = -(2*j+1) ;
1043  fact_rt = pow(-1, i)*(2*i+1)*(2*j+1) ;
1044  break ;
1045  case LEG_ODD : {
1046  double l0 = 1 ;
1047  for (int t=0 ; t<i ; t++)
1048  l0 *= -double(2*t+3)/double(2*t+2) ;
1049  fact_r = - l0 ;
1050  fact_t = -(2*j+1) ;
1051  fact_rt = l0*(2*j+1) ;
1052  }
1053  break ;
1054  default :
1055  cerr << "Strange base in Domain_nucleus::affecte_tau_val_domain" << endl ;
1056  abort() ;
1057  }
1058  so.cf->set(pos_cf) += values(conte) ;
1059  so.cf->set(pos_gal_r) += fact_r*values(conte) ;
1060  so.cf->set(pos_gal_t) += fact_t*values(conte) ;
1061  so.cf->set(pos_gal_rt) += fact_rt*values(conte) ;
1062  conte ++ ;
1063  }
1064  }
1065  }
1066  break ;
1067  default:
1068  cerr << "Unknow theta basis in Domain_nucleus::affecte_tau_val_domain" << endl ;
1069  abort() ;
1070  }
1071  }
1072  }
1073  }
1074 }
1075 
1076 void Domain_nucleus::affecte_tau (Tensor& tt, int dom, const Array<double>& cf, int& pos_cf) const {
1077 
1078  // Check right domain
1079  assert (tt.get_space().get_domain(dom)==this) ;
1080 
1081  int val = tt.get_valence() ;
1082  switch (val) {
1083  case 0 :
1084  affecte_tau_val_domain (tt.set().set_domain(dom), 0, 0, cf, pos_cf) ;
1085  break ;
1086  case 1 : {
1087  bool found = false ;
1088  // Cartesian basis
1089  if (tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) {
1090  affecte_tau_val_domain (tt.set(1).set_domain(dom), 0, 0, cf, pos_cf) ;
1091  affecte_tau_val_domain (tt.set(2).set_domain(dom), 0, 0, cf, pos_cf) ;
1092  affecte_tau_val_domain (tt.set(3).set_domain(dom), 0, 0, cf, pos_cf) ;
1093  found = true ;
1094  }
1095  // Spherical coordinates
1096  if (tt.get_basis().get_basis(dom)==SPHERICAL_BASIS) {
1097  affecte_tau_val_domain_vr (tt.set(1).set_domain(dom), cf, pos_cf) ;
1098  affecte_tau_val_domain_vt (tt.set(2).set_domain(dom), cf, pos_cf) ;
1099  affecte_tau_val_domain_vp (tt.set(3).set_domain(dom), cf, pos_cf) ;
1100  found = true ;
1101  }
1102  if (!found) {
1103  cerr << "Unknown type of vector Domain_nucleus::affecte_tau" << endl ;
1104  abort() ;
1105  }
1106  }
1107  break ;
1108  case 2 : {
1109  bool found = false ;
1110  // Cartesian basis and symetric
1111  if ((tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) && (tt.get_n_comp()==6)) {
1112  affecte_tau_val_domain (tt.set(1,1).set_domain(dom), 0, 0, cf, pos_cf) ;
1113  affecte_tau_val_domain (tt.set(1,2).set_domain(dom), 0, 0, cf, pos_cf) ;
1114  affecte_tau_val_domain (tt.set(1,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1115  affecte_tau_val_domain (tt.set(2,2).set_domain(dom), 0, 0, cf, pos_cf) ;
1116  affecte_tau_val_domain (tt.set(2,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1117  affecte_tau_val_domain (tt.set(3,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1118  found = true ;
1119  }
1120  // Cartesian basis and not symetric
1121  if ((tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) && (tt.get_n_comp()==9)) {
1122  affecte_tau_val_domain (tt.set(1,1).set_domain(dom), 0, 0, cf, pos_cf) ;
1123  affecte_tau_val_domain (tt.set(1,2).set_domain(dom), 0, 0, cf, pos_cf) ;
1124  affecte_tau_val_domain (tt.set(1,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1125  affecte_tau_val_domain (tt.set(2,1).set_domain(dom), 0, 0, cf, pos_cf) ;
1126  affecte_tau_val_domain (tt.set(2,2).set_domain(dom), 0, 0, cf, pos_cf) ;
1127  affecte_tau_val_domain (tt.set(2,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1128  affecte_tau_val_domain (tt.set(3,1).set_domain(dom), 0, 0, cf, pos_cf) ;
1129  affecte_tau_val_domain (tt.set(3,2).set_domain(dom), 0, 0, cf, pos_cf) ;
1130  affecte_tau_val_domain (tt.set(3,3).set_domain(dom), 0, 0, cf, pos_cf) ;
1131  found = true ;
1132  }
1133  if (!found) {
1134  cerr << "Unknown type of 2-tensor Domain_nucleus::affecte_tau" << endl ;
1135  abort() ;
1136  }
1137  }
1138  break ;
1139  default :
1140  cerr << "Valence " << val << " not implemented in Domain_nucleus::affecte_tau" << endl ;
1141  break ;
1142  }
1143 }}
reference set(const Index &pos)
Read/write of an element.
Definition: array.hpp:186
Bases_container bases_1d
Arrays containing the various basis of decomposition.
int get_basis(int nd) const
Read only the basis in a given domain.
Definition: base_tensor.hpp:93
virtual void affecte_tau(Tensor &, int, const Array< double > &, int &) const
Affects some coefficients to a Tensor.
void affecte_tau_val_domain_vp(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
void affecte_tau_val_domain_vt(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
void affecte_tau_val_domain_vr(Val_domain &so, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
void affecte_tau_val_domain(Val_domain &so, int mlim, int llim, const Array< double > &cf, int &pos_cf) const
Affects some coefficients to a Val_domain.
Dim_array nbr_coefs
Number of coefficients.
Definition: space.hpp:66
Class that gives the position inside a multi-dimensional Array.
Definition: index.hpp:38
int & set(int i)
Read/write of the position in a given dimension.
Definition: index.hpp:72
Val_domain & set_domain(int)
Read/write of a particular Val_domain.
Definition: scalar.hpp:555
const Domain * get_domain(int i) const
returns a pointer on the domain.
Definition: space.hpp:1385
Tensor handling.
Definition: tensor.hpp:149
Scalar & set(const Array< int > &ind)
Returns the value of a component (read/write version).
Definition: tensor_impl.hpp:91
const Base_tensor & get_basis() const
Returns the vectorial basis (triad) on which the components are defined.
Definition: tensor.hpp:504
int get_n_comp() const
Returns the number of stored components.
Definition: tensor.hpp:514
int get_valence() const
Returns the valence.
Definition: tensor.hpp:509
const Space & get_space() const
Returns the Space.
Definition: tensor.hpp:499
Class for storing the basis of decompositions of a field and its values on both the configuration and...
Definition: val_domain.hpp:69
void allocate_coef()
Allocates the values in the coefficient space and destroys the values in the configuration space.
Definition: val_domain.cpp:216
Array< double > * cf
Pointer on the Array of the values in the coefficients space.
Definition: val_domain.hpp:77
const Base_spectral & get_base() const
Returns the basis of decomposition.
Definition: val_domain.hpp:122