This file is indexed.

/usr/include/lorene/C++/Include/etoile.h is in liblorene-dev 0.0.0~cvs20161116+dfsg-1ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
/*
 *  Definition of Lorene classes Etoile
 *				 Etoile_bin
 *				 Etoile_rot
 *
 */

/*
 *   Copyright (c) 2000-2001 Eric Gourgoulhon
 *   Copyright (c) 2000-2001 Keisuke Taniguchi
 *
 *   This file is part of LORENE.
 *
 *   LORENE is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   LORENE is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with LORENE; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */


#ifndef __ETOILE_H_ 
#define __ETOILE_H_ 

/*
 * $Id: etoile.h,v 1.35 2015/06/12 12:38:24 j_novak Exp $
 * $Log: etoile.h,v $
 * Revision 1.35  2015/06/12 12:38:24  j_novak
 * Implementation of the corrected formula for the quadrupole momentum.
 *
 * Revision 1.34  2015/06/11 13:50:19  j_novak
 * Minor corrections
 *
 * Revision 1.33  2015/06/10 14:36:39  a_sourie
 * Corrected the formula for the computation of the quadrupole momentum.
 *
 * Revision 1.32  2014/10/13 08:52:34  j_novak
 * Lorene classes and functions now belong to the namespace Lorene.
 *
 * Revision 1.31  2011/10/06 14:55:36  j_novak
 * equation_of_state() is now virtual to be able to call to the magnetized
 * Eos_mag.
 *
 * Revision 1.30  2010/02/02 21:05:49  e_gourgoulhon
 * Etoile_bin:equilibrium : suppressed the argument method_khi added by
 * mistake during previous commit.
 *
 * Revision 1.29  2010/02/02 13:34:12  e_gourgoulhon
 * Marked DEPRECATED (in the documentation).
 *
 * Revision 1.28  2008/11/14 13:51:08  e_gourgoulhon
 * Added the parameter ent_limit to Etoile::equilibrium_spher and
 * Etoile_bin::equilibrium.
 *
 * Revision 1.27  2005/10/05 15:14:47  j_novak
 * Added a Param* as parameter of Etoile_rot::equilibrium
 *
 * Revision 1.26  2005/08/29 15:10:12  p_grandclement
 * Addition of things needed :
 *   1) For BBH with different masses
 *   2) Provisory files for the mixted binaries (Bh and NS) : THIS IS NOT
 *   WORKING YET !!!
 *
 * Revision 1.25  2005/01/18 22:35:51  k_taniguchi
 * Delete a pointer for Etoile::ray_eq(int kk).
 *
 * Revision 1.24  2005/01/18 20:34:14  k_taniguchi
 * Addition of Etoile::ray_eq(int kk).
 *
 * Revision 1.23  2005/01/17 20:39:32  k_taniguchi
 * Addition of Etoile::ray_eq_3pis2().
 *
 * Revision 1.22  2004/11/30 20:40:06  k_taniguchi
 * Addition of the method for calculating a spherical star with falloff
 * condition at the outer boundary.
 *
 * Revision 1.21  2004/05/10 10:18:33  f_limousin
 * Change to avoid warning in the compilation of Lorene
 *
 * Revision 1.20  2004/05/07 12:37:12  f_limousin
 * Add new member ssjm1_psi
 *
 * Revision 1.19  2004/04/08 16:42:31  f_limousin
 * Add a function velocity_potential with argument ssjm1_psi for the
 * case of strange stars.
 *
 * Revision 1.18  2004/03/22 13:12:41  j_novak
 * Modification of comments to use doxygen instead of doc++
 *
 * Revision 1.17  2003/10/24 12:24:41  k_taniguchi
 * Suppress the methods of update metric for NS-BH
 *
 * Revision 1.16  2003/10/21 11:44:43  k_taniguchi
 * Delete various things for the Bin_ns_bh project.
 * They are moved to et_bin_nsbh.h.
 *
 * Revision 1.15  2003/10/20 14:50:04  k_taniguchi
 * Addition of various things for the Bin_ns_bh project
 * which are related with the part of the neutron star.
 *
 * Revision 1.14  2003/10/20 13:11:03  k_taniguchi
 * Back to version 1.12
 *
 * Revision 1.13  2003/10/20 12:15:55  k_taniguchi
 * Addition of various things for the Bin_ns_bh project
 * which are related with the part of the neutron star.
 *
 * Revision 1.12  2003/06/20 14:13:16  f_limousin
 * Change to virtual the functions equilibrium_spher() and kinematics().
 *
 * Revision 1.11  2003/02/13 16:40:24  p_grandclement
 * Addition of various things for the Bin_ns_bh project, non of them being
 * completely tested
 *
 * Revision 1.10  2003/02/04 16:20:35  f_limousin
 * Change to virtual the routine extrinsic_curvature
 *
 * Revision 1.9  2003/01/31 16:57:12  p_grandclement
 * addition of the member Cmp decouple used to compute the K_ij auto, once
 * the K_ij total is known
 *
 * Revision 1.8  2002/12/19 14:48:00  e_gourgoulhon
 *
 * Class Etoile_bin: added the new functions:
 * 	void update_metric(const Bhole& comp)
 *  	void update_metric_der_comp(const Bhole& comp)
 * to treat the case where the companion is a black hole
 *
 * Revision 1.7  2002/12/17 21:17:08  e_gourgoulhon
 * Class Etoile_bin: suppression of the member p_companion
 *                   as well as the associated functions set_companion
 *   		  and get_companion.
 *
 * Revision 1.6  2002/09/13 09:17:33  j_novak
 * Modif. commentaires
 *
 * Revision 1.5  2002/06/17 14:05:16  j_novak
 * friend functions are now also declared outside the class definition
 *
 * Revision 1.4  2002/04/05 09:09:36  j_novak
 * The inversion of the EOS for 2-fluids polytrope has been modified.
 * Some errors in the determination of the surface were corrected.
 *
 * Revision 1.3  2002/01/11 14:09:34  j_novak
 * Added newtonian version for 2-fluid stars
 *
 * Revision 1.2  2001/12/06 15:11:43  jl_zdunik
 * Introduction of the new function f_eq() in the class Etoile_rot
 *
 * Revision 1.1.1.1  2001/11/20 15:19:27  e_gourgoulhon
 * LORENE
 *
 * Revision 2.61  2001/10/25  08:32:57  eric
 * Etoile_rot::display_poly passe de protected a public.
 *
 * Revision 2.60  2001/10/24  15:35:55  eric
 * Classe Etoile_rot: ajout de la fonction display_poly.
 *
 * Revision 2.59  2001/10/16  14:48:00  eric
 * La fonction Etoile_rot::get_omega() devient
 *   virtual Etoile_rot::get_omega_c()
 *  (retourne la valeur centrale de Omega).
 *
 * Revision 2.58  2001/10/11  09:24:00  eric
 * La fonction Etoile_rot::equilibrium est desormais virtuelle.
 *
 * Revision 2.57  2001/08/06  15:39:04  keisuke
 * Addition of a new argument to Etoile_bin::equilibrium and equil_regular.
 *
 * Revision 2.56  2001/06/25  12:52:33  eric
 * Classe Etoile_bin : ajout du membre p_companion et des fonctions
 *  associees set_companion() et get_companion().
 *
 * Revision 2.55  2001/06/13  14:11:55  eric
 * Modif commentaires (mise en conformite Doc++ 3.4.7)
 *
 * Revision 2.54  2001/03/26  09:29:59  jlz
 * Classe Etoile_rot: new members p_espec_isco and p_lspec_isco.
 *
 * Revision 2.53  2001/02/08  15:37:09  eric
 * *** empty log message ***
 *
 * Revision 2.52  2001/02/08  15:12:42  eric
 * Ajout de la fonction Etoile_rot::f_eccentric.
 *
 * Revision 2.51  2000/11/23  15:43:24  eric
 * Ajout de l'argument ent_limit a Etoile_rot::equilibrium.
 *
 * Revision 2.50  2000/11/19  18:51:13  eric
 * Etoile_rot: ajout de la fonction (static) lambda_grv2
 *
 * Revision 2.49  2000/11/18  23:17:32  eric
 * Ajout de l'argument ost a Etoile_rot::r_isco.
 *
 * Revision 2.48  2000/11/18  21:08:33  eric
 * Classe Etoile_rot: ajout des fonctions r_isco() et f_isco()
 *   ainsi que des membres associes p_r_isco et p_f_isco.
 *
 * Revision 2.47  2000/11/10  15:15:38  eric
 * Modif arguments Etoile_rot::equilibrium.
 *
 * Revision 2.46  2000/10/20  13:10:23  eric
 * Etoile_rot::equilibrium: ajout de l'argument nzadapt.
 *
 * Revision 2.45  2000/10/17  15:59:14  eric
 * Modif commentaires Etoile_rot::equilibrium
 *
 * Revision 2.44  2000/10/12  15:22:29  eric
 * Modif commentaires Etoile_rot.
 *
 * Revision 2.43  2000/10/12  10:20:12  eric
 * Ajout de la fonction Etoile_rot::fait_nphi().
 *
 * Revision 2.42  2000/09/22  15:50:13  keisuke
 * d_logn_auto_div devient desormais un membre de la classe Etoile
 * et non plus de la classe derivee Etoile_bin.
 *
 * Revision 2.41  2000/09/18  16:14:37  eric
 * Classe Etoile_rot: ajout du membre tkij et de la fonction
 *   extrinsic curvature().
 *
 * Revision 2.40  2000/09/07  14:31:09  keisuke
 * Ajout des membres logn_auto_regu et get_logn_auto_regu() a la classe Etoile.
 * Ajout des membres d_logn_auto_regu et get_d_logn_auto_regu()
 *  a la classe Etoile_bin.
 *
 * Revision 2.39  2000/09/07  10:25:50  keisuke
 * Ajout du membre get_logn_auto_div() a la classe Etoile.
 * Ajout du membre get_d_logn_auto_div() a la classe Etoile_bin.
 *
 * Revision 2.38  2000/08/31  11:25:24  eric
 * Classe Etoile_rot: ajout des membres tnphi et ak_car.
 *
 * Revision 2.37  2000/08/29  11:37:06  eric
 * Ajout des membres k_div et logn_auto_div a la classe Etoile.
 * Ajout du membre d_logn_auto_div a la classe Etoile_bin.
 *
 * Revision 2.36  2000/08/25  10:25:57  keisuke
 * Ajout de Etoile_bin::equil_regular.
 *
 * Revision 2.35  2000/08/18  14:01:07  eric
 * Modif commentaires.
 *
 * Revision 2.34  2000/08/17  12:38:30  eric
 * Modifs classe Etoile_rot : ajout des membres nuf, nuq, ssjm1_nuf et ssjm1_nuq
 * Modif arguments Etoile_rot::equilibrium.
 * .\
 *
 * Revision 2.33  2000/08/07  12:11:13  keisuke
 * Ajout de Etoile::equil_spher_regular.
 *
 * Revision 2.32  2000/07/21  12:02:55  eric
 * Suppression de Etoile_rot::relaxation.
 *
 * Revision 2.31  2000/07/20  15:32:28  eric
 * *** empty log message ***
 *
 * Revision 2.30  2000/07/06  09:39:12  eric
 * Ajout du membre p_xa_barycenter a Etoile_bin, ainsi que de la
 * fonction associee xa_barycenter().
 *
 * Revision 2.29  2000/05/25  13:47:38  eric
 * Modif Etoile_bin::equilibrium: ajout de l'argument thres_adapt
 *
 * Revision 2.28  2000/03/22  16:41:45  eric
 * Ajout de la sortie de nouvelles erreurs dans Etoile_bin::equilibrium.
 *
 * Revision 2.27  2000/03/22  12:54:44  eric
 * Nouveau prototype d'Etoile_bin::velocity_potential : l'erreur est
 * retournee en double.
 * Nouveau prototype d'Etoile_bin::equilibrium : diff_ent est remplace
 *  par le Tbl diff.
 *
 * Revision 2.26  2000/03/15  11:04:15  eric
 * Ajout des fonctions Etoile_bin::set_w_shift() et Etoile_bin::set_khi_shift()
 * Amelioration des commentaires.
 *
 * Revision 2.25  2000/03/08  12:12:49  eric
 * Ajout de la fonction Etoile_bin::is_irrotational().
 *
 * Revision 2.24  2000/03/07  14:48:01  eric
 * Ajout de la fonction Etoile_bin::extrinsic_curvature().
 *
 * Revision 2.23  2000/02/21  13:57:57  eric
 * classe Etoile_bin: suppression du membre psi: remplacement par psi0.
 *
 * Revision 2.22  2000/02/17  16:51:22  eric
 * Ajout de l'argument diff_ent dans Etoile_bin::equilibrium.
 *
 * Revision 2.21  2000/02/17  15:29:38  eric
 * Ajout de la fonction Etoile_bin::relaxation.
 *
 * Revision 2.20  2000/02/17  13:54:21  eric
 * Ajout de la fonction Etoile_bin::velocity_potential.
 *
 * Revision 2.19  2000/02/16  15:05:14  eric
 * Ajout des membres w_shift et khi_shift.
 * (sauves dans les fichiers a la place de shift_auto).
 * Ajout de la fonction Etoile_bin::fait_shift_auto.
 *
 * Revision 2.18  2000/02/16  13:47:02  eric
 * Classe Etoile_bin: ajout des membres ssjm1_khi et ssjm1_wshift.
 *
 * Revision 2.17  2000/02/16  11:54:13  eric
 * Classe Etoile_bin : ajout des membres ssjm1_logn et ssjm1_beta.
 *
 * Revision 2.16  2000/02/15  15:40:07  eric
 * Ajout de Etoile_bin::equilibrium.
 *
 * Revision 2.15  2000/02/12  18:40:15  eric
 * Modif commentaires.
 *
 * Revision 2.14  2000/02/12  14:44:26  eric
 * Ajout des fonctions Etoile_bin::set_logn_comp et set_pot_centri.
 *
 * Revision 2.13  2000/02/10  20:22:25  eric
 * Modif commentaires.
 *
 * Revision 2.12  2000/02/10  16:11:24  eric
 * Classe Etoile_bin : ajout des accesseurs get_psi, etc...
 *                     ajout de la fonction fait_d_psi
 *
 * Revision 2.11  2000/02/08  19:28:29  eric
 * La fonction Etoile_bin::scal_prod est rebaptisee Etoile_bin::sprod
 *
 * Revision 2.10  2000/02/04  17:15:15  eric
 * Classe Etoile_bin: ajout du membre ref_triad.
 *
 * Revision 2.9  2000/02/04  16:36:48  eric
 * Ajout des fonctions update_metric* et kinematics.
 *
 * Revision 2.8  2000/02/02  10:12:37  eric
 * Ajout des fonctions de lecture/ecriture mp, nzet, eos, etc...
 *
 * Revision 2.7  2000/02/01  15:59:43  eric
 * Ajout de la fonction Etoile_bin::scal_prod.
 *
 * Revision 2.6  2000/01/31  15:56:45  eric
 * Introduction de la classe derivee Etoile_bin.
 *
 * Revision 2.5  2000/01/28  17:17:45  eric
 * Ajout des fonctions de calcul des quantites globales.
 *
 * Revision 2.4  2000/01/27  16:46:59  eric
 * Ajout des fonctions get_ent(), etc....
 *
 * Revision 2.3  2000/01/24  17:19:48  eric
 * Modif commentaires.
 *
 * Revision 2.2  2000/01/24  17:13:04  eric
 * Le mapping mp n'est plus constant.
 * Ajout de la fonction equilibrium_spher.
 *
 * Revision 2.1  2000/01/24  13:37:19  eric
 * *** empty log message ***
 *
 * Revision 2.0  2000/01/20  17:04:33  eric
 * *** empty log message ***
 *
 *
 * $Header: /cvsroot/Lorene/C++/Include/etoile.h,v 1.35 2015/06/12 12:38:24 j_novak Exp $
 *
 */

// Headers Lorene
#include "tenseur.h"
namespace Lorene {
  class Eos ;
  class Bhole ;


			//---------------------------//
			//    base class Etoile      //
			//---------------------------//

  /**
   * Base class for stars *** DEPRECATED : use class \c Star instead ***. 
   \ingroup (star)
   * 
   * An \c Etoile  is constructed upon (i) a mapping 
   * (derived class of \c Map ), the center of which defines the center of the 
   * star, and (ii) an equation of state (derived class of \c Eos ).  
   * It contains tensor fields (class \c Tenseur ) which describle the
   * hydrodynamical quantities as well as the gravitational field (spacetime
   * metric). 
   * 
   * According to the 3+1 formalism, the spacetime metric is written
   * \f[ \label{eetoilemetrique}
   *   ds^2 = - (N^2 - N_i N^i) dt^2 - 2 N_i \,  dt\,  dx^i
   *	    + A^2  \,  {\tilde h}_{ij} \,  dx^i dx^j
   * \f]
   * where \f${\tilde h}_{ij}\f$ is a 3-metric, the exact form of which is specified
   * in the derived classes of \c Etoile . The base class \c Etoile  by
   * itself provides only storage for the lapse function \e N  (member \c nnn ), 
   * the shift vector \f$N^i\f$ (member \c shift ) and the conformal factor
   * \f$A^2\f$ (member \c a_car ). 
   * 
   * The 3+1 formalism introduces two kinds of priviledged observers: the
   * fluid comoving observer and the Eulerian observer, whose 4-velocity
   * is the unit future directed normal to the \e t = const hypersurfaces. 
   * The hydrodynamical quantities measured by the fluid observer correspond
   * to the members \c ent , \c nbar , \c ener , and \c press . 
   * The hydrodynamical quantities measured by the Eulerian observer correspond
   * to the members \c ener_euler , \c s_euler , \c gam_euler , and 
   * \c u_euler .  
   * 
   * A star of class \c Etoile  can be either relativistic or Newtonian, 
   * depending on the boolean indicator \c relativistic . For a Newtonian
   * star, the metric coefficients \e N  and \e A  are set to 1,  and \f$N^i\f$ is
   * set to zero; the only relevant gravitational quantity in this case is
   * \c logn_auto  which represents the (regular part of) the
   * Newtonian gravitational potential
   * generated by the star. 
   */
  class Etoile {
    
    // Data : 
    // -----
  protected:
    Map& mp ;	    ///< Mapping associated with the star
    
    /// Number of domains of \c *mp  occupied by the star
    int nzet ;
    
    /** Indicator of relativity: \c true  for a relativistic star,
     *	\c false  for a Newtonian one. 
     */
    bool relativistic ;
    
    /** \f$1/c^2\f$ : \c unsurc2=1 for a relativistic star,
     *  0 for a Newtonian one. 
     */
    double unsurc2 ; 	     
    
    /** Index of regularity of the gravitational potential \c logn_auto .
     *  If \c k_div=0 , \c logn_auto  contains the total potential
     *  generated principaly by the star, otherwise it should be
     *  supplemented by \c logn_auto_div . 
     */
    int k_div ; 
    
    const Eos& eos ;   ///< Equation of state of the stellar matter
    
    // Fluid quantities with respect to the fluid frame
    // ------------------------------------------------

    /// Log-enthalpy (relativistic case) or specific enthalpy (Newtonian case)
    Tenseur ent ;	  
    
    Tenseur nbar ; 	   ///< Baryon density in the fluid frame
    Tenseur ener ;	   ///< Total energy density in the fluid frame
    Tenseur press ;	   ///< Fluid pressure
    
    // Fluid quantities with respect to the Eulerian frame
    // ---------------------------------------------------
    Tenseur ener_euler ; ///< Total energy density in the Eulerian frame
    
    /// Trace of the stress tensor in the Eulerian frame
    Tenseur s_euler ;   
    
    /// Lorentz factor between the fluid and Eulerian observers 
    Tenseur gam_euler ; 
    
    /// Fluid 3-velocity with respect to the Eulerian observer
    Tenseur u_euler ; 
    
    // Metric potentials
    // -----------------
    
    /** Total of the logarithm of the part of the lapse \e N  
     *   generated principaly by the star. In the Newtonian case, 
     *   this is the Newtonian gravitational potential
     *   (in units of \f$c^2\f$). 
     */
    Tenseur logn_auto ;
    
    /** Regular part of the logarithm of the part of the lapse \e N  
     *   generated principaly by the star. In the Newtonian case, 
     *   this is the Newtonian gravitational potential
     *   (in units of \f$c^2\f$). 
     */
    Tenseur logn_auto_regu ;
    
    /** Divergent part (if \c k_div!=0 ) 
     *  of the logarithm of the part of the lapse \e N  
     *   generated principaly by the star. 
     */
    Tenseur logn_auto_div ; 
    
    /** Gradient of \c logn_auto_div  (if \c k_div!=0 )
     */
    Tenseur d_logn_auto_div ; 
    
    /** Logarithm of the part of the product \e AN  generated principaly by
     *   by the star
     */
    Tenseur beta_auto ; 
    
    /// Total lapse function 
    Tenseur nnn ; 
    
    /// Total shift vector
    Tenseur shift ;
    
    /// Total conformal factor \f$A^2\f$
    Tenseur a_car ; 
    
    // Derived data : 
    // ------------
  protected:
    /// Coordinate radius at \f$\phi=0\f$, \f$\theta=\pi/2\f$. 
    mutable double* p_ray_eq ; 
    
    /// Coordinate radius at \f$\phi=\pi/2\f$, \f$\theta=\pi/2\f$. 
    mutable double* p_ray_eq_pis2 ;
    
    /// Coordinate radius at \f$\phi=\pi\f$, \f$\theta=\pi/2\f$. 
    mutable double* p_ray_eq_pi ;
    
    /// Coordinate radius at \f$\phi=3\pi/2\f$, \f$\theta=\pi/2\f$. 
    mutable double* p_ray_eq_3pis2 ;
    
    /// Coordinate radius at \f$\theta=0\f$. 
    mutable double* p_ray_pole ;
    
    /** Description of the stellar surface: 2-D \c Itbl  containing the 
     *	values of the domain index \e l  on the surface at the 
     *	collocation points in \f$(\theta', \phi')\f$
     */
    mutable Itbl* p_l_surf ; 
    
    /** Description of the stellar surface: 2-D \c Tbl  containing the 
     *	values of the radial coordinate \f$\xi\f$ on the surface at the 
     *	collocation points in \f$(\theta', \phi')\f$
     */
    mutable Tbl* p_xi_surf ; 
    
    mutable double* p_mass_b ;	///< Baryon mass
    mutable double* p_mass_g ;	///< Gravitational mass
    
    
    // Constructors - Destructor
    // -------------------------
  public:
    
    /** Standard constructor. 
     * 
     * @param mp_i Mapping on which the star will be defined
     * @param nzet_i Number of domains occupied by the star
     * @param relat should be \c true  for a relativistic
     *			star,  \c false  for a Newtonian one
     * @param eos_i Equation of state of the stellar matter
     * 
     */
    Etoile(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i) ;
    
    Etoile(const Etoile& ) ;		///< Copy constructor
    
    /** Constructor from a file (see \c sauve(FILE*) ). 
     * 
     * @param mp_i Mapping on which the star will be defined
     * @param eos_i Equation of state of the stellar matter
     * @param fich	input file (must have been created by the function
     *	\c sauve )
     */
    Etoile(Map& mp_i, const Eos& eos_i, FILE* fich) ;    		
    
    virtual ~Etoile() ;			///< Destructor
        
    // Memory management
    // -----------------
  protected:
    /// Deletes all the derived quantities
    virtual void del_deriv() const ; 
    
    /// Sets to \c 0x0  all the pointers on derived quantities
    virtual void set_der_0x0() const ; 
    
    /** Sets to \c ETATNONDEF  (undefined state) the hydrodynamical 
     *  quantities relative to the Eulerian observer.
     */
    virtual void del_hydro_euler() ; 
    
    
    // Mutators / assignment
    // ---------------------
  public:
    /// Assignment to another \c Etoile 
    void operator=(const Etoile&) ;	
    
    /// Read/write of the mapping
    Map& set_mp() {return mp; } ; 
    
    /// Assignment of the enthalpy field.
    void set_enthalpy(const Cmp& ) ; 
    
    /** Computes the proper baryon and energy density, as well as
     *  pressure from the enthalpy.
     */
    virtual void equation_of_state() ; 
    
    /** Computes the hydrodynamical quantities relative to the Eulerian
     *  observer from those in the fluid frame (\c nbar , \c ener 
     *  and \c press ).
     */
    virtual void hydro_euler() ; 
    
    /** Computes a spherical static configuration. 
     * 
     *  @param ent_c [input] central value of the enthalpy
     *  @param precis [input] threshold in the relative difference between 
     *	                      the enthalpy fields of two consecutive steps
     *	                      to stop the iterative procedure 
     *                        (default value: 1.e-14)
     *  @param ent_limit [input] : array of enthalpy values to be set at the
     *                         boundaries between 
     *		               the domains; if set to 0x0 (default), the 
     *                         initial values will be kept.
     */
    virtual void equilibrium_spher(double ent_c, double precis = 1.e-14, 
				   const Tbl* ent_limit = 0x0 ) ; 

    /** Computes a spherical static configuration. 
     *  The sources for Poisson equations are regularized
     *  by extracting analytical diverging parts.
     * 
     *  @param ent_c [input] central value of the enthalpy
     *  @param precis [input] threshold in the relative difference between 
     *	                      the enthalpy fields of two consecutive steps
     *	                      to stop the iterative procedure 
     *                        (default value: 1.e-14)
     */
    void equil_spher_regular(double ent_c, double precis = 1.e-14) ; 
    
    /** Computes a spherical static configuration with the outer
     *  boundary condition at a finite radius
     * 
     *  @param ent_c [input] central value of the enthalpy
     *  @param precis [input] threshold in the relative difference between 
     *	the enthalpy fields of two consecutive steps
     *	to stop the iterative procedure (default value: 1.e-14)
     */
    virtual void equil_spher_falloff(double ent_c,
				     double precis = 1.e-14) ;
    
    // Accessors
    // ---------
  public:
    /// Returns the mapping
    const Map& get_mp() const {return mp; } ; 
    
    /// Returns the number of domains occupied by the star
    int get_nzet() const {return nzet; } ; 
    
    /** Returns \c true  for a relativistic star, \c false  for 
     *  a Newtonian one
     */
    bool is_relativistic() const {return relativistic; } ; 
    
    /// Returns the equation of state
    const Eos& get_eos() const {return eos; } ; 
    
    /// Returns the enthalpy field 
    const Tenseur& get_ent() const {return ent;} ;
    
    /// Returns the proper baryon density
    const Tenseur& get_nbar() const {return nbar;} ;
    
    /// Returns the proper total energy density
    const Tenseur& get_ener() const {return ener;} ;
    
    /// Returns the fluid pressure
    const Tenseur& get_press() const {return press;} ;
    
    /// Returns the total energy density with respect to the Eulerian observer
    const Tenseur& get_ener_euler() const {return ener_euler;} ;
    
    /// Returns the trace of the stress tensor in the Eulerian frame
    const Tenseur& get_s_euler() const {return s_euler;} ;
    
    /// Returns the Lorentz factor between the fluid and Eulerian observers
    const Tenseur& get_gam_euler() const {return gam_euler;} ;
    
    /// Returns the fluid 3-velocity with respect to the Eulerian observer
    const Tenseur& get_u_euler() const {return u_euler;} ;
    
    /** Returns the logarithm of the part of the lapse \e N  generated 
     *   principaly by the star.
     *   In the Newtonian case, this is the Newtonian
     *   gravitational potential (in units of \f$c^2\f$). 
     */
    const Tenseur& get_logn_auto() const {return logn_auto;} ;
    
    /** Returns the regular part of the logarithm of the part of
     *   the lapse \e N  generated principaly by the star.
     *   In the Newtonian case, this is the Newtonian
     *   gravitational potential (in units of \f$c^2\f$). 
     */
    const Tenseur& get_logn_auto_regu() const {return logn_auto_regu;} ;
    
    /** Returns the divergent part of the logarithm of the part of
     *   the lapse \e N  generated principaly by the star.
     *   In the Newtonian case, this is the diverging part of
     *   the Newtonian gravitational potential (in units of \f$c^2\f$). 
     */
    const Tenseur& get_logn_auto_div() const {return logn_auto_div;} ;
    
    /** Returns the gradient of \c logn_auto_div 
     */
    const Tenseur& get_d_logn_auto_div() const {return d_logn_auto_div;} ;
    
    /** Returns the logarithm of the part of the product \e AN  generated 
     *  principaly by the star.
     */
    const Tenseur& get_beta_auto() const {return beta_auto;} ;
    
    /// Returns the total lapse function \e N 
    const Tenseur& get_nnn() const {return nnn;} ;
    
    /// Returns the total shift vector \f$N^i\f$
    const Tenseur& get_shift() const {return shift;} ;
    
    /// Returns the total conformal factor \f$A^2\f$
    const Tenseur& get_a_car() const {return a_car;} ;
    
    // Outputs
    // -------
  public:
    virtual void sauve(FILE* ) const ;	    ///< Save in a file
    
    /// Display
    friend ostream& operator<<(ostream& , const Etoile& ) ;	
    
  protected:
    /// Operator >> (virtual function called by the operator <<). 
    virtual ostream& operator>>(ostream& ) const ;    
    
    // Global quantities
    // -----------------
  public:
    /// Coordinate radius at \f$\phi=0\f$, \f$\theta=\pi/2\f$ [r_unit].
    double ray_eq() const ; 
    
    /// Coordinate radius at \f$\phi=\pi/2\f$, \f$\theta=\pi/2\f$ [r_unit].
    double ray_eq_pis2() const ; 
    
    /// Coordinate radius at \f$\phi=\pi\f$, \f$\theta=\pi/2\f$ [r_unit].
    double ray_eq_pi() const ; 
    
    /// Coordinate radius at \f$\phi=3\pi/2\f$, \f$\theta=\pi/2\f$ [r_unit].
    double ray_eq_3pis2() const ;
    
    /// Coordinate radius at \f$\theta=0\f$ [r_unit]. 
    double ray_pole() const ; 
    
    /// Coordinate radius at \f$\phi=2k\pi/np\f$, \f$\theta=\pi/2\f$ [r_unit].
    double ray_eq(int kk) const ;
    
    /** Description of the stellar surface: returns a 2-D \c Itbl  
     *	containing the 
     *	values of the domain index \e l  on the surface at the 
     *	collocation points in \f$(\theta', \phi')\f$.
     *	The stellar surface is defined as the location where
     *	the enthalpy (member \c ent ) vanishes.
     */
    virtual const Itbl& l_surf() const ; 
    
    /** Description of the stellar surface: returns a 2-D \c Tbl  
     *	containing the values of the radial coordinate \f$\xi\f$ 
     *	on the surface at the 
     *	collocation points in \f$(\theta', \phi')\f$. 
     *	The stellar surface is defined as the location where
     *	the enthalpy (member \c ent ) vanishes.
     */
    const Tbl& xi_surf() const ; 
    
    /// Baryon mass
    virtual double mass_b() const ;
    
    /// Gravitational mass
    virtual double mass_g() const ;
    
  };
  ostream& operator<<(ostream& , const Etoile& ) ;	
  

			//---------------------------//
			//    class Etoile_bin       //
			//---------------------------//

  /**
   * Class for stars in binary system. \ingroup (star)
   *
   * This class implements the formalism for corotating or irrotational
   * systems presented in Bonazzola, Gourgoulhon \& Marck \a Phys. \a Rev. \a Lett.
   * \b 82 , 892 (1999). In particular, the conformal 3-metric 
   * \f$\tilde h_{ij}\f$ introduced in Eq.~(\ref{eetoilemetrique}) is flat. 
   *
   * An \c Etoile_bin  can be construted in two states, represented by
   * the \c bool  member \c irrotational : (i) irrotational
   * (i.e. the fluid motion is irrotational) or (ii) rigidly corotating 
   * with respect to the orbital motion (synchronized binary). 
   *
   */
  class Etoile_bin : public Etoile {
    
    // Data : 
    // -----
  protected:
    /** \c true  for an irrotational star, \c false  for a
     *  corotating one
     */
    bool irrotational ; 
    
    /** Reference triad ("absolute frame"), with
     *  respect to which the components of all the member \c Tenseur 's
     *  are defined, except for \c w_shift  and \c ssjm1_wshift .
     */
    const Base_vect& ref_triad ; 
    
    /** Scalar potential \f$\Psi_0\f$ of the non-translational part of
     *  fluid 4-velocity (in the irrotational case)
     */
    Tenseur psi0 ; 
    
    /** Gradient of \f$\Psi\f$ (in the irrotational case)
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_psi ; 
    
    /** Spatial projection of the fluid 3-velocity with respect to  
     *  the co-orbiting observer. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur wit_w ; 
    
    /** Logarithm of the Lorentz factor between the fluid and 
     *  the co-orbiting observer.
     */
    Tenseur loggam ; 
    
    /** Part of the lapse logarithm (gravitational potential at the
     *  Newtonian limit) generated principaly by the companion star. 
     */
    Tenseur logn_comp ; 
    
    /** Gradient of \c logn_auto 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_logn_auto ; 
    
    /** Gradient of \c logn_auto_regu 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_logn_auto_regu ; 
    
    /** Gradient of \c logn_comp 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_logn_comp ; 
    
    /** Part of the logarithm of \e AN  generated principaly by the 
     *  companion star. 
     */
    Tenseur beta_comp ; 
    
    /** Gradient of \c beta_auto 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_beta_auto ; 
    
    /** Gradient of \c beta_comp 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur d_beta_comp ; 
    
    /** Part of the shift vector \f$N^i\f$ generated principaly by the star.
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur shift_auto ; 
    
    /** Part of the shift vector \f$N^i\f$ generated principaly by the 
     *  companion star. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur shift_comp ; 
    
    /** Vector \f$W^i\f$ used in the decomposition of \c shift_auto ,
     *  following Shibata's prescription 
     *  [\a Prog. \a Theor. \a Phys. \b 101, 1199 (1999)] :
     * \f[
     *  N^i = {7\over 8} W^i - {1\over 8} 
     *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
     * \f]
     * NB: \c w_shift  contains the components of \f$W^i\f$
     *      with respect to the Cartesian triad associated with the 
     *	mapping \c mp . 
     */
    Tenseur w_shift ; 
    
    /** Scalar \f$\chi\f$ used in the decomposition of \c shift_auto ,
     *  following Shibata's prescription 
     *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
     * \f[
     *  N^i = {7\over 8} W^i - {1\over 8} 
     *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
     * \f]
     */
    Tenseur khi_shift ; 
    
    /** Part of the extrinsic curvature tensor 
     *  \f$\tilde K^{ij} = A^2 K^{ij}\f$
     *  generated by \c shift_auto . 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur_sym tkij_auto ;
    
    /** Part of the extrinsic curvature tensor 
     *  \f$\tilde K^{ij}  = A^2 K^{ij}\f$
     *  generated by \c shift_comp . 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur_sym tkij_comp ;
    
    /** Part of the scalar \f$A^2 K_{ij} K^{ij}\f$
     *  generated by \c shift_auto , i.e. 
     *    \f$A^2 K_{ij}^{\rm auto} K^{ij}_{\rm auto}\f$ 
     */
    Tenseur akcar_auto ;
    
    /** Part of the scalar \f$A^2 K_{ij} K^{ij}\f$
     *  generated by \c shift_auto  and \c shift_comp , i.e. 
     *    \f$A^2 K_{ij}^{\rm auto} K^{ij}_{\rm comp}\f$ 
     */
    Tenseur akcar_comp ;
    
    /** 3-vector shift, divided by \e N , of the rotating coordinates,
     *  \f$B^i/N\f$. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    Tenseur bsn ; 
    
    /// Centrifugal potential
    Tenseur pot_centri ; 	
    
    /** Effective source at the previous step for the resolution of 
     *  the Poisson equation for \c logn_auto  by means of
     *  \c Map_et::poisson .
     */
    Cmp ssjm1_logn ; 
    
    /** Effective source at the previous step for the resolution of 
     *  the Poisson equation for \c beta_auto  by means of
     *  \c Map_et::poisson .
     */
    Cmp ssjm1_beta ; 
    
    /** Effective source at the previous step for the resolution of 
     *  the Poisson equation for the scalar \f$\chi\f$ by means of
     *  \c Map_et::poisson . 
     *  \f$\chi\f$ is an intermediate quantity for the resolution of the
     *  elliptic equation for the shift vector \f$N^i\f$
     */
    Cmp ssjm1_khi ; 
    
    /** Effective source at the previous step for the resolution of 
     *  the vector Poisson equation for \f$W^i\f$ by means of
     *  \c Map_et::poisson . 
     *  \f$W^i\f$ is an intermediate quantity for the resolution of the
     *  elliptic equation for the shift vector \f$N^i\f$
     *  (Components with respect to the Cartesian triad associated with 
     *   the mapping \c mp )
     */
    Tenseur ssjm1_wshift ; 
    
    /** Effective source at the previous step for the resolution of 
     *  the Poisson equation for the scalar \f$\psi\f$ by means of
     *  \c Map_et::poisson_interne . 
     */
    Cmp ssjm1_psi ; 
    
    /**
     * Function used to construct the part of \f$K^{ij}\f$ generated by 
     * the star  from the total \f$K^{ij}\f$. Only used for a binary system
     * where the other member is a black hole.
     * 
     * Mainly this \c Cmp  is 1 around the hole and 0 around the companion
     * and the sum of \c decouple for the hole and his companion is 1 
     * everywhere.
     */
    Cmp decouple ;
    
    // Derived data : 
    // ------------
  protected:
    /// Absolute coordinate X of the barycenter of the baryon density
    mutable double* p_xa_barycenter ; 
    
    
    // Constructors - Destructor
    // -------------------------
  public:
    /** Standard constructor. 
     * 
     * @param mp_i Mapping on which the star will be defined
     * @param nzet_i Number of domains occupied by the star
     * @param relat should be \c true  for a relativistic
     *			star,  \c false  for a Newtonian one
     * @param eos_i Equation of state of the stellar matter
     * @param irrot should be \c true  for an irrotational star, 
     *		    \c false  for a corotating one
     * @param ref_triad_i  Reference triad ("absolute frame"), with
     *	    respect to which the components of all the member 
     *	    \c Tenseur 's are defined, except for \c w_shift 
     *	    and \c ssjm1_wshift  whose components are defined
     *	    with respect to the mapping \c mp  Cartesian triad. 
     */
    Etoile_bin(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i,
	       bool irrot, const Base_vect& ref_triad_i) ;			
    
    
    Etoile_bin(const Etoile_bin& ) ;		///< Copy constructor
    
    /** Constructor from a file (see \c sauve(FILE*) ). 
     * 
     * @param mp_i Mapping on which the star will be defined
     * @param eos_i Equation of state of the stellar matter
     * @param ref_triad_i  Reference triad ("absolute frame"), with
     *	    respect to which the components of all the member 
     *	    \c Tenseur 's are defined, except for \c w_shift 
     *	    and \c ssjm1_wshift  whose components are defined
     *	    with respect to the mapping \c mp  Cartesian triad. 
     * @param fich	input file (must have been created by the function
     *	\c sauve )
     */
    Etoile_bin(Map& mp_i, const Eos& eos_i, const Base_vect& ref_triad_i, 
	       FILE* fich) ;    		
    
    virtual ~Etoile_bin() ;			///< Destructor
    
    
    // Memory management
    // -----------------
  protected:
    /// Deletes all the derived quantities
    virtual void del_deriv() const ; 
    
    /// Sets to \c 0x0  all the pointers on derived quantities
    virtual void set_der_0x0() const ; 
    
    /** Sets to \c ETATNONDEF  (undefined state) the hydrodynamical 
     *  quantities relative to the Eulerian observer.
     */
    virtual void del_hydro_euler() ; 
    
    
    // Mutators / assignment
    // ---------------------
  public:
    /// Assignment to another \c Etoile_bin 
    void operator=(const Etoile_bin& ) ;	
    
    /** Read/write the part of the lapse logarithm (gravitational potential 
     *  at the Newtonian limit) generated principaly by the companion star. 
     */
    Tenseur& set_logn_comp() ;
    
    /// Read/write the centrifugal potential
    Tenseur& set_pot_centri() ;
    
    /// Read/write of \c w_shift 
    Tenseur& set_w_shift() ;
    
    /// Read/write of \c khi_shift 
    Tenseur& set_khi_shift() ;
    
    // Accessors
    // ---------
  public:
    /** Returns \c true  for an irrotational motion, \c false  for 
     *  a corotating one. 
     */
    bool is_irrotational() const {return irrotational; } ; 
    
    /// Returns the non-translational part of the velocity potential
    const Tenseur& get_psi0() const {return psi0;} ;
    
    /** Returns the gradient of the velocity potential 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_psi() const {return d_psi;} ;
    
    /** Returns the spatial projection of the fluid 3-velocity with 
     *  respect to the co-orbiting observer. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_wit_w() const {return wit_w;} ;
    
    /** Returns the logarithm of the Lorentz factor between the fluid and 
     *  the co-orbiting observer.
     */
    const Tenseur& get_loggam() const {return loggam;} ;
    
    /** Returns the part of the lapse logarithm (gravitational potential 
     *  at the Newtonian limit) generated principaly by the companion star. 
     */
    const Tenseur& get_logn_comp() const {return logn_comp;} ;
    
    /** Returns the gradient of \c logn_auto 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_logn_auto() const {return d_logn_auto;} ;
    
    /** Returns the gradient of \c logn_auto_regu 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_logn_auto_regu() const {return d_logn_auto_regu;} ;
    
    /** Returns the gradient of \c logn_comp 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_logn_comp() const {return d_logn_comp;} ;
    
    /** Returns the part of the logarithm of \e AN  generated principaly 
     *  by the companion star. 
     */
    const Tenseur& get_beta_comp() const {return beta_comp;} ;
    
    /** Returns the gradient of \c beta_auto 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_beta_auto() const {return d_beta_auto;} ;
    
    /** Returns the gradient of \c beta_comp  
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_d_beta_comp() const {return d_beta_comp;} ;

    /** Returns the part of the shift vector \f$N^i\f$ generated principaly 
     * by the star.
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_shift_auto() const {return shift_auto;} ;
    
    /** Returns the part of the shift vector \f$N^i\f$ generated principaly 
     *   by the companion star. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_shift_comp() const {return shift_comp;} ;
    
    /** Returns the vector \f$W^i\f$ used in the decomposition of 
     *  \c shift_auto ,
     *  following Shibata's prescription 
     *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
     * \f[
     *  N^i = {7\over 8} W^i - {1\over 8} 
     *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
     * \f]
     * NB: \c w_shift  contains the components of \f$W^i\f$
     *      with respect to the Cartesian triad associated with the 
     *	mapping \c mp . 
     */
    const Tenseur& get_w_shift() const {return w_shift;} ; 
    
    /** Returns the scalar \f$\chi\f$ used in the decomposition of 
     *  \c shift_auto  
     *  following Shibata's prescription 
     *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
     * \f[
     *  N^i = {7\over 8} W^i - {1\over 8} 
     *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
     * \f]
     * NB: \c w_shift  contains the components of \f$W^i\f$
     *      with respect to the Cartesian triad associated with the 
     *	mapping \c mp . 
	 */
    const Tenseur& get_khi_shift() const {return khi_shift;} ; 
    
    /** Returns the part of the extrinsic curvature tensor 
     *  \f$\tilde K^{ij} = A^2 K^{ij}\f$ generated by \c shift_auto . 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur_sym& get_tkij_auto() const {return tkij_auto;} ;
    
    /** Returns the part of the extrinsic curvature tensor 
     *  \f$\tilde K^{ij} = A^2 K^{ij}\f$ generated by \c shift_comp . 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur_sym& get_tkij_comp() const {return tkij_comp;} ;
    
    /** Returns the part of the scalar \f$A^2 K_{ij} K^{ij}\f$
     *  generated by \c shift_auto , i.e. 
     *    \f$A^2 K_{ij}^{\rm auto} K^{ij}_{\rm auto}\f$ 
     */
    const Tenseur& get_akcar_auto() const {return akcar_auto;} ;
    
    /** Returns the part of the scalar \f$A^2 K_{ij} K^{ij}\f$
     *  generated by \c shift_auto  and \c shift_comp , i.e. 
     *    \f$A^2 K_{ij}^{\rm auto} K^{ij}_{\rm comp} \f$ 
     */
    const Tenseur& get_akcar_comp() const {return akcar_comp;} ;
    
    /** Returns the shift vector, divided by \e N , of the rotating 
     *   coordinates, \f$B^i/N\f$. 
     *  (Cartesian components with respect to \c ref_triad )
     */
    const Tenseur& get_bsn() const {return bsn;} ;
    
    /// Returns the centrifugal potential
    const Tenseur& get_pot_centri() const {return pot_centri;} ;
    /**
     * Returns the function used to construct \c tkij_auto  
     from \c tkij_tot .
    */
    const Cmp get_decouple() const {return decouple ;}
    
    // Outputs
    // -------
  public:
    virtual void sauve(FILE* ) const ;	    ///< Save in a file
    
  protected:
    /// Operator >> (virtual function called by the operator <<). 
    virtual ostream& operator>>(ostream& ) const ;    
    
    // Global quantities
    // -----------------
  public:
    /// Baryon mass
    virtual double mass_b() const ;
    
    /// Gravitational mass
    virtual double mass_g() const ;
    
    /** Absolute coordinate X of the barycenter of the baryon density, 
     *  defined according to the formula
     *  \f[
     *    X_G := \int A^3 \Gamma_{\rm n} \,  n \,  X \, d^3x \ ,  
     *  \f]
     *  where \f$\Gamma_{\rm n}\f$ is the Lorentz factor between the fluid 
     *  and Eulerian observers.
     */
    virtual double xa_barycenter() const ;
    
    
    // Computational routines
    // ----------------------
  public: 
    /** Performs the scalar product of two tensors by contracting
     *  the last index of \c t1  with the first index of \c t2 .
     *  Both indices are supposed to be contravariant, so that a 
     *  multiplication by \f$A^2\f$ is performed to lower one index. 
     *  For instance, for two vectors \f$V^i\f$ and \f$W^i\f$, this function
     *  returns the scalar \f$h_{ij} V^i W^j = A^2 f_{ij} V^i W^j\f$.  
     */
    virtual Tenseur sprod(const Tenseur& t1, const Tenseur& t2) const ; 
    
    /** Computes the hydrodynamical quantities relative to the Eulerian
     *  observer from those in the fluid frame, as well as 
     *  \c wit_w  and \c loggam .  
     *
     *  The calculation is performed starting from the quantities
     *  \c ent , \c ener , \c press , \c a_car  and \c bsn ,  
     *  which are supposed to be up to date.  
     *  From these,  the following fields are updated:
     *  \c gam_euler , \c u_euler , \c ener_euler , \c s_euler , 
     *  \c wit_w  and \c loggam . 
     * 
     */
    virtual void hydro_euler() ; 
    
    /** Computes metric coefficients from known potentials,
     * when the companion is another star.
     *
     *  The calculation is performed starting from the quantities
     *  \c logn_auto ,  \c beta_auto , \c shift_auto ,
     *  \c comp.logn_auto ,  \c comp.beta_auto ,
     *  \c comp.shift_auto 
     *  which are supposed to be up to date.
     *  From these,  the following fields are updated:
     *  \c logn_comp , \c beta_comp , \c shift_comp ,
     *  \c nnn ,  \c a_car ,  \c shift ,
     *  \c d_logn_auto , \c d_beta_auto , \c tkij_auto ,
     *  \c akcar_auto .
     *
     *  @param comp companion star.
     *
     */
    void update_metric(const Etoile_bin& comp) ;
    
    /** Same as \c update_metric(const Etoile_bin\& \c ) but with
     *  relaxation.
     *
     *  @param comp companion star.
     *  @param star_prev previous value of the star. 
     *  @param relax relaxation parameter.  
     */
    void update_metric(const Etoile_bin& comp, const Etoile_bin& star_prev, 
		       double relax) ; 
    
    /** Computes the derivative of metric functions related to the
     *  companion star.
     *
     *  The calculation is performed starting from the quantities
     *  \c comp.d_logn_auto ,  \c comp.d_beta_auto ,
     *  \c comp.tkij_auto 
     *  which are supposed to be up to date.
     *  From these,  the following fields are updated:
     *  \c d_logn_comp , \c d_beta_comp , \c tkij_comp ,
     *  \c akcar_comp .
     *
     *  @param comp companion star.
     *
     */
    void update_metric_der_comp(const Etoile_bin& comp) ;
    
    /** Computes the quantities \c bsn  and \c pot_centri .
     * 
     *  The calculation is performed starting from the quantities
     *  \c nnn , \c shift ,  \c a_car ,  
     *  which are supposed to be up to date.  
     * 
     *  @param omega  angular velocity with respect to an asymptotically 
     *		  inertial observer
     *  @param x_axe  absolute X coordinate of the rotation axis
     */
    virtual void kinematics(double omega, double x_axe) ; 
    
    /** Computes the gradient of the total velocity potential \f$\psi\f$. 
     * 
     */
    void fait_d_psi() ; 
	
    /** Computes \c shift_auto  from \c w_shift  and \c khi_shift 
     *  according to Shibata's prescription 
     *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
     * \f[
     *  N^i = {7\over 8} W^i - {1\over 8} 
     *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
     * \f]
     */
    void fait_shift_auto() ; 
    
    /** Computes \c tkij_auto  and \c akcar_auto  from 
     *  \c shift_auto , \c nnn  and \c a_car .
     */
    virtual void extrinsic_curvature() ; 
		
    /** Computes an equilibrium configuration.
     * 
     *  The values of \c logn_comp , \c beta_comp , \c pot_centri 
     *  are held fixed during the iteration. 
     *  
     *  @param ent_c  [input] Central enthalpy
     *  @param mermax [input] Maximum number of steps 
     *  @param mermax_poisson [input]   Maximum number of steps in 
     *				    Map_et::poisson
     *  @param relax_poisson [input]  Relaxation factor in Map_et::poisson
     *  @param mermax_potvit [input]  Maximum number of steps in 
     *				  Map_radial::poisson_compact
     *  @param relax_potvit [input]   Relaxation factor in 
     *				  Map_radial::poisson_compact
     *  @param thres_adapt  [input]   Threshold on dH/dr for the adaptation 
     *				  of the mapping
     *  @param fact [input]    1-D \c Tbl  for the input
     *                          of some factors : 
     *          \li \c fact(0)  : A resizing factor for the first shell
     *  @param diff [output]   1-D \c Tbl  for the storage of some
     *			    error indicators : 
     *	    \li \c diff(0)  : Relative change in the enthalpy field
     *			      between two successive steps 
     *	    \li \c diff(1)  : Relative error returned by the routine
     *				\c Etoile_bin::velocity_potential   
     *	    \li \c diff(2)  : Relative error in the resolution of the
     *			    Poisson equation for \c logn_auto    
     *	    \li \c diff(3)  : Relative error in the resolution of the
     *			    Poisson equation for \c beta_auto    
     *	    \li \c diff(4)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (x comp.)   
     *	    \li \c diff(5)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (y comp.)   
     *	    \li \c diff(6)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (z comp.)
     * @param ent_limit [input] : array of enthalpy values to be set at 
     *                           the boundaries between 
     *			         the domains; if set to 0x0 (default), 
     *                           the initial values will be kept.
     */
    void equilibrium(double ent_c, 
		     int mermax, int mermax_poisson, 
		     double relax_poisson, int mermax_potvit, 
		     double relax_potvit, double thres_adapt, 
		     const Tbl& fact, Tbl& diff, const Tbl* ent_limit = 0x0) ;
    
    /** Computes an equilibrium configuration by regularizing
     *  the diverging source.
     * 
     *  The values of \c logn_comp , \c beta_comp , \c pot_centri 
     *  are held fixed during the iteration. 
     *  
     *  @param ent_c  [input] Central enthalpy
     *  @param ent_limit is the table of enthalpy values on the domain borders
     *  
     *  @param mermax [input] Maximum number of steps 
     *  @param mermax_poisson [input]   Maximum number of steps in 
     *				    Map_et::poisson
     *  @param relax_poisson [input]  Relaxation factor in Map_et::poisson
     *  @param mermax_potvit [input]  Maximum number of steps in 
     *				  Map_radial::poisson_compact
     *  @param relax_potvit [input]   Relaxation factor in 
     *				  Map_radial::poisson_compact
     *  @param thres_adapt  [input]   Threshold on dH/dr for the adaptation 
     *				  of the mapping
     *  @param fact [input]    1-D \c Tbl  for the input
     *                          of some factors : 
     *          \li \c fact(0)  : A resizing factor for the first shell
     *  @param diff [output]   1-D \c Tbl  for the storage of some
     *			    error indicators : 
     *	    \li \c diff(0)  : Relative change in the enthalpy field
     *			      between two successive steps 
     *	    \li \c diff(1)  : Relative error returned by the routine
     *				\c Etoile_bin::velocity_potential   
     *	    \li \c diff(2)  : Relative error in the resolution of the
     *			    Poisson equation for \c logn_auto    
     *	    \li \c diff(3)  : Relative error in the resolution of the
     *			    Poisson equation for \c beta_auto    
     *	    \li \c diff(4)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (x comp.)   
     *	    \li \c diff(5)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (y comp.)   
     *	    \li \c diff(6)  : Relative error in the resolution of the
     *			    equation for \c shift_auto  (z comp.)   
     */
    void equil_regular(double ent_c, int mermax, int mermax_poisson, 
		       double relax_poisson, int mermax_potvit, 
		       double relax_potvit, double thres_adapt, 
		       const Tbl& fact, Tbl& diff) ;
    
    /** Computes the non-translational part of the velocity scalar potential
     *  \f$\psi0\f$ by solving the continuity equation.
     *  
     *  @param mermax  [input] Maximum number of steps in the iteration
     *  @param precis  [input] Required precision: the iteration will
     *			   be stopped when the relative difference
     *			   on \f$\psi0\f$ between two successive steps
     *			   is lower than \c precis .
     *  @param relax   [input] Relaxation factor.  
     *
     *  @return Relative error of the resolution obtained by comparing
     *	    the operator acting on the solution with the source.
     */
    double velocity_potential(int mermax, double precis, double relax) ;
    
    /** Performs a relaxation on \c ent , \c logn_auto , \c beta_auto  
     *  and \c shift_auto .  
     *  @param star_prev   [input] star at the previous step.
     *  @param relax_ent   [input] Relaxation factor for \c ent
     *  @param relax_met   [input] Relaxation factor for \c logn_auto ,
     *			           \c beta_auto , \c shift_auto , 
     *			           only if \c (mer \% fmer_met == 0) .
     *  @param mer	   [input] Step number
     *  @param fmer_met    [input] Step interval between metric updates
     */
    void relaxation(const Etoile_bin& star_prev, double relax_ent, 
		    double relax_met, int mer, int fmer_met) ;
    
    friend class Bin_ns_bh ; ///< Friend class Bin_ns_bh
  };



			//---------------------------//
			//    class Etoile_rot       //
			//---------------------------//

/**
 * Class for isolated rotating stars *** DEPRECATED : use class \c Star_rot instead ***. \ingroup (star)
 * 
 * The metric is
 * \f[
 *   ds^2 = - N^2 dt^2 + A^2 (dr^2 + r^2 d\theta^2)
 *		       + B^2 r^2 \sin^2\theta (d\varphi - N^\varphi dt)^2
 * \f]
 *
 *
 */
class Etoile_rot : public Etoile {

    // Data : 
    // -----
    protected:
	double omega ;	    ///< Rotation angular velocity (\c [f_unit] ) 

	/// Metric factor \e B 
	Tenseur bbb ; 

	/// Square of the metric factor \e B 
	Tenseur b_car ; 

	/// Metric coefficient \f$N^\varphi\f$
	Tenseur nphi ; 

	/** Component \f$\tilde N^\varphi = N^\varphi r\sin\theta\f$ of the
	 *  shift vector
	 */
	Tenseur tnphi ; 

	/// Norm of \c u_euler 
	Tenseur uuu ;		
	
	/// Metric potential \f$\nu = \ln N\f$ = \c logn_auto 
	Tenseur& logn ;	

	/** Part of the Metric potential \f$\nu = \ln N\f$ = \c logn 
	 *  generated by the matter terms
	 */
	Tenseur nuf ;	

	/** Part of the Metric potential \f$\nu = \ln N\f$ = \c logn 
	 *  generated by the quadratic terms
	 */
	Tenseur nuq ;	

	/// Metric potential \f$\zeta = \ln(AN)\f$ = \c beta_auto 
	Tenseur& dzeta ;	

	/// Metric potential \f$\tilde G = (NB-1) r\sin\theta\f$
	Tenseur tggg ; 

	/** Vector \f$W^i\f$ used in the decomposition of \c shift ,
	 *  following Shibata's prescription 
	 *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
	 * \f[
	 *  N^i = {7\over 8} W^i - {1\over 8} 
	 *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
	 * \f]
	 * NB: \c w_shift  contains the components of \f$W^i\f$
	 *      with respect to the Cartesian triad associated with the 
	 *	mapping \c mp . 
	 */
	Tenseur w_shift ; 
	
	/** Scalar \f$\chi\f$ used in the decomposition of \c shift ,
	 *  following Shibata's prescription 
	 *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
	 * \f[
	 *  N^i = {7\over 8} W^i - {1\over 8} 
	 *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
	 * \f]
	 */
	Tenseur khi_shift ; 

	/** Tensor \f${\tilde K_{ij}}\f$ related to the extrinsic curvature
	 *  tensor by \f${\tilde K_{ij}} = B^{-2} K_{ij}\f$.
	 *  \c tkij  contains the Cartesian components of
	 *  \f${\tilde K_{ij}}\f$. 
	 */
	Tenseur_sym tkij ; 

	/** Scalar \f$A^2 K_{ij} K^{ij}\f$.
	 *  For axisymmetric stars, this quantity is related to the 
	 *  derivatives of \f$N^\varphi\f$ by
	 * \f[
	 *	A^2 K_{ij} K^{ij} = {B^2 \over 2 N^2} \, r^2\sin^2\theta \,  
	 *    \left[ \left( {\partial N^\varphi \over \partial r} \right) ^2
	 *	    + {1\over r^2} \left( {\partial N^\varphi \over 
	 *		    \partial \theta} \right) ^2 \right] \ . 
	 * \f]
	 * In particular it is related to the quantities \f$k_1\f$ and \f$k_2\f$
	 * introduced by Eqs.~(3.7) and (3.8) of 
	 * Bonazzola et al. \a Astron. \a Astrophys. \b 278 , 421 (1993)
	 * by 
	 * \f[
	 *	A^2 K_{ij} K^{ij} = 2 A^2 (k_1^2 + k_2^2) \ . 
	 * \f]
	 */
	 Tenseur ak_car ; 

	/** Effective source at the previous step for the resolution of 
	 *  the Poisson equation for \c nuf  by means of
	 *  \c Map_et::poisson .
	 */
	Cmp ssjm1_nuf ; 

	/** Effective source at the previous step for the resolution of 
	 *  the Poisson equation for \c nuq  by means of
	 *  \c Map_et::poisson .
	 */
	Cmp ssjm1_nuq ; 

	/** Effective source at the previous step for the resolution of 
	 *  the Poisson equation for \c dzeta .
	 */
	Cmp ssjm1_dzeta ; 

	/** Effective source at the previous step for the resolution of 
	 *  the Poisson equation for \c tggg .
	 */
	Cmp ssjm1_tggg ; 

	/** Effective source at the previous step for the resolution of 
	 *  the Poisson equation for the scalar \f$\chi\f$ by means of
	 *  \c Map_et::poisson . 
	 *  \f$\chi\f$ is an intermediate quantity for the resolution of the
	 *  elliptic equation for the shift vector \f$N^i\f$
	 */
	 Cmp ssjm1_khi ; 
	 
	/** Effective source at the previous step for the resolution of 
	 *  the vector Poisson equation for \f$W^i\f$.
	 *  \f$W^i\f$ is an intermediate quantity for the resolution of the
	 *  elliptic equation for the shift vector \f$N^i\f$
	 *  (Components with respect to the Cartesian triad associated with 
	 *   the mapping \c mp )
	 */
	 Tenseur ssjm1_wshift ; 
	 
    // Derived data : 
    // ------------
    protected:
	
	mutable double* p_angu_mom ;	///< Angular momentum 
	mutable double* p_tsw ;		///< Ratio T/W
	mutable double* p_grv2 ;	///< Error on the virial identity GRV2
	mutable double* p_grv3 ;	///< Error on the virial identity GRV3
	mutable double* p_r_circ ;	///< Circumferential radius
	mutable double* p_area ;	///< Surface area 
	mutable double* p_aplat ;	///< Flatening r_pole/r_eq
	mutable double* p_z_eqf ;	///< Forward redshift factor at equator
	mutable double* p_z_eqb ;	///< Backward redshift factor at equator
	mutable double* p_z_pole ;	///< Redshift factor at North pole
	mutable double* p_mom_quad ;	///< Quadrupole moment
	mutable double* p_mom_quad_old ; ///< Part of the quadrupole moment
	mutable double* p_mom_quad_Bo ; ///< Part of the quadrupole moment
	mutable double* p_r_isco ;	///< Circumferential radius of the ISCO
	mutable double* p_f_isco ;	///< Orbital frequency of the ISCO
	/// Specific energy of a particle on the ISCO 
	mutable double* p_espec_isco ;	
	/// Specific angular momentum of a particle on the ISCO
	mutable double* p_lspec_isco ;	
   mutable double* p_f_eq ;        ///< Orbital frequency at the equator
	
	 

    // Constructors - Destructor
    // -------------------------
    public:
	/** Standard constructor. 
	 * 
	 * @param mp_i Mapping on which the star will be defined
	 * @param nzet_i Number of domains occupied by the star
	 * @param relat should be \c true  for a relativistic
	 *			star,  \c false  for a Newtonian one
	 * @param eos_i Equation of state of the stellar matter
	 */
	Etoile_rot(Map& mp_i, int nzet_i, bool relat, const Eos& eos_i) ;			
	
	
	Etoile_rot(const Etoile_rot& ) ;		///< Copy constructor

	/** Constructor from a file (see \c sauve(FILE*) ). 
	 * 
	 * @param mp_i Mapping on which the star will be defined
	 * @param eos_i Equation of state of the stellar matter
	 * @param fich	input file (must have been created by the function
	 *	\c sauve )
	 */
	Etoile_rot(Map& mp_i, const Eos& eos_i, FILE* fich) ;    		

	virtual ~Etoile_rot() ;			///< Destructor


    // Memory management
    // -----------------
    protected:
	/// Deletes all the derived quantities
	virtual void del_deriv() const ; 
	
	/// Sets to \c 0x0  all the pointers on derived quantities
	virtual void set_der_0x0() const ; 

	/** Sets to \c ETATNONDEF  (undefined state) the hydrodynamical 
	 *  quantities relative to the Eulerian observer.
	 */
	virtual void del_hydro_euler() ; 
	

    // Mutators / assignment
    // ---------------------
    public:
	/// Assignment to another \c Etoile_rot 
	void operator=(const Etoile_rot& ) ;	
	
    // Accessors
    // ---------
    public:
	/** Returns the central value of the rotation angular velocity 
	 *  (\c [f_unit] )
	 */ 
	virtual double get_omega_c() const ;	    

	/// Returns the metric factor \e B 
	const Tenseur& get_bbb() const {return bbb;} ; 

	/// Returns the square of the metric factor \e B 
	const Tenseur& get_b_car() const {return b_car;} ; 

	/// Returns the metric coefficient \f$N^\varphi\f$
	const Tenseur& get_nphi() const {return nphi;} ; 

	/** Returns the component \f$\tilde N^\varphi = N^\varphi r\sin\theta\f$ 
	 *  of the shift vector
	 */
	const Tenseur& get_tnphi() const {return tnphi;} ; 

	/// Returns the norm of \c u_euler 
	const Tenseur& get_uuu() const {return uuu;} ;		
	
	/// Returns the metric potential \f$\nu = \ln N\f$ = \c logn_auto 
	const Tenseur& get_logn() const {return logn;} ;	

	/** Returns the part of the Metric potential \f$\nu = \ln N\f$ = \c logn 
	 *  generated by the matter terms
	 */
	const Tenseur& get_nuf() const {return nuf;} ;	

	/** Returns the Part of the Metric potential \f$\nu = \ln N\f$ = \c logn 
	 *  generated by the quadratic terms
	 */
	const Tenseur& get_nuq() const {return nuq;} ;	

	/// Returns the Metric potential \f$\zeta = \ln(AN)\f$ = \c beta_auto 
	const Tenseur& get_dzeta() const {return dzeta;} ;	

	/// Returns the Metric potential \f$\tilde G = (NB-1) r\sin\theta\f$
	const Tenseur& get_tggg() const {return tggg;} ; 

	/** Returns the vector \f$W^i\f$ used in the decomposition of 
	 *  \c shift ,
	 *  following Shibata's prescription 
	 *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
	 * \f[
	 *  N^i = {7\over 8} W^i - {1\over 8} 
	 *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
	 * \f]
	 * NB: \c w_shift  contains the components of \f$W^i\f$
	 *      with respect to the Cartesian triad associated with the 
	 *	mapping \c mp . 
	 */
	const Tenseur& get_w_shift() const {return w_shift;} ; 
	
	/** Returns the scalar \f$\chi\f$ used in the decomposition of 
	 *  \c shift  
	 *  following Shibata's prescription 
	 *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
	 * \f[
	 *  N^i = {7\over 8} W^i - {1\over 8} 
	 *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
	 * \f]
	 * NB: \c w_shift  contains the components of \f$W^i\f$
	 *      with respect to the Cartesian triad associated with the 
	 *	mapping \c mp . 
	 */
	const Tenseur& get_khi_shift() const {return khi_shift;} ; 

	/** Returns the tensor \f${\tilde K_{ij}}\f$ related to the extrinsic 
	 *  curvature tensor by \f${\tilde K_{ij}} = B^{-2} K_{ij}\f$.
	 *  \c tkij  contains the Cartesian components of
	 *  \f${\tilde K_{ij}}\f$. 
	 */
	const Tenseur_sym& get_tkij() const {return tkij;} ; 

	/** Returns the scalar \f$A^2 K_{ij} K^{ij}\f$.
	 *  For axisymmetric stars, this quantity is related to the 
	 *  derivatives of \f$N^\varphi\f$ by
	 * \f[
	 *	A^2 K_{ij} K^{ij} = {B^2 \over 2 N^2} \, r^2\sin^2\theta \,  
	 *    \left[ \left( {\partial N^\varphi \over \partial r} \right) ^2
	 *	    + {1\over r^2} \left( {\partial N^\varphi \over 
	 *		    \partial \theta} \right) ^2 \right] \ . 
	 * \f]
	 * In particular it is related to the quantities \f$k_1\f$ and \f$k_2\f$
	 * introduced by Eqs.~(3.7) and (3.8) of 
	 * Bonazzola et al. \a Astron. \a Astrophys. \b 278 , 421 (1993)
	 * by 
	 * \f[
	 *	A^2 K_{ij} K^{ij} = 2 A^2 (k_1^2 + k_2^2) \ . 
	 * \f]
	 */
	 const Tenseur& get_ak_car() const {return ak_car;} ; 

    // Outputs
    // -------
    public:
	virtual void sauve(FILE* ) const ;	    ///< Save in a file
    
	/// Display in polytropic units
	virtual void display_poly(ostream& ) const ; 

    protected:
	/// Operator >> (virtual function called by the operator <<). 
	virtual ostream& operator>>(ostream& ) const ;    

	/// Printing of some informations, excluding all global quantities
	virtual void partial_display(ostream& ) const ;    

    // Global quantities
    // -----------------
    public:
	
	/** Description of the stellar surface: returns a 2-D \c Itbl 
	 *	containing the 
	 *	values of the domain index \e l  on the surface at the 
	 *	collocation points in \f$(\theta', \phi')\f$.
	 *	The stellar surface is defined as the location where
	 *	the enthalpy (member \c ent ) vanishes.
	 */
	virtual const Itbl& l_surf() const ; 
	
	virtual double mass_b() const ;	    ///< Baryon mass
	virtual double mass_g() const ;	    ///< Gravitational mass
	virtual double angu_mom() const ;	///< Angular momentum 
	virtual double tsw() const ;		///< Ratio T/W

	/** Error on the virial identity GRV2.
	 *  This indicator is only valid for relativistic computations.
	 */
	virtual double grv2() const ;	

	/** Error on the virial identity GRV3.
	 *  The error is computed as the integral defined
	 *  by Eq. (43) of [Gourgoulhon and Bonazzola, 
	 *  \a Class. \a Quantum \a Grav. \b 11, 443 (1994)] divided by
	 *  the integral of the matter terms.
	 * 
	 *  @param ost output stream to give details of the computation;
	 *		if set to 0x0 [default value], no details will be
	 *		given.
	 *   
	 */
	virtual double grv3(ostream* ost = 0x0) const ;	

	virtual double r_circ() const ;		///< Circumferential radius
	virtual double area() const ;		///< Surface area
	virtual double mean_radius() const ;	///< Mean radius
	virtual double aplat() const ;		///< Flatening r_pole/r_eq
	virtual double z_eqf() const ;		///< Forward redshift factor at equator
	virtual double z_eqb() const ;		///< Backward redshift factor at equator
	virtual double z_pole() const ;		///< Redshift factor at North pole
    
	/** Quadrupole moment.
	 *  The quadrupole moment \e Q is defined according to Eq. (11) of
	 *  [Pappas and Apostolatos, \a Physical \a Review \a Letters 
	 *  \b 108, 231104 (2012)]. This is a corrected version of the quadrupole
	 *  moment defined by [Salgado, Bonazzola, Gourgoulhon and Haensel,
	 *  \a Astron. \a Astrophys. \b 291 , 155 (1994)]. Following this 
	 *  definition, \f$Q = {\bar Q } - 4/3 (1/4 + b) M^3 \f$, where 
	 *  \f${\bar Q }\f$ is defined as the negative of the (wrong) quadrupole 
	 *  moment defined in Eq. (7) of [Salgado, Bonazzola, Gourgoulhon and 
	 *  Haensel, \a Astron. \a Astrophys. \b 291 , 155 (1994)], \e b is 
	 *  defined by Eq. (3.37) of [Friedman and Stergioulas, \a Rotating 
	 *  \a Relativistic \a Stars, Cambridge Monograph on mathematical 
	 *  physics] and \e M is the gravitational mass of the star.
	 */
	virtual double mom_quad() const ;	

	/** Part of the quadrupole moment.
	 *  This term \f${\bar Q }\f$ is defined by Laarakkers and Poisson, 
	 *  \a Astrophys. \a J. \b 512 , 282 (1999). Note that \f${\bar Q }\f$ 
	 *  is the negative of the (wrong) quadrupole moment defined in Eq. (7) of
	 *  [Salgado, Bonazzola, Gourgoulhon and Haensel, \a Astron. \a Astrophys.
	 *  \b 291 , 155 (1994)]. 
	 */
	virtual double mom_quad_old() const ;

	/** Part of the quadrupole moment.
	 *  \f$B_o\f$ is defined as \f$bM^2\f$, where \e b is given by 
	 *  Eq. (3.37) of [Friedman and Stergioulas, \a Rotating \a 
	 *  Relativistic \a Stars, Cambridge Monograph on mathematical 
	 *  physics] and \e M is the the gravitational mass of the star. 
	 */
	virtual double mom_quad_Bo() const ;

	/** Circumferential radius of the innermost stable circular orbit (ISCO).
	 *
	 *  @param ost output stream to give details of the computation;
	 *		if set to 0x0 [default value], no details will be
	 *		given.
	 */
	virtual double r_isco(ostream* ost = 0x0) const ;	
 	
 	/// Orbital frequency at the innermost stable circular orbit (ISCO).	
 	virtual double f_isco() const ;	

	/// Energy of a particle on the ISCO 
 	virtual double espec_isco() const ;	
	
	/// Angular momentum of a particle on the ISCO
 	virtual double lspec_isco() const ;	


	/** Computation of frequency of eccentric orbits.
	 * 
	 *  @param ecc eccentricity of the orbit
	 *  @param periasrt periastron of the orbit
	 *  @param ost output stream to give details of the computation;
	 *		if set to 0x0 [default value], no details will be
	 *		given.
	 * 
	 *  @return orbital frequency
	 */
	virtual double f_eccentric(double ecc, double periast, 
				   ostream* ost = 0x0) const ; 

        /// Orbital frequency at the equator.
	virtual double f_eq() const ;
	

    // Computational routines
    // ----------------------
    public: 
	/** Computes the hydrodynamical quantities relative to the Eulerian
	 *  observer from those in the fluid frame.
	 *
	 *  The calculation is performed starting from the quantities
	 *  \c ent , \c ener , \c press , and \c a_car ,  
	 *  which are supposed to be up to date.  
	 *  From these,  the following fields are updated:
	 *  \c gam_euler , \c u_euler , \c ener_euler , \c s_euler . 
	 * 
	 */
	virtual void hydro_euler() ; 
	
	/** Computes metric coefficients from known potentials. 
	 * 
	 *  The calculation is performed starting from the quantities
	 *  \c logn ,  \c dzeta , \c tggg  and \c shift , 
	 *  which are supposed to be up to date.  
	 *  From these,  the following fields are updated:
	 *  \c nnn , \c a_car ,  \c bbb  and \c b_car . 
	 * 
	 */
	void update_metric() ; 
		
	/** Computes \c shift  from \c w_shift  and \c khi_shift 
	 *  according to Shibata's prescription 
	 *  [\a Prog. \a Theor. \a Phys. \b 101 , 1199 (1999)] :
	 * \f[
	 *  N^i = {7\over 8} W^i - {1\over 8} 
	 *			\left(\nabla^i\chi+\nabla^iW^kx_k\right)
	 * \f]
	 */
	void fait_shift() ; 
	
	/** Computes \c tnphi  and \c nphi  from the Cartesian 
	 *   components of the shift, stored in \c shift .
	 */
	void fait_nphi() ; 
		
	/** Computes \c tkij  and \c ak_car  from 
	 *  \c shift , \c nnn  and \c b_car .
	 */
	void extrinsic_curvature() ;
	
	/** Computes the coefficient \f$\lambda\f$ which ensures that the
	 *	GRV2 virial identity is satisfied.
	 *  \f$\lambda\f$ is the coefficient by which one must multiply
	 *  the quadratic source term \f$\sigma_q\f$ of the 2-D Poisson equation
	 *	\f[
	 *		\Delta_2 u = \sigma_m + \sigma_q
	 *	\f]
	 *  in order that the total source does not contain any monopolar term,
	 *  i.e. in order that
	 *  \f[
	 *		\int_0^{2\pi} \int_0^{+\infty} \sigma(r, \theta)
	 *				\, r \, dr \, d\theta = 0	    \ ,
	 *  \f]
	 *  where \f$\sigma = \sigma_m + \sigma_q\f$.
	 *	\f$\lambda\f$ is computed according to the formula
	 *  \f[
	 *		\lambda = - { \int_0^{2\pi} \int_0^{+\infty} \sigma_m(r, \theta)
	 *				\, r \, dr \, d\theta	    \over
	 * 			\int_0^{2\pi} \int_0^{+\infty} \sigma_q(r, \theta)
	 *				\, r \, dr \, d\theta } \ .
	 *  \f]
	 *  Then, by construction, the new source
	 *	\f$\sigma' = \sigma_m + \lambda \sigma_q\f$ has a vanishing monopolar
	 *  term.
	 *
	 *	@param sou_m [input] matter source term \f$\sigma_m\f$
	 *	@param sou_q [input] quadratic source term \f$\sigma_q\f$
	 *  @return	value of \f$\lambda\f$
	 */
	static double lambda_grv2(const Cmp& sou_m, const Cmp& sou_q) ;
		
	/** Computes an equilibrium configuration.
	 *  
	 *  @param ent_c  [input] Central enthalpy 
	 *  @param omega0  [input] Requested angular velocity 
	 *			     (if \c fact_omega=1. )
	 *  @param fact_omega [input] 1.01 = search for the Keplerian frequency,
	 *			      1. = otherwise.
	 *  @param nzadapt  [input] Number of (inner) domains where the mapping 
	 *			    adaptation to an iso-enthalpy surface
	 *			    should be performed
	 *  @param ent_limit [input] 1-D \c Tbl  of dimension \c nzet  which
	 *				defines the enthalpy at the outer boundary
	 *				of each domain
	 *  @param icontrol [input] Set of integer parameters (stored as a
	 *			    1-D \c Itbl  of size 8) to control the 
	 *			    iteration: 
	 *	\li \c icontrol(0) = mer_max  : maximum number of steps 
	 *	\li \c icontrol(1) = mer_rot  : step at which the rotation is 
	 *				      switched on 
	 *	\li \c icontrol(2) = mer_change_omega  : step at which the rotation
	 *			  velocity is changed to reach the final one  
	 *	\li \c icontrol(3) = mer_fix_omega  :  step at which the final
	 *			    rotation velocity must have been reached  
	 *	\li \c icontrol(4) = mer_mass  : the absolute value of 
	 *			    \c mer_mass  is the step from which the 
	 *			    baryon mass is forced to converge, 
	 *			    by varying the central enthalpy 
	 *			    (\c mer_mass>0 ) or the angular 
	 *			    velocity (\c mer_mass<0 ) 
	 *	\li \c icontrol(5) = mermax_poisson  : maximum number of steps in 
	 *				\c Map_et::poisson  
	 *	\li \c icontrol(6) = mer_triax  : step at which the 3-D 
	 *				perturbation is switched on 
	 *	\li \c icontrol(7) = delta_mer_kep  : number of steps
	 *			    after \c mer_fix_omega  when \c omega 
	 *			    starts to be increased by \c fact_omega 
	 *			    to search for the Keplerian velocity
	 * 	 
	 *  @param control [input] Set of parameters (stored as a 
	 *			    1-D \c Tbl  of size 7) to control the 
	 *			    iteration: 
	 *	\li \c control(0) = precis  : threshold on the enthalpy relative 
	 *				change for ending the computation 
	 *	\li \c control(1) = omega_ini  : initial angular velocity, 
	 *			    switched on only if \c mer_rot<0 , 
	 *			    otherwise 0 is used  
	 *	\li \c control(2) = relax  : relaxation factor in the main 
	 *				   iteration  
	 *	\li \c control(3) = relax_poisson  : relaxation factor in 
	 *				   \c Map_et::poisson  
	 *	\li \c control(4) = thres_adapt  :  threshold on dH/dr for 
	 *			    freezing the adaptation of the mapping 
	 *	\li \c control(5) = ampli_triax  :  relative amplitude of 
	 *			    the 3-D perturbation 
	 *	\li \c control(6) = precis_adapt  : precision for 
	 *			    \c Map_et::adapt 
	 *
	 *  @param mbar_wanted [input] Requested baryon mass (effective only 
	 *				if \c mer_mass > \c mer_max )
	 *  @param aexp_mass [input] Exponent for the increase factor of the 
	 *			      central enthalpy to converge to the 
	 *			      requested baryon mass
	 *  @param diff [output]   1-D \c Tbl  of size 7 for the storage of 
	 *			    some error indicators : 
	 *	    \li \c diff(0)  : Relative change in the enthalpy field
	 *			      between two successive steps 
	 *	    \li \c diff(1)  : Relative error in the resolution of the
	 *			    Poisson equation for \c nuf    
	 *	    \li \c diff(2)  : Relative error in the resolution of the
	 *			    Poisson equation for \c nuq    
	 *	    \li \c diff(3)  : Relative error in the resolution of the
	 *			    Poisson equation for \c dzeta    
	 *	    \li \c diff(4)  : Relative error in the resolution of the
	 *			    Poisson equation for \c tggg    
	 *	    \li \c diff(5)  : Relative error in the resolution of the
	 *			    equation for \c shift  (x comp.)   
	 *	    \li \c diff(6)  : Relative error in the resolution of the
	 *			    equation for \c shift  (y comp.)   
	 */
	virtual void equilibrium(double ent_c, double omega0, double fact_omega, 
			 int nzadapt, const Tbl& ent_limit,
			 const Itbl& icontrol, const Tbl& control,
			 double mbar_wanted, double aexp_mass, 
			 Tbl& diff, Param* = 0x0) ;
	

};




}
#endif