LORENE
scalar_import_asymy.C
1 /*
2  * Member function of the Scalar class for initiating a Scalar from
3  * a Scalar defined on another mapping.
4  * Case where both Scalar's are antisymmetric with respect to their y=0 plane.
5  */
6 
7 /*
8  * Copyright (c) 2003 Eric Gourgoulhon & Jerome Novak
9  * Copyright (c) 1999-2001 Eric Gourgoulhon (Cmp version)
10  *
11  * This file is part of LORENE.
12  *
13  * LORENE is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * LORENE is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with LORENE; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26  *
27  */
28 
29 
30 
31 
32 
33 /*
34  * $Id: scalar_import_asymy.C,v 1.6 2016/12/05 16:18:18 j_novak Exp $
35  * $Log: scalar_import_asymy.C,v $
36  * Revision 1.6 2016/12/05 16:18:18 j_novak
37  * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
38  *
39  * Revision 1.5 2014/10/13 08:53:46 j_novak
40  * Lorene classes and functions now belong to the namespace Lorene.
41  *
42  * Revision 1.4 2014/10/06 15:16:15 j_novak
43  * Modified #include directives to use c++ syntax.
44  *
45  * Revision 1.3 2003/10/10 15:57:29 j_novak
46  * Added the state one (ETATUN) to the class Scalar
47  *
48  * Revision 1.2 2003/10/01 13:04:44 e_gourgoulhon
49  * The method Tensor::get_mp() returns now a reference (and not
50  * a pointer) onto a mapping.
51  *
52  * Revision 1.1 2003/09/25 09:07:05 j_novak
53  * Added the functions for importing from another mapping (to be tested).
54  *
55  *
56  * $Header: /cvsroot/Lorene/C++/Source/Tensor/Scalar/scalar_import_asymy.C,v 1.6 2016/12/05 16:18:18 j_novak Exp $
57  *
58  */
59 
60 
61 
62 // Headers C
63 #include <cmath>
64 
65 // Headers Lorene
66 #include "tensor.h"
67 #include "param.h"
68 #include "nbr_spx.h"
69 
70  //-------------------------------//
71  // Importation in all domains //
72  //-------------------------------//
73 
74 namespace Lorene {
75 void Scalar::import_asymy(const Scalar& ci) {
76 
77  int nz = mp->get_mg()->get_nzone() ;
78 
79  import_asymy(nz, ci) ;
80 
81 }
82 
83  //--------------------------------------//
84  // Importation in inner domains only //
85  //--------------------------------------//
86 
87 void Scalar::import_asymy(int nzet, const Scalar& cm_d) {
88 
89  const Map* mp_d = &(cm_d.get_mp()) ; // Departure mapping
90 
91  // Trivial case : mappings identical !
92  // -----------------------------------
93 
94  if (mp_d == mp) {
95  *this = cm_d ;
96  return ;
97  }
98 
99  // Relative orientation of the two mappings
100  // ----------------------------------------
101 
102  int align_rel = (mp->get_bvect_cart()).get_align()
103  * (mp_d->get_bvect_cart()).get_align() ;
104 
105  switch (align_rel) {
106 
107  case 1 : { // the two mappings have aligned Cartesian axis
108  import_align_asymy(nzet, cm_d) ;
109  break ;
110  }
111 
112  case -1 : { // the two mappings have anti-aligned Cartesian axis
113  import_anti_asymy(nzet, cm_d) ;
114  break ;
115  }
116 
117  default : {
118  cout << "Scalar::import_asymy : unexpected value of align_rel : "
119  << align_rel << endl ;
120  abort() ;
121  break ;
122  }
123 
124  }
125 
126 }
127 
128 
129  //-----------------------------------------//
130  // Case of Cartesian axis anti-aligned //
131  //-----------------------------------------//
132 
133 
134 void Scalar::import_anti_asymy(int nzet, const Scalar& cm_d) {
135 
136  // Trivial case : null Scalar
137  // ------------------------
138 
139  if (cm_d.get_etat() == ETATZERO) {
140  set_etat_zero() ;
141  return ;
142  }
143  if (cm_d.get_etat() == ETATUN) {
144  set_etat_one() ;
145  return ;
146  }
147 
148  const Map* mp_d = &(cm_d.get_mp()) ; // Departure mapping
149 
150  // Protections
151  // -----------
152  int align = (mp->get_bvect_cart()).get_align() ;
153 
154  assert( align * (mp_d->get_bvect_cart()).get_align() == -1 ) ;
155 
156  assert(cm_d.get_etat() == ETATQCQ) ;
157 
158  if (cm_d.get_dzpuis() != 0) {
159  cout <<
160  "Scalar::import_anti_asymy : the dzpuis of the Scalar to be imported"
161  << " must be zero !" << endl ;
162  abort() ;
163  }
164 
165 
166  const Mg3d* mg_a = mp->get_mg() ;
167  assert(mg_a->get_type_p() == NONSYM) ;
168 
169 
170  int nz_a = mg_a->get_nzone() ;
171  assert(nzet <= nz_a) ;
172 
173  const Valeur& va_d = cm_d.get_spectral_va() ;
174  va_d.coef() ; // The coefficients are required
175 
176 
177  // Preparations for storing the result in *this
178  // --------------------------------------------
179  del_t() ; // delete all previously computed derived quantities
180 
181  set_etat_qcq() ; // Set the state to ETATQCQ
182 
183  va.set_etat_c_qcq() ; // Allocates the memory for the Mtbl va.c
184  // if it does not exist already
185  va.c->set_etat_qcq() ; // Allocates the memory for the Tbl's in each
186  // domain if they do not exist already
187 
188 
189  // Departure (x,y,z) coordinates of the origin of the Arrival mapping :
190 
191  double xx_a, yy_a, zz_a ;
192  if (align == 1) {
193  xx_a = mp_d->get_ori_x() - mp->get_ori_x() ;
194  yy_a = mp_d->get_ori_y() - mp->get_ori_y() ;
195  }
196  else {
197  xx_a = mp->get_ori_x() - mp_d->get_ori_x() ;
198  yy_a = mp->get_ori_y() - mp_d->get_ori_y() ;
199  }
200  zz_a = mp->get_ori_z() - mp_d->get_ori_z() ;
201 
202 
203  // r, theta, phi, x, y and z on the Arrival mapping
204  // update of the corresponding Coord's if necessary
205 
206  if ( (mp->r).c == 0x0 ) (mp->r).fait() ;
207  if ( (mp->tet).c == 0x0 ) (mp->tet).fait() ;
208  if ( (mp->phi).c == 0x0 ) (mp->phi).fait() ;
209  if ( (mp->x).c == 0x0 ) (mp->x).fait() ;
210  if ( (mp->y).c == 0x0 ) (mp->y).fait() ;
211  if ( (mp->z).c == 0x0 ) (mp->z).fait() ;
212 
213  const Mtbl* mr_a = (mp->r).c ;
214  const Mtbl* mtet_a = (mp->tet).c ;
215  const Mtbl* mphi_a = (mp->phi).c ;
216  const Mtbl* mx_a = (mp->x).c ;
217  const Mtbl* my_a = (mp->y).c ;
218  const Mtbl* mz_a = (mp->z).c ;
219 
220  Param par_precis ; // Required precision in the method Map::val_lx
221  int nitermax = 100 ; // Maximum number of iteration in the secant method
222  int niter ;
223  double precis = 1e-15 ; // Absolute precision in the secant method
224  par_precis.add_int(nitermax) ;
225  par_precis.add_int_mod(niter) ;
226  par_precis.add_double(precis) ;
227 
228 
229  // Loop of the Arrival domains where the computation is to be performed
230  // --------------------------------------------------------------------
231 
232  for (int l=0; l < nzet; l++) {
233 
234  int nr = mg_a->get_nr(l) ;
235  int nt = mg_a->get_nt(l) ;
236  int np = mg_a->get_np(l) ;
237  int ntnr = nt*nr ;
238 
239  const double* pr_a = mr_a->t[l]->t ; // Pointer on the values of r
240  const double* ptet_a = mtet_a->t[l]->t ; // Pointer on the values of theta
241  const double* pphi_a = mphi_a->t[l]->t ; // Pointer on the values of phi
242  const double* px_a = mx_a->t[l]->t ; // Pointer on the values of X
243  const double* py_a = my_a->t[l]->t ; // Pointer on the values of Y
244  const double* pz_a = mz_a->t[l]->t ; // Pointer on the values of Z
245 
246  (va.c->t[l])->set_etat_qcq() ; // Allocates the array of double to
247  // store the result
248  double* ptx = (va.c->t[l])->t ; // Pointer on the allocated array
249 
250 
251  // Loop on half the grid points in the considered arrival domain
252  // (the other half will be obtained by antisymmetry with respect to
253  // the y=0 plane).
254 
255  // Case k=0 (phi=0) : the function is zero (by antisymmetry)
256  for (int i=0; i<ntnr; i++) {
257  *ptx = 0 ;
258  ptx++ ; // next point
259  }
260 
261  // Go to k=1 :
262  pr_a += ntnr ;
263  ptet_a += ntnr ;
264  pphi_a += ntnr ;
265  px_a += ntnr ;
266  py_a += ntnr ;
267  pz_a += ntnr ;
268 
269  for (int k=1 ; k<np/2 ; k++) { // np/2 : ~ half the grid
270  for (int j=0 ; j<nt ; j++) {
271  for (int i=0 ; i<nr ; i++) {
272 
273  double r = *pr_a ;
274  double rd, tetd, phid ;
275  if (r == __infinity) {
276  rd = r ;
277  tetd = *ptet_a ;
278  phid = *pphi_a + M_PI ;
279  if (phid < 0) phid += 2*M_PI ;
280  }
281  else {
282 
283  // Cartesian coordinates on the Departure mapping
284  double xd = - *px_a + xx_a ;
285  double yd = - *py_a + yy_a ;
286  double zd = *pz_a + zz_a ;
287 
288  // Spherical coordinates on the Departure mapping
289  double rhod2 = xd*xd + yd*yd ;
290  double rhod = sqrt( rhod2 ) ;
291  rd = sqrt(rhod2 + zd*zd) ;
292  tetd = atan2(rhod, zd) ;
293  phid = atan2(yd, xd) ;
294  if (phid < 0) phid += 2*M_PI ;
295  }
296 
297 
298  // NB: to increase the efficiency, the method Scalar::val_point
299  // is not invoked; the method Mtbl_cf::val_point is
300  // called directly instead.
301 
302  // Value of the grid coordinates (l,xi) corresponding to
303  // (rd,tetd,phid) :
304 
305  int ld ; // domain index
306  double xxd ; // radial coordinate xi in [0,1] or [-1,1]
307  mp_d->val_lx(rd, tetd, phid, par_precis, ld, xxd) ;
308 
309  // Value of the Departure Scalar at the obtained point:
310  *ptx = va_d.c_cf->val_point_asymy(ld, xxd, tetd, phid) ;
311 
312  // Next point :
313  ptx++ ;
314  pr_a++ ;
315  ptet_a++ ;
316  pphi_a++ ;
317  px_a++ ;
318  py_a++ ;
319  pz_a++ ;
320 
321  }
322  }
323  }
324 
325  // Case k=np/2 (phi=pi) : the function is zero (by antisymmetry)
326  for (int i=0; i<ntnr; i++) {
327  *ptx = 0 ;
328  ptx++ ; // next point
329  }
330 
331  // Go to k=np/2+1 :
332  pr_a += ntnr ;
333  ptet_a += ntnr ;
334  pphi_a += ntnr ;
335  px_a += ntnr ;
336  py_a += ntnr ;
337  pz_a += ntnr ;
338 
339  // The remaining points are obtained by antisymmetry with rspect to the
340  // y=0 plane
341 
342  for (int k=np/2+1 ; k<np ; k++) {
343 
344  // pointer on the value (already computed) at the point symmetric
345  // with respect to the plane y=0
346  double* ptx_symy = (va.c->t[l])->t + (np-k)*nt*nr ;
347 
348  // copy :
349  for (int j=0 ; j<nt ; j++) {
350  for (int i=0 ; i<nr ; i++) {
351  *ptx = - (*ptx_symy) ;
352  ptx++ ;
353  ptx_symy++ ;
354  }
355  }
356  }
357 
358 
359  } // End of the loop on the Arrival domains
360 
361  // In the remaining domains, *this is set to zero:
362  // ----------------------------------------------
363 
364  if (nzet < nz_a) {
365  annule(nzet, nz_a - 1) ;
366  }
367 
368  // Treatment of dzpuis
369  // -------------------
370 
371  set_dzpuis(0) ;
372 
373 }
374 
375 
376  //-------------------------------------//
377  // Case of aligned Cartesian axis //
378  //-------------------------------------//
379 
380 
381 void Scalar::import_align_asymy(int nzet, const Scalar& cm_d) {
382 
383  // Trivial case : null Scalar
384  // ------------------------
385 
386  if (cm_d.get_etat() == ETATZERO) {
387  set_etat_zero() ;
388  return ;
389  }
390  if (cm_d.get_etat() == ETATUN) {
391  set_etat_one() ;
392  return ;
393  }
394 
395  const Map* mp_d = &(cm_d.get_mp()) ; // Departure mapping
396 
397  // Protections
398  // -----------
399  int align = (mp->get_bvect_cart()).get_align() ;
400 
401  assert( align * (mp_d->get_bvect_cart()).get_align() == 1 ) ;
402 
403  assert(cm_d.get_etat() == ETATQCQ) ;
404 
405  if (cm_d.get_dzpuis() != 0) {
406  cout <<
407  "Scalar::import_align_asymy : the dzpuis of the Scalar to be imported"
408  << " must be zero !" << endl ;
409  abort() ;
410  }
411 
412 
413  const Mg3d* mg_a = mp->get_mg() ;
414  assert(mg_a->get_type_p() == NONSYM) ;
415 
416  int nz_a = mg_a->get_nzone() ;
417  assert(nzet <= nz_a) ;
418 
419  const Valeur& va_d = cm_d.get_spectral_va() ;
420  va_d.coef() ; // The coefficients are required
421 
422 
423  // Preparations for storing the result in *this
424  // --------------------------------------------
425  del_t() ; // delete all previously computed derived quantities
426 
427  set_etat_qcq() ; // Set the state to ETATQCQ
428 
429  va.set_etat_c_qcq() ; // Allocates the memory for the Mtbl va.c
430  // if it does not exist already
431  va.c->set_etat_qcq() ; // Allocates the memory for the Tbl's in each
432  // domain if they do not exist already
433 
434 
435  // Departure (x,y,z) coordinates of the origin of the Arrival mapping :
436 
437  double xx_a, yy_a, zz_a ;
438  if (align == 1) {
439  xx_a = mp->get_ori_x() - mp_d->get_ori_x() ;
440  yy_a = mp->get_ori_y() - mp_d->get_ori_y() ;
441  }
442  else {
443  xx_a = mp_d->get_ori_x() - mp->get_ori_x() ;
444  yy_a = mp_d->get_ori_y() - mp->get_ori_y() ;
445  }
446  zz_a = mp->get_ori_z() - mp_d->get_ori_z() ;
447 
448 
449  // r, theta, phi, x, y and z on the Arrival mapping
450  // update of the corresponding Coord's if necessary
451 
452  if ( (mp->r).c == 0x0 ) (mp->r).fait() ;
453  if ( (mp->tet).c == 0x0 ) (mp->tet).fait() ;
454  if ( (mp->phi).c == 0x0 ) (mp->phi).fait() ;
455  if ( (mp->x).c == 0x0 ) (mp->x).fait() ;
456  if ( (mp->y).c == 0x0 ) (mp->y).fait() ;
457  if ( (mp->z).c == 0x0 ) (mp->z).fait() ;
458 
459  const Mtbl* mr_a = (mp->r).c ;
460  const Mtbl* mtet_a = (mp->tet).c ;
461  const Mtbl* mphi_a = (mp->phi).c ;
462  const Mtbl* mx_a = (mp->x).c ;
463  const Mtbl* my_a = (mp->y).c ;
464  const Mtbl* mz_a = (mp->z).c ;
465 
466  Param par_precis ; // Required precision in the method Map::val_lx
467  int nitermax = 100 ; // Maximum number of iteration in the secant method
468  int niter ;
469  double precis = 1e-15 ; // Absolute precision in the secant method
470  par_precis.add_int(nitermax) ;
471  par_precis.add_int_mod(niter) ;
472  par_precis.add_double(precis) ;
473 
474 
475  // Loop of the Arrival domains where the computation is to be performed
476  // --------------------------------------------------------------------
477 
478  for (int l=0; l < nzet; l++) {
479 
480  int nr = mg_a->get_nr(l) ;
481  int nt = mg_a->get_nt(l) ;
482  int np = mg_a->get_np(l) ;
483  int ntnr = nt*nr ;
484 
485  const double* pr_a = mr_a->t[l]->t ; // Pointer on the values of r
486  const double* ptet_a = mtet_a->t[l]->t ; // Pointer on the values of theta
487  const double* pphi_a = mphi_a->t[l]->t ; // Pointer on the values of phi
488  const double* px_a = mx_a->t[l]->t ; // Pointer on the values of X
489  const double* py_a = my_a->t[l]->t ; // Pointer on the values of Y
490  const double* pz_a = mz_a->t[l]->t ; // Pointer on the values of Z
491 
492  (va.c->t[l])->set_etat_qcq() ; // Allocates the array of double to
493  // store the result
494  double* ptx = (va.c->t[l])->t ; // Pointer on the allocated array
495 
496 
497 
498  // Loop on half the grid points in the considered arrival domain
499  // (the other half will be obtained by antisymmetry with respect to
500  // the y=0 plane).
501 
502  // Case k=0 (phi=0) : the function is zero (by antisymmetry)
503  for (int i=0; i<ntnr; i++) {
504  *ptx = 0 ;
505  ptx++ ; // next point
506  }
507 
508  // Go to k=1 :
509  pr_a += ntnr ;
510  ptet_a += ntnr ;
511  pphi_a += ntnr ;
512  px_a += ntnr ;
513  py_a += ntnr ;
514  pz_a += ntnr ;
515 
516  for (int k=1 ; k<np/2 ; k++) { // np/2 : ~ half the grid
517  for (int j=0 ; j<nt ; j++) {
518  for (int i=0 ; i<nr ; i++) {
519 
520  double r = *pr_a ;
521  double rd, tetd, phid ;
522  if (r == __infinity) {
523  rd = r ;
524  tetd = *ptet_a ;
525  phid = *pphi_a ;
526  }
527  else {
528 
529  // Cartesian coordinates on the Departure mapping
530  double xd = *px_a + xx_a ;
531  double yd = *py_a + yy_a ;
532  double zd = *pz_a + zz_a ;
533 
534  // Spherical coordinates on the Departure mapping
535  double rhod2 = xd*xd + yd*yd ;
536  double rhod = sqrt( rhod2 ) ;
537  rd = sqrt(rhod2 + zd*zd) ;
538  tetd = atan2(rhod, zd) ;
539  phid = atan2(yd, xd) ;
540  if (phid < 0) phid += 2*M_PI ;
541  }
542 
543 
544  // NB: to increase the efficiency, the method Scalar::val_point
545  // is not invoked; the method Mtbl_cf::val_point is
546  // called directly instead.
547 
548  // Value of the grid coordinates (l,xi) corresponding to
549  // (rd,tetd,phid) :
550 
551  int ld ; // domain index
552  double xxd ; // radial coordinate xi in [0,1] or [-1,1]
553  mp_d->val_lx(rd, tetd, phid, par_precis, ld, xxd) ;
554 
555  // Value of the Departure Scalar at the obtained point:
556  *ptx = va_d.c_cf->val_point_asymy(ld, xxd, tetd, phid) ;
557 
558  // Next point :
559  ptx++ ;
560  pr_a++ ;
561  ptet_a++ ;
562  pphi_a++ ;
563  px_a++ ;
564  py_a++ ;
565  pz_a++ ;
566 
567  }
568  }
569  }
570 
571 
572  // Case k=np/2 (phi=pi) : the function is zero (by antisymmetry)
573  for (int i=0; i<ntnr; i++) {
574  *ptx = 0 ;
575  ptx++ ; // next point
576  }
577 
578  // Go to k=np/2+1 :
579  pr_a += ntnr ;
580  ptet_a += ntnr ;
581  pphi_a += ntnr ;
582  px_a += ntnr ;
583  py_a += ntnr ;
584  pz_a += ntnr ;
585 
586  // The remaining points are obtained by antisymmetry with respect to the
587  // y=0 plane
588 
589  for (int k=np/2+1 ; k<np ; k++) {
590 
591  // pointer on the value (already computed) at the point symmetric
592  // with respect to the plane y=0
593  double* ptx_symy = (va.c->t[l])->t + (np-k)*nt*nr ;
594 
595  // copy :
596  for (int j=0 ; j<nt ; j++) {
597  for (int i=0 ; i<nr ; i++) {
598  *ptx = - (*ptx_symy) ;
599  ptx++ ;
600  ptx_symy++ ;
601  }
602  }
603  }
604 
605  } // End of the loop on the Arrival domains
606 
607  // In the remaining domains, *this is set to zero:
608  // ----------------------------------------------
609 
610  if (nzet < nz_a) {
611  annule(nzet, nz_a - 1) ;
612  }
613 
614  // Treatment of dzpuis
615  // -------------------
616 
617  set_dzpuis(0) ;
618 
619 }
620 }
int get_type_p() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the transformatio...
Definition: grilles.h:512
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Definition: valeur.h:312
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition: param.C:249
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
Definition: grilles.h:479
void coef() const
Computes the coeffcients of *this.
Definition: valeur_coef.C:151
virtual void set_etat_zero()
Sets the logical state to ETATZERO (zero).
Definition: scalar.C:330
virtual void annule(int l_min, int l_max)
Sets the Scalar to zero in several domains.
Definition: scalar.C:397
Multi-domain array.
Definition: mtbl.h:118
double get_ori_y() const
Returns the y coordinate of the origin.
Definition: map.h:782
Lorene prototypes.
Definition: app_hor.h:67
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition: map.h:777
Tensor field of valence 0 (or component of a tensorial field).
Definition: scalar.h:393
Base class for coordinate mappings.
Definition: map.h:682
double get_ori_x() const
Returns the x coordinate of the origin.
Definition: map.h:780
Values and coefficients of a (real-value) function.
Definition: valeur.h:297
int get_etat() const
Returns the logical state ETATNONDEF (undefined), ETATZERO (null) or ETATQCQ (ordinary).
Definition: scalar.h:560
virtual void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: scalar.C:359
friend Scalar sqrt(const Scalar &)
Square root.
Definition: scalar_math.C:266
Coord tet
coordinate centered on the grid
Definition: map.h:731
void set_dzpuis(int)
Modifies the dzpuis flag.
Definition: scalar.C:814
Coord phi
coordinate centered on the grid
Definition: map.h:732
int get_dzpuis() const
Returns dzpuis.
Definition: scalar.h:563
double * t
The array of double.
Definition: tbl.h:176
Mtbl * c
Values of the function at the points of the multi-grid.
Definition: valeur.h:309
Parameter storage.
Definition: param.h:125
void set_etat_one()
Sets the logical state to ETATUN (one).
Definition: scalar.C:340
int get_nzone() const
Returns the number of domains.
Definition: grilles.h:465
Valeur va
The numerical value of the Scalar.
Definition: scalar.h:411
void del_t()
Logical destructor.
Definition: scalar.C:285
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition: mtbl.C:302
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition: grilles.h:469
Multi-domain grid.
Definition: grilles.h:279
void import_anti_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have anti-aligned ...
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition: map.h:803
Coord y
y coordinate centered on the grid
Definition: map.h:739
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition: param.C:318
Coord x
x coordinate centered on the grid
Definition: map.h:738
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c )...
Definition: valeur.C:704
double get_ori_z() const
Returns the z coordinate of the origin.
Definition: map.h:784
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Definition: grilles.h:474
const Map *const mp
Mapping on which the numerical values at the grid points are defined.
Definition: tensor.h:301
Tbl ** t
Array (size nzone ) of pointers on the Tbl &#39;s.
Definition: mtbl.h:132
void import_align_asymy(int nzet, const Scalar &ci)
Assignment to another Scalar defined on a different mapping, when the two mappings have aligned Carte...
const Map & get_mp() const
Returns the mapping.
Definition: tensor.h:874
Coord z
z coordinate centered on the grid
Definition: map.h:740
void import_asymy(const Scalar &ci)
Assignment to another Scalar defined on a different mapping.
double val_point_asymy(int l, double x, double theta, double phi) const
Computes the value of the field represented by *this at an arbitrary point, by means of the spectral ...
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition: param.C:388
const Valeur & get_spectral_va() const
Returns va (read only version)
Definition: scalar.h:607
Coord r
r coordinate centered on the grid
Definition: map.h:730
virtual void val_lx(double rr, double theta, double pphi, int &l, double &xi) const =0
Computes the domain index l and the value of corresponding to a point given by its physical coordina...