31 char param_C[] =
"$Header: /cvsroot/Lorene/C++/Source/Param/param.C,v 1.9 2014/10/13 08:53:37 j_novak Exp $" ;
248 if (index >=
n_int) {
250 int n_int_nouveau = index + 1 ;
251 const int** p_int_nouveau =
new const int*[n_int_nouveau] ;
255 for (
int i=0; i<
n_int; i++) {
256 p_int_nouveau[i] =
p_int[i] ;
261 for (
int i=
n_int; i<index; i++) {
262 p_int_nouveau[i] = 0x0 ;
266 p_int_nouveau[index] = &ti ;
270 p_int = p_int_nouveau ;
271 n_int = n_int_nouveau ;
276 if (
p_int[index] != 0x0) {
277 cout <<
"Param::add_int : the position " << index
278 <<
" is already occupied !" << endl ;
295 assert(index <
n_int) ;
297 return *(
p_int[index]) ;
319 int n_double_nouveau = index + 1 ;
320 const double** p_double_nouveau =
321 new const double*[n_double_nouveau] ;
330 for (
int i=
n_double; i<index; i++) {
331 p_double_nouveau[i] = 0x0 ;
335 p_double_nouveau[index] = &ti ;
346 cout <<
"Param::add_double : the position " << index
347 <<
" is already occupied !" << endl ;
389 int n_int_nouveau = index + 1 ;
390 int** p_int_nouveau =
new int*[n_int_nouveau] ;
400 p_int_nouveau[i] = 0x0 ;
404 p_int_nouveau[index] = &ti ;
415 cout <<
"Param::add_int_mod : the position " << index
416 <<
" is already occupied !" << endl ;
457 int n_double_nouveau = index + 1 ;
458 double** p_double_nouveau =
new double*[n_double_nouveau] ;
468 p_double_nouveau[i] = 0x0 ;
472 p_double_nouveau[index] = &ti ;
483 cout <<
"Param::add_double_mod : the position " << index
484 <<
" is already occupied !" << endl ;
524 if (index >=
n_tbl) {
526 int n_tbl_nouveau = index + 1 ;
527 const Tbl** p_tbl_nouveau =
new const Tbl*[n_tbl_nouveau] ;
531 for (
int i=0; i<
n_tbl; i++) {
532 p_tbl_nouveau[i] =
p_tbl[i] ;
536 for (
int i=
n_tbl; i<index; i++) {
537 p_tbl_nouveau[i] = 0x0 ;
541 p_tbl_nouveau[index] = &ti ;
545 p_tbl = p_tbl_nouveau ;
546 n_tbl = n_tbl_nouveau ;
551 if (
p_tbl[index] != 0x0) {
552 cout <<
"Param::add_tbl : the position " << index
553 <<
" is already occupied !" << endl ;
570 assert(index <
n_tbl) ;
572 return *(
p_tbl[index]) ;
595 int n_tbl_nouveau = index + 1 ;
596 Tbl** p_tbl_nouveau =
new Tbl*[n_tbl_nouveau] ;
606 p_tbl_nouveau[i] = 0x0 ;
610 p_tbl_nouveau[index] = &ti ;
621 cout <<
"Param::add_tbl_mod : the position " << index
622 <<
" is already occupied !" << endl ;
664 int n_itbl_nouveau = index + 1 ;
665 const Itbl** p_itbl_nouveau =
new const Itbl*[n_itbl_nouveau] ;
669 for (
int i=0; i<
n_itbl; i++) {
670 p_itbl_nouveau[i] =
p_itbl[i] ;
674 for (
int i=
n_itbl; i<index; i++) {
675 p_itbl_nouveau[i] = 0x0 ;
679 p_itbl_nouveau[index] = &ti ;
689 if (
p_itbl[index] != 0x0) {
690 cout <<
"Param::add_itbl : the position " << index
691 <<
" is already occupied !" << endl ;
733 int n_itbl_nouveau = index + 1 ;
734 Itbl** p_itbl_nouveau =
new Itbl*[n_itbl_nouveau] ;
744 p_itbl_nouveau[i] = 0x0 ;
748 p_itbl_nouveau[index] = &ti ;
759 cout <<
"Param::add_itbl_mod : the position " << index
760 <<
" is already occupied !" << endl ;
801 int n_matrice_nouveau = index + 1 ;
802 const Matrice** p_matrice_nouveau =
new const Matrice*[n_matrice_nouveau] ;
812 p_matrice_nouveau[i] = 0x0 ;
816 p_matrice_nouveau[index] = &ti ;
827 cout <<
"Param::add_matrice : the position " << index
828 <<
" is already occupied !" << endl ;
870 int n_matrice_nouveau = index + 1 ;
881 p_matrice_nouveau[i] = 0x0 ;
885 p_matrice_nouveau[index] = &ti ;
896 cout <<
"Param::add_matrice_mod : the position " << index
897 <<
" is already occupied !" << endl ;
937 if (index >=
n_cmp) {
939 int n_cmp_nouveau = index + 1 ;
940 const Cmp** p_cmp_nouveau =
new const Cmp*[n_cmp_nouveau] ;
944 for (
int i=0; i<
n_cmp; i++) {
945 p_cmp_nouveau[i] =
p_cmp[i] ;
949 for (
int i=
n_cmp; i<index; i++) {
950 p_cmp_nouveau[i] = 0x0 ;
954 p_cmp_nouveau[index] = &ti ;
958 p_cmp = p_cmp_nouveau ;
959 n_cmp = n_cmp_nouveau ;
964 if (
p_cmp[index] != 0x0) {
965 cout <<
"Param::add_cmp : the position " << index
966 <<
" is already occupied !" << endl ;
983 assert(index <
n_cmp) ;
985 return *(
p_cmp[index]) ;
1008 int n_cmp_nouveau = index + 1 ;
1009 Cmp** p_cmp_nouveau =
new Cmp*[n_cmp_nouveau] ;
1019 p_cmp_nouveau[i] = 0x0 ;
1023 p_cmp_nouveau[index] = &ti ;
1034 cout <<
"Param::add_cmp_mod : the position " << index
1035 <<
" is already occupied !" << endl ;
1051 assert(index >= 0) ;
1077 int n_tenseur_nouveau = index + 1 ;
1078 const Tenseur** p_tenseur_nouveau =
new const Tenseur*[n_tenseur_nouveau] ;
1088 p_tenseur_nouveau[i] = 0x0 ;
1092 p_tenseur_nouveau[index] = &ti ;
1103 cout <<
"Param::add_tenseur : the position " << index
1104 <<
" is already occupied !" << endl ;
1120 assert(index >= 0) ;
1146 int n_tenseur_nouveau = index + 1 ;
1157 p_tenseur_nouveau[i] = 0x0 ;
1161 p_tenseur_nouveau[index] = &ti ;
1172 cout <<
"Param::add_tenseur_mod : the position " << index
1173 <<
" is already occupied !" << endl ;
1189 assert(index >= 0) ;
1213 if (index >=
n_map) {
1215 int n_map_nouveau = index + 1 ;
1216 const Map** p_map_nouveau =
new const Map*[n_map_nouveau] ;
1220 for (
int i=0; i<
n_map; i++) {
1221 p_map_nouveau[i] =
p_map[i] ;
1225 for (
int i=
n_map; i<index; i++) {
1226 p_map_nouveau[i] = 0x0 ;
1230 p_map_nouveau[index] = &mi ;
1234 p_map = p_map_nouveau ;
1235 n_map = n_map_nouveau ;
1240 if (
p_map[index] != 0x0) {
1241 cout <<
"Param::add_map : the position " << index
1242 <<
" is already occupied !" << endl ;
1246 p_map[index] = &mi ;
1258 assert(index >= 0) ;
1259 assert(index <
n_map) ;
1261 return *(
p_map[index]) ;
1283 int n_mtbl_cf_nouveau = index + 1 ;
1284 const Mtbl_cf** p_mtbl_cf_nouveau =
1285 new const Mtbl_cf*[n_mtbl_cf_nouveau] ;
1295 p_mtbl_cf_nouveau[i] = 0x0 ;
1299 p_mtbl_cf_nouveau[index] = &mi ;
1310 cout <<
"Param::add_mtbl_cf : the position " << index
1311 <<
" is already occupied !" << endl ;
1327 assert(index >= 0) ;
1352 int n_scalar_nouveau = index + 1 ;
1353 const Scalar** p_scalar_nouveau =
new const Scalar*[n_scalar_nouveau] ;
1358 p_scalar_nouveau[i] =
p_scalar[i] ;
1362 for (
int i=
n_scalar; i<index; i++) {
1363 p_scalar_nouveau[i] = 0x0 ;
1367 p_scalar_nouveau[index] = &ti ;
1378 cout <<
"Param::add_scalar : the position " << index
1379 <<
" is already occupied !" << endl ;
1395 assert(index >= 0) ;
1421 int n_scalar_nouveau = index + 1 ;
1422 Scalar** p_scalar_nouveau =
new Scalar*[n_scalar_nouveau] ;
1432 p_scalar_nouveau[i] = 0x0 ;
1436 p_scalar_nouveau[index] = &ti ;
1447 cout <<
"Param::add_scalar_mod : the position " << index
1448 <<
" is already occupied !" << endl ;
1464 assert(index >= 0) ;
1490 int n_tensor_nouveau = index + 1 ;
1491 const Tensor** p_tensor_nouveau =
new const Tensor*[n_tensor_nouveau] ;
1496 p_tensor_nouveau[i] =
p_tensor[i] ;
1500 for (
int i=
n_tensor; i<index; i++) {
1501 p_tensor_nouveau[i] = 0x0 ;
1505 p_tensor_nouveau[index] = &ti ;
1516 cout <<
"Param::add_tensor : the position " << index
1517 <<
" is already occupied !" << endl ;
1533 assert(index >= 0) ;
1559 int n_tensor_nouveau = index + 1 ;
1560 Tensor** p_tensor_nouveau =
new Tensor*[n_tensor_nouveau] ;
1570 p_tensor_nouveau[i] = 0x0 ;
1574 p_tensor_nouveau[index] = &ti ;
1585 cout <<
"Param::add_tensor_mod : the position " << index
1586 <<
" is already occupied !" << endl ;
1602 assert(index >= 0) ;
1628 int n_etoile_nouveau = index + 1 ;
1629 const Etoile** p_etoile_nouveau =
new const Etoile*[n_etoile_nouveau] ;
1634 p_etoile_nouveau[i] =
p_etoile[i] ;
1638 for (
int i=
n_etoile; i<index; i++) {
1639 p_etoile_nouveau[i] = 0x0 ;
1643 p_etoile_nouveau[index] = &eti ;
1654 cout <<
"Param::add_etoile : the position " << index
1655 <<
" is already occupied !" << endl ;
1671 assert(index >= 0) ;
1694 int n_star_nouveau = index + 1 ;
1695 const Star** p_star_nouveau =
new const Star*[n_star_nouveau] ;
1699 for (
int i=0; i<
n_star; i++) {
1700 p_star_nouveau[i] =
p_star[i] ;
1704 for (
int i=
n_star; i<index; i++) {
1705 p_star_nouveau[i] = 0x0 ;
1709 p_star_nouveau[index] = &eti ;
1713 p_star = p_star_nouveau ;
1714 n_star = n_star_nouveau ;
1719 if (
p_star[index] != 0x0) {
1720 cout <<
"Param::add_star : the position " << index
1721 <<
" is already occupied !" << endl ;
1737 assert(index >= 0) ;
1740 return *(
p_star[index]) ;
Component of a tensorial field *** DEPRECATED : use class Scalar instead ***.
Base class for stars *** DEPRECATED : use class Star instead ***.
Basic integer array class.
Base class for coordinate mappings.
Coefficients storage for the multi-domain spectral method.
int get_n_cmp_mod() const
Returns the number of modifiable Cmp 's addresses in the list.
Tensor & get_tensor_mod(int position=0) const
Returns the reference of a modifiable Tensor stored in the list.
void add_double(const double &x, int position=0)
Adds the the address of a new double to the list.
const Itbl & get_itbl(int position=0) const
Returns the reference of a Itbl stored in the list.
int get_n_itbl() const
Returns the number of Itbl 's addresses in the list.
const Map ** p_map
Array (size n_map ) of the Map 's addresses.
int get_n_itbl_mod() const
Returns the number of modifiable Itbl 's addresses in the list.
const Mtbl_cf ** p_mtbl_cf
Array (size n_mtbl_cf ) of the Mtbl_cf 's addresses.
const int ** p_int
Array (size n_int ) of the int 's addresses.
int n_scalar
Number of Scalar 's
int n_matrice
Number of Matrice 's
void add_scalar_mod(Scalar &ti, int position=0)
Adds the address of a new modifiable Scalar to the list.
Cmp & get_cmp_mod(int position=0) const
Returns the reference of a modifiable Cmp stored in the list.
Scalar ** p_scalar_mod
Array (size n_scalar_mod ) of the modifiable Scalar 's addresses.
int get_n_matrice_mod() const
Returns the number of modifiable Matrice 's addresses in the list.
void add_matrice(const Matrice &ti, int position=0)
Adds the address of a new Matrice to the list.
Tbl ** p_tbl_mod
Array (size n_tbl_mod ) of the modifiable Tbl 's addresses.
const Matrice ** p_matrice
Array (size n_matrice ) of the Matrice 's addresses.
const double ** p_double
Array (size n_double ) of the double 's addresses.
void add_map(const Map &mi, int position=0)
Adds the address of a new Map to the list.
int n_int_mod
Number of modifiable int 's (integers).
Scalar & get_scalar_mod(int position=0) const
Returns the reference of a modifiable Scalar stored in the list.
const Star ** p_star
Array (size n_star ) of the Star 's addresses.
const Scalar ** p_scalar
Array (size n_scalar ) of the Scalar 's addresses.
const int & get_int(int position=0) const
Returns the reference of a int stored in the list.
const double & get_double(int position=0) const
Returns the reference of a double stored in the list.
void add_mtbl_cf(const Mtbl_cf &mi, int position=0)
Adds the address of a new Mtbl_cf to the list.
int get_n_tbl_mod() const
Returns the number of modifiable Tbl 's addresses in the list.
Itbl & get_itbl_mod(int position=0) const
Returns the reference of a stored modifiable Itbl .
int get_n_double_mod() const
Returns the number of stored modifiable double 's addresses.
void add_tensor_mod(Tensor &ti, int position=0)
Adds the address of a new modifiable Tensor to the list.
int get_n_tenseur() const
Returns the number of Tenseur 's addresses in the list.
void add_star(const Star &eti, int position=0)
Adds the address of a new Star to the list.
int get_n_int_mod() const
Returns the number of modifiable int 's addresses in the list.
Tbl & get_tbl_mod(int position=0) const
Returns the reference of a modifiable Tbl stored in the list.
const Star & get_star(int position=0) const
Returns the reference of a Star stored in the list.
int get_n_scalar_mod() const
Returns the number of modifiable Scalar 's addresses in the list.
Tensor ** p_tensor_mod
Array (size n_tensor_mod ) of the modifiable Tensor 's addresses.
void clean_all()
Deletes all the objects stored as modifiables, i.e.
const Tenseur & get_tenseur(int position=0) const
Returns the reference of a Tenseur stored in the list.
int get_n_etoile() const
Returns the number of Etoile 's addresses in the list.
void add_cmp_mod(Cmp &ti, int position=0)
Adds the address of a new modifiable Cmp to the list.
void add_etoile(const Etoile &eti, int position=0)
Adds the address of a new Etoile to the list.
int get_n_tenseur_mod() const
Returns the number of modifiable Tenseur 's addresses in the list.
int n_itbl
Number of Itbl 's
Tenseur ** p_tenseur_mod
Array (size n_tenseur_mod ) of the modifiable Tenseur 's addresses.
double ** p_double_mod
Array (size n_double_mod ) of the double 's addresses.
int n_tbl
Number of Tbl 's
void add_matrice_mod(Matrice &ti, int position=0)
Adds the address of a new modifiable Matrice to the list.
int get_n_tensor() const
Returns the number of Tensor 's addresses in the list.
int get_n_map() const
Returns the number of Map 's addresses in the list.
const Map & get_map(int position=0) const
Returns the reference of a Map stored in the list.
int get_n_cmp() const
Returns the number of Cmp 's addresses in the list.
int n_double_mod
Number of modifiable double 's (double precis.
void add_tensor(const Tensor &ti, int position=0)
Adds the address of a new Tensor to the list.
const Scalar & get_scalar(int position=0) const
Returns the reference of a Scalar stored in the list.
const Tensor ** p_tensor
Array (size n_tensor ) of the Tensor 's addresses.
int n_int
Number of int 's (integers).
Tenseur & get_tenseur_mod(int position=0) const
Returns the reference of a modifiable Tenseur stored in the list.
int get_n_mtbl_cf() const
Returns the number of Mtbl_cf 's addresses in the list.
void add_cmp(const Cmp &ti, int position=0)
Adds the address of a new Cmp to the list.
Matrice ** p_matrice_mod
Array (size n_matrice_mod ) of the modifiable Matrice 's addresses.
const Tbl ** p_tbl
Array (size n_tbl ) of the Tbl 's addresses.
int get_n_tensor_mod() const
Returns the number of modifiable Tensor 's addresses in the list.
void add_scalar(const Scalar &ti, int position=0)
Adds the address of a new Scalar to the list.
void add_double_mod(double &x, int position=0)
Adds the address of a new modifiable double to the list.
Matrice & get_matrice_mod(int position=0) const
Returns the reference of a modifiable Matrice stored in the list.
Cmp ** p_cmp_mod
Array (size n_cmp_mod ) of the modifiable Cmp 's addresses.
int get_n_matrice() const
Returns the number of Matrice 's addresses in the list.
void add_int_mod(int &n, int position=0)
Adds the address of a new modifiable int to the list.
int ** p_int_mod
Array (size n_int_mod ) of the modifiable int 's addresses.
Itbl ** p_itbl_mod
Array (size n_itbl_mod ) of the modifiable Itbl 's addresses.
int n_itbl_mod
Number of modifiable Itbl 's
const Tenseur ** p_tenseur
Array (size n_tenseur ) of the Tenseur 's addresses.
int n_mtbl_cf
Number of Mtbl_cf 's
void add_tenseur(const Tenseur &ti, int position=0)
Adds the address of a new Tenseur to the list.
void add_tbl_mod(Tbl &ti, int position=0)
Adds the address of a new modifiable Tbl to the list.
int n_tensor
Number of Tensor 's
int n_tenseur
Number of Tenseur 's
void add_itbl_mod(Itbl &ti, int position=0)
Adds the address of a new modifiable Itbl to the list.
const Cmp ** p_cmp
Array (size n_cmp ) of the Cmp 's addresses.
const Etoile ** p_etoile
Array (size n_etoile ) of the Etoile 's addresses.
void add_tenseur_mod(Tenseur &ti, int position=0)
Adds the address of a new modifiable Tenseur to the list.
const Tbl & get_tbl(int position=0) const
Returns the reference of a Tbl stored in the list.
int get_n_scalar() const
Returns the number of Scalar 's addresses in the list.
Param()
Default constructor is the only constructor.
int get_n_star() const
Returns the number of Star 's addresses in the list.
const Itbl ** p_itbl
Array (size n_itbl ) of the Itbl 's addresses.
int n_double
Number of double 's (double precis.
int n_etoile
Number of Etoile 's.
const Tensor & get_tensor(int position=0) const
Returns the reference of a Tensor stored in the list.
int get_n_double() const
Returns the number of stored double 's addresses.
int get_n_int() const
Returns the number of stored int 's addresses.
const Cmp & get_cmp(int position=0) const
Returns the reference of a Cmp stored in the list.
int n_tenseur_mod
Number of modifiable Tenseur 's
int n_cmp_mod
Number of modifiable Cmp 's
int n_matrice_mod
Number of modifiable Matrice 's
int & get_int_mod(int position=0) const
Returns the reference of a modifiable int stored in the list.
int n_tbl_mod
Number of modifiable Tbl 's
void add_itbl(const Itbl &ti, int position=0)
Adds the address of a new Itbl to the list.
double & get_double_mod(int position=0) const
Returns the reference of a stored modifiable double .
int n_star
Number of Star 's.
int n_map
Number of Map 's
void add_int(const int &n, int position=0)
Adds the address of a new int to the list.
int n_scalar_mod
Number of modifiable Scalar 's
const Etoile & get_etoile(int position=0) const
Returns the reference of a Etoile stored in the list.
const Matrice & get_matrice(int position=0) const
Returns the reference of a Matrice stored in the list.
int get_n_tbl() const
Returns the number of Tbl 's addresses in the list.
int n_tensor_mod
Number of modifiable Tensor 's
int n_cmp
Number of Cmp 's
void add_tbl(const Tbl &ti, int position=0)
Adds the address of a new Tbl to the list.
const Mtbl_cf & get_mtbl_cf(int position=0) const
Returns the reference of a Mtbl_cf stored in the list.
Tensor field of valence 0 (or component of a tensorial field).
Tensor handling *** DEPRECATED : use class Tensor instead ***.