84 const Map* mp_d = cm_d.
mp ;
113 cout <<
"Cmp::import_symy : unexpected value of align_rel : " 114 << align_rel << endl ;
134 if (cm_d.
etat == ETATZERO) {
139 const Map* mp_d = cm_d.
mp ;
147 assert(cm_d.
etat == ETATQCQ) ;
151 "Cmp::import_anti_symy : the dzpuis of the Cmp to be imported" 152 <<
" must be zero !" << endl ;
161 assert(nzet <= nz_a) ;
181 double xx_a, yy_a, zz_a ;
196 if ( (
mp->
r).c == 0x0 ) (
mp->
r).fait() ;
199 if ( (
mp->
x).c == 0x0 ) (
mp->
x).fait() ;
200 if ( (
mp->
y).c == 0x0 ) (
mp->
y).fait() ;
201 if ( (
mp->
z).c == 0x0 ) (
mp->
z).fait() ;
213 double precis = 1e-15 ;
222 for (
int l=0; l < nzet; l++) {
224 int nr = mg_a->
get_nr(l) ;
225 int nt = mg_a->
get_nt(l) ;
226 int np = mg_a->
get_np(l) ;
229 const double* pr_a = mr_a->
t[l]->
t ;
230 const double* ptet_a = mtet_a->
t[l]->
t ;
231 const double* pphi_a = mphi_a->
t[l]->
t ;
232 const double* px_a = mx_a->
t[l]->
t ;
233 const double* py_a = my_a->
t[l]->
t ;
234 const double* pz_a = mz_a->
t[l]->
t ;
238 double* ptx = (
va.
c->
t[l])->t ;
245 for (
int k=0 ; k<np/2+1 ; k++) {
246 for (
int j=0 ; j<nt ; j++) {
247 for (
int i=0 ; i<nr ; i++) {
250 double rd, tetd, phid ;
251 if (r == __infinity) {
254 phid = *pphi_a + M_PI ;
255 if (phid < 0) phid += 2*M_PI ;
260 double xd = - *px_a + xx_a ;
261 double yd = - *py_a + yy_a ;
262 double zd = *pz_a + zz_a ;
265 double rhod2 = xd*xd + yd*yd ;
266 double rhod =
sqrt( rhod2 ) ;
267 rd =
sqrt(rhod2 + zd*zd) ;
268 tetd = atan2(rhod, zd) ;
269 phid = atan2(yd, xd) ;
270 if (phid < 0) phid += 2*M_PI ;
283 mp_d->
val_lx(rd, tetd, phid, par_precis, ld, xxd) ;
304 for (
int k=np/2+1 ; k<np ; k++) {
308 double* ptx_symy = (
va.
c->
t[l])->t + (np-k)*nt*nr ;
311 for (
int j=0 ; j<nt ; j++) {
312 for (
int i=0 ; i<nr ; i++) {
348 if (cm_d.
etat == ETATZERO) {
353 const Map* mp_d = cm_d.
mp ;
361 assert(cm_d.
etat == ETATQCQ) ;
365 "Cmp::import_align_symy : the dzpuis of the Cmp to be imported" 366 <<
" must be zero !" << endl ;
375 assert(nzet <= nz_a) ;
395 double xx_a, yy_a, zz_a ;
410 if ( (
mp->
r).c == 0x0 ) (
mp->
r).fait() ;
413 if ( (
mp->
x).c == 0x0 ) (
mp->
x).fait() ;
414 if ( (
mp->
y).c == 0x0 ) (
mp->
y).fait() ;
415 if ( (
mp->
z).c == 0x0 ) (
mp->
z).fait() ;
427 double precis = 1e-15 ;
436 for (
int l=0; l < nzet; l++) {
438 int nr = mg_a->
get_nr(l) ;
439 int nt = mg_a->
get_nt(l) ;
440 int np = mg_a->
get_np(l) ;
443 const double* pr_a = mr_a->
t[l]->
t ;
444 const double* ptet_a = mtet_a->
t[l]->
t ;
445 const double* pphi_a = mphi_a->
t[l]->
t ;
446 const double* px_a = mx_a->
t[l]->
t ;
447 const double* py_a = my_a->
t[l]->
t ;
448 const double* pz_a = mz_a->
t[l]->
t ;
452 double* ptx = (
va.
c->
t[l])->t ;
460 for (
int k=0 ; k<np/2+1 ; k++) {
461 for (
int j=0 ; j<nt ; j++) {
462 for (
int i=0 ; i<nr ; i++) {
465 double rd, tetd, phid ;
466 if (r == __infinity) {
474 double xd = *px_a + xx_a ;
475 double yd = *py_a + yy_a ;
476 double zd = *pz_a + zz_a ;
479 double rhod2 = xd*xd + yd*yd ;
480 double rhod =
sqrt( rhod2 ) ;
481 rd =
sqrt(rhod2 + zd*zd) ;
482 tetd = atan2(rhod, zd) ;
483 phid = atan2(yd, xd) ;
484 if (phid < 0) phid += 2*M_PI ;
497 mp_d->
val_lx(rd, tetd, phid, par_precis, ld, xxd) ;
519 for (
int k=np/2+1 ; k<np ; k++) {
523 double* ptx_symy = (
va.
c->
t[l])->t + (np-k)*nt*nr ;
526 for (
int j=0 ; j<nt ; j++) {
527 for (
int i=0 ; i<nr ; i++) {
int get_type_p() const
Returns the type of sampling in the direction: SYM : : symmetry with respect to the transformatio...
void del_t()
Logical destructor.
Mtbl_cf * c_cf
Coefficients of the spectral expansion of the function.
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
int get_np(int l) const
Returns the number of points in the azimuthal direction ( ) in domain no. l.
void coef() const
Computes the coeffcients of *this.
Cmp sqrt(const Cmp &)
Square root.
void annule(int l)
Sets the Cmp to zero in a given domain.
double get_ori_y() const
Returns the y coordinate of the origin.
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
int etat
Logical state (ETATNONDEF , ETATQCQ or ETATZERO ).
Base class for coordinate mappings.
double get_ori_x() const
Returns the x coordinate of the origin.
Values and coefficients of a (real-value) function.
Coord tet
coordinate centered on the grid
Coord phi
coordinate centered on the grid
void set_etat_zero()
Sets the logical state to ETATZERO (zero).
void import_align_symy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have aligned Cartesia...
int dzpuis
Power of r by which the quantity represented by this must be divided in the external compactified zo...
double * t
The array of double.
Mtbl * c
Values of the function at the points of the multi-grid.
int get_nzone() const
Returns the number of domains.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
void import_symy(const Cmp &ci)
Assignment to another Cmp defined on a different mapping.
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
double val_point_symy(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 ...
const Map * mp
Reference mapping.
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Coord y
y coordinate centered on the grid
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
void import_anti_symy(int nzet, const Cmp &ci)
Assignment to another Cmp defined on a different mapping, when the two mappings have anti-aligned Car...
Coord x
x coordinate centered on the grid
void set_etat_c_qcq()
Sets the logical state to ETATQCQ (ordinary state) for values in the configuration space (Mtbl c )...
double get_ori_z() const
Returns the z coordinate of the origin.
void set_dzpuis(int)
Set a value to dzpuis.
int get_nt(int l) const
Returns the number of points in the co-latitude direction ( ) in domain no. l.
Tbl ** t
Array (size nzone ) of pointers on the Tbl 's.
Coord z
z coordinate centered on the grid
Valeur va
The numerical value of the Cmp.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Coord r
r coordinate centered on the grid
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...