LORENE
param.C
1/*
2 * Methods of class Param
3 *
4 * (see file param.h for documentation)
5 *
6 */
7
8/*
9 * Copyright (c) 1999-2005 Eric Gourgoulhon
10 * Copyright (c) 2000-2003 Jerome Novak
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
31
32
33/*
34 * $Id: param.C,v 1.10 2016/12/05 16:18:14 j_novak Exp $
35 * $Log: param.C,v $
36 * Revision 1.10 2016/12/05 16:18:14 j_novak
37 * Suppression of some global variables (file names, loch, ...) to prevent redefinitions
38 *
39 * Revision 1.9 2014/10/13 08:53:37 j_novak
40 * Lorene classes and functions now belong to the namespace Lorene.
41 *
42 * Revision 1.8 2014/10/06 15:13:16 j_novak
43 * Modified #include directives to use c++ syntax.
44 *
45 * Revision 1.7 2006/06/15 08:15:39 j_novak
46 * Removed members linked to Qtenseur objects.
47 * Added members for Matrice objects.
48 *
49 * Revision 1.6 2005/08/13 16:11:44 m_saijo
50 * Added storage of a Star
51 *
52 * Revision 1.5 2005/03/24 21:56:31 e_gourgoulhon
53 * Added storage of a Scalar.
54 *
55 * Revision 1.4 2003/09/25 12:08:03 j_novak
56 * Tensors can be stored in Param objects
57 *
58 * Revision 1.3 2002/10/16 14:37:12 j_novak
59 * Reorganization of #include instructions of standard C++, in order to
60 * use experimental version 3 of gcc.
61 *
62 * Revision 1.2 2002/09/19 09:52:42 j_novak
63 * Added objects Qtenseur and Qmetrique for 4D tensor and metric handling.
64 *
65 * Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
66 * LORENE
67 *
68 * Revision 1.8 2001/10/11 07:44:27 eric
69 * Ajout du stokage des Etoile's
70 *
71 * Revision 1.7 2000/10/24 14:55:20 novak
72 * Added the function clean_all()
73 *
74 * Revision 1.6 2000/05/25 12:40:47 eric
75 * MODIFICATION MAJEURE: pour les int et les double, ce sont desormais les
76 * dresses qui sont stokees, et non plus les nombres eux-memes
77 * (le traitement des int et des double est donc desormais completement
78 * aligne sur celui des Tbl, Cmp, etc...)
79 *
80 * Revision 1.5 1999/12/29 13:10:54 eric
81 * Ajout du stokage des Mtbl_cf.
82 *
83 * Revision 1.4 1999/12/27 12:17:02 eric
84 * Ajout du stokage des mappings (class Map).
85 *
86 * Revision 1.3 1999/12/16 10:28:25 eric
87 * Ajout des membres modifiables.
88 * Par defaut, les objets listes sont const.
89 *
90 * Revision 1.2 1999/12/15 16:23:22 eric
91 * Changement de l'ordre des arguments dans add_*
92 * Argument par defaut: position = 0
93 * Ajout du stokage des int et des double.
94 *
95 * Revision 1.1 1999/12/13 14:36:00 eric
96 * Initial revision
97 *
98 *
99 * $Header: /cvsroot/Lorene/C++/Source/Param/param.C,v 1.10 2016/12/05 16:18:14 j_novak Exp $
100 *
101 */
102
103// Headers C
104#include <cstdlib>
105#include <cassert>
106
107// Headers Lorene
108#include "param.h"
109#include "tenseur.h"
110#include "tensor.h"
111#include "matrice.h"
112
113 //------------------------//
114 // Constructor //
115 //------------------------//
116
117namespace Lorene {
119 n_int_mod(0),
120 n_double(0),
121 n_double_mod(0),
122 n_tbl(0),
123 n_tbl_mod(0),
124 n_itbl(0),
125 n_itbl_mod(0),
126 n_matrice(0),
127 n_matrice_mod(0),
128 n_cmp(0),
129 n_cmp_mod(0),
130 n_tenseur(0),
131 n_tenseur_mod(0),
132 n_map(0),
133 n_mtbl_cf(0),
134 n_scalar(0),
135 n_scalar_mod(0),
136 n_tensor(0),
137 n_tensor_mod(0),
138 n_etoile(0),
139 n_star(0)
140 {}
141
142
143 //----------------------//
144 // Destructor //
145 //----------------------//
146
148
149 if (n_int > 0) delete [] p_int ;
150 if (n_int_mod > 0) delete [] p_int_mod ;
151 if (n_double > 0) delete [] p_double ;
152 if (n_double_mod > 0) delete [] p_double_mod ;
153 if (n_tbl > 0) delete [] p_tbl ;
154 if (n_tbl_mod > 0) delete [] p_tbl_mod ;
155 if (n_itbl > 0) delete [] p_itbl ;
156 if (n_itbl_mod > 0) delete [] p_itbl_mod ;
157 if (n_matrice > 0) delete [] p_matrice ;
158 if (n_matrice_mod > 0) delete [] p_matrice_mod ;
159 if (n_cmp > 0) delete [] p_cmp ;
160 if (n_cmp_mod > 0) delete [] p_cmp_mod ;
161 if (n_tenseur > 0) delete [] p_tenseur ;
162 if (n_tenseur_mod > 0) delete [] p_tenseur_mod ;
163 if (n_map > 0) delete [] p_map ;
164 if (n_mtbl_cf > 0) delete [] p_mtbl_cf ;
165 if (n_scalar > 0) delete [] p_scalar ;
166 if (n_scalar_mod > 0) delete [] p_scalar_mod ;
167 if (n_tensor > 0) delete [] p_tensor ;
168 if (n_tensor_mod > 0) delete [] p_tensor_mod ;
169 if (n_etoile > 0) delete [] p_etoile ;
170 if (n_star > 0) delete [] p_star ;
171}
172
173 //------------------------------------//
174 // cleaning the memory //
175 //------------------------------------//
176
178
179 for (int i=0; i<n_int_mod; i++)
180 if (p_int_mod[i] != 0x0) {
181 delete p_int_mod[i] ;
182 p_int_mod[i] = 0x0 ;
183 }
184
185 for (int i=0; i<n_double_mod; i++)
186 if (p_double_mod[i] != 0x0) {
187 delete p_double_mod[i] ;
188 p_double_mod[i] = 0x0 ;
189 }
190
191 for (int i=0; i<n_tbl_mod; i++)
192 if (p_tbl_mod[i] != 0x0) {
193 delete p_tbl_mod[i] ;
194 p_tbl_mod[i] = 0x0 ;
195 }
196
197 for (int i=0; i<n_itbl_mod; i++)
198 if (p_itbl_mod[i] != 0x0) {
199 delete p_itbl_mod[i] ;
200 p_itbl_mod[i] = 0x0 ;
201 }
202
203 for (int i=0; i<n_matrice_mod; i++)
204 if (p_matrice_mod[i] != 0x0) {
205 delete p_matrice_mod[i] ;
206 p_matrice_mod[i] = 0x0 ;
207 }
208
209 for (int i=0; i<n_cmp_mod; i++)
210 if (p_cmp_mod[i] != 0x0) {
211 delete p_cmp_mod[i] ;
212 p_cmp_mod[i] = 0x0 ;
213 }
214
215 for (int i=0; i<n_tenseur_mod; i++)
216 if (p_tenseur_mod[i] != 0x0) {
217 delete p_tenseur_mod[i] ;
218 p_tenseur_mod[i] = 0x0 ;
219 }
220
221 for (int i=0; i<n_scalar_mod; i++)
222 if (p_scalar_mod[i] != 0x0) {
223 delete p_scalar_mod[i] ;
224 p_scalar_mod[i] = 0x0 ;
225 }
226
227 for (int i=0; i<n_tensor_mod; i++)
228 if (p_tensor_mod[i] != 0x0) {
229 delete p_tensor_mod[i] ;
230 p_tensor_mod[i] = 0x0 ;
231 }
232}
233
234
235 //------------------------------------//
236 // int storage //
237 //------------------------------------//
238
239// Total number of stored int
240// --------------------------
241
242int Param::get_n_int() const {
243 return n_int ;
244}
245
246// Addition
247// --------
248
249void Param::add_int(const int& ti, int index){
250
251 if (index >= n_int) { // p_int must be rescaled
252
253 int n_int_nouveau = index + 1 ;
254 const int** p_int_nouveau = new const int*[n_int_nouveau] ;
255
256
257 // Copy of the previous addresses
258 for (int i=0; i<n_int; i++) {
259 p_int_nouveau[i] = p_int[i] ;
260 }
261
262
263 // The intermediate addresses are set to 0x0
264 for (int i=n_int; i<index; i++) {
265 p_int_nouveau[i] = 0x0 ;
266 }
267
268 // The new address
269 p_int_nouveau[index] = &ti ;
270
271 // Update
272 if (n_int > 0) delete [] p_int ;
273 p_int = p_int_nouveau ;
274 n_int = n_int_nouveau ;
275
276 }
277 else {
278
279 if (p_int[index] != 0x0) {
280 cout << "Param::add_int : the position " << index
281 << " is already occupied !" << endl ;
282 abort() ;
283 }
284 else{
285 p_int[index] = &ti ;
286 }
287
288 }
289
290}
291
292// Extraction
293// ----------
294
295const int& Param::get_int(int index) const {
296
297 assert(index >= 0) ;
298 assert(index < n_int) ;
299
300 return *(p_int[index]) ;
301
302}
303
304 //------------------------------------//
305 // double storage //
306 //------------------------------------//
307
308// Total number of stored doubles
309// ------------------------------
310
312 return n_double ;
313}
314
315// Addition
316// --------
317
318void Param::add_double(const double& ti, int index){
319
320 if (index >= n_double) { // p_double must be rescaled
321
322 int n_double_nouveau = index + 1 ;
323 const double** p_double_nouveau =
324 new const double*[n_double_nouveau] ;
325
326
327 // Copy of the previous addresses
328 for (int i=0; i<n_double; i++) {
329 p_double_nouveau[i] = p_double[i] ;
330 }
331
332 // The intermediate addresses are set to 0x0
333 for (int i=n_double; i<index; i++) {
334 p_double_nouveau[i] = 0x0 ;
335 }
336
337 // The new address
338 p_double_nouveau[index] = &ti ;
339
340 // Update
341 if (n_double > 0) delete [] p_double ;
342 p_double = p_double_nouveau ;
343 n_double = n_double_nouveau ;
344
345 }
346 else {
347
348 if (p_double[index] != 0x0) {
349 cout << "Param::add_double : the position " << index
350 << " is already occupied !" << endl ;
351 abort() ;
352 }
353 else{
354 p_double[index] = &ti ;
355 }
356
357 }
358
359}
360
361// Extraction
362// ----------
363
364const double& Param::get_double(int index) const {
365
366 assert(index >= 0) ;
367 assert(index < n_double) ;
368
369 return *(p_double[index]) ;
370
371}
372
373
374 //------------------------------------//
375 // Modifiable int storage //
376 //------------------------------------//
377
378// Total number of stored addresses
379// --------------------------------
380
382 return n_int_mod ;
383}
384
385// Addition
386// --------
387
388void Param::add_int_mod(int& ti, int index){
389
390 if (index >= n_int_mod) { // p_int_mod must be rescaled
391
392 int n_int_nouveau = index + 1 ;
393 int** p_int_nouveau = new int*[n_int_nouveau] ;
394
395
396 // Copy of the previous addresses
397 for (int i=0; i<n_int_mod; i++) {
398 p_int_nouveau[i] = p_int_mod[i] ;
399 }
400
401 // The intermediate addresses are set to 0x0
402 for (int i=n_int_mod; i<index; i++) {
403 p_int_nouveau[i] = 0x0 ;
404 }
405
406 // The new address
407 p_int_nouveau[index] = &ti ;
408
409 // Update
410 if (n_int_mod > 0) delete [] p_int_mod ;
411 p_int_mod = p_int_nouveau ;
412 n_int_mod = n_int_nouveau ;
413
414 }
415 else {
416
417 if (p_int_mod[index] != 0x0) {
418 cout << "Param::add_int_mod : the position " << index
419 << " is already occupied !" << endl ;
420 abort() ;
421 }
422 else{
423 p_int_mod[index] = &ti ;
424 }
425
426 }
427
428}
429
430// Extraction
431// ----------
432
433int& Param::get_int_mod(int index) const {
434
435 assert(index >= 0) ;
436 assert(index < n_int_mod) ;
437
438 return *(p_int_mod[index]) ;
439
440}
441
442 //------------------------------------//
443 // Modifiable double storage //
444 //------------------------------------//
445
446// Total number of stored addresses
447// --------------------------------
448
450 return n_double_mod ;
451}
452
453// Addition
454// --------
455
456void Param::add_double_mod(double& ti, int index){
457
458 if (index >= n_double_mod) { // p_double_mod must be rescaled
459
460 int n_double_nouveau = index + 1 ;
461 double** p_double_nouveau = new double*[n_double_nouveau] ;
462
463
464 // Copy of the previous addresses
465 for (int i=0; i<n_double_mod; i++) {
466 p_double_nouveau[i] = p_double_mod[i] ;
467 }
468
469 // The intermediate addresses are set to 0x0
470 for (int i=n_double_mod; i<index; i++) {
471 p_double_nouveau[i] = 0x0 ;
472 }
473
474 // The new address
475 p_double_nouveau[index] = &ti ;
476
477 // Update
478 if (n_double_mod > 0) delete [] p_double_mod ;
479 p_double_mod = p_double_nouveau ;
480 n_double_mod = n_double_nouveau ;
481
482 }
483 else {
484
485 if (p_double_mod[index] != 0x0) {
486 cout << "Param::add_double_mod : the position " << index
487 << " is already occupied !" << endl ;
488 abort() ;
489 }
490 else{
491 p_double_mod[index] = &ti ;
492 }
493
494 }
495
496}
497
498// Extraction
499// ----------
500
501double& Param::get_double_mod(int index) const {
502
503 assert(index >= 0) ;
504 assert(index < n_double_mod) ;
505
506 return *(p_double_mod[index]) ;
507
508}
509
510
511 //------------------------------------//
512 // Tbl storage //
513 //------------------------------------//
514
515// Total number of stored addresses
516// --------------------------------
517
518int Param::get_n_tbl() const {
519 return n_tbl ;
520}
521
522// Addition
523// --------
524
525void Param::add_tbl(const Tbl& ti, int index){
526
527 if (index >= n_tbl) { // p_tbl must be rescaled
528
529 int n_tbl_nouveau = index + 1 ;
530 const Tbl** p_tbl_nouveau = new const Tbl*[n_tbl_nouveau] ;
531
532
533 // Copy of the previous addresses
534 for (int i=0; i<n_tbl; i++) {
535 p_tbl_nouveau[i] = p_tbl[i] ;
536 }
537
538 // The intermediate addresses are set to 0x0
539 for (int i=n_tbl; i<index; i++) {
540 p_tbl_nouveau[i] = 0x0 ;
541 }
542
543 // The new address
544 p_tbl_nouveau[index] = &ti ;
545
546 // Update
547 if (n_tbl > 0) delete [] p_tbl ;
548 p_tbl = p_tbl_nouveau ;
549 n_tbl = n_tbl_nouveau ;
550
551 }
552 else {
553
554 if (p_tbl[index] != 0x0) {
555 cout << "Param::add_tbl : the position " << index
556 << " is already occupied !" << endl ;
557 abort() ;
558 }
559 else{
560 p_tbl[index] = &ti ;
561 }
562
563 }
564
565}
566
567// Extraction
568// ----------
569
570const Tbl& Param::get_tbl(int index) const {
571
572 assert(index >= 0) ;
573 assert(index < n_tbl) ;
574
575 return *(p_tbl[index]) ;
576
577}
578
579
580 //------------------------------------//
581 // Modifiable Tbl storage //
582 //------------------------------------//
583
584// Total number of stored addresses
585// --------------------------------
586
588 return n_tbl_mod ;
589}
590
591// Addition
592// --------
593
594void Param::add_tbl_mod(Tbl& ti, int index){
595
596 if (index >= n_tbl_mod) { // p_tbl_mod must be rescaled
597
598 int n_tbl_nouveau = index + 1 ;
599 Tbl** p_tbl_nouveau = new Tbl*[n_tbl_nouveau] ;
600
601
602 // Copy of the previous addresses
603 for (int i=0; i<n_tbl_mod; i++) {
604 p_tbl_nouveau[i] = p_tbl_mod[i] ;
605 }
606
607 // The intermediate addresses are set to 0x0
608 for (int i=n_tbl_mod; i<index; i++) {
609 p_tbl_nouveau[i] = 0x0 ;
610 }
611
612 // The new address
613 p_tbl_nouveau[index] = &ti ;
614
615 // Update
616 if (n_tbl_mod > 0) delete [] p_tbl_mod ;
617 p_tbl_mod = p_tbl_nouveau ;
618 n_tbl_mod = n_tbl_nouveau ;
619
620 }
621 else {
622
623 if (p_tbl_mod[index] != 0x0) {
624 cout << "Param::add_tbl_mod : the position " << index
625 << " is already occupied !" << endl ;
626 abort() ;
627 }
628 else{
629 p_tbl_mod[index] = &ti ;
630 }
631
632 }
633
634}
635
636// Extraction
637// ----------
638
639Tbl& Param::get_tbl_mod(int index) const {
640
641 assert(index >= 0) ;
642 assert(index < n_tbl_mod) ;
643
644 return *(p_tbl_mod[index]) ;
645
646}
647
648
649 //------------------------------------//
650 // Itbl storage //
651 //------------------------------------//
652
653// Total number of stored addresses
654// --------------------------------
655
656int Param::get_n_itbl() const {
657 return n_itbl ;
658}
659
660// Addition
661// --------
662
663void Param::add_itbl(const Itbl& ti, int index){
664
665 if (index >= n_itbl) { // p_itbl must be rescaled
666
667 int n_itbl_nouveau = index + 1 ;
668 const Itbl** p_itbl_nouveau = new const Itbl*[n_itbl_nouveau] ;
669
670
671 // Copy of the previous addresses
672 for (int i=0; i<n_itbl; i++) {
673 p_itbl_nouveau[i] = p_itbl[i] ;
674 }
675
676 // The intermediate addresses are set to 0x0
677 for (int i=n_itbl; i<index; i++) {
678 p_itbl_nouveau[i] = 0x0 ;
679 }
680
681 // The new address
682 p_itbl_nouveau[index] = &ti ;
683
684 // Update
685 if (n_itbl > 0) delete [] p_itbl ;
686 p_itbl = p_itbl_nouveau ;
687 n_itbl = n_itbl_nouveau ;
688
689 }
690 else {
691
692 if (p_itbl[index] != 0x0) {
693 cout << "Param::add_itbl : the position " << index
694 << " is already occupied !" << endl ;
695 abort() ;
696 }
697 else{
698 p_itbl[index] = &ti ;
699 }
700
701 }
702
703}
704
705// Extraction
706// ----------
707
708const Itbl& Param::get_itbl(int index) const {
709
710 assert(index >= 0) ;
711 assert(index < n_itbl) ;
712
713 return *(p_itbl[index]) ;
714
715}
716
717
718 //------------------------------------//
719 // Modifiable Itbl storage //
720 //------------------------------------//
721
722// Total number of stored addresses
723// --------------------------------
724
726 return n_itbl_mod ;
727}
728
729// Addition
730// --------
731
732void Param::add_itbl_mod(Itbl& ti, int index){
733
734 if (index >= n_itbl_mod) { // p_itbl_mod must be rescaled
735
736 int n_itbl_nouveau = index + 1 ;
737 Itbl** p_itbl_nouveau = new Itbl*[n_itbl_nouveau] ;
738
739
740 // Copy of the previous addresses
741 for (int i=0; i<n_itbl_mod; i++) {
742 p_itbl_nouveau[i] = p_itbl_mod[i] ;
743 }
744
745 // The intermediate addresses are set to 0x0
746 for (int i=n_itbl_mod; i<index; i++) {
747 p_itbl_nouveau[i] = 0x0 ;
748 }
749
750 // The new address
751 p_itbl_nouveau[index] = &ti ;
752
753 // Update
754 if (n_itbl_mod > 0) delete [] p_itbl_mod ;
755 p_itbl_mod = p_itbl_nouveau ;
756 n_itbl_mod = n_itbl_nouveau ;
757
758 }
759 else {
760
761 if (p_itbl_mod[index] != 0x0) {
762 cout << "Param::add_itbl_mod : the position " << index
763 << " is already occupied !" << endl ;
764 abort() ;
765 }
766 else{
767 p_itbl_mod[index] = &ti ;
768 }
769
770 }
771
772}
773
774// Extraction
775// ----------
776
777Itbl& Param::get_itbl_mod(int index) const {
778
779 assert(index >= 0) ;
780 assert(index < n_itbl_mod) ;
781
782 return *(p_itbl_mod[index]) ;
783
784}
785
786 //------------------------------------//
787 // Matrice storage //
788 //------------------------------------//
789
790// Total number of stored addresses
791// --------------------------------
792
794 return n_matrice ;
795}
796
797// Addition
798// --------
799
800void Param::add_matrice(const Matrice& ti, int index){
801
802 if (index >= n_matrice) { // p_matrice must be rescaled
803
804 int n_matrice_nouveau = index + 1 ;
805 const Matrice** p_matrice_nouveau = new const Matrice*[n_matrice_nouveau] ;
806
807
808 // Copy of the previous addresses
809 for (int i=0; i<n_matrice; i++) {
810 p_matrice_nouveau[i] = p_matrice[i] ;
811 }
812
813 // The intermediate addresses are set to 0x0
814 for (int i=n_matrice; i<index; i++) {
815 p_matrice_nouveau[i] = 0x0 ;
816 }
817
818 // The new address
819 p_matrice_nouveau[index] = &ti ;
820
821 // Update
822 if (n_matrice > 0) delete [] p_matrice ;
823 p_matrice = p_matrice_nouveau ;
824 n_matrice = n_matrice_nouveau ;
825
826 }
827 else {
828
829 if (p_matrice[index] != 0x0) {
830 cout << "Param::add_matrice : the position " << index
831 << " is already occupied !" << endl ;
832 abort() ;
833 }
834 else{
835 p_matrice[index] = &ti ;
836 }
837
838 }
839
840}
841
842// Extraction
843// ----------
844
845const Matrice& Param::get_matrice(int index) const {
846
847 assert(index >= 0) ;
848 assert(index < n_matrice) ;
849
850 return *(p_matrice[index]) ;
851
852}
853
854
855 //------------------------------------//
856 // Modifiable Matrice storage //
857 //------------------------------------//
858
859// Total number of stored addresses
860// --------------------------------
861
863 return n_matrice_mod ;
864}
865
866// Addition
867// --------
868
869void Param::add_matrice_mod(Matrice& ti, int index){
870
871 if (index >= n_matrice_mod) { // p_matrice_mod must be rescaled
872
873 int n_matrice_nouveau = index + 1 ;
874 Matrice** p_matrice_nouveau = new Matrice*[n_matrice_nouveau] ;
875
876
877 // Copy of the previous addresses
878 for (int i=0; i<n_matrice_mod; i++) {
879 p_matrice_nouveau[i] = p_matrice_mod[i] ;
880 }
881
882 // The intermediate addresses are set to 0x0
883 for (int i=n_matrice_mod; i<index; i++) {
884 p_matrice_nouveau[i] = 0x0 ;
885 }
886
887 // The new address
888 p_matrice_nouveau[index] = &ti ;
889
890 // Update
891 if (n_matrice_mod > 0) delete [] p_matrice_mod ;
892 p_matrice_mod = p_matrice_nouveau ;
893 n_matrice_mod = n_matrice_nouveau ;
894
895 }
896 else {
897
898 if (p_matrice_mod[index] != 0x0) {
899 cout << "Param::add_matrice_mod : the position " << index
900 << " is already occupied !" << endl ;
901 abort() ;
902 }
903 else{
904 p_matrice_mod[index] = &ti ;
905 }
906
907 }
908
909}
910
911// Extraction
912// ----------
913
915
916 assert(index >= 0) ;
917 assert(index < n_matrice_mod) ;
918
919 return *(p_matrice_mod[index]) ;
920
921}
922
923
924 //------------------------------------//
925 // Cmp storage //
926 //------------------------------------//
927
928// Total number of stored addresses
929// --------------------------------
930
931int Param::get_n_cmp() const {
932 return n_cmp ;
933}
934
935// Addition
936// --------
937
938void Param::add_cmp(const Cmp& ti, int index){
939
940 if (index >= n_cmp) { // p_cmp must be rescaled
941
942 int n_cmp_nouveau = index + 1 ;
943 const Cmp** p_cmp_nouveau = new const Cmp*[n_cmp_nouveau] ;
944
945
946 // Copy of the previous addresses
947 for (int i=0; i<n_cmp; i++) {
948 p_cmp_nouveau[i] = p_cmp[i] ;
949 }
950
951 // The intermediate addresses are set to 0x0
952 for (int i=n_cmp; i<index; i++) {
953 p_cmp_nouveau[i] = 0x0 ;
954 }
955
956 // The new address
957 p_cmp_nouveau[index] = &ti ;
958
959 // Update
960 if (n_cmp > 0) delete [] p_cmp ;
961 p_cmp = p_cmp_nouveau ;
962 n_cmp = n_cmp_nouveau ;
963
964 }
965 else {
966
967 if (p_cmp[index] != 0x0) {
968 cout << "Param::add_cmp : the position " << index
969 << " is already occupied !" << endl ;
970 abort() ;
971 }
972 else{
973 p_cmp[index] = &ti ;
974 }
975
976 }
977
978}
979
980// Extraction
981// ----------
982
983const Cmp& Param::get_cmp(int index) const {
984
985 assert(index >= 0) ;
986 assert(index < n_cmp) ;
987
988 return *(p_cmp[index]) ;
989
990}
991
992
993 //------------------------------------//
994 // Modifiable Cmp storage //
995 //------------------------------------//
996
997// Total number of stored addresses
998// --------------------------------
999
1001 return n_cmp_mod ;
1002}
1003
1004// Addition
1005// --------
1006
1007void Param::add_cmp_mod(Cmp& ti, int index){
1008
1009 if (index >= n_cmp_mod) { // p_cmp_mod must be rescaled
1010
1011 int n_cmp_nouveau = index + 1 ;
1012 Cmp** p_cmp_nouveau = new Cmp*[n_cmp_nouveau] ;
1013
1014
1015 // Copy of the previous addresses
1016 for (int i=0; i<n_cmp_mod; i++) {
1017 p_cmp_nouveau[i] = p_cmp_mod[i] ;
1018 }
1019
1020 // The intermediate addresses are set to 0x0
1021 for (int i=n_cmp_mod; i<index; i++) {
1022 p_cmp_nouveau[i] = 0x0 ;
1023 }
1024
1025 // The new address
1026 p_cmp_nouveau[index] = &ti ;
1027
1028 // Update
1029 if (n_cmp_mod > 0) delete [] p_cmp_mod ;
1030 p_cmp_mod = p_cmp_nouveau ;
1031 n_cmp_mod = n_cmp_nouveau ;
1032
1033 }
1034 else {
1035
1036 if (p_cmp_mod[index] != 0x0) {
1037 cout << "Param::add_cmp_mod : the position " << index
1038 << " is already occupied !" << endl ;
1039 abort() ;
1040 }
1041 else{
1042 p_cmp_mod[index] = &ti ;
1043 }
1044
1045 }
1046
1047}
1048
1049// Extraction
1050// ----------
1051
1052Cmp& Param::get_cmp_mod(int index) const {
1053
1054 assert(index >= 0) ;
1055 assert(index < n_cmp_mod) ;
1056
1057 return *(p_cmp_mod[index]) ;
1058
1059}
1060
1061
1062 //------------------------------------//
1063 // Tenseur storage //
1064 //------------------------------------//
1065
1066// Total number of stored addresses
1067// --------------------------------
1068
1070 return n_tenseur ;
1071}
1072
1073// Addition
1074// --------
1075
1076void Param::add_tenseur(const Tenseur& ti, int index){
1077
1078 if (index >= n_tenseur) { // p_tenseur must be rescaled
1079
1080 int n_tenseur_nouveau = index + 1 ;
1081 const Tenseur** p_tenseur_nouveau = new const Tenseur*[n_tenseur_nouveau] ;
1082
1083
1084 // Copy of the previous addresses
1085 for (int i=0; i<n_tenseur; i++) {
1086 p_tenseur_nouveau[i] = p_tenseur[i] ;
1087 }
1088
1089 // The intermediate addresses are set to 0x0
1090 for (int i=n_tenseur; i<index; i++) {
1091 p_tenseur_nouveau[i] = 0x0 ;
1092 }
1093
1094 // The new address
1095 p_tenseur_nouveau[index] = &ti ;
1096
1097 // Update
1098 if (n_tenseur > 0) delete [] p_tenseur ;
1099 p_tenseur = p_tenseur_nouveau ;
1100 n_tenseur = n_tenseur_nouveau ;
1101
1102 }
1103 else {
1104
1105 if (p_tenseur[index] != 0x0) {
1106 cout << "Param::add_tenseur : the position " << index
1107 << " is already occupied !" << endl ;
1108 abort() ;
1109 }
1110 else{
1111 p_tenseur[index] = &ti ;
1112 }
1113
1114 }
1115
1116}
1117
1118// Extraction
1119// ----------
1120
1121const Tenseur& Param::get_tenseur(int index) const {
1122
1123 assert(index >= 0) ;
1124 assert(index < n_tenseur) ;
1125
1126 return *(p_tenseur[index]) ;
1127
1128}
1129
1130
1131 //------------------------------------//
1132 // Modifiable Tenseur storage //
1133 //------------------------------------//
1134
1135// Total number of stored addresses
1136// --------------------------------
1137
1139 return n_tenseur_mod ;
1140}
1141
1142// Addition
1143// --------
1144
1145void Param::add_tenseur_mod(Tenseur& ti, int index){
1146
1147 if (index >= n_tenseur_mod) { // p_tenseur_mod must be rescaled
1148
1149 int n_tenseur_nouveau = index + 1 ;
1150 Tenseur** p_tenseur_nouveau = new Tenseur*[n_tenseur_nouveau] ;
1151
1152
1153 // Copy of the previous addresses
1154 for (int i=0; i<n_tenseur_mod; i++) {
1155 p_tenseur_nouveau[i] = p_tenseur_mod[i] ;
1156 }
1157
1158 // The intermediate addresses are set to 0x0
1159 for (int i=n_tenseur_mod; i<index; i++) {
1160 p_tenseur_nouveau[i] = 0x0 ;
1161 }
1162
1163 // The new address
1164 p_tenseur_nouveau[index] = &ti ;
1165
1166 // Update
1167 if (n_tenseur_mod > 0) delete [] p_tenseur_mod ;
1168 p_tenseur_mod = p_tenseur_nouveau ;
1169 n_tenseur_mod = n_tenseur_nouveau ;
1170
1171 }
1172 else {
1173
1174 if (p_tenseur_mod[index] != 0x0) {
1175 cout << "Param::add_tenseur_mod : the position " << index
1176 << " is already occupied !" << endl ;
1177 abort() ;
1178 }
1179 else{
1180 p_tenseur_mod[index] = &ti ;
1181 }
1182
1183 }
1184
1185}
1186
1187// Extraction
1188// ----------
1189
1191
1192 assert(index >= 0) ;
1193 assert(index < n_tenseur_mod) ;
1194
1195 return *(p_tenseur_mod[index]) ;
1196
1197}
1198
1199
1200 //------------------------------------//
1201 // Map storage //
1202 //------------------------------------//
1203
1204// Total number of stored addresses
1205// --------------------------------
1206
1207int Param::get_n_map() const {
1208 return n_map ;
1209}
1210
1211// Addition
1212// --------
1213
1214void Param::add_map(const Map& mi, int index){
1215
1216 if (index >= n_map) { // p_map must be rescaled
1217
1218 int n_map_nouveau = index + 1 ;
1219 const Map** p_map_nouveau = new const Map*[n_map_nouveau] ;
1220
1221
1222 // Copy of the previous addresses
1223 for (int i=0; i<n_map; i++) {
1224 p_map_nouveau[i] = p_map[i] ;
1225 }
1226
1227 // The intermediate addresses are set to 0x0
1228 for (int i=n_map; i<index; i++) {
1229 p_map_nouveau[i] = 0x0 ;
1230 }
1231
1232 // The new address
1233 p_map_nouveau[index] = &mi ;
1234
1235 // Update
1236 if (n_map > 0) delete [] p_map ;
1237 p_map = p_map_nouveau ;
1238 n_map = n_map_nouveau ;
1239
1240 }
1241 else {
1242
1243 if (p_map[index] != 0x0) {
1244 cout << "Param::add_map : the position " << index
1245 << " is already occupied !" << endl ;
1246 abort() ;
1247 }
1248 else{
1249 p_map[index] = &mi ;
1250 }
1251
1252 }
1253
1254}
1255
1256// Extraction
1257// ----------
1258
1259const Map& Param::get_map(int index) const {
1260
1261 assert(index >= 0) ;
1262 assert(index < n_map) ;
1263
1264 return *(p_map[index]) ;
1265
1266}
1267
1268 //------------------------------------//
1269 // Mtbl_cf storage //
1270 //------------------------------------//
1271
1272// Total number of stored addresses
1273// --------------------------------
1274
1276 return n_mtbl_cf ;
1277}
1278
1279// Addition
1280// --------
1281
1282void Param::add_mtbl_cf(const Mtbl_cf& mi, int index){
1283
1284 if (index >= n_mtbl_cf) { // p_mtbl_cf must be rescaled
1285
1286 int n_mtbl_cf_nouveau = index + 1 ;
1287 const Mtbl_cf** p_mtbl_cf_nouveau =
1288 new const Mtbl_cf*[n_mtbl_cf_nouveau] ;
1289
1290
1291 // Copy of the previous addresses
1292 for (int i=0; i<n_mtbl_cf; i++) {
1293 p_mtbl_cf_nouveau[i] = p_mtbl_cf[i] ;
1294 }
1295
1296 // The intermediate addresses are set to 0x0
1297 for (int i=n_mtbl_cf; i<index; i++) {
1298 p_mtbl_cf_nouveau[i] = 0x0 ;
1299 }
1300
1301 // The new address
1302 p_mtbl_cf_nouveau[index] = &mi ;
1303
1304 // Update
1305 if (n_mtbl_cf > 0) delete [] p_mtbl_cf ;
1306 p_mtbl_cf = p_mtbl_cf_nouveau ;
1307 n_mtbl_cf = n_mtbl_cf_nouveau ;
1308
1309 }
1310 else {
1311
1312 if (p_mtbl_cf[index] != 0x0) {
1313 cout << "Param::add_mtbl_cf : the position " << index
1314 << " is already occupied !" << endl ;
1315 abort() ;
1316 }
1317 else{
1318 p_mtbl_cf[index] = &mi ;
1319 }
1320
1321 }
1322
1323}
1324
1325// Extraction
1326// ----------
1327
1328const Mtbl_cf& Param::get_mtbl_cf(int index) const {
1329
1330 assert(index >= 0) ;
1331 assert(index < n_mtbl_cf) ;
1332
1333 return *(p_mtbl_cf[index]) ;
1334
1335}
1336
1337 //------------------------------------//
1338 // Scalar storage //
1339 //------------------------------------//
1340
1341// Total number of stored addresses
1342// --------------------------------
1343
1345 return n_scalar ;
1346}
1347
1348// Addition
1349// --------
1350
1351void Param::add_scalar(const Scalar& ti, int index){
1352
1353 if (index >= n_scalar) { // p_scalar must be rescaled
1354
1355 int n_scalar_nouveau = index + 1 ;
1356 const Scalar** p_scalar_nouveau = new const Scalar*[n_scalar_nouveau] ;
1357
1358
1359 // Copy of the previous addresses
1360 for (int i=0; i<n_scalar; i++) {
1361 p_scalar_nouveau[i] = p_scalar[i] ;
1362 }
1363
1364 // The intermediate addresses are set to 0x0
1365 for (int i=n_scalar; i<index; i++) {
1366 p_scalar_nouveau[i] = 0x0 ;
1367 }
1368
1369 // The new address
1370 p_scalar_nouveau[index] = &ti ;
1371
1372 // Update
1373 if (n_scalar > 0) delete [] p_scalar ;
1374 p_scalar = p_scalar_nouveau ;
1375 n_scalar = n_scalar_nouveau ;
1376
1377 }
1378 else {
1379
1380 if (p_scalar[index] != 0x0) {
1381 cout << "Param::add_scalar : the position " << index
1382 << " is already occupied !" << endl ;
1383 abort() ;
1384 }
1385 else{
1386 p_scalar[index] = &ti ;
1387 }
1388
1389 }
1390
1391}
1392
1393// Extraction
1394// ----------
1395
1396const Scalar& Param::get_scalar(int index) const {
1397
1398 assert(index >= 0) ;
1399 assert(index < n_scalar) ;
1400
1401 return *(p_scalar[index]) ;
1402
1403}
1404
1405
1406 //------------------------------------//
1407 // Modifiable Scalar storage //
1408 //------------------------------------//
1409
1410// Total number of stored addresses
1411// --------------------------------
1412
1414 return n_scalar_mod ;
1415}
1416
1417// Addition
1418// --------
1419
1420void Param::add_scalar_mod(Scalar& ti, int index){
1421
1422 if (index >= n_scalar_mod) { // p_scalar_mod must be rescaled
1423
1424 int n_scalar_nouveau = index + 1 ;
1425 Scalar** p_scalar_nouveau = new Scalar*[n_scalar_nouveau] ;
1426
1427
1428 // Copy of the previous addresses
1429 for (int i=0; i<n_scalar_mod; i++) {
1430 p_scalar_nouveau[i] = p_scalar_mod[i] ;
1431 }
1432
1433 // The intermediate addresses are set to 0x0
1434 for (int i=n_scalar_mod; i<index; i++) {
1435 p_scalar_nouveau[i] = 0x0 ;
1436 }
1437
1438 // The new address
1439 p_scalar_nouveau[index] = &ti ;
1440
1441 // Update
1442 if (n_scalar_mod > 0) delete [] p_scalar_mod ;
1443 p_scalar_mod = p_scalar_nouveau ;
1444 n_scalar_mod = n_scalar_nouveau ;
1445
1446 }
1447 else {
1448
1449 if (p_scalar_mod[index] != 0x0) {
1450 cout << "Param::add_scalar_mod : the position " << index
1451 << " is already occupied !" << endl ;
1452 abort() ;
1453 }
1454 else{
1455 p_scalar_mod[index] = &ti ;
1456 }
1457
1458 }
1459
1460}
1461
1462// Extraction
1463// ----------
1464
1466
1467 assert(index >= 0) ;
1468 assert(index < n_scalar_mod) ;
1469
1470 return *(p_scalar_mod[index]) ;
1471
1472}
1473
1474
1475 //------------------------------------//
1476 // Tensor storage //
1477 //------------------------------------//
1478
1479// Total number of stored addresses
1480// --------------------------------
1481
1483 return n_tensor ;
1484}
1485
1486// Addition
1487// --------
1488
1489void Param::add_tensor(const Tensor& ti, int index){
1490
1491 if (index >= n_tensor) { // p_tensor must be rescaled
1492
1493 int n_tensor_nouveau = index + 1 ;
1494 const Tensor** p_tensor_nouveau = new const Tensor*[n_tensor_nouveau] ;
1495
1496
1497 // Copy of the previous addresses
1498 for (int i=0; i<n_tensor; i++) {
1499 p_tensor_nouveau[i] = p_tensor[i] ;
1500 }
1501
1502 // The intermediate addresses are set to 0x0
1503 for (int i=n_tensor; i<index; i++) {
1504 p_tensor_nouveau[i] = 0x0 ;
1505 }
1506
1507 // The new address
1508 p_tensor_nouveau[index] = &ti ;
1509
1510 // Update
1511 if (n_tensor > 0) delete [] p_tensor ;
1512 p_tensor = p_tensor_nouveau ;
1513 n_tensor = n_tensor_nouveau ;
1514
1515 }
1516 else {
1517
1518 if (p_tensor[index] != 0x0) {
1519 cout << "Param::add_tensor : the position " << index
1520 << " is already occupied !" << endl ;
1521 abort() ;
1522 }
1523 else{
1524 p_tensor[index] = &ti ;
1525 }
1526
1527 }
1528
1529}
1530
1531// Extraction
1532// ----------
1533
1534const Tensor& Param::get_tensor(int index) const {
1535
1536 assert(index >= 0) ;
1537 assert(index < n_tensor) ;
1538
1539 return *(p_tensor[index]) ;
1540
1541}
1542
1543
1544 //------------------------------------//
1545 // Modifiable Tensor storage //
1546 //------------------------------------//
1547
1548// Total number of stored addresses
1549// --------------------------------
1550
1552 return n_tensor_mod ;
1553}
1554
1555// Addition
1556// --------
1557
1558void Param::add_tensor_mod(Tensor& ti, int index){
1559
1560 if (index >= n_tensor_mod) { // p_tensor_mod must be rescaled
1561
1562 int n_tensor_nouveau = index + 1 ;
1563 Tensor** p_tensor_nouveau = new Tensor*[n_tensor_nouveau] ;
1564
1565
1566 // Copy of the previous addresses
1567 for (int i=0; i<n_tensor_mod; i++) {
1568 p_tensor_nouveau[i] = p_tensor_mod[i] ;
1569 }
1570
1571 // The intermediate addresses are set to 0x0
1572 for (int i=n_tensor_mod; i<index; i++) {
1573 p_tensor_nouveau[i] = 0x0 ;
1574 }
1575
1576 // The new address
1577 p_tensor_nouveau[index] = &ti ;
1578
1579 // Update
1580 if (n_tensor_mod > 0) delete [] p_tensor_mod ;
1581 p_tensor_mod = p_tensor_nouveau ;
1582 n_tensor_mod = n_tensor_nouveau ;
1583
1584 }
1585 else {
1586
1587 if (p_tensor_mod[index] != 0x0) {
1588 cout << "Param::add_tensor_mod : the position " << index
1589 << " is already occupied !" << endl ;
1590 abort() ;
1591 }
1592 else{
1593 p_tensor_mod[index] = &ti ;
1594 }
1595
1596 }
1597
1598}
1599
1600// Extraction
1601// ----------
1602
1604
1605 assert(index >= 0) ;
1606 assert(index < n_tensor_mod) ;
1607
1608 return *(p_tensor_mod[index]) ;
1609
1610}
1611
1612
1613 //------------------------------------//
1614 // Etoile storage //
1615 //------------------------------------//
1616
1617// Total number of stored addresses
1618// --------------------------------
1619
1621 return n_etoile ;
1622}
1623
1624// Addition
1625// --------
1626
1627void Param::add_etoile(const Etoile& eti, int index){
1628
1629 if (index >= n_etoile) { // p_etoile must be rescaled
1630
1631 int n_etoile_nouveau = index + 1 ;
1632 const Etoile** p_etoile_nouveau = new const Etoile*[n_etoile_nouveau] ;
1633
1634
1635 // Copy of the previous addresses
1636 for (int i=0; i<n_etoile; i++) {
1637 p_etoile_nouveau[i] = p_etoile[i] ;
1638 }
1639
1640 // The intermediate addresses are set to 0x0
1641 for (int i=n_etoile; i<index; i++) {
1642 p_etoile_nouveau[i] = 0x0 ;
1643 }
1644
1645 // The new address
1646 p_etoile_nouveau[index] = &eti ;
1647
1648 // Update
1649 if (n_etoile > 0) delete [] p_etoile ;
1650 p_etoile = p_etoile_nouveau ;
1651 n_etoile = n_etoile_nouveau ;
1652
1653 }
1654 else {
1655
1656 if (p_etoile[index] != 0x0) {
1657 cout << "Param::add_etoile : the position " << index
1658 << " is already occupied !" << endl ;
1659 abort() ;
1660 }
1661 else{
1662 p_etoile[index] = &eti ;
1663 }
1664
1665 }
1666
1667}
1668
1669// Extraction
1670// ----------
1671
1672const Etoile& Param::get_etoile(int index) const {
1673
1674 assert(index >= 0) ;
1675 assert(index < n_etoile) ;
1676
1677 return *(p_etoile[index]) ;
1678}
1679 //------------------------------------//
1680 // Star storage //
1681 //------------------------------------//
1682
1683// Total number of stored addresses
1684// --------------------------------
1685
1687 return n_star ;
1688}
1689
1690// Addition
1691// --------
1692
1693void Param::add_star(const Star& eti, int index){
1694
1695 if (index >= n_star) { // p_star must be rescaled
1696
1697 int n_star_nouveau = index + 1 ;
1698 const Star** p_star_nouveau = new const Star*[n_star_nouveau] ;
1699
1700
1701 // Copy of the previous addresses
1702 for (int i=0; i<n_star; i++) {
1703 p_star_nouveau[i] = p_star[i] ;
1704 }
1705
1706 // The intermediate addresses are set to 0x0
1707 for (int i=n_star; i<index; i++) {
1708 p_star_nouveau[i] = 0x0 ;
1709 }
1710
1711 // The new address
1712 p_star_nouveau[index] = &eti ;
1713
1714 // Update
1715 if (n_star > 0) delete [] p_star ;
1716 p_star = p_star_nouveau ;
1717 n_star = n_star_nouveau ;
1718
1719 }
1720 else {
1721
1722 if (p_star[index] != 0x0) {
1723 cout << "Param::add_star : the position " << index
1724 << " is already occupied !" << endl ;
1725 abort() ;
1726 }
1727 else{
1728 p_star[index] = &eti ;
1729 }
1730
1731 }
1732
1733}
1734
1735// Extraction
1736// ----------
1737
1738const Star& Param::get_star(int index) const {
1739
1740 assert(index >= 0) ;
1741 assert(index < n_star) ;
1742
1743 return *(p_star[index]) ;
1744
1745
1746}
1747}
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Definition cmp.h:446
Base class for stars *** DEPRECATED : use class Star instead ***.
Definition etoile.h:427
Basic integer array class.
Definition itbl.h:122
Matrix handling.
Definition matrice.h:152
Coefficients storage for the multi-domain spectral method.
Definition mtbl_cf.h:196
int get_n_cmp_mod() const
Returns the number of modifiable Cmp 's addresses in the list.
Definition param.C:1000
Tensor & get_tensor_mod(int position=0) const
Returns the reference of a modifiable Tensor stored in the list.
Definition param.C:1603
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
Definition param.C:318
const Itbl & get_itbl(int position=0) const
Returns the reference of a Itbl stored in the list.
Definition param.C:708
int get_n_itbl() const
Returns the number of Itbl 's addresses in the list.
Definition param.C:656
const Map ** p_map
Array (size n_map ) of the Map 's addresses.
Definition param.h:189
int get_n_itbl_mod() const
Returns the number of modifiable Itbl 's addresses in the list.
Definition param.C:725
const Mtbl_cf ** p_mtbl_cf
Array (size n_mtbl_cf ) of the Mtbl_cf 's addresses.
Definition param.h:193
const int ** p_int
Array (size n_int ) of the int 's addresses.
Definition param.h:132
int n_scalar
Number of Scalar 's.
Definition param.h:195
~Param()
Destructor.
Definition param.C:147
int n_matrice
Number of Matrice 's.
Definition param.h:163
void add_scalar_mod(Scalar &ti, int position=0)
Adds the address of a new modifiable Scalar to the list.
Definition param.C:1420
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Definition param.C:1052
Scalar ** p_scalar_mod
Array (size n_scalar_mod ) of the modifiable Scalar 's addresses.
Definition param.h:201
int get_n_matrice_mod() const
Returns the number of modifiable Matrice 's addresses in the list.
Definition param.C:862
void add_matrice(const Matrice &ti, int position=0)
Adds the address of a new Matrice to the list.
Definition param.C:800
Tbl ** p_tbl_mod
Array (size n_tbl_mod ) of the modifiable Tbl 's addresses.
Definition param.h:153
const Matrice ** p_matrice
Array (size n_matrice ) of the Matrice 's addresses.
Definition param.h:165
const double ** p_double
Array (size n_double ) of the double 's addresses.
Definition param.h:140
void add_map(const Map &mi, int position=0)
Adds the address of a new Map to the list.
Definition param.C:1214
int n_int_mod
Number of modifiable int 's (integers).
Definition param.h:134
Scalar & get_scalar_mod(int position=0) const
Returns the reference of a modifiable Scalar stored in the list.
Definition param.C:1465
const Star ** p_star
Array (size n_star ) of the Star 's addresses.
Definition param.h:217
const Scalar ** p_scalar
Array (size n_scalar ) of the Scalar 's addresses.
Definition param.h:197
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
Definition param.C:295
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
Definition param.C:364
void add_mtbl_cf(const Mtbl_cf &mi, int position=0)
Adds the address of a new Mtbl_cf to the list.
Definition param.C:1282
int get_n_tbl_mod() const
Returns the number of modifiable Tbl 's addresses in the list.
Definition param.C:587
Itbl & get_itbl_mod(int position=0) const
Returns the reference of a stored modifiable Itbl .
Definition param.C:777
int get_n_double_mod() const
Returns the number of stored modifiable double 's addresses.
Definition param.C:449
void add_tensor_mod(Tensor &ti, int position=0)
Adds the address of a new modifiable Tensor to the list.
Definition param.C:1558
int get_n_tenseur() const
Returns the number of Tenseur 's addresses in the list.
Definition param.C:1069
void add_star(const Star &eti, int position=0)
Adds the address of a new Star to the list.
Definition param.C:1693
int get_n_int_mod() const
Returns the number of modifiable int 's addresses in the list.
Definition param.C:381
Tbl & get_tbl_mod(int position=0) const
Returns the reference of a modifiable Tbl stored in the list.
Definition param.C:639
const Star & get_star(int position=0) const
Returns the reference of a Star stored in the list.
Definition param.C:1738
int get_n_scalar_mod() const
Returns the number of modifiable Scalar 's addresses in the list.
Definition param.C:1413
Tensor ** p_tensor_mod
Array (size n_tensor_mod ) of the modifiable Tensor 's addresses.
Definition param.h:209
void clean_all()
Deletes all the objects stored as modifiables, i.e.
Definition param.C:177
const Tenseur & get_tenseur(int position=0) const
Returns the reference of a Tenseur stored in the list.
Definition param.C:1121
int get_n_etoile() const
Returns the number of Etoile 's addresses in the list.
Definition param.C:1620
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
Definition param.C:1007
void add_etoile(const Etoile &eti, int position=0)
Adds the address of a new Etoile to the list.
Definition param.C:1627
int get_n_tenseur_mod() const
Returns the number of modifiable Tenseur 's addresses in the list.
Definition param.C:1138
int n_itbl
Number of Itbl 's.
Definition param.h:155
Tenseur ** p_tenseur_mod
Array (size n_tenseur_mod ) of the modifiable Tenseur 's addresses.
Definition param.h:185
double ** p_double_mod
Array (size n_double_mod ) of the double 's addresses.
Definition param.h:144
int n_tbl
Number of Tbl 's.
Definition param.h:147
void add_matrice_mod(Matrice &ti, int position=0)
Adds the address of a new modifiable Matrice to the list.
Definition param.C:869
int get_n_tensor() const
Returns the number of Tensor 's addresses in the list.
Definition param.C:1482
int get_n_map() const
Returns the number of Map 's addresses in the list.
Definition param.C:1207
const Map & get_map(int position=0) const
Returns the reference of a Map stored in the list.
Definition param.C:1259
int get_n_cmp() const
Returns the number of Cmp 's addresses in the list.
Definition param.C:931
int n_double_mod
Number of modifiable double 's (double precis.
Definition param.h:142
void add_tensor(const Tensor &ti, int position=0)
Adds the address of a new Tensor to the list.
Definition param.C:1489
const Scalar & get_scalar(int position=0) const
Returns the reference of a Scalar stored in the list.
Definition param.C:1396
const Tensor ** p_tensor
Array (size n_tensor ) of the Tensor 's addresses.
Definition param.h:205
int n_int
Number of int 's (integers).
Definition param.h:130
Tenseur & get_tenseur_mod(int position=0) const
Returns the reference of a modifiable Tenseur stored in the list.
Definition param.C:1190
int get_n_mtbl_cf() const
Returns the number of Mtbl_cf 's addresses in the list.
Definition param.C:1275
void add_cmp(const Cmp &ti, int position=0)
Adds the address of a new Cmp to the list.
Definition param.C:938
Matrice ** p_matrice_mod
Array (size n_matrice_mod ) of the modifiable Matrice 's addresses.
Definition param.h:169
const Tbl ** p_tbl
Array (size n_tbl ) of the Tbl 's addresses.
Definition param.h:149
int get_n_tensor_mod() const
Returns the number of modifiable Tensor 's addresses in the list.
Definition param.C:1551
void add_scalar(const Scalar &ti, int position=0)
Adds the address of a new Scalar to the list.
Definition param.C:1351
void add_double_mod(double &x, int position=0)
Adds the address of a new modifiable double to the list.
Definition param.C:456
Matrice & get_matrice_mod(int position=0) const
Returns the reference of a modifiable Matrice stored in the list.
Definition param.C:914
Cmp ** p_cmp_mod
Array (size n_cmp_mod ) of the modifiable Cmp 's addresses.
Definition param.h:177
int get_n_matrice() const
Returns the number of Matrice 's addresses in the list.
Definition param.C:793
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
Definition param.C:388
int ** p_int_mod
Array (size n_int_mod ) of the modifiable int 's addresses.
Definition param.h:136
Itbl ** p_itbl_mod
Array (size n_itbl_mod ) of the modifiable Itbl 's addresses.
Definition param.h:161
int n_itbl_mod
Number of modifiable Itbl 's.
Definition param.h:159
const Tenseur ** p_tenseur
Array (size n_tenseur ) of the Tenseur 's addresses.
Definition param.h:181
int n_mtbl_cf
Number of Mtbl_cf 's.
Definition param.h:191
void add_tenseur(const Tenseur &ti, int position=0)
Adds the address of a new Tenseur to the list.
Definition param.C:1076
void add_tbl_mod(Tbl &ti, int position=0)
Adds the address of a new modifiable Tbl to the list.
Definition param.C:594
int n_tensor
Number of Tensor 's.
Definition param.h:203
int n_tenseur
Number of Tenseur 's.
Definition param.h:179
void add_itbl_mod(Itbl &ti, int position=0)
Adds the address of a new modifiable Itbl to the list.
Definition param.C:732
const Cmp ** p_cmp
Array (size n_cmp ) of the Cmp 's addresses.
Definition param.h:173
const Etoile ** p_etoile
Array (size n_etoile ) of the Etoile 's addresses.
Definition param.h:213
void add_tenseur_mod(Tenseur &ti, int position=0)
Adds the address of a new modifiable Tenseur to the list.
Definition param.C:1145
const Tbl & get_tbl(int position=0) const
Returns the reference of a Tbl stored in the list.
Definition param.C:570
int get_n_scalar() const
Returns the number of Scalar 's addresses in the list.
Definition param.C:1344
Param()
Default constructor is the only constructor.
Definition param.C:118
int get_n_star() const
Returns the number of Star 's addresses in the list.
Definition param.C:1686
const Itbl ** p_itbl
Array (size n_itbl ) of the Itbl 's addresses.
Definition param.h:157
int n_double
Number of double 's (double precis.
Definition param.h:138
int n_etoile
Number of Etoile 's.
Definition param.h:211
const Tensor & get_tensor(int position=0) const
Returns the reference of a Tensor stored in the list.
Definition param.C:1534
int get_n_double() const
Returns the number of stored double 's addresses.
Definition param.C:311
int get_n_int() const
Returns the number of stored int 's addresses.
Definition param.C:242
const Cmp & get_cmp(int position=0) const
Returns the reference of a Cmp stored in the list.
Definition param.C:983
int n_tenseur_mod
Number of modifiable Tenseur 's.
Definition param.h:183
int n_cmp_mod
Number of modifiable Cmp 's.
Definition param.h:175
int n_matrice_mod
Number of modifiable Matrice 's.
Definition param.h:167
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
Definition param.C:433
int n_tbl_mod
Number of modifiable Tbl 's.
Definition param.h:151
void add_itbl(const Itbl &ti, int position=0)
Adds the address of a new Itbl to the list.
Definition param.C:663
double & get_double_mod(int position=0) const
Returns the reference of a stored modifiable double .
Definition param.C:501
int n_star
Number of Star 's.
Definition param.h:215
int n_map
Number of Map 's.
Definition param.h:187
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
Definition param.C:249
int n_scalar_mod
Number of modifiable Scalar 's.
Definition param.h:199
const Etoile & get_etoile(int position=0) const
Returns the reference of a Etoile stored in the list.
Definition param.C:1672
const Matrice & get_matrice(int position=0) const
Returns the reference of a Matrice stored in the list.
Definition param.C:845
int get_n_tbl() const
Returns the number of Tbl 's addresses in the list.
Definition param.C:518
int n_tensor_mod
Number of modifiable Tensor 's.
Definition param.h:207
int n_cmp
Number of Cmp 's.
Definition param.h:171
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
Definition param.C:525
const Mtbl_cf & get_mtbl_cf(int position=0) const
Returns the reference of a Mtbl_cf stored in the list.
Definition param.C:1328
Tensor field of valence 0 (or component of a tensorial field).
Definition scalar.h:393
Base class for stars.
Definition star.h:175
Basic array class.
Definition tbl.h:161
Tensor handling *** DEPRECATED : use class Tensor instead ***.
Definition tenseur.h:304
Tensor handling.
Definition tensor.h:294
Lorene prototypes.
Definition app_hor.h:67
Map(const Mg3d &)
Constructor from a multi-domain 3D grid.
Definition map.C:142