KADATH
domain_shell_nbr_conditions.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 #include "spheric.hpp"
22 #include "scalar.hpp"
23 #include "tensor_impl.hpp"
24 #include "tensor.hpp"
25 
26 namespace Kadath {
27 
28 
29 int Domain_shell::nbr_conditions_val_domain_mquant (const Val_domain& so, int mquant, int order) const {
30  int res = 0 ;
31 
32  Index pos (nbr_coefs) ;
33  do {
34  bool indic = true ;
35  // Get base in theta :
36  int baset = (*so.get_base().bases_1d[1]) (0) ;
37  switch (baset) {
38  case COS_EVEN:
39  if ((pos(1)==0) && (mquant!=0))
40  indic = false ;
41  break ;
42  case COS_ODD:
43  if ((pos(1)==nbr_coefs(1)-1) || ((pos(1)==0) && (mquant!=0)))
44  indic = false ;
45  break ;
46  case SIN_EVEN:
47  if (((pos(1)==1) && (mquant>1)) || (pos(1)==0) || (pos(1)==nbr_coefs(1)-1))
48  indic = false ;
49  break ;
50  case SIN_ODD:
51  if (((pos(1)==0) && (mquant>1)) || (pos(1)==nbr_coefs(1)-1))
52  indic = false ;
53  break ;
54  default:
55  cerr << "Unknow theta basis in Domain_shell::nbr_conditions_val_domain_mquant" << endl ;
56  abort() ;
57  }
58  // Order with respect to r :
59  if (pos(0)>nbr_coefs(0)-order-1)
60  indic = false ;
61 
62  if (indic)
63  res ++ ;
64  pos.inc() ;
65  }
66  while (pos(2)==0) ;
67 
68  return res ;
69 }
70 
71 
72 int Domain_shell::nbr_conditions_val_domain (const Val_domain& so, int mlim, int order) const {
73 
74  int res = 0 ;
75  int kmin = 2*mlim + 2 ;
76 
77  Index pos (nbr_coefs) ;
78  do {
79  bool indic = true ;
80  // True coef in phi ?
81  if ((pos(2)==1) || (pos(2)==nbr_coefs(2)-1))
82  indic = false ;
83  // Get base in theta :
84  int baset = (*so.get_base().bases_1d[1]) (pos(2)) ;
85  switch (baset) {
86  case COS_EVEN:
87  if ((pos(1)==0) && (pos(2)>=kmin))
88  indic = false ;
89  break ;
90  case COS_ODD:
91  if ((pos(1)==nbr_coefs(1)-1) || ((pos(1)==0) && (pos(2)>=kmin)))
92  indic = false ;
93  break ;
94  case SIN_EVEN:
95  if (((pos(1)==1)&&(pos(2)>=kmin+2)) || (pos(1)==0) || (pos(1)==nbr_coefs(1)-1))
96  indic = false ;
97  break ;
98  case SIN_ODD:
99  if (((pos(1)==0)&&(pos(2)>=kmin+2)) || (pos(1)==nbr_coefs(1)-1))
100  indic = false ;
101  break ;
102  default:
103  cerr << "Unknow theta basis in Domain_shell::nbr_conditions_val_domain" << endl ;
104  abort() ;
105  }
106  // Order with respect to r :
107  if (pos(0)>nbr_coefs(0)-order-1)
108  indic = false ;
109 
110  if (indic)
111  res ++ ;
112  }
113  while (pos.inc()) ;
114 
115  return res ;
116 }
117 
118 Array<int> Domain_shell::nbr_conditions (const Tensor& tt, int dom, int order, int n_cmp, Array<int>** p_cmp) const {
119 
120  int size = (n_cmp==-1) ? tt.get_n_comp() : n_cmp ;
121  Array<int> res (size) ;
122  int val = tt.get_valence() ;
123  switch (val) {
124  case 0 :
125  if (tt.is_m_quant_affected()) {
126  // Special case for boson field
127  res.set(0) = nbr_conditions_val_domain_mquant (tt()(dom), tt.get_parameters().get_m_quant(), order) ;
128  }
129  else {
130  if (!tt.is_m_order_affected())
131  res.set(0) = nbr_conditions_val_domain (tt()(dom), 0, order) ;
132  else
133  res.set(0) = nbr_conditions_val_domain (tt()(dom), tt.get_parameters().get_m_order(), order) ;
134  }
135  break ;
136  case 1 : {
137  bool found = false ;
138  // Cartesian basis
139  if (tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) {
140  if (n_cmp==-1) {
141  res.set(0) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
142  res.set(1) = nbr_conditions_val_domain (tt(2)(dom), 0, order) ;
143  res.set(2) = nbr_conditions_val_domain (tt(3)(dom), 0, order) ;
144  }
145  else for (int i=0 ; i<n_cmp ; i++) {
146  if ((*p_cmp[i])(0)==1)
147  res.set(i) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
148  if ((*p_cmp[i])(0)==2)
149  res.set(i) = nbr_conditions_val_domain (tt(2)(dom), 0, order) ;
150  if ((*p_cmp[i])(0)==3)
151  res.set(i) = nbr_conditions_val_domain (tt(3)(dom), 0, order) ;
152  }
153  found = true ;
154  }
155  // Spherical coordinates
156  if (tt.get_basis().get_basis(dom)==SPHERICAL_BASIS) {
157  if (n_cmp==-1) {
158  res.set(0) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
159  res.set(1) = nbr_conditions_val_domain (tt(2)(dom), 1, order) ;
160  res.set(2) = nbr_conditions_val_domain (tt(3)(dom), 1, order) ;
161  }
162  else for (int i=0 ; i<n_cmp ; i++) {
163  if ((*p_cmp[i])(0)==1)
164  res.set(i) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
165  if ((*p_cmp[i])(0)==2)
166  res.set(i) = nbr_conditions_val_domain (tt(2)(dom), 1, order) ;
167  if ((*p_cmp[i])(0)==3)
168  res.set(i) = nbr_conditions_val_domain (tt(3)(dom), 1, order) ;
169  }
170  found = true ;
171  }
172  // MTZ coordinates
173  if (tt.get_basis().get_basis(dom)==MTZ_BASIS) {
174  if (n_cmp==-1) {
175  res.set(0) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
176  res.set(1) = nbr_conditions_val_domain (tt(2)(dom), 1, order) ;
177  res.set(2) = nbr_conditions_val_domain (tt(3)(dom), 1, order) ;
178  }
179  else for (int i=0 ; i<n_cmp ; i++) {
180  if ((*p_cmp[i])(0)==1)
181  res.set(i) = nbr_conditions_val_domain (tt(1)(dom), 0, order) ;
182  if ((*p_cmp[i])(0)==2)
183  res.set(i) = nbr_conditions_val_domain (tt(2)(dom), 1, order) ;
184  if ((*p_cmp[i])(0)==3)
185  res.set(i) = nbr_conditions_val_domain (tt(3)(dom), 1, order) ;
186  }
187  found = true ;
188  }
189  if (!found) {
190  cerr << "Unknown type of vector Domain_shell::nbr_conditions" << endl ;
191  abort() ;
192  }
193  }
194  break ;
195  case 2 : {
196  bool found = false ;
197  // Cartesian basis and symetric
198  if ((tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) && (tt.get_n_comp()==6)) {
199  if (n_cmp==-1) {
200  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
201  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 0, order) ;
202  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 0, order) ;
203  res.set(3) = nbr_conditions_val_domain (tt(2,2)(dom), 0, order) ;
204  res.set(4) = nbr_conditions_val_domain (tt(2,3)(dom), 0, order) ;
205  res.set(5) = nbr_conditions_val_domain (tt(3,3)(dom), 0, order) ;
206  }
207  else for (int i=0 ; i<n_cmp ; i++) {
208  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
209  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
210  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
211  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 0, order) ;
212  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
213  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 0, order) ;
214  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
215  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 0, order) ;
216  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
217  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 0, order) ;
218  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
219  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 0, order) ;
220  }
221  found = true ;
222  }
223  // Cartesian basis and not symetric
224  if ((tt.get_basis().get_basis(dom)==CARTESIAN_BASIS) && (tt.get_n_comp()==9)) {
225  if (n_cmp==-1) {
226  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
227  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 0, order) ;
228  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 0, order) ;
229  res.set(3) = nbr_conditions_val_domain (tt(2,1)(dom), 0, order) ;
230  res.set(4) = nbr_conditions_val_domain (tt(2,2)(dom), 0, order) ;
231  res.set(5) = nbr_conditions_val_domain (tt(2,3)(dom), 0, order) ;
232  res.set(6) = nbr_conditions_val_domain (tt(3,1)(dom), 0, order) ;
233  res.set(7) = nbr_conditions_val_domain (tt(3,2)(dom), 0, order) ;
234  res.set(8) = nbr_conditions_val_domain (tt(3,3)(dom), 0, order) ;
235  }
236  else for (int i=0 ; i<n_cmp ; i++) {
237  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
238  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
239  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
240  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 0, order) ;
241  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
242  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 0, order) ;
243  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
244  res.set(i) = nbr_conditions_val_domain (tt(2, 1)(dom), 0, order) ;
245  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
246  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 0, order) ;
247  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
248  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 0, order) ;
249  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
250  res.set(i) = nbr_conditions_val_domain (tt(3, 1)(dom), 0, order) ;
251  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
252  res.set(i) = nbr_conditions_val_domain (tt(3, 2)(dom), 0, order) ;
253  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
254  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 0, order) ;
255  }
256  found = true ;
257  }
258  // Spherical coordinates and symetric
259  if ((tt.get_basis().get_basis(dom)==SPHERICAL_BASIS) && (tt.get_n_comp()==6)) {
260  if (n_cmp==-1) {
261  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
262  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 1, order) ;
263  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 1, order) ;
264  res.set(3) = nbr_conditions_val_domain (tt(2,2)(dom), 2, order) ;
265  res.set(4) = nbr_conditions_val_domain (tt(2,3)(dom), 2, order) ;
266  res.set(5) = nbr_conditions_val_domain (tt(3,3)(dom), 2, order) ;
267  }
268  else for (int i=0 ; i<n_cmp ; i++) {
269  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
270  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
271  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
272  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 1, order) ;
273  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
274  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 1, order) ;
275  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
276  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 2, order) ;
277  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
278  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 2, order) ;
279  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
280  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 2, order) ;
281  }
282  found = true ;
283  }
284  // Spherical coordinates and not symetric
285  if ((tt.get_basis().get_basis(dom)==SPHERICAL_BASIS) && (tt.get_n_comp()==9)) {
286  if (n_cmp==-1) {
287  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
288  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 1, order) ;
289  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 1, order) ;
290  res.set(3) = nbr_conditions_val_domain (tt(2,1)(dom), 1, order) ;
291  res.set(4) = nbr_conditions_val_domain (tt(2,2)(dom), 2, order) ;
292  res.set(5) = nbr_conditions_val_domain (tt(2,3)(dom), 2, order) ;
293  res.set(6) = nbr_conditions_val_domain (tt(3,1)(dom), 1, order) ;
294  res.set(7) = nbr_conditions_val_domain (tt(3,2)(dom), 2, order) ;
295  res.set(8) = nbr_conditions_val_domain (tt(3,3)(dom), 2, order) ;
296 
297  }
298  else for (int i=0 ; i<n_cmp ; i++) {
299  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
300  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
301  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
302  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 1, order) ;
303  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
304  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 1, order) ;
305  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
306  res.set(i) = nbr_conditions_val_domain (tt(2, 1)(dom), 1, order) ;
307  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
308  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 2, order) ;
309  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
310  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 2, order) ;
311  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
312  res.set(i) = nbr_conditions_val_domain (tt(3, 1)(dom), 1, order) ;
313  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
314  res.set(i) = nbr_conditions_val_domain (tt(3, 2)(dom), 2, order) ;
315  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
316  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 2, order) ;
317  }
318  found = true ;
319  }// MTZ coordinates and symetric
320  if ((tt.get_basis().get_basis(dom)==MTZ_BASIS) && (tt.get_n_comp()==6)) {
321  if (n_cmp==-1) {
322  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
323  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 1, order) ;
324  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 1, order) ;
325  res.set(3) = nbr_conditions_val_domain (tt(2,2)(dom), 2, order) ;
326  res.set(4) = nbr_conditions_val_domain (tt(2,3)(dom), 2, order) ;
327  res.set(5) = nbr_conditions_val_domain (tt(3,3)(dom), 2, order) ;
328  }
329  else for (int i=0 ; i<n_cmp ; i++) {
330  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
331  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
332  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
333  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 1, order) ;
334  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
335  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 1, order) ;
336  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
337  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 2, order) ;
338  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
339  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 2, order) ;
340  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
341  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 2, order) ;
342  }
343  found = true ;
344  }
345  // MTZ coordinates and not symetric
346  if ((tt.get_basis().get_basis(dom)==MTZ_BASIS) && (tt.get_n_comp()==9)) {
347  if (n_cmp==-1) {
348  res.set(0) = nbr_conditions_val_domain (tt(1,1)(dom), 0, order) ;
349  res.set(1) = nbr_conditions_val_domain (tt(1,2)(dom), 1, order) ;
350  res.set(2) = nbr_conditions_val_domain (tt(1,3)(dom), 1, order) ;
351  res.set(3) = nbr_conditions_val_domain (tt(2,1)(dom), 1, order) ;
352  res.set(4) = nbr_conditions_val_domain (tt(2,2)(dom), 2, order) ;
353  res.set(5) = nbr_conditions_val_domain (tt(2,3)(dom), 2, order) ;
354  res.set(6) = nbr_conditions_val_domain (tt(3,1)(dom), 1, order) ;
355  res.set(7) = nbr_conditions_val_domain (tt(3,2)(dom), 2, order) ;
356  res.set(8) = nbr_conditions_val_domain (tt(3,3)(dom), 2, order) ;
357 
358  }
359  else for (int i=0 ; i<n_cmp ; i++) {
360  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==1))
361  res.set(i) = nbr_conditions_val_domain (tt(1, 1)(dom), 0, order) ;
362  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==2))
363  res.set(i) = nbr_conditions_val_domain (tt(1, 2)(dom), 1, order) ;
364  if (((*p_cmp[i])(0)==1) && ((*p_cmp[i])(1)==3))
365  res.set(i) = nbr_conditions_val_domain (tt(1, 3)(dom), 1, order) ;
366  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==1))
367  res.set(i) = nbr_conditions_val_domain (tt(2, 1)(dom), 1, order) ;
368  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==2))
369  res.set(i) = nbr_conditions_val_domain (tt(2, 2)(dom), 2, order) ;
370  if (((*p_cmp[i])(0)==2) && ((*p_cmp[i])(1)==3))
371  res.set(i) = nbr_conditions_val_domain (tt(2, 3)(dom), 2, order) ;
372  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==1))
373  res.set(i) = nbr_conditions_val_domain (tt(3, 1)(dom), 1, order) ;
374  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==2))
375  res.set(i) = nbr_conditions_val_domain (tt(3, 2)(dom), 2, order) ;
376  if (((*p_cmp[i])(0)==3) && ((*p_cmp[i])(1)==3))
377  res.set(i) = nbr_conditions_val_domain (tt(3, 3)(dom), 2, order) ;
378  }
379  found = true ;
380  }
381  if (!found) {
382  cerr << "Unknown type of 2-tensor Domain_shell::nbr_conditions" << endl ;
383  abort() ;
384  }
385  }
386  break ;
387  default :
388  cerr << "Valence " << val << " not implemented in Domain_shell::nbr_conditions" << endl ;
389  break ;
390  }
391  return res ;
392 }}
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
int nbr_conditions_val_domain_mquant(const Val_domain &so, int mquant, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
int nbr_conditions_val_domain(const Val_domain &so, int mlim, int order) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
virtual Array< int > nbr_conditions(const Tensor &, int, int, int n_cmp=-1, Array< int > **p_cmp=0x0) const
Computes number of discretized equations associated with a given tensorial equation in the bulk.
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
bool inc(int increm, int var=0)
Increments the position of the Index.
Definition: index.hpp:99
int get_m_order() const
Returns .
Definition: tensor.hpp:737
int get_m_quant() const
Returns .
Definition: tensor.hpp:747
Tensor handling.
Definition: tensor.hpp:149
bool is_m_order_affected() const
Checks whether the additional parameter order is affected (not very used).
Definition: tensor.hpp:323
const Param_tensor & get_parameters() const
Returns a pointer on the possible additional parameter.
Definition: tensor.hpp:311
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
bool is_m_quant_affected() const
Checks whether the additional parameter is affected (used for boson stars for instance).
Definition: tensor.hpp:326
Class for storing the basis of decompositions of a field and its values on both the configuration and...
Definition: val_domain.hpp:69
const Base_spectral & get_base() const
Returns the basis of decomposition.
Definition: val_domain.hpp:122