LORENE
map_af.C
1/*
2 * Methods of class Map_af
3 *
4 * (see file map.h for documentation)
5 *
6 */
7
8/*
9 * Copyright (c) 1999-2003 Eric Gourgoulhon
10 * Copyright (c) 1999-2001 Philippe Grandclement
11 *
12 * This file is part of LORENE.
13 *
14 * LORENE is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * LORENE is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with LORENE; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 *
28 */
29
30
31char map_af_C[] = "$Header: /cvsroot/Lorene/C++/Source/Map/map_af.C,v 1.19 2014/10/13 08:53:02 j_novak Exp $" ;
32
33/*
34 * $Id: map_af.C,v 1.19 2014/10/13 08:53:02 j_novak Exp $
35 * $Log: map_af.C,v $
36 * Revision 1.19 2014/10/13 08:53:02 j_novak
37 * Lorene classes and functions now belong to the namespace Lorene.
38 *
39 * Revision 1.18 2014/10/06 15:13:11 j_novak
40 * Modified #include directives to use c++ syntax.
41 *
42 * Revision 1.17 2013/06/05 15:10:42 j_novak
43 * Suppression of FINJAC sampling in r. This Jacobi(0,2) base is now
44 * available by setting colloc_r to BASE_JAC02 in the Mg3d constructor.
45 *
46 * Revision 1.16 2012/01/17 15:34:35 j_penner
47 * *** empty log message ***
48 *
49 * Revision 1.15 2012/01/17 10:31:32 j_penner
50 * added access to computational coordinate xi
51 *
52 * Revision 1.14 2008/09/29 13:23:51 j_novak
53 * Implementation of the angular mapping associated with an affine
54 * mapping. Things must be improved to take into account the domain index.
55 *
56 * Revision 1.13 2008/08/19 06:42:00 j_novak
57 * Minor modifications to avoid warnings with gcc 4.3. Most of them concern
58 * cast-type operations, and constant strings that must be defined as const char*
59 *
60 * Revision 1.12 2007/12/21 11:05:33 j_novak
61 * Put back the constructor from a Mg3d and a Tbl (it had disappeared?).
62 *
63 * Revision 1.11 2007/12/20 09:11:04 jl_cornou
64 * Correction of an error in op_sxpun about Jacobi(0,2) polynomials
65 *
66 * Revision 1.10 2007/12/11 15:28:14 jl_cornou
67 * Jacobi(0,2) polynomials partially implemented
68 *
69 * Revision 1.9 2006/04/25 07:21:59 p_grandclement
70 * Various changes for the NS_BH project
71 *
72 * Revision 1.8 2005/08/29 15:10:18 p_grandclement
73 * Addition of things needed :
74 * 1) For BBH with different masses
75 * 2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
76 * WORKING YET !!!
77 *
78 * Revision 1.7 2004/12/02 09:33:06 p_grandclement
79 * *** empty log message ***
80 *
81 * Revision 1.6 2004/03/25 10:29:23 j_novak
82 * All LORENE's units are now defined in the namespace Unites (in file unites.h).
83 *
84 * Revision 1.5 2004/01/29 08:50:03 p_grandclement
85 * Modification of Map::operator==(const Map&) and addition of the surface
86 * integrales using Scalar.
87 *
88 * Revision 1.4 2003/10/15 10:33:11 e_gourgoulhon
89 * Added new Coord's : drdt, srdrdp.
90 *
91 * Revision 1.3 2002/10/16 14:36:41 j_novak
92 * Reorganization of #include instructions of standard C++, in order to
93 * use experimental version 3 of gcc.
94 *
95 * Revision 1.2 2001/12/04 21:27:53 e_gourgoulhon
96 *
97 * All writing/reading to a binary file are now performed according to
98 * the big endian convention, whatever the system is big endian or
99 * small endian, thanks to the functions fwrite_be and fread_be
100 *
101 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
102 * LORENE
103 *
104 * Revision 2.23 2001/02/28 11:04:05 eric
105 * 1ere version testee de resize.
106 *
107 * Revision 2.22 2001/02/26 17:29:22 eric
108 * Ajout de la fonction resize.
109 *
110 * Revision 2.21 2001/01/10 11:03:13 phil
111 * ajout de homothetie interne
112 *
113 * Revision 2.20 2000/01/24 17:09:13 eric
114 * suppression de la fonction convert.
115 * suppression du constructeur par convertion d'un Map_et.
116 * ajout du constructeur par conversion d'un Map.
117 *
118 * Revision 2.19 2000/01/24 16:42:48 eric
119 * Dans operator=(const Map_af& ), appel de set_rot_phi.
120 * Ajout de la fonction convert(const Map& ).
121 *
122 * Revision 2.18 1999/12/21 16:27:26 eric
123 * Ajout du constructeur par conversion Map_af::Map_af(const Map_et&).
124 * Ajout des fonctions Map_af::set_alpha et Map_af::set_beta.
125 *
126 * Revision 2.17 1999/12/17 09:14:43 eric
127 * Amelioration de l'affichage.
128 *
129 * Revision 2.16 1999/12/06 13:12:23 eric
130 * Introduction de la fonction homothetie.
131 *
132 * Revision 2.15 1999/11/25 16:28:53 eric
133 * Le calcul des derivees partielles est transfere dans le fichier
134 * map_af_deriv.C.
135 *
136 * Revision 2.14 1999/11/24 14:32:54 eric
137 * Les prototypes des fonctions de constructions des coords sont desormais
138 * dans map.h.
139 * Introduction des fonctions get_alpha() et get_beta().
140 * /
141 *
142 * Revision 2.13 1999/11/22 10:36:14 eric
143 * Introduction de la fonction set_coord().
144 * Fonction del_coord() rebaptisee reset_coord().
145 *
146 * Revision 2.12 1999/10/27 08:46:29 eric
147 * Introduction de Cmp::va a la place de *(Cmp::c).
148 *
149 * Revision 2.11 1999/10/15 09:23:10 eric
150 * *** empty log message ***
151 *
152 * Revision 2.10 1999/10/15 09:16:23 eric
153 * Changement prototypes: const.
154 *
155 * Revision 2.9 1999/10/14 14:27:05 eric
156 * Depoussierage.
157 *
158 * Revision 2.8 1999/04/12 12:54:05 phil
159 * *** empty log message ***
160 *
161 * Revision 2.7 1999/04/12 12:09:03 phil
162 * Mise a jour des bases dans dsdr()
163 *
164 * Revision 2.6 1999/03/04 13:11:48 eric
165 * Ajout des Coord representant les derivees du changement de variable.
166 *
167 * Revision 2.5 1999/03/03 11:19:08 hyc
168 * *** empty log message ***
169 *
170 *
171 * $Header: /cvsroot/Lorene/C++/Source/Map/map_af.C,v 1.19 2014/10/13 08:53:02 j_novak Exp $
172 *
173 */
174
175// headers C
176#include <cmath>
177
178// headers Lorene
179#include "cmp.h"
180#include "utilitaires.h"
181#include "proto.h"
182#include "unites.h"
183
184 //---------------//
185 // Constructeurs //
186 //---------------//
187
188// Constructor from a grid
189// -----------------------
190namespace Lorene {
191Map_af::Map_af(const Mg3d& mgrille, const double* bornes) : Map_radial(mgrille)
192{
193 // Les coordonnees et les derivees du changement de variable
194 set_coord() ;
195
196 // Les bornes
197 int nzone = mg->get_nzone() ;
198
199 alpha = new double[nzone] ;
200 beta = new double[nzone] ;
201
202 for (int l=0 ; l<nzone ; l++) {
203 switch (mg->get_type_r(l)) {
204 case RARE: {
205 alpha[l] = bornes[l+1] - bornes[l] ;
206 beta[l] = bornes[l] ;
207 break ;
208 }
209
210 case FIN: {
211 alpha[l] = (bornes[l+1] - bornes[l]) * .5 ;
212 beta[l] = (bornes[l+1] + bornes[l]) * .5 ;
213 break ;
214 }
215
216 case UNSURR: {
217 double umax = 1./bornes[l] ;
218 double umin = 1./bornes[l+1] ;
219 alpha[l] = (umin - umax) * .5 ; // u est une fonction decroissante
220 beta[l] = (umin + umax) * .5 ; // de l'indice i en r
221 break ;
222 }
223
224 default: {
225 cout << "Map_af::Map_af: unkown type_r ! " << endl ;
226 abort () ;
227 break ;
228 }
229
230 }
231 } // Fin de la boucle sur zone
232}
233
234// Constructor from a grid
235// -----------------------
236Map_af::Map_af(const Mg3d& mgrille, const Tbl& bornes) : Map_radial(mgrille)
237{
238 // Les coordonnees et les derivees du changement de variable
239 set_coord() ;
240
241 // Les bornes
242 int nzone = mg->get_nzone() ;
243
244 alpha = new double[nzone] ;
245 beta = new double[nzone] ;
246
247 for (int l=0 ; l<nzone ; l++) {
248 switch (mg->get_type_r(l)) {
249 case RARE: {
250 alpha[l] = bornes(l+1) - bornes(l) ;
251 beta[l] = bornes(l) ;
252 break ;
253 }
254
255 case FIN: {
256 alpha[l] = (bornes(l+1) - bornes(l)) * .5 ;
257 beta[l] = (bornes(l+1) + bornes(l)) * .5 ;
258 break ;
259 }
260
261 case UNSURR: {
262 assert (l==nzone-1) ;
263 double umax = 1./bornes(l) ;
264 double umin = 0 ;
265 alpha[l] = (umin - umax) * .5 ; // u est une fonction decroissante
266 beta[l] = (umin + umax) * .5 ; // de l'indice i en r
267 break ;
268 }
269
270 default: {
271 cout << "Map_af::Map_af: unkown type_r ! " << endl ;
272 abort () ;
273 break ;
274 }
275
276 }
277 } // Fin de la boucle sur zone
278}
279
280// Copy constructor
281// ----------------
283{
284 // Les coordonnees et les derivees du changement de variable
285 set_coord() ;
286
287 // Les bornes
288 int nzone = mg->get_nzone() ;
289
290 alpha = new double[nzone] ;
291 beta = new double[nzone] ;
292
293 for (int l=0; l<nzone; l++){
294 alpha[l] = mp.alpha[l] ;
295 beta[l] = mp.beta[l] ;
296 }
297}
298
299// Constructor from file
300// ---------------------
301Map_af::Map_af(const Mg3d& mgi, FILE* fd) : Map_radial(mgi, fd)
302{
303 int nz = mg->get_nzone() ;
304 alpha = new double[nz] ;
305 beta = new double[nz] ;
306 fread_be(alpha, sizeof(double), nz, fd) ;
307 fread_be(beta, sizeof(double), nz, fd) ;
308
309 // Les coordonnees et les derivees du changement de variable
310 set_coord() ;
311}
312
313
314
315// Constructor from a Map
316// -----------------------
317Map_af::Map_af(const Map& mpi) : Map_radial(*(mpi.get_mg()))
318{
319 // Les coordonnees et les derivees du changement de variable
320 set_coord() ;
321
322 // Les bornes
323 int nz = mg->get_nzone() ;
324
325 alpha = new double[nz] ;
326 beta = new double[nz] ;
327
328 const Map_af* mp0 = dynamic_cast<const Map_af*>(&mpi) ;
329 const Map_et* mp1 = dynamic_cast<const Map_et*>(&mpi) ;
330
331 if( (mp0 == 0x0) && (mp1 == 0x0) ) {
332 cout << "Map_af::Map_af(const Map& ) : unkown mapping type !"
333 << endl ;
334 abort() ;
335 }
336
337 if (mp0 != 0x0) {
338 assert( mp1 == 0x0 ) ;
339 for (int l=0; l<nz; l++){
340 alpha[l] = mp0->get_alpha()[l] ;
341 beta[l] = mp0->get_beta()[l] ;
342 }
343 }
344
345
346 if (mp1 != 0x0) {
347 assert( mp0 == 0x0 ) ;
348 for (int l=0; l<nz; l++){
349 alpha[l] = mp1->get_alpha()[l] ;
350 beta[l] = mp1->get_beta()[l] ;
351 }
352 }
353
354
355 set_ori( mpi.get_ori_x(), mpi.get_ori_y(), mpi.get_ori_z() ) ;
356
357 set_rot_phi( mpi.get_rot_phi() ) ;
358
359}
360
361
362
363
364 //--------------//
365 // Destructeurs //
366 //--------------//
367
369 delete [] alpha ;
370 delete [] beta ;
371}
372
373 //-------------//
374 // Assignement //
375 //-------------//
376
377// From another Map_af
378// -------------------
379
380void Map_af::operator=(const Map_af & mpi) {
381
382 assert(mpi.mg == mg) ;
383
384 set_ori( mpi.ori_x, mpi.ori_y, mpi.ori_z ) ;
385
386 set_rot_phi( mpi.rot_phi ) ;
387
388 for (int l = 0; l<mg->get_nzone(); l++) {
389 alpha[l] = mpi.alpha[l] ;
390 beta[l] = mpi.beta[l] ;
391 }
392
393 reset_coord() ;
394}
395
396
397
398
399 //-------------------------------------------------//
400 // Assignement of the Coord building functions //
401 //-------------------------------------------------//
402
404
405 // ... Coord's introduced by the base class Map :
406 r.set(this, map_af_fait_r) ;
407 tet.set(this, map_af_fait_tet) ;
408 phi.set(this, map_af_fait_phi) ;
409 sint.set(this, map_af_fait_sint) ;
410 cost.set(this, map_af_fait_cost) ;
411 sinp.set(this, map_af_fait_sinp) ;
412 cosp.set(this, map_af_fait_cosp) ;
413
414 x.set(this, map_af_fait_x) ;
415 y.set(this, map_af_fait_y) ;
416 z.set(this, map_af_fait_z) ;
417
418 xa.set(this, map_af_fait_xa) ;
419 ya.set(this, map_af_fait_ya) ;
420 za.set(this, map_af_fait_za) ;
421
422 // ... Coord's introduced by the base class Map_radial :
423 xsr.set(this, map_af_fait_xsr) ;
424 dxdr.set(this, map_af_fait_dxdr) ;
425 drdt.set(this, map_af_fait_drdt) ;
426 stdrdp.set(this, map_af_fait_stdrdp) ;
427 srdrdt.set(this, map_af_fait_srdrdt) ;
428 srstdrdp.set(this, map_af_fait_srstdrdp) ;
429 sr2drdt.set(this, map_af_fait_sr2drdt) ;
430 sr2stdrdp.set(this, map_af_fait_sr2stdrdp) ;
431 d2rdx2.set(this, map_af_fait_d2rdx2) ;
432 lapr_tp.set(this, map_af_fait_lapr_tp) ;
433 d2rdtdx.set(this, map_af_fait_d2rdtdx) ;
434 sstd2rdpdx.set(this, map_af_fait_sstd2rdpdx) ;
435 sr2d2rdt2.set(this, map_af_fait_sr2d2rdt2) ;
436
437}
438// Comparison operator :
439bool Map_af::operator==(const Map& mpi) const {
440
441 // Precision of the comparison
442 double precis = 1e-10 ;
443 bool resu = true ;
444
445 // Dynamic cast pour etre sur meme Map...
446 const Map_af* mp0 = dynamic_cast<const Map_af*>(&mpi) ;
447 if (mp0 == 0x0)
448 resu = false ;
449 else {
450 if (*mg != *(mpi.get_mg()))
451 resu = false ;
452
453 if (fabs(ori_x-mpi.get_ori_x()) > precis) resu = false ;
454 if (fabs(ori_y-mpi.get_ori_y()) > precis) resu = false ;
455 if (fabs(ori_z-mpi.get_ori_z()) > precis) resu = false ;
456
457 if (bvect_spher != mpi.get_bvect_spher()) resu = false ;
458 if (bvect_cart != mpi.get_bvect_cart()) resu = false ;
459
460 int nz = mg->get_nzone() ;
461 for (int i=0 ; i<nz ; i++) {
462 if (fabs(alpha[i]-mp0->alpha[i])/fabs(alpha[i]) > precis)
463 resu = false ;
464 if ((i!=0) && (i!=nz-1))
465 if (fabs(beta[i]-mp0->beta[i])/fabs(beta[i]) > precis)
466 resu = false ;
467 }
468 }
469
470 return resu ;
471}
472
473 //--------------------------------------//
474 // Extraction of the mapping parameters //
475 //--------------------------------------//
476
477const double* Map_af::get_alpha() const {
478 return alpha ;
479}
480
481const double* Map_af::get_beta() const {
482 return beta ;
483}
484
485 //------------//
486 // Sauvegarde //
487 //------------//
488
489void Map_af::sauve(FILE* fd) const {
490
491 Map_radial::sauve(fd) ;
492
493 int nz = mg->get_nzone() ;
494 fwrite_be(alpha, sizeof(double), nz, fd) ;
495 fwrite_be(beta, sizeof(double), nz, fd) ;
496
497}
498
499 //------------//
500 // Impression //
501 //------------//
502
503ostream & Map_af::operator>>(ostream & ost) const {
504
505 using namespace Unites ;
506
507 ost << "Affine mapping (class Map_af)" << endl ;
508 int nz = mg->get_nzone() ;
509 for (int l=0; l<nz; l++) {
510 ost << " Domain #" << l << " : alpha_l = " << alpha[l]
511 << " , beta_l = " << beta[l] << endl ;
512 }
513
514 ost << endl << " Values of r at the outer boundary of each domain [km] :"
515 << endl ;
516 ost << " val_r : " ;
517 for (int l=0; l<nz; l++) {
518 ost << " " << val_r(l, 1., 0., 0.) / km ;
519 }
520 ost << endl ;
521
522 ost << " Coord r : " ;
523 for (int l=0; l<nz; l++) {
524 int nrm1 = mg->get_nr(l) - 1 ;
525 ost << " " << (+r)(l, 0, 0, nrm1) / km ;
526 }
527 ost << endl ;
528
529 return ost ;
530}
531
532 //------------------//
533 // Homothetie //
534 //------------------//
535
536
537void Map_af::homothetie(double fact) {
538
539 int nz = mg->get_nzone() ;
540
541 for (int l=0; l<nz; l++) {
542 if (mg->get_type_r(l) == UNSURR) {
543 alpha[l] /= fact ;
544 beta[l] /= fact ;
545 }
546 else {
547 alpha[l] *= fact ;
548 beta[l] *= fact ;
549 }
550 }
551
552 reset_coord() ;
553
554}
555
556 //----------------------------//
557 // Rescaling of one domain //
558 //----------------------------//
559
560void Map_af::resize(int l, double lambda) {
561
562 // Protections
563 // -----------
564 if (mg->get_type_r(l) != FIN) {
565 cout << "Map_af::resize can be applied only to a shell !" << endl ;
566 abort() ;
567 }
568
569 // New values of alpha and beta in domain l :
570 // ----------------------------------------
571 double n_alpha = 0.5 * ( (lambda + 1.) * alpha[l] +
572 (lambda - 1.) * beta[l] ) ;
573
574 double n_beta = 0.5 * ( (lambda - 1.) * alpha[l] +
575 (lambda + 1.) * beta[l] ) ;
576
577 alpha[l] = n_alpha ;
578 beta[l] = n_beta ;
579
580 // New values of alpha and beta in domain l+1 :
581 // ------------------------------------------
582 assert(l<mg->get_nzone()-1) ;
583 int lp1 = l + 1 ;
584
585 if (mg->get_type_r(lp1) == UNSURR) { // compactified case
586
587 alpha[lp1] = - 0.5 / ( alpha[l] + beta[l] ) ;
588 beta[lp1] = - alpha[lp1] ;
589
590 }
591 else{ // non-compactified case
592
593 assert( mg->get_type_r(lp1) == FIN ) ;
594 n_alpha = 0.5 * ( alpha[lp1] - alpha[l] + beta[lp1] - beta[l] ) ;
595 n_beta = 0.5 * ( alpha[lp1] + alpha[l] + beta[lp1] + beta[l] ) ;
596 alpha[lp1] = n_alpha ;
597 beta[lp1] = n_beta ;
598 }
599
600 // The coords are no longer up to date :
601 reset_coord() ;
602
603}
604
605
606
607
608
609 //---------------------------//
610 // Homothetie partielle //
611 //-------------------------//
612
613
614void Map_af::homothetie_interne(double fact) {
615
616 // Dans le noyau
617 alpha[0] *= fact ;
618
619 // Dans la premiere coquille :
620 double asauve = alpha[1] ;
621 alpha[1] = (1-fact)/2.*beta[1] + (1+fact)/2. * alpha[1] ;
622 beta[1] = (1+fact)/2.*beta[1]+ (1-fact)/2. * asauve ;
623
624 reset_coord() ;
625}
626 //------------------------------------------//
627 // Modification of the mapping parameters //
628 //------------------------------------------//
629
630void Map_af::set_alpha(double alpha0, int l) {
631
632 assert(l>=0) ;
633 assert(l<mg->get_nzone()) ;
634
635 alpha[l] = alpha0 ;
636
637 reset_coord() ;
638
639}
640
641void Map_af::set_beta(double beta0, int l) {
642
643 assert(l>=0) ;
644 assert(l<mg->get_nzone()) ;
645
646 beta[l] = beta0 ;
647
648 reset_coord() ;
649
650}
651
652 //------------------------------------//
653 // Angular part of the mapping //
654 //------------------------------------//
655
656const Map_af& Map_af::mp_angu(int l_zone) const {
657//## the handling of l_zone must be improved
658 if (p_mp_angu == 0x0) {
659 const Mg3d& g_angu = (*get_mg()->get_angu_1dom()) ;
660 double Rb = val_r_jk(l_zone, 1., 0, 0) ;
661 Tbl rlim(2) ;
662 rlim.set_etat_qcq() ;
663 rlim.set(0) = Rb ;
664 rlim.set(1) = Rb ;
665 p_mp_angu = new Map_af(g_angu, rlim) ;
666 }
667 return *p_mp_angu ;
668}
669
670// To be done
671//-----------
672
673void Map_af::adapt(const Cmp&, const Param&, int) {
674 const char* f = __FILE__ ;
675 c_est_pas_fait(f) ;
676}
677
678
679
680}
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
void set(const Map *mp, Mtbl *(*construct)(const Map *))
Semi-constructor from a mapping and a method.
Definition coord.C:134
Affine radial mapping.
Definition map.h:2027
virtual ostream & operator>>(ostream &) const
Operator >>
Definition map_af.C:503
const double * get_beta() const
Returns the pointer on the array beta.
Definition map_af.C:481
const double * get_alpha() const
Returns the pointer on the array alpha.
Definition map_af.C:477
void set_beta(double beta0, int l)
Modifies the value of in domain no. l.
Definition map_af.C:641
virtual void adapt(const Cmp &ent, const Param &par, int nbr=0)
Adaptation of the mapping to a given scalar field.
Definition map_af.C:673
void set_coord()
Assignment of the building functions to the member Coords.
Definition map_af.C:403
Map_af(const Mg3d &mgrille, const double *r_limits)
Standard Constructor.
Definition map_af.C:191
virtual ~Map_af()
Destructor.
Definition map_af.C:368
virtual void sauve(FILE *) const
Save in a file.
Definition map_af.C:489
double * beta
Array (size: mg->nzone ) of the values of in each domain.
Definition map.h:2035
virtual void operator=(const Map_af &)
Assignment to another affine mapping.
Definition map_af.C:380
void homothetie_interne(double lambda)
Sets a new radial scale at the bondary between the nucleus and the first shell.
Definition map_af.C:614
virtual void homothetie(double lambda)
Sets a new radial scale.
Definition map_af.C:537
double * alpha
Array (size: mg->nzone ) of the values of in each domain.
Definition map.h:2033
virtual bool operator==(const Map &) const
Comparison operator (egality)
Definition map_af.C:439
void set_alpha(double alpha0, int l)
Modifies the value of in domain no. l.
Definition map_af.C:630
virtual void resize(int l, double lambda)
Rescales the outer boundary of one domain.
Definition map_af.C:560
virtual double val_r_jk(int l, double xi, int j, int k) const
Returns the value of the radial coordinate r for a given and a given collocation point in in a give...
virtual const Map_af & mp_angu(int) const
Returns the "angular" mapping for the outside of domain l_zone.
Definition map_af.C:656
virtual double val_r(int l, double xi, double theta, double pphi) const
Returns the value of the radial coordinate r for a given in a given domain.
Radial mapping of rather general form.
Definition map.h:2752
const double * get_alpha() const
Returns a pointer on the array alpha (values of in each domain)
Definition map_et.C:1026
const double * get_beta() const
Returns a pointer on the array beta (values of in each domain)
Definition map_et.C:1030
Base class for pure radial mappings.
Definition map.h:1536
Coord d2rdx2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1619
Coord sr2drdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1600
Coord srstdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1592
Coord d2rdtdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1640
Coord sstd2rdpdx
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1648
virtual void reset_coord()
Resets all the member Coords.
Definition map_radial.C:126
Coord lapr_tp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1631
Coord sr2stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1608
Coord drdt
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED).
Definition map.h:1568
Coord srdrdt
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1584
Coord xsr
in the nucleus; \ 1/R in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1549
virtual void sauve(FILE *) const
Save in a file.
Definition map_radial.C:116
Coord dxdr
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1560
Coord sr2d2rdt2
in the nucleus and in the non-compactified shells; \ in the compactified outer domain.
Definition map.h:1657
Coord stdrdp
in the nucleus and in the non-compactified shells; \ in the compactified external domain (CED).
Definition map.h:1576
Base class for coordinate mappings.
Definition map.h:670
double get_ori_z() const
Returns the z coordinate of the origin.
Definition map.h:772
Coord cosp
Definition map.h:724
const Base_vect_cart & get_bvect_cart() const
Returns the Cartesian basis associated with the coordinates (x,y,z) of the mapping,...
Definition map.h:791
Coord y
y coordinate centered on the grid
Definition map.h:727
Coord sint
Definition map.h:721
double ori_x
Absolute coordinate x of the origin.
Definition map.h:678
Coord ya
Absolute y coordinate.
Definition map.h:731
void set_rot_phi(double phi0)
Sets a new rotation angle.
Definition map.C:263
double ori_y
Absolute coordinate y of the origin.
Definition map.h:679
Coord r
r coordinate centered on the grid
Definition map.h:718
Base_vect_spher bvect_spher
Orthonormal vectorial basis associated with the coordinates of the mapping.
Definition map.h:689
void set_ori(double xa0, double ya0, double za0)
Sets a new origin.
Definition map.C:253
double get_ori_y() const
Returns the y coordinate of the origin.
Definition map.h:770
Coord za
Absolute z coordinate.
Definition map.h:732
Coord tet
coordinate centered on the grid
Definition map.h:719
Coord sinp
Definition map.h:723
const Base_vect_spher & get_bvect_spher() const
Returns the orthonormal vectorial basis associated with the coordinates of the mapping.
Definition map.h:783
Base_vect_cart bvect_cart
Cartesian basis associated with the coordinates (x,y,z) of the mapping, i.e.
Definition map.h:697
double rot_phi
Angle between the x –axis and X –axis.
Definition map.h:681
Coord z
z coordinate centered on the grid
Definition map.h:728
double get_ori_x() const
Returns the x coordinate of the origin.
Definition map.h:768
Map_af * p_mp_angu
Pointer on the "angular" mapping.
Definition map.h:715
Coord x
x coordinate centered on the grid
Definition map.h:726
Coord phi
coordinate centered on the grid
Definition map.h:720
double ori_z
Absolute coordinate z of the origin.
Definition map.h:680
double get_rot_phi() const
Returns the angle between the x –axis and X –axis.
Definition map.h:775
Coord xa
Absolute x coordinate.
Definition map.h:730
Coord cost
Definition map.h:722
const Mg3d * get_mg() const
Gives the Mg3d on which the mapping is defined.
Definition map.h:765
const Mg3d * mg
Pointer on the multi-grid Mgd3 on which this is defined
Definition map.h:676
Multi-domain grid.
Definition grilles.h:273
const Mg3d * get_angu_1dom() const
Returns the pointer on the associated mono-domain angular grid.
Definition mg3d.C:494
int get_nzone() const
Returns the number of domains.
Definition grilles.h:448
int get_nr(int l) const
Returns the number of points in the radial direction ( ) in domain no. l.
Definition grilles.h:452
int get_type_r(int l) const
Returns the type of sampling in the radial direction in domain no.
Definition grilles.h:474
Parameter storage.
Definition param.h:125
Basic array class.
Definition tbl.h:161
void set_etat_qcq()
Sets the logical state to ETATQCQ (ordinary state).
Definition tbl.C:361
double & set(int i)
Read/write of a particular element (index i) (1D case)
Definition tbl.h:281
void c_est_pas_fait(const char *)
Helpful function to say something is not implemented yet.
int fread_be(int *aa, int size, int nb, FILE *fich)
Reads integer(s) from a binary file according to the big endian convention.
Definition fread_be.C:69
int fwrite_be(const int *aa, int size, int nb, FILE *fich)
Writes integer(s) into a binary file according to the big endian convention.
Definition fwrite_be.C:70
Lorene prototypes.
Definition app_hor.h:64
Standard units of space, time and mass.