/usr/include/lorene/C++/Include/map.h is in liblorene-dev 0.0.0~cvs20161116+dfsg-1.
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 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 | /*
* Definition of Lorene classes Map
* Map_radial
* Map_af
* Map_et
* Map_log
*
*/
/*
* Copyright (c) 1999-2000 Jean-Alain Marck
* Copyright (c) 1999-2003 Eric Gourgoulhon
* Copyright (c) 1999-2001 Philippe Grandclement
* Copyright (c) 2000-2001 Jerome Novak
* 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 __MAP_H_
#define __MAP_H_
/*
* $Id: map.h,v 1.59 2014/10/13 08:52:35 j_novak Exp $
* $Log: map.h,v $
* Revision 1.59 2014/10/13 08:52:35 j_novak
* Lorene classes and functions now belong to the namespace Lorene.
*
* Revision 1.58 2014/10/06 15:09:40 j_novak
* Modified #include directives to use c++ syntax.
*
* Revision 1.57 2014/01/14 13:24:02 b_peres
* *** empty log message ***
*
* Revision 1.56 2012/01/24 14:58:54 j_novak
* Removed functions XXX_fait_xi()
*
* Revision 1.55 2012/01/17 15:34:20 j_penner
* *** empty log message ***
*
* Revision 1.54 2012/01/17 10:20:07 j_penner
* added a member cxi that allows for direct access to the computational coordinates in each domain
*
* Revision 1.53 2008/09/29 13:23:51 j_novak
* Implementation of the angular mapping associated with an affine
* mapping. Things must be improved to take into account the domain index.
*
* Revision 1.52 2007/10/16 21:52:10 e_gourgoulhon
* Added method poisson_compact for multi-domains.
*
* Revision 1.51 2007/05/15 12:44:18 p_grandclement
* Scalar version of reevaluate
*
* Revision 1.50 2007/05/06 10:48:08 p_grandclement
* Modification of a few operators for the vorton project
*
* Revision 1.49 2007/01/16 15:05:59 n_vasset
* New constructor (taking a Scalar in mono-domain angular grid for
* boundary) for function sol_elliptic_boundary
*
* Revision 1.48 2006/08/31 12:10:51 j_novak
* More comments for Map_af::avance_dalembert().
*
* Revision 1.47 2006/05/26 09:00:09 j_novak
* New members for multiplication or division by cos(theta).
*
* Revision 1.46 2006/04/25 07:21:54 p_grandclement
* Various changes for the NS_BH project
*
* Revision 1.45 2005/11/30 11:09:03 p_grandclement
* Changes for the Bin_ns_bh project
*
* Revision 1.44 2005/11/24 09:25:06 j_novak
* Added the Scalar version for the Laplacian
*
* Revision 1.43 2005/09/15 15:51:25 j_novak
* The "rotation" (change of triad) methods take now Scalars as default
* arguments.
*
* Revision 1.42 2005/08/26 14:02:38 p_grandclement
* Modification of the elliptic solver that matches with an oscillatory exterior solution
* small correction in Poisson tau also...
*
* Revision 1.41 2005/08/25 12:14:07 p_grandclement
* Addition of a new method to solve the scalar Poisson equation, based on a multi-domain Tau-method
*
* Revision 1.40 2005/06/09 07:56:24 f_limousin
* Implement a new function sol_elliptic_boundary() and
* Vector::poisson_boundary(...) which solve the vectorial poisson
* equation (method 6) with an inner boundary condition.
*
* Revision 1.39 2005/04/04 21:30:41 e_gourgoulhon
* Added argument lambda to method poisson_angu
* to treat the generalized angular Poisson equation:
* Lap_ang u + lambda u = source.
*
* Revision 1.38 2004/12/29 16:37:22 k_taniguchi
* Addition of some functions with the multipole falloff condition.
*
* Revision 1.37 2004/12/02 09:33:04 p_grandclement
* *** empty log message ***
*
* Revision 1.36 2004/11/30 20:42:05 k_taniguchi
* Addition of some functions with the falloff condition and a method
* to resize the external shell.
*
* Revision 1.35 2004/11/23 12:39:12 f_limousin
* Intoduce function poisson_dir_neu(...) to solve a scalar poisson
* equation with a mixed boundary condition (Dirichlet + Neumann).
*
* Revision 1.34 2004/10/11 15:08:59 j_novak
* The radial manipulation functions take Scalar as arguments, instead of Cmp.
* Added a conversion operator from Scalar to Cmp.
* The Cmp radial manipulation function make conversion to Scalar, call to the
* Map_radial version with a Scalar argument and back.
*
* Revision 1.33 2004/10/08 13:34:35 j_novak
* Scalar::div_r() does not need to pass through Cmp version anymore.
*
* Revision 1.32 2004/08/24 09:14:40 p_grandclement
* Addition of some new operators, like Poisson in 2d... It now requieres the
* GSL library to work.
*
* Also, the way a variable change is stored by a Param_elliptic is changed and
* no longer uses Change_var but rather 2 Scalars. The codes using that feature
* will requiere some modification. (It should concern only the ones about monopoles)
*
* Revision 1.31 2004/07/27 08:24:26 j_novak
* Modif. comments
*
* Revision 1.30 2004/07/26 16:02:21 j_novak
* Added a flag to specify whether the primitive should be zero either at r=0
* or at r going to infinity.
*
* Revision 1.29 2004/06/22 08:49:57 p_grandclement
* Addition of everything needed for using the logarithmic mapping
*
* Revision 1.28 2004/06/14 15:23:53 e_gourgoulhon
* Added virtual function primr for computation of radial primitives.
*
* Revision 1.27 2004/03/31 11:22:23 f_limousin
* Methods Map_et::poisson_interne and Map_af::poisson_interne have been
* implemented to solve the continuity equation for strange stars.
*
* Revision 1.26 2004/03/22 13:12:41 j_novak
* Modification of comments to use doxygen instead of doc++
*
* Revision 1.24 2004/03/01 09:57:02 j_novak
* the wave equation is solved with Scalars. It now accepts a grid with a
* compactified external domain, which the solver ignores and where it copies
* the values of the field from one time-step to the next.
*
* Revision 1.23 2004/02/11 09:47:44 p_grandclement
* Addition of a new elliptic solver, matching with the homogeneous solution
* at the outer shell and not solving in the external domain (more details
* coming soon ; check your local Lorene dealer...)
*
* Revision 1.22 2004/01/29 08:50:01 p_grandclement
* Modification of Map::operator==(const Map&) and addition of the surface
* integrales using Scalar.
*
* Revision 1.21 2004/01/28 16:46:22 p_grandclement
* Addition of the sol_elliptic_fixe_der_zero stuff
*
* Revision 1.20 2004/01/28 10:35:52 j_novak
* Added new methods mult_r() for Scalars. These do not change the dzpuis flag.
*
* Revision 1.19 2004/01/27 09:33:46 j_novak
* New method Map_radial::div_r_zec
*
* Revision 1.18 2004/01/26 16:16:15 j_novak
* Methods of gradient for Scalar s. The input can have any dzpuis.
*
* Revision 1.17 2004/01/19 21:38:21 e_gourgoulhon
* Corrected sign error in comments of Map_radial::dxdr.
*
* Revision 1.16 2003/12/30 22:52:47 e_gourgoulhon
* Class Map: added methods flat_met_spher() and flat_met_cart() to get
* flat metric associated with the coordinates described by the mapping.
*
* Revision 1.15 2003/12/11 14:48:47 p_grandclement
* Addition of ALL (and that is a lot !) the files needed for the general elliptic solver ... UNDER DEVELOPEMENT...
*
* Revision 1.14 2003/11/06 14:43:37 e_gourgoulhon
* Gave a name to const arguments in certain method prototypes (e.g.
* constructors) to correct a bug of DOC++.
*
* Revision 1.13 2003/11/04 22:54:49 e_gourgoulhon
* Added new virtual methods mult_cost, mult_sint and div_sint.
*
* Revision 1.12 2003/10/16 08:49:21 j_novak
* Added a flag to decide wether the output is in the Ylm or in the standard base.
*
* Revision 1.11 2003/10/15 21:08:22 e_gourgoulhon
* Added method poisson_angu.
*
* Revision 1.10 2003/10/15 16:03:35 j_novak
* Added the angular Laplace operator for Scalar.
*
* Revision 1.9 2003/10/15 10:27:33 e_gourgoulhon
* Classes Map, Map_af and Map_et: added new methods dsdt, stdsdp and div_tant.
* Class Map_radial: added new Coord's : drdt and stdrdp.
*
* Revision 1.8 2003/06/20 14:14:53 f_limousin
* Add the operator== to compare two Cmp.
*
* Revision 1.7 2003/06/20 09:27:09 j_novak
* Modif commentaires.
*
* Revision 1.6 2002/10/16 14:36:29 j_novak
* Reorganization of #include instructions of standard C++, in order to
* use experimental version 3 of gcc.
*
* Revision 1.5 2002/09/13 09:17:33 j_novak
* Modif. commentaires
*
* Revision 1.4 2002/06/17 14:05:16 j_novak
* friend functions are now also declared outside the class definition
*
* Revision 1.3 2002/05/07 07:06:37 e_gourgoulhon
* Compatibily with xlC compiler on IBM SP2:
* added declaration of functions map_af_fait_* and map_et_fait_*
* outside the classes declarations.
*
* Revision 1.2 2002/01/15 15:53:06 p_grandclement
* I have had a constructor fot map_et using the equation of the surface
* of the star.
*
* Revision 1.1.1.1 2001/11/20 15:19:27 e_gourgoulhon
* LORENE
*
* Revision 2.110 2001/10/29 15:31:55 novak
* Ajout de Map_radial::div_r
*
* Revision 2.109 2001/10/16 10:02:49 novak
* *** empty log message ***
*
* Revision 2.108 2001/07/19 14:01:00 novak
* new arguments for Map_af::dalembert
*
* Revision 2.107 2001/02/26 17:28:31 eric
* Ajout de la fonction virtuelle resize.
*
* Revision 2.106 2001/01/10 11:03:00 phil
* ajout de homothetie interne
*
* Revision 2.105 2001/01/02 10:51:55 phil
* ajout integrale de surface a l'infini
*
* Revision 2.104 2000/10/23 13:59:48 eric
* Map_et::adapt: changement des arguments (en autre, ajout de nz_search).
*
* Revision 2.103 2000/10/20 09:39:19 phil
* changement commentaires
*
* Revision 2.102 2000/10/19 14:33:23 novak
* corrige oubli pour Map_et?
*
* Revision 2.101 2000/10/19 14:11:20 novak
* Ajout des fonctions membres Map::dalembert et Map_af::dalembert
* (etat experimental)
*
* Revision 2.100 2000/10/09 13:46:39 eric
* Ajout de la fonction virtuelle poisson2d.
*
* Revision 2.99 2000/09/19 15:28:55 phil
* *** empty log message ***
*
* Revision 2.98 2000/09/19 15:24:19 phil
* ajout du passage de cartesienne en spheriques
*
* Revision 2.97 2000/09/19 13:05:38 phil
* ajout integrale_surface
*
* Revision 2.96 2000/09/11 15:54:03 eric
* Suppression des methodes deriv_x, deriv_y et deriv_z.
* Introduction des methodes comp_x_from_spherical, etc...
*
* Revision 2.95 2000/09/07 15:27:58 keisuke
* Add a new argument Cmp& uu in Map_af::poisson_regular and Map_et::poisson_regular.
*
* Revision 2.94 2000/09/04 15:30:56 keisuke
* Modify the arguments of Map_af::poisson_regular and Map_et::poisson_regular.
*
* Revision 2.93 2000/09/04 13:36:19 keisuke
* Modify the explanation for "uu_div" in Map_et::poisson_regular.
*
* Revision 2.92 2000/08/31 15:50:12 keisuke
* Modify Map_af::poisson_regular.
* Add Map_et::poisson_regular and Map::poisson_regular.
*
* Revision 2.91 2000/08/31 13:03:22 eric
* Ajout de la fonction virtuelle mult_rsint.
*
* Revision 2.90 2000/08/28 16:17:37 keisuke
* Add "int nzet" in the argumant of Map_af::poisson_regular.
*
* Revision 2.89 2000/08/18 11:10:12 eric
* Classe Map_et: ajout de l'operateur d'affectation a un autre Map_et.
*
* Revision 2.88 2000/08/11 08:50:18 keisuke
* Modif Map_af::poisson_regular
*
* Revision 2.87 2000/08/10 12:54:00 keisuke
* Ajout de Map_af::poisson_regular
*
* Revision 2.86 2000/07/20 14:21:07 eric
* Ajout de la fonction div_rsint.
*
* Revision 2.85 2000/05/25 13:54:41 eric
* Modif commentaires
*
* Revision 2.84 2000/05/22 14:38:51 phil
* ajout de inc_dzpuis et dec_dzpuis
*
* Revision 2.83 2000/04/27 15:18:54 phil
* *** empty log message ***
*
* Revision 2.82 2000/03/20 13:33:23 phil
* commentaires
*
* Revision 2.81 2000/03/17 17:32:48 phil
* *** empty log message ***
*
* Revision 2.80 2000/03/17 17:01:54 phil
* *** empty log message ***
*
* Revision 2.79 2000/03/17 16:58:48 phil
* ajout de poisson_frontiere
*
* Revision 2.78 2000/03/06 11:29:51 eric
* Ajout du membre reeavaluate_symy.
*
* Revision 2.77 2000/02/15 15:08:21 eric
* Changement du Param dans Map_et::adapt : fact_echelle est desormais
* passe en double_mod.
*
* Revision 2.76 2000/02/15 10:26:25 phil
* commentaire +
* suppression de poisson_vect et poisson_vect_oohara
*
* Revision 2.75 2000/02/11 13:37:43 eric
* Ajout de la fonction convert_absolute.
*
* Revision 2.74 2000/02/09 09:53:37 phil
* ajout de poisson_vect_oohara
*
* Revision 2.73 2000/01/26 13:07:02 eric
* Reprototypage complet des routines de derivation:
* le resultat est desormais suppose alloue a l'exterieur de la routine
* et est passe en argument (Cmp& resu), si bien que le prototypage
* complet devient:
* void DERIV(const Cmp& ci, Cmp& resu)
*
* Revision 2.72 2000/01/24 17:08:21 eric
* Class Map_af : suppression de la fonction convert.
* suppression du constructeur par convertion d'un Map_et.
* ajout du constructeur par conversion d'un Map.
*
* Revision 2.71 2000/01/24 16:41:43 eric
* Ajout de la fonction virtuelle operator=(const Map_af& ).
* Classe Map_af : ajout de la fonction convert(const Map& ).
*
* Revision 2.70 2000/01/21 12:48:34 phil
* changement prototypage de Map::poisson_vect
*
* Revision 2.69 2000/01/20 16:35:05 phil
* *** empty log message ***
*
* Revision 2.68 2000/01/20 15:44:42 phil
* *** empty log message ***
*
* Revision 2.67 2000/01/20 15:31:56 phil
* *** empty log message ***
*
* Revision 2.66 2000/01/20 14:18:06 phil
* *** empty log message ***
*
* Revision 2.65 2000/01/20 13:16:34 phil
* *** empty log message ***
*
* Revision 2.64 2000/01/20 12:51:24 phil
* *** empty log message ***
*
* Revision 2.63 2000/01/20 12:45:28 phil
* *** empty log message ***
*
* Revision 2.62 2000/01/20 12:40:27 phil
* *** empty log message ***
*
* Revision 2.61 2000/01/20 11:27:54 phil
* ajout de poisson_vect
*
* Revision 2.60 2000/01/13 15:31:55 eric
* Modif commentaires/
*
* Revision 2.59 2000/01/12 16:02:57 eric
* Modif commentaires poisson_compact.
*
* Revision 2.58 2000/01/12 12:54:23 eric
* Ajout du Cmp null, *p_cmp_zero, et de la methode associee cmp_zero().
*
* Revision 2.57 2000/01/10 13:27:43 eric
* Ajout des bases vectorielles associees aux coordonnees :
* membres bvect_spher et bvect_cart.
*
* Revision 2.56 2000/01/10 09:12:47 eric
* Reprototypage de poisson_compact : Valeur -> Cmp, Tenseur.
* Suppression de poisson_compact_boucle.
* poisson_compact est desormais implementee au niveau Map_radial.
*
* Revision 2.55 2000/01/04 15:23:11 eric
* Classe Map_radial : les data sont listees en premier
* Introduction de la fonction reevalutate.
*
* Revision 2.54 2000/01/03 13:30:32 eric
* Ajout de la fonction adapt.
*
* Revision 2.53 1999/12/22 17:09:52 eric
* Modif commentaires.
*
* Revision 2.52 1999/12/21 16:26:25 eric
* Ajout du constructeur par conversion Map_af::Map_af(const Map_et&).
* Ajout des fonctions Map_af::set_alpha et Map_af::set_beta.
*
* Revision 2.51 1999/12/21 13:01:29 eric
* Changement de prototype de la routine poisson : la solution est
* desormais passee en argument (et non plus en valeur de retour)
* pour permettre l'initialisation de methodes de resolution iterative.
*
* Revision 2.50 1999/12/21 10:12:09 eric
* Modif commentaires.
*
* Revision 2.49 1999/12/21 10:06:05 eric
* Ajout de l'argument Param& a poisson.
*
* Revision 2.48 1999/12/20 15:44:35 eric
* Modif commentaires.
*
* Revision 2.47 1999/12/20 10:47:45 eric
* Modif commentaires.
*
* Revision 2.46 1999/12/20 10:24:12 eric
* Ajout des fonctions de lecture des parametres de Map_et:
* get_alpha(), get_beta(), get_ff(), get_gg().
*
* Revision 2.45 1999/12/16 14:50:08 eric
* Modif commentaires.
*
* Revision 2.44 1999/12/16 14:17:54 eric
* Introduction de l'argument const Param& par dans val_lx et val_lx_jk.
* (en remplacement de l'argument Tbl& param).
*
* Revision 2.43 1999/12/09 10:45:24 eric
* Ajout de la fonction virtuelle integrale.
*
* Revision 2.42 1999/12/07 14:50:47 eric
* Changement ordre des arguments val_r, val_lx
* val_r_kj --> val_r_jk
* val_lx_kj -->val_lx_jk
*
* Revision 2.41 1999/12/06 16:45:20 eric
* Surcharge de val_lx avec la version sans param.
*
* Revision 2.40 1999/12/06 15:33:44 eric
* Ajout des fonctions val_r_kj et val_lx_kj.
*
* Revision 2.39 1999/12/06 13:11:54 eric
* Introduction des fonctions val_r, val_lx et homothetie.
*
* Revision 2.38 1999/12/02 14:28:22 eric
* Reprototypage de la fonction poisson: Valeur -> Cmp.
*
* Revision 2.37 1999/11/30 14:19:33 eric
* Reprototypage complet des fonctions membres mult_r, mult_r_zec,
* dec2_dzpuis et inc2_dzpuis : Valeur --> Cmp
*
* Revision 2.36 1999/11/29 13:17:57 eric
* Modif commentaires.
*
* Revision 2.35 1999/11/29 12:55:42 eric
* Changement prototype de la fonction laplacien : Valeur --> Cmp.
*
* Revision 2.34 1999/11/25 16:27:27 eric
* Reorganisation complete du calcul des derivees partielles.
*
* Revision 2.33 1999/11/24 16:31:17 eric
* Map_et: ajout des fonctions set_ff et set_gg.
*
* Revision 2.32 1999/11/24 14:31:48 eric
* Map_af: les membres alpha et beta deviennent prives.
* Map_af: introduction des fonctions get_alpha() et get_beta().
*
* Revision 2.31 1999/11/24 11:22:09 eric
* Map_et : Coords rendus publics
* Map_et : fonctions de constructions amies.
*
* Revision 2.30 1999/11/22 10:32:39 eric
* Introduction de la classe Map_et.
* Constructeurs de Map rendus protected.
* Fonction del_coord() rebaptisee reset_coord().
*
* Revision 2.29 1999/10/27 16:44:41 phil
* ajout de mult_r_zec
*
* Revision 2.28 1999/10/19 14:40:37 phil
* ajout de inc2_dzpuis()
*
* Revision 2.27 1999/10/15 14:12:20 eric
* *** empty log message ***
*
* Revision 2.26 1999/10/14 14:26:06 eric
* Depoussierage.
* Documentation.
*
* Revision 2.25 1999/10/11 11:16:29 phil
* changement prototypage de poisson_compact_boucle
*
* Revision 2.24 1999/10/11 10:48:51 phil
* changement de nom pour poisson a support compact
*
* Revision 2.23 1999/10/04 09:20:58 phil
* changement de prototypage de void Map_af::poisson_nul
*
* Revision 2.22 1999/09/30 18:38:32 phil
* *** empty log message ***
*
* Revision 2.21 1999/09/30 18:33:10 phil
* ajout de poisson_nul et poisson_nul_boucle
*
* Revision 2.20 1999/09/30 16:45:54 phil
* ajout de Map_af::poisson_nul(const Valeur&, int, int)
*
* Revision 2.19 1999/09/16 13:15:40 phil
* ajout de Valeur mult_r (const Valeur &)
*
* Revision 2.18 1999/09/15 10:42:11 phil
* ajout de Valeur dec2_dzpuis(const Valeur&)
*
* Revision 2.17 1999/09/14 13:45:45 phil
* suppression de la divergence
*
* Revision 2.16 1999/09/13 15:09:07 phil
* ajout de Map_af::divergence
*
* Revision 2.15 1999/09/13 13:52:23 phil
* ajout des derivations partielles par rapport a x,y et z.
*
* Revision 2.14 1999/09/07 14:35:20 phil
* ajout de la fonction Valeur** gradient(const Valeur&)
*
* Revision 2.13 1999/04/26 16:37:43 phil
* *** empty log message ***
*
* Revision 2.12 1999/04/26 16:33:28 phil
* *** empty log message ***
*
* Revision 2.11 1999/04/26 13:53:04 phil
* *** empty log message ***
*
* Revision 2.10 1999/04/26 13:51:19 phil
* ajout de Map_af::laplacien (2versions)
*
* Revision 2.9 1999/04/14 09:04:01 phil
* *** empty log message ***
*
* Revision 2.8 1999/04/14 08:53:27 phil
* *** empty log message ***
*
* Revision 2.7 1999/04/13 17:45:25 phil
* *** empty log message ***
*
* Revision 2.6 1999/04/13 17:02:41 phil
* ,
*
* Revision 2.5 1999/04/13 17:00:41 phil
* ajout de la resolution de poisson affine
*
* Revision 2.4 1999/03/04 13:10:53 eric
* Ajout des Coord representant les derivees du changement de variable
* dans la classe Map_radial.
*
* Revision 2.3 1999/03/01 17:00:38 eric
* *** empty log message ***
*
* Revision 2.2 1999/03/01 16:44:41 eric
* Operateurs << et >> sur les ostream.
* L'operateur >> est virtuel.
*
* Revision 2.1 1999/02/22 15:21:45 hyc
* *** empty log message ***
*
*
* Revision 2.0 1999/01/15 09:10:39 hyc
* *** empty log message ***
*
* $Header: /cvsroot/Lorene/C++/Include/map.h,v 1.59 2014/10/13 08:52:35 j_novak Exp $
*
*/
#include <cstdio>
#include "coord.h"
#include "base_vect.h"
#include "valeur.h"
#include "tbl.h"
#include "itbl.h"
namespace Lorene {
class Scalar ;
class Cmp ;
class Param ;
class Map_af ;
class Map_et ;
class Tenseur ;
class Param_elliptic ;
class Metric_flat ;
class Tbl ;
class Itbl ;
//------------------------------------//
// class Map //
//------------------------------------//
/**
* Base class for coordinate mappings. \ingroup (map)
*
* This class is the basic class for describing the mapping between the
* grid coordinates \f$(\xi, \theta', \phi')\f$ and the physical coordinates
* \f$(r, \theta, \phi)\f$ [cf. Bonazzola, Gourgoulhon & Marck, \e Phys.
* \e Rev. \e D \b 58, 104020 (1998)].
* The class \c Map is an abstract one: it cannot be instanciated.
* Specific implementation of coordinate mappings will be performed by derived
* classes of \c Map.
*
* The class \c Map and its derived classes determine the methods for
* partial derivatives with respect to the physical coordinates, as well
* as resolution of basic partial differential equations (e.g. Poisson
* equations).
*
* The mapping is defined with respect to some ``absolute'' reference frame,
* whose Cartesian coordinates are denoted by \e (X,Y,Z). The coordinates
* (X, Y, Z) of center of the mapping (i.e. the point \e r =0) are given by the data
* members \c (ori_x,ori_y,ori_z).
* The Cartesian coordinate relative to the mapping (i.e. defined from
* \f$(r, \theta, \phi)\f$ by the usual formul\ae \f$x=r\sin\theta\cos\phi, \ldots\f$)
* are denoted by \e (x,y,z). The planes \e (x,y) and \e (X,Y) are supposed to
* coincide, so that the relative orientation of the mapping with respect to
* the absolute reference frame is described by only one angle (the data member
* \c rot_phi).
*
*
*/
class Map {
// Data :
// ----
protected:
/// Pointer on the multi-grid \c Mgd3 on which \c this is defined
const Mg3d* mg ;
double ori_x ; ///< Absolute coordinate \e x of the origin
double ori_y ; ///< Absolute coordinate \e y of the origin
double ori_z ; ///< Absolute coordinate \e z of the origin
double rot_phi ; ///< Angle between the \e x --axis and \e X --axis
/** Orthonormal vectorial basis
* \f$(\partial/\partial r,1/r\partial/\partial \theta,
* 1/(r\sin\theta)\partial/\partial \phi)\f$
* associated with the coordinates \f$(r, \theta, \phi)\f$ of the
* mapping.
*/
Base_vect_spher bvect_spher ;
/** Cartesian basis
* \f$(\partial/\partial x,\partial/\partial y,\partial/\partial z)\f$
* associated with the coordinates \e (x,y,z) of the
* mapping, i.e. the Cartesian coordinates related to
* \f$(r, \theta, \phi)\f$ by means of usual formulae.
*/
Base_vect_cart bvect_cart ;
/** Pointer onto the flat metric associated with the spherical coordinates
* and with components expressed in the triad \c bvect_spher
*/
mutable Metric_flat* p_flat_met_spher ;
/** Pointer onto the flat metric associated with the Cartesian coordinates
* and with components expressed in the triad \c bvect_cart
*/
mutable Metric_flat* p_flat_met_cart ;
/** The null Cmp.
* To be used by the \c Tenseur class when necessary to
* return a null \c Cmp .
*/
Cmp* p_cmp_zero ;
mutable Map_af* p_mp_angu ; ///< Pointer on the "angular" mapping.
public:
Coord r ; ///< \e r coordinate centered on the grid
Coord tet ; ///< \f$\theta\f$ coordinate centered on the grid
Coord phi ; ///< \f$\phi\f$ coordinate centered on the grid
Coord sint ; ///< \f$\sin\theta\f$
Coord cost ; ///< \f$\cos\theta\f$
Coord sinp ; ///< \f$\sin\phi\f$
Coord cosp ; ///< \f$\cos\phi\f$
Coord x ; ///< \e x coordinate centered on the grid
Coord y ; ///< \e y coordinate centered on the grid
Coord z ; ///< \e z coordinate centered on the grid
Coord xa ; ///< Absolute \e x coordinate
Coord ya ; ///< Absolute \e y coordinate
Coord za ; ///< Absolute \e z coordinate
// Constructors, destructor :
// ------------------------
protected:
explicit Map(const Mg3d& ) ; ///< Constructor from a multi-domain 3D grid
Map(const Map &) ; ///< Copy constructor
Map(const Mg3d&, FILE* ) ; ///< Constructor from a file (see \c sauve(FILE* ) )
public:
virtual ~Map() ; ///< Destructor
// Memory management
// -----------------
protected:
virtual void reset_coord() ; ///< Resets all the member \c Coords
// Outputs
// -------
private:
virtual ostream& operator>>(ostream &) const = 0 ; ///< Operator >>
public:
virtual void sauve(FILE* ) const ; ///< Save in a file
// Extraction of information
// -------------------------
public:
/// Gives the \c Mg3d on which the mapping is defined
const Mg3d* get_mg() const {return mg; };
/// Returns the \e x coordinate of the origin
double get_ori_x() const {return ori_x;} ;
/// Returns the \e y coordinate of the origin
double get_ori_y() const {return ori_y;} ;
/// Returns the \e z coordinate of the origin
double get_ori_z() const {return ori_z;} ;
/// Returns the angle between the \e x --axis and \e X --axis
double get_rot_phi() const {return rot_phi;} ;
/** Returns the orthonormal vectorial basis
* \f$(\partial/\partial r,1/r\partial/\partial \theta,
* 1/(r\sin\theta)\partial/\partial \phi)\f$
* associated with the coordinates \f$(r, \theta, \phi)\f$ of the
* mapping.
*/
const Base_vect_spher& get_bvect_spher() const {return bvect_spher;} ;
/** Returns the Cartesian basis
* \f$(\partial/\partial x,\partial/\partial y,\partial/\partial z)\f$
* associated with the coordinates \e (x,y,z) of the
* mapping, i.e. the Cartesian coordinates related to
* \f$(r, \theta, \phi)\f$ by means of usual formulae.
*/
const Base_vect_cart& get_bvect_cart() const {return bvect_cart;} ;
/** Returns the flat metric associated with the spherical coordinates
* and with components expressed in the triad \c bvect_spher
*/
const Metric_flat& flat_met_spher() const ;
/** Returns the flat metric associated with the Cartesian coordinates
* and with components expressed in the triad \c bvect_cart
*/
const Metric_flat& flat_met_cart() const ;
/** Returns the null \c Cmp defined on \c *this.
* To be used by the \c Tenseur class when necessary to
* return a null \c Cmp .
*/
const Cmp& cmp_zero() const {return *p_cmp_zero;} ;
/** Returns the "angular" mapping for the outside of domain \c l_zone.
* Valid only for the class \c Map_af.
*/
virtual const Map_af& mp_angu(int) const = 0 ;
/** Determines the coordinates \f$(r,\theta,\phi)\f$
* corresponding to given absolute Cartesian coordinates
* \e (X,Y,Z).
* @param xx [input] value of the coordinate \e x (absolute frame)
* @param yy [input] value of the coordinate \e y (absolute frame)
* @param zz [input] value of the coordinate \e z (absolute frame)
* @param rr [output] value of \e r
* @param theta [output] value of \f$\theta\f$
* @param pphi [output] value of \f$\phi\f$
*/
void convert_absolute(double xx, double yy, double zz,
double& rr, double& theta, double& pphi) const ;
/** Returns the value of the radial coordinate \e r for a given
* \f$(\xi, \theta', \phi')\f$ in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param theta [input] value of \f$\theta'\f$
* @param pphi [input] value of \f$\phi'\f$
* @return value of \f$r=R_l(\xi, \theta', \phi')\f$
*/
virtual double val_r(int l, double xi, double theta, double pphi)
const = 0 ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
int& l, double& xi) const = 0 ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* This version enables to pass some parameters to control the
* accuracy of the computation.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param par [input/output] parameters to control the
* accuracy of the computation
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
const Param& par, int& l, double& xi) const = 0 ;
/// Comparison operator (egality)
virtual bool operator==(const Map& ) const = 0;
// Modification of the origin, the orientation and the radial scale:
// ----------------------------------------------------------------
public:
void set_ori(double xa0, double ya0, double za0) ; ///< Sets a new origin
void set_rot_phi(double phi0) ; ///< Sets a new rotation angle
/** Sets a new radial scale.
* @param lambda [input] factor by which the value of \e r is to
* be multiplied
*/
virtual void homothetie(double lambda) = 0 ;
/** Rescales the outer boundary of one domain.
* The inner boundary is unchanged. The inner boundary
* of the next domain is changed to match the new outer
* boundary.
* @param l [input] index of the domain
* @param lambda [input] factor by which the value of
* \f$R(\theta, \varphi)\f$ defining the outer boundary
* of the domain is to be multiplied.
*/
virtual void resize(int l, double lambda) = 0 ;
// Modification of the mapping
// ---------------------------
public:
/// Assignment to an affine mapping.
virtual void operator=(const Map_af& ) = 0 ;
/** Adaptation of the mapping to a given scalar field.
* This is a virtual function: see the actual implementations
* in the derived classes for the meaning of the various
* parameters.
*/
virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) = 0 ;
// Values of a Cmp at the new grid points
// --------------------------------------
/** Recomputes the values of a \c Cmp at the collocation points
* after a change in the mapping.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Cmp previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Cmp
* at the grid points defined by \c *this.
*/
virtual void reevaluate(const Map* mp_prev, int nzet,
Cmp& uu) const = 0 ;
/** Recomputes the values of a \c Cmp at the collocation points
* after a change in the mapping.
* Case where the \c Cmp is symmetric with respect the plane y=0.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Cmp previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Cmp
* at the grid points defined by \c *this.
*/
virtual void reevaluate_symy(const Map* mp_prev, int nzet,
Cmp& uu) const = 0 ;
/** Recomputes the values of a \c Scalar at the collocation points
* after a change in the mapping.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Scalar previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Scalae
* at the grid points defined by \c *this.
*/
virtual void reevaluate(const Map* mp_prev, int nzet,
Scalar& uu) const = 0 ;
/** Recomputes the values of a \c Scalar at the collocation points
* after a change in the mapping.
* Case where the \c Scalar is symmetric with respect the plane y=0.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Scalar previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Scalar
* at the grid points defined by \c *this.
*/
virtual void reevaluate_symy(const Map* mp_prev, int nzet,
Scalar& uu) const = 0 ;
// Differential operators:
// ----------------------
public:
/** Computes \f$\partial/ \partial \xi\f$ of a \c Cmp .
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = \xi^2 \partial/ \partial \xi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdxi(const Cmp& ci, Cmp& resu) const = 0 ;
/** Computes \f$\partial/ \partial r\f$ of a \c Cmp .
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = r^2 \partial/ \partial r\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdr(const Cmp& ci, Cmp& resu) const = 0 ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Cmp .
* Note that in the compactified external domain (CED), it computes
* \f$1/u \partial/ \partial \theta = r \partial/ \partial \theta\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srdsdt(const Cmp& ci, Cmp& resu) const = 0 ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Cmp .
* Note that in the compactified external domain (CED), it computes
* \f$1/(u\sin\theta) \partial/ \partial \phi =
* r/\sin\theta \partial/ \partial \phi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srstdsdp(const Cmp& ci, Cmp& resu) const = 0 ;
/** Computes \f$\partial/ \partial xi\f$ of a \c Scalar .
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdxi(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar .
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdr(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar if the description is affine and
* \f$\partial/ \partial \ln r\f$ if it is logarithmic.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdradial(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Scalar .
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srdsdt(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Scalar .
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srstdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$\partial/ \partial \theta\f$ of a \c Scalar .
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void dsdt(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes \f$1/\sin\theta \partial/ \partial \varphi\f$ of a \c Scalar .
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void stdsdp(const Scalar& uu, Scalar& resu) const = 0 ;
/** Computes the Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar )
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param zec_mult_r [input] Determines the quantity computed in
* the compactified external domain (CED) : \\
* zec_mult_r = 0 : \f$\Delta u\f$ \\
* zec_mult_r = 2 : \f$r^2 \, \Delta u\f$ \\
* zec_mult_r = 4 (default) : \f$r^4 \, \Delta u\f$
* @param lap [output] Laplacian of \e u
*/
virtual void laplacien(const Scalar& uu, int zec_mult_r,
Scalar& lap) const = 0 ;
/// Computes the Laplacian of a scalar field (\c Cmp version).
virtual void laplacien(const Cmp& uu, int zec_mult_r,
Cmp& lap) const = 0 ;
/** Computes the angular Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar )
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param lap [output] Angular Laplacian of \e u (see documentation
* of \c Scalar
*/
virtual void lapang(const Scalar& uu, Scalar& lap) const = 0 ;
/** Computes the radial primitive which vanishes for \f$r\to \infty\f$.
* i.e. the function
* \f$ F(r,\theta,\varphi) = \int_r^\infty f(r',\theta,\varphi) \, dr' \f$
*
* @param uu [input] function \e f (must have a \c dzpuis = 2)
* @param resu [input] function \e F
* @param null_infty if true (default), the primitive is null
* at infinity (or on the grid boundary). \e F is null at the
* center otherwise
*/
virtual void primr(const Scalar& uu, Scalar& resu,
bool null_infty) const = 0 ;
// Various linear operators
// ------------------------
public:
/** Multiplication by \e r of a \c Scalar , the \c dzpuis
* of \c uu is not changed.
*/
virtual void mult_r(Scalar& uu) const = 0 ;
/** Multiplication by \e r of a \c Cmp . In the CED,
* there is only a decrement of \c dzpuis
*/
virtual void mult_r(Cmp& ci) const = 0 ;
/** Multiplication by \e r (in the compactified external domain only)
* of a \c Scalar
*/
virtual void mult_r_zec(Scalar& ) const = 0 ;
/** Multiplication by \f$r\sin\theta\f$ of a \c Scalar
*/
virtual void mult_rsint(Scalar& ) const = 0 ;
/** Division by \f$r\sin\theta\f$ of a \c Scalar
*/
virtual void div_rsint(Scalar& ) const = 0 ;
/** Division by \e r of a \c Scalar
*/
virtual void div_r(Scalar& ) const = 0 ;
/** Division by \e r (in the compactified external domain only)
* of a \c Scalar
*/
virtual void div_r_zec(Scalar& ) const = 0 ;
/** Multiplication by \f$\cos\theta\f$ of a \c Scalar
*/
virtual void mult_cost(Scalar& ) const = 0 ;
/** Division by \f$\cos\theta\f$ of a \c Scalar
*/
virtual void div_cost(Scalar& ) const = 0 ;
/** Multiplication by \f$\sin\theta\f$ of a \c Scalar
*/
virtual void mult_sint(Scalar& ) const = 0 ;
/** Division by \f$\sin\theta\f$ of a \c Scalar
*/
virtual void div_sint(Scalar& ) const = 0 ;
/** Division by \f$\tan\theta\f$ of a \c Scalar
*/
virtual void div_tant(Scalar& ) const = 0 ;
/** Computes the Cartesian x component (with respect to
* \c bvect_cart ) of a vector given
* by its spherical components with respect to \c bvect_spher .
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_phi [input] \f$\phi\f$-component of the vector
* @param v_x [output] x-component of the vector
*/
virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
const Scalar& v_phi, Scalar& v_x) const = 0 ;
/// \c Cmp version
virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
const Cmp& v_phi, Cmp& v_x) const = 0 ;
/** Computes the Cartesian y component (with respect to
* \c bvect_cart ) of a vector given
* by its spherical components with respect to \c bvect_spher .
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_phi [input] \f$\phi\f$-component of the vector
* @param v_y [output] y-component of the vector
*/
virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
const Scalar& v_phi, Scalar& v_y) const = 0 ;
/// \c Cmp version
virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
const Cmp& v_phi, Cmp& v_y) const = 0 ;
/** Computes the Cartesian z component (with respect to
* \c bvect_cart ) of a vector given
* by its spherical components with respect to \c bvect_spher .
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_z [output] z-component of the vector
*/
virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
Scalar& v_z) const = 0 ;
/// \c Cmp version
virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
Cmp& v_z) const = 0 ;
/** Computes the Spherical r component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_z [input] z-component of the vector
* @param v_r [output] \e r -component of the vector
*/
virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
const Scalar& v_z, Scalar& v_r) const = 0 ;
/// \c Cmp version
virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
const Cmp& v_z, Cmp& v_r) const = 0 ;
/** Computes the Spherical \f$\theta\f$ component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_z [input] z-component of the vector
* @param v_t [output] \f$\theta\f$-component of the vector
*/
virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
const Scalar& v_z, Scalar& v_t) const = 0 ;
/// \c Cmp version
virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
const Cmp& v_z, Cmp& v_t) const = 0 ;
/** Computes the Spherical \f$\phi\f$ component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_p [output] \f$\phi\f$-component of the vector
*/
virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
Scalar& v_p) const = 0 ;
/// \c Cmp version
virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
Cmp& v_p) const = 0 ;
/** Decreases by 1 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void dec_dzpuis(Scalar& ) const = 0 ;
/** Decreases by 2 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void dec2_dzpuis(Scalar& ) const = 0 ;
/** Increases by 1 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void inc_dzpuis(Scalar& ) const = 0 ;
/** Increases by 2 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void inc2_dzpuis(Scalar& ) const = 0 ;
/** Computes the integral over all space of a \c Cmp .
* The computed quantity is
* \f$\int u \, r^2 \sin\theta \, dr\, d\theta \, d\phi\f$.
* The routine allocates a \c Tbl (size: \c mg->nzone ) to store
* the result (partial integral) in each domain and returns a pointer
* to it.
*/
virtual Tbl* integrale(const Cmp&) const = 0 ;
// PDE resolution :
// --------------
public:
/** Computes the solution of a scalar Poisson equation.
*
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
/** Computes the solution of a scalar Poisson equationwith a Tau method.
*
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const = 0 ;
virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
int k_falloff) const = 0 ;
virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
int nylm, double* intvec) const = 0 ;
/** Computes the solution of a scalar Poisson equation.
* The regularized source
*
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param k_div [input] regularization degree of the procedure
* @param nzet [input] number of domains covering the star
* @param unsgam1 [input] parameter \f$1/(\gamma-1)\f$ where \f$\gamma\f$
* denotes the adiabatic index.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
* @param uu_regu [output] solution of the regular part of
* the source.
* @param uu_div [output] solution of the diverging part of
* the source.
* @param duu_div [output] derivative of the diverging potential
* @param source_regu [output] regularized source
* @param source_div [output] diverging part of the source
*/
virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
double unsgam1, Param& par, Cmp& uu,
Cmp& uu_regu, Cmp& uu_div,
Tenseur& duu_div, Cmp& source_regu,
Cmp& source_div) const = 0 ;
/** Resolution of the elliptic equation
* \f$ a \Delta\psi + {\bf b} \cdot \nabla \psi = \sigma\f$
* in the case where the stellar interior is covered by a single domain.
*
* @param source [input] source \f$\sigma\f$ of the above equation
* @param aa [input] factor \e a in the above equation
* @param bb [input] vector \e \b b in the above equation
* @param par [input/output] possible parameters to control the
* resolution of the equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param psi [input/output] solution \f$\psi\f$ which satisfies
* \f$\psi(0)=0\f$.
*/
virtual void poisson_compact(const Cmp& source, const Cmp& aa,
const Tenseur& bb, const Param& par,
Cmp& psi) const = 0 ;
/** Resolution of the elliptic equation
* \f$ a \Delta\psi + {\bf b} \cdot \nabla \psi = \sigma\f$
* in the case of a multidomain stellar interior.
*
* @param nzet [input] number of domains covering the stellar interior
* @param source [input] source \f$\sigma\f$ of the above equation
* @param aa [input] factor \e a in the above equation
* @param bb [input] vector \e \b b in the above equation
* @param par [input/output] possible parameters to control the
* resolution of the equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param psi [input/output] solution \f$\psi\f$ which satisfies
* \f$\psi(0)=0\f$.
*/
virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
const Tenseur& bb, const Param& par,
Cmp& psi) const = 0 ;
/** Computes the solution of the generalized angular Poisson equation.
* The generalized angular Poisson equation is
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$,
* where \f$\Delta_{\theta\varphi} u := \frac{\partial^2 u}
* {\partial \theta^2} + \frac{1}{\tan \theta} \frac{\partial u}
* {\partial \theta} +\frac{1}{\sin^2 \theta}\frac{\partial^2 u}
* {\partial \varphi^2}\f$.
*
* @param source [input] source \f$\sigma\f$ of the equation
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u
* @param lambda [input] coefficient \f$\lambda\f$ in the above equation
* (default value = 0)
*/
virtual void poisson_angu(const Scalar& source, Param& par,
Scalar& uu, double lambda=0) const = 0 ;
public:
/**
* Function intended to be used by \c Map::poisson_vect
* and \c Map::poisson_vect_oohara . It constructs the sets of
* parameters used for each scalar Poisson equation from the one for
* the vectorial one.
*
* @param para [input] : the \c Param used for the resolution of
* the vectorial Poisson equation : \\
* \c para.int() maximum number of iteration.\\
* \c para.double(0) relaxation parameter.\\
* \c para.double(1) required precision. \\
* \c para.tenseur_mod() source of the vectorial part at the previous
* step.\\
* \c para.cmp_mod() source of the scalar part at the previous
* step.
*
* @param i [input] number of the scalar Poisson equation that is being
* solved (values from 0 to 2 for the componants of the vectorial part
* and 3 for the scalar one).
*
* @return the pointer on the parameter set used for solving the
* scalar Poisson equation labelled by \e i .
*/
virtual Param* donne_para_poisson_vect (Param& para, int i) const = 0;
/**
* Computes the solution of a Poisson equation from the domain
* \c num_front+1 .
* imposing a boundary condition at the boundary between the domains
* \c num_front and \c num_front+1 .
*
* @param source [input] : source of the equation.
* @param limite [input] : \c limite[num_front] contains the angular
* function being the boudary condition.
* @param raccord [input] : 1 for the Dirichlet problem and 2 for
* the Neumann one and 3 for Dirichlet-Neumann.
* @param num_front [input] : index of the boudary at which the boundary
* condition has to be imposed.
* @param pot [output] : result.
* @param fact_dir [input] : Valeur by which we multiply the quantity
* we solve. (in the case of Dirichlet-Neumann boundary condition.)
* @param fact_neu [input] : Valeur by which we multiply the radial
* derivative of the quantity we solve. (in the case of
* Dirichlet-Neumann boundary condition.)
*/
virtual void poisson_frontiere (const Cmp& source,const Valeur& limite,
int raccord, int num_front, Cmp& pot,
double = 0., double = 0.) const = 0 ;
virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
const Valeur& lim_der, int num_zone, Cmp& pot) const = 0 ;
/**
* Computes the solution of a Poisson equation in the shell,
* imposing a boundary condition at the surface of the star
*
* @param source [input] : source of the equation.
* @param limite [input] : \c limite[num_front] contains the angular
* function being the boudary condition.
* @param par [input] : parameters of the computation.
* @param pot [output] : result.
*/
virtual void poisson_interne (const Cmp& source, const Valeur& limite,
Param& par, Cmp& pot) const = 0 ;
/** Computes the solution of a 2-D Poisson equation.
* The 2-D Poisson equation writes
* \f[
* {\partial^2 u\over\partial r^2} +
* {1\over r} {\partial u \over \partial r} +
* {1\over r^2} {\partial^2 u\over\partial \theta^2} =
* \sigma \ .
* \f]
*
* @param source_mat [input] Compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* matter terms)
* @param source_quad [input] Non-compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* quadratic terms)
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
Param& par, Cmp& uu) const = 0 ;
/** Performs one time-step integration of the d'Alembert scalar equation
* @param par [input/output] possible parameters to control the
* resolution of the wave equation. See the actual implementation
* in the derived class of \c Map for documentation. Note that,
* at least, param must contain the time step as first \c double
* parameter.
* @param fJp1 [output] solution \f$f^{J+1}\f$ at time \e J+1
* with boundary conditions of outgoing radiation (not exact!)
* @param fJ [input] solution \f$f^J\f$ at time \e J
* @param fJm1 [input] solution \f$f^{J-1}\f$ at time \e J-1
* @param source [input] source \f$\sigma\f$ of the d'Alembert equation
* \f$\diamond u = \sigma\f$.
*/
virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
const Scalar& fJm1, const Scalar& source) const = 0 ;
// Friend functions :
// ----------------
friend ostream& operator<<(ostream& , const Map& ) ; ///< Operator <<
};
ostream& operator<<(ostream& , const Map& ) ;
//------------------------------------//
// class Map_radial //
//------------------------------------//
/**
* Base class for pure radial mappings. \ingroup (map)
*
* A pure radial mapping is a mapping of the type \f$r=R(\xi, \theta', \phi')\f$,
* \f$\theta=\theta'\f$, \f$\phi=\phi'\f$.
* The class \c Map_radial is an abstract class. Effective implementations
* of radial mapping are performed by the derived class \c Map_af and
* \c Map_et .
*
*
*/
class Map_radial : public Map {
// Data :
// ----
// 0th order derivatives of the mapping
// - - - - - - - - - - - - - - - - - -
public:
/**
* \f$\xi/R\f$ in the nucleus; \\
* \e 1/R in the non-compactified shells; \\
* \f$(\xi-1)/U\f$ in the compactified outer domain.
*/
Coord xsr ;
// 1st order derivatives of the mapping
// - - - - - - - - - - - - - - - - - -
public:
/**
* \f$1/(\partial R/\partial\xi) = \partial \xi /\partial r\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/(\partial U/\partial\xi) = - \partial \xi /\partial u\f$ in the
* compactified outer domain.
*/
Coord dxdr ;
/**
* \f$\partial R/\partial\theta'\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-\partial U/\partial\theta'\f$ in the
* compactified external domain (CED).
*/
Coord drdt ;
/**
* \f${1\over\sin\theta} \partial R/\partial\varphi'\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-{1\over\sin\theta}\partial U/\partial\varphi'\f$ in the
* compactified external domain (CED).
*/
Coord stdrdp ;
/**
* \f$1/R \times (\partial R/\partial\theta')\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/U \times (\partial U/\partial\theta)\f$ in the
* compactified outer domain.
*/
Coord srdrdt ;
/**
* \f$1/(R\sin\theta) \times (\partial R/\partial\varphi')\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/(U\sin\theta) \times (\partial U/\partial\varphi')\f$ in the
* compactified outer domain.
*/
Coord srstdrdp ;
/**
* \f$1/R^2 \times (\partial R/\partial\theta')\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/U^2 \times (\partial U/\partial\theta')\f$ in the
* compactified outer domain.
*/
Coord sr2drdt ;
/**
* \f$1/(R^2\sin\theta) \times (\partial R/\partial\varphi')\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/(U^2\sin\theta) \times (\partial U/\partial\varphi')\f$ in the
* compactified outer domain.
*/
Coord sr2stdrdp ;
// 2nd order derivatives of the mapping
// - - - - - - - - - - - - - - - - - -
public:
/**
* \f$\partial^2 R/\partial\xi^2\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-\partial^2 U/\partial\xi^2 \f$ in the
* compactified outer domain.
*/
Coord d2rdx2 ;
/**
* \f$1/R^2 \times [ 1/\sin(\theta)\times \partial /\partial\theta'
* (\sin\theta \partial R /\partial\theta') + 1/\sin^2\theta
* \partial^2 R /\partial{\varphi'}^2] \f$ in the nucleus
* and in the non-compactified shells; \\
* \f$- 1/U^2 \times [ 1/\sin(\theta)\times \partial /\partial\theta'
* (\sin\theta \partial U /\partial\theta') + 1/\sin^2\theta
* \partial^2 U /\partial{\varphi'}^2] \f$ in the
* compactified outer domain.
*/
Coord lapr_tp ;
/**
* \f$\partial^2 R/\partial\xi\partial\theta'\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-\partial^2 U/\partial\xi\partial\theta'\f$ in the
* compactified outer domain.
*/
Coord d2rdtdx ;
/**
* \f$1/\sin\theta \times \partial^2 R/\partial\xi\partial\varphi'\f$
* in the nucleus and in the non-compactified shells; \\
* \f$-1/\sin\theta \times \partial^2 U/\partial\xi\partial\varphi' \f$
* in the compactified outer domain.
*/
Coord sstd2rdpdx ;
/**
* \f$1/R^2 \partial^2 R/\partial{\theta'}^2\f$ in the nucleus
* and in the non-compactified shells; \\
* \f$-1/U^2 \partial^2 U/\partial{\theta'}^2\f$ in the
* compactified outer domain.
*/
Coord sr2d2rdt2 ;
// Constructors, destructor :
// ------------------------
protected:
/// Constructor from a grid (protected to make \c Map_radial an abstract class)
Map_radial(const Mg3d& mgrid ) ;
Map_radial(const Map_radial& mp) ; ///< Copy constructor
Map_radial (const Mg3d&, FILE* ) ; ///< Constructor from a file (see \c sauve(FILE* ) )
public:
virtual ~Map_radial() ; ///< Destructor
// Memory management
// -----------------
protected:
virtual void reset_coord() ; ///< Resets all the member \c Coords
// Modification of the mapping
// ---------------------------
public:
/// Assignment to an affine mapping.
virtual void operator=(const Map_af& ) = 0 ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ; ///< Save in a file
// Extraction of information
// -------------------------
/** Returns the value of the radial coordinate \e r for a given
* \f$\xi\f$ and a given collocation point in \f$(\theta', \phi')\f$
* in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param j [input] index of the collocation point in \f$\theta'\f$
* @param k [input] index of the collocation point in \f$\phi'\f$
* @return value of \f$r=R_l(\xi, {\theta'}_j, {\phi'}_k)\f$
*/
virtual double val_r_jk(int l, double xi, int j, int k) const = 0 ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point of arbitrary \e r but collocation values of \f$(\theta, \phi)\f$
* @param rr [input] value of \e r
* @param j [input] index of the collocation point in \f$\theta\f$
* @param k [input] index of the collocation point in \f$\phi\f$
* @param par [input/output] parameters to control the
* accuracy of the computation
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx_jk(double rr, int j, int k, const Param& par,
int& l, double& xi) const = 0 ;
/// Comparison operator (egality)
virtual bool operator==(const Map& ) const = 0;
// Values of a Cmp at the new grid points
// --------------------------------------
/** Recomputes the values of a \c Cmp at the collocation points
* after a change in the mapping.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Cmp previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Cmp
* at the grid points defined by \c *this.
*/
virtual void reevaluate(const Map* mp_prev, int nzet, Cmp& uu) const ;
/** Recomputes the values of a \c Cmp at the collocation points
* after a change in the mapping.
* Case where the \c Cmp is symmetric with respect to the plane y=0.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Cmp previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Cmp
* at the grid points defined by \c *this.
*/
virtual void reevaluate_symy(const Map* mp_prev, int nzet, Cmp& uu)
const ;
/** Recomputes the values of a \c Scalar at the collocation points
* after a change in the mapping.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Scalar previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Scalar
* at the grid points defined by \c *this.
*/
virtual void reevaluate(const Map* mp_prev, int nzet, Scalar& uu) const ;
/** Recomputes the values of a \c Scalar at the collocation points
* after a change in the mapping.
* Case where the \c Scalar is symmetric with respect to the plane y=0.
* @param mp_prev [input] Previous value of the mapping.
* @param nzet [input] Number of domains where the computation
* must be done: the computation is performed for the domains
* of index \f$0\le {\tt l} \le {\tt nzet-1}\f$; \c uu is set
* to zero in the other domains.
* @param uu [input/output] input : \c Scalar previously computed on
* the mapping \c *mp_prev ; ouput :
* values of (logically) the same \c Scalar
* at the grid points defined by \c *this.
*/
virtual void reevaluate_symy(const Map* mp_prev, int nzet, Scalar& uu)
const ;
// Various linear operators
// ------------------------
public:
/** Multiplication by \e r of a \c Scalar, the \c dzpuis
* of \c uu is not changed.
*/
virtual void mult_r(Scalar& uu) const ;
/** Multiplication by \e r of a \c Cmp. In the CED,
* there is only a decrement of \c dzpuis
*/
virtual void mult_r(Cmp& ci) const ;
/**
* Multiplication by \e r (in the compactified external domain only)
* of a \c Scalar
*/
virtual void mult_r_zec(Scalar& ) const ;
/** Multiplication by \f$r\sin\theta\f$ of a \c Scalar
*/
virtual void mult_rsint(Scalar& ) const ;
/** Division by \f$r\sin\theta\f$ of a \c Scalar
*/
virtual void div_rsint(Scalar& ) const ;
/** Division by \e r of a \c Scalar
*/
virtual void div_r(Scalar& ) const ;
/** Division by \e r (in the compactified external domain only)
* of a \c Scalar
*/
virtual void div_r_zec(Scalar& ) const ;
/** Multiplication by \f$\cos\theta\f$ of a \c Scalar
*/
virtual void mult_cost(Scalar& ) const ;
/** Division by \f$\cos\theta\f$ of a \c Scalar
*/
virtual void div_cost(Scalar& ) const ;
/** Multiplication by \f$\sin\theta\f$ of a \c Scalar
*/
virtual void mult_sint(Scalar& ) const ;
/** Division by \f$\sin\theta\f$ of a \c Scalar
*/
virtual void div_sint(Scalar& ) const ;
/** Division by \f$\tan\theta\f$ of a \c Scalar
*/
virtual void div_tant(Scalar& ) const ;
/** Computes the Cartesian x component (with respect to
* \c bvect_cart) of a vector given
* by its spherical components with respect to \c bvect_spher.
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_phi [input] \f$\phi\f$-component of the vector
* @param v_x [output] x-component of the vector
*/
virtual void comp_x_from_spherical(const Scalar& v_r, const Scalar& v_theta,
const Scalar& v_phi, Scalar& v_x) const ;
/// \c Cmp version
virtual void comp_x_from_spherical(const Cmp& v_r, const Cmp& v_theta,
const Cmp& v_phi, Cmp& v_x) const ;
/** Computes the Cartesian y component (with respect to
* \c bvect_cart ) of a vector given
* by its spherical components with respect to \c bvect_spher .
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_phi [input] \f$\phi\f$-component of the vector
* @param v_y [output] y-component of the vector
*/
virtual void comp_y_from_spherical(const Scalar& v_r, const Scalar& v_theta,
const Scalar& v_phi, Scalar& v_y) const ;
/// \c Cmp version
virtual void comp_y_from_spherical(const Cmp& v_r, const Cmp& v_theta,
const Cmp& v_phi, Cmp& v_y) const ;
/** Computes the Cartesian z component (with respect to
* \c bvect_cart ) of a vector given
* by its spherical components with respect to \c bvect_spher .
*
* @param v_r [input] \e r -component of the vector
* @param v_theta [input] \f$\theta\f$-component of the vector
* @param v_z [output] z-component of the vector
*/
virtual void comp_z_from_spherical(const Scalar& v_r, const Scalar& v_theta,
Scalar& v_z) const ;
/// \c Cmp version
virtual void comp_z_from_spherical(const Cmp& v_r, const Cmp& v_theta,
Cmp& v_z) const ;
/** Computes the Spherical r component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_z [input] z-component of the vector
* @param v_r [output] \e r -component of the vector
*/
virtual void comp_r_from_cartesian(const Scalar& v_x, const Scalar& v_y,
const Scalar& v_z, Scalar& v_r) const ;
/// \c Cmp version
virtual void comp_r_from_cartesian(const Cmp& v_x, const Cmp& v_y,
const Cmp& v_z, Cmp& v_r) const ;
/** Computes the Spherical \f$\theta\f$ component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_z [input] z-component of the vector
* @param v_t [output] \f$\theta\f$-component of the vector
*/
virtual void comp_t_from_cartesian(const Scalar& v_x, const Scalar& v_y,
const Scalar& v_z, Scalar& v_t) const ;
/// \c Cmp version
virtual void comp_t_from_cartesian(const Cmp& v_x, const Cmp& v_y,
const Cmp& v_z, Cmp& v_t) const ;
/** Computes the Spherical \f$\phi\f$ component (with respect to
* \c bvect_spher ) of a vector given
* by its cartesian components with respect to \c bvect_cart .
*
* @param v_x [input] x-component of the vector
* @param v_y [input] y-component of the vector
* @param v_p [output] \f$\phi\f$-component of the vector
*/
virtual void comp_p_from_cartesian(const Scalar& v_x, const Scalar& v_y,
Scalar& v_p) const ;
/// \c Cmp version
virtual void comp_p_from_cartesian(const Cmp& v_x, const Cmp& v_y,
Cmp& v_p) const ;
/**
* Decreases by 1 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void dec_dzpuis(Scalar& ) const ;
/**
* Decreases by 2 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void dec2_dzpuis(Scalar& ) const ;
/**
* Increases by 1 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void inc_dzpuis(Scalar& ) const ;
/**
* Increases by 2 the value of \c dzpuis of a \c Scalar
* and changes accordingly its values in the
* compactified external domain (CED).
*/
virtual void inc2_dzpuis(Scalar& ) const ;
// PDE resolution :
// --------------
public:
/** Resolution of the elliptic equation
* \f$ a \Delta\psi + {\bf b} \cdot \nabla \psi = \sigma\f$
* in the case where the stellar interior is covered by a single domain.
*
* @param source [input] source \f$\sigma\f$ of the above equation
* @param aa [input] factor \e a in the above equation
* @param bb [input] vector \e \b b in the above equation
* @param par [input/output] parameters of the iterative method of
* resolution : \\
* \c par.get_int(0) : [input] maximum number of iterations \\
* \c par.get_double(0) : [input] required precision: the iterative
* method is stopped as soon as the relative difference between
* \f$\psi^J\f$ and \f$\psi^{J-1}\f$ is greater than
* \c par.get_double(0) \\
* \c par.get_double(1) : [input] relaxation parameter \f$\lambda\f$ \\
* \c par.get_int_mod(0) : [output] number of iterations
* actually used to get the solution.
* @param psi [input/output]: input : previously computed value of \f$\psi\f$
* to start the iteration (if nothing is known a priori,
* \c psi must be set to zero);
* output: solution \f$\psi\f$ which satisfies \f$\psi(0)=0\f$.
*/
virtual void poisson_compact(const Cmp& source, const Cmp& aa,
const Tenseur& bb, const Param& par,
Cmp& psi) const ;
/** Resolution of the elliptic equation
* \f$ a \Delta\psi + {\bf b} \cdot \nabla \psi = \sigma\f$
* in the case of a multidomain stellar interior.
*
* @param nzet [input] number of domains covering the stellar interior
* @param source [input] source \f$\sigma\f$ of the above equation
* @param aa [input] factor \e a in the above equation
* @param bb [input] vector \e \b b in the above equation
* @param par [input/output] possible parameters to control the
* resolution of the equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param psi [input/output] solution \f$\psi\f$ which satisfies
* \f$\psi(0)=0\f$.
*/
virtual void poisson_compact(int nzet, const Cmp& source, const Cmp& aa,
const Tenseur& bb, const Param& par,
Cmp& psi) const ;
};
//------------------------------------//
// class Map_af //
//------------------------------------//
/**
* Affine radial mapping. \ingroup (map)
*
* The affine radial mapping is the simplest one between the grid coordinates
* \f$(\xi, \theta', \phi')\f$ and the physical coordinates \f$(r, \theta, \phi)\f$.
* It is defined by \f$\theta=\theta'\f$, \f$\phi=\phi'\f$ and
* \li \f$r=\alpha \xi + \beta\f$, in non-compactified domains,
* \li \f$ u={1\over r} = \alpha \xi + \beta\f$ in the (usually outermost) compactified
* domain,
* where \f$\alpha\f$ and \f$\beta\f$ are constant in each domain.
*
*
*/
class Map_af : public Map_radial {
// Data :
// ----
private:
/// Array (size: \c mg->nzone ) of the values of \f$\alpha\f$ in each domain
double* alpha ;
/// Array (size: \c mg->nzone ) of the values of \f$\beta\f$ in each domain
double* beta ;
// Constructors, destructor :
// ------------------------
public:
/**
* Standard Constructor
* @param mgrille [input] Multi-domain grid on which the mapping is defined
* @param r_limits [input] Array (size: number of domains + 1) of the
* value of \e r at the boundaries of the various
* domains :
* \li \c r_limits[l] : inner boundary of the
* domain no. \c l
* \li \c r_limits[l+1] : outer boundary of the
* domain no. \c l
*/
Map_af(const Mg3d& mgrille, const double* r_limits) ;
/**
* Standard Constructor with Tbl
* @param mgrille [input] Multi-domain grid on which the mapping is defined
* @param r_limits [input] Array (size: number of domains) of the
* value of \e r at the boundaries of the various
* domains :
* \li \c r_limits[l] : inner boundary of the
* domain no. \c l
* \li \c r_limits[l+1] : outer boundary of the
* domain no. \c l except in the last domain
* The last boundary is set to inifnity if the grid contains a compactified domain.
*/
Map_af(const Mg3d& mgrille, const Tbl& r_limits) ;
Map_af(const Map_af& ) ; ///< Copy constructor
Map_af(const Mg3d&, FILE* ) ; ///< Constructor from a file (see \c sauve(FILE*) )
/** Constructor from a general mapping.
*
* If the input mapping belongs to the class \c Map_af , this
* constructor does the same job as the copy constructor
* \c Map_af(const \c Map_af& \c ) .
*
* If the input mapping belongs to the class \c Map_et , this
* constructor sets in each domain, the values of
* \f$\alpha\f$ and \f$\beta\f$ to those of the \c Map_et .
*
*/
explicit Map_af(const Map& ) ;
virtual ~Map_af() ; ///< Destructor
// Assignment
// ----------
public:
/// Assignment to another affine mapping.
virtual void operator=(const Map_af& ) ;
// Memory management
// -----------------
private:
/// Assignment of the building functions to the member \c Coords
void set_coord() ;
// Extraction of information
// -------------------------
public:
/// Returns the pointer on the array \c alpha
const double* get_alpha() const ;
/// Returns the pointer on the array \c beta
const double* get_beta() const ;
/** Returns the "angular" mapping for the outside of domain \c l_zone.
* Valid only for the class \c Map_af.
*/
virtual const Map_af& mp_angu(int) const ;
/**
* Returns the value of the radial coordinate \e r for a given
* \f$(\xi, \theta', \phi')\f$ in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param theta [input] value of \f$\theta'\f$
* @param pphi [input] value of \f$\phi'\f$
* @return value of \f$r=R_l(\xi, \theta', \phi')\f$
*/
virtual double val_r(int l, double xi, double theta, double pphi) const ;
/**
* Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
int& l, double& xi) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param par [] unused by the \c Map_af version
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
const Param& par, int& l, double& xi) const ;
/** Returns the value of the radial coordinate \e r for a given
* \f$\xi\f$ and a given collocation point in \f$(\theta', \phi')\f$
* in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param j [input] index of the collocation point in \f$\theta'\f$
* @param k [input] index of the collocation point in \f$\phi'\f$
* @return value of \f$r=R_l(\xi, {\theta'}_j, {\phi'}_k)\f$
*/
virtual double val_r_jk(int l, double xi, int j, int k) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point of arbitrary \e r but collocation values of \f$(\theta, \phi)\f$
* @param rr [input] value of \e r
* @param j [input] index of the collocation point in \f$\theta\f$
* @param k [input] index of the collocation point in \f$\phi\f$
* @param par [] unused by the \c Map_af version
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx_jk(double rr, int j, int k, const Param& par,
int& l, double& xi) const ;
/// Comparison operator (egality)
virtual bool operator==(const Map& ) const ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ; ///< Save in a file
private:
virtual ostream& operator>>(ostream &) const ; ///< Operator >>
// Modification of the mapping
// ---------------------------
public:
/** Sets a new radial scale.
* @param lambda [input] factor by which the value of \e r is to
* be multiplied
*/
virtual void homothetie(double lambda) ;
/** Rescales the outer boundary of one domain.
* The inner boundary is unchanged. The inner boundary
* of the next domain is changed to match the new outer
* boundary.
* @param l [input] index of the domain
* @param lambda [input] factor by which the value of
* \f$R(\theta, \varphi)\f$ defining the outer boundary
* of the domain is to be multiplied.
*/
virtual void resize(int l, double lambda) ;
/** Sets a new radial scale at the bondary between the nucleus and the
* first shell.
* @param lambda [input] factor by which the value of \e r is to
* be multiplied
*/
void homothetie_interne(double lambda) ;
/** Adaptation of the mapping to a given scalar field.
*/
virtual void adapt(const Cmp& ent, const Param& par, int nbr=0) ;
/// Modifies the value of \f$\alpha\f$ in domain no. \e l
void set_alpha(double alpha0, int l) ;
/// Modifies the value of \f$\beta\f$ in domain no. \e l
void set_beta(double beta0, int l) ;
// Differential operators:
// ----------------------
public:
/** Computes \f$\partial/ \partial \xi\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = \xi^2 \partial/ \partial \xi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = r^2 \partial/ \partial r\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$1/u \partial/ \partial \theta = r \partial/ \partial \theta\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$1/(u\sin\theta) \partial/ \partial \phi =
* r/\sin\theta \partial/ \partial \phi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial \xi\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdradial(const Scalar&, Scalar&) const ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial \theta\f$ of a \c Scalar.
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$1/\sin\theta \partial/ \partial \varphi\f$ of a \c Scalar.
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
/** Computes the Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar )
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param zec_mult_r [input] Determines the quantity computed in
* the compactified external domain (CED) : \\
* zec_mult_r = 0 : \f$\Delta u\f$ \\
* zec_mult_r = 2 : \f$r^2 \, \Delta u\f$ \\
* zec_mult_r = 4 (default) : \f$r^4 \, \Delta u\f$
* @param lap [output] Laplacian of \e u
*/
virtual void laplacien(const Scalar& uu, int zec_mult_r,
Scalar& lap) const ;
/// Computes the Laplacian of a scalar field (\c Cmp version).
virtual void laplacien(const Cmp& uu, int zec_mult_r,
Cmp& lap) const ;
/** Computes the angular Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar)
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param lap [output] Angular Laplacian of \e u (see documentation
* of \c Scalar
*/
virtual void lapang(const Scalar& uu, Scalar& lap) const ;
/** Computes the radial primitive which vanishes for \f$r\to \infty\f$.
* i.e. the function
* \f$ F(r,\theta,\varphi) = \int_r^\infty f(r',\theta,\varphi) \, dr' \f$
*
* @param uu [input] function \e f (must have a \c dzpuis = 2)
* @param resu [input] function \e F
* @param null_infty if true (default), the primitive is null
* at infinity (or on the grid boundary). \e F is null at the
* center otherwise
*/
virtual void primr(const Scalar& uu, Scalar& resu,
bool null_infty) const ;
/** Computes the integral over all space of a \c Cmp.
* The computed quantity is
* \f$\int u \, r^2 \sin\theta \, dr\, d\theta \, d\phi\f$.
* The routine allocates a \c Tbl (size: \c mg->nzone ) to store
* the result (partial integral) in each domain and returns a pointer
* to it.
*/
virtual Tbl* integrale(const Cmp&) const ;
// PDE resolution :
// --------------
public:
/** Computes the solution of a scalar Poisson equation.
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param par [] not used by this \c Map_af version.
* @param uu [output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
/** Computes the solution of a scalar Poisson equation using a Tau method.
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param par [] not used by this \c Map_af version.
* @param uu [output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
int k_falloff) const ;
virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& pot,
int nylm, double* intvec) const ;
/** Computes the solution of a scalar Poisson equation.
* The regularized source
* \f$\sigma_{\rm regu} = \sigma - \sigma_{\rm div}\f$
* is constructed and solved.
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param k_div [input] regularization degree of the procedure
* @param nzet [input] number of domains covering the star
* @param unsgam1 [input] parameter \f$1/(\gamma-1)\f$ where \f$\gamma\f$
* denotes the adiabatic index.
* @param par [] not used by this \c Map_af version.
* @param uu [output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
* @param uu_regu [output] solution of the regular part of
* the source.
* @param uu_div [output] solution of the diverging part of
* the source.
* @param duu_div [output] derivative of the diverging potential
* @param source_regu [output] regularized source
* @param source_div [output] diverging part of the source
*/
virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
double unsgam1, Param& par, Cmp& uu,
Cmp& uu_regu, Cmp& uu_div,
Tenseur& duu_div, Cmp& source_regu,
Cmp& source_div) const ;
/** Computes the solution of the generalized angular Poisson equation.
* The generalized angular Poisson equation is
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$,
* where \f$\Delta_{\theta\varphi} u := \frac{\partial^2 u}
* {\partial \theta^2} + \frac{1}{\tan \theta} \frac{\partial u}
* {\partial \theta} +\frac{1}{\sin^2 \theta}\frac{\partial^2 u}
* {\partial \varphi^2}\f$.
*
* @param source [input] source \f$\sigma\f$ of the equation
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u
* @param lambda [input] coefficient \f$\lambda\f$ in the above equation
* (default value = 0)
*/
virtual void poisson_angu(const Scalar& source, Param& par,
Scalar& uu, double lambda=0) const ;
/**
* Internal function intended to be used by \c Map::poisson_vect
* and \c Map::poisson_vect_oohara . It constructs the sets of
* parameters used for each scalar Poisson equation from the one for
* the vectorial one.
*
* In the case of a \c Map_af the result is not used and the function
* only returns \c & \c par .
*/
virtual Param* donne_para_poisson_vect (Param& par, int i) const ;
/**
* Solver of the Poisson equation with boundary condition for the
* affine mapping case.
*/
virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;
/**
* Solver of the Poisson equation with boundary condition for the
* affine mapping case, cases with boundary conditions of both
* Dirichlet and Neumann type (no condition imposed at infinity).
*/
virtual void poisson_frontiere_double (const Cmp& source, const Valeur& lim_func,
const Valeur& lim_der, int num_zone, Cmp& pot) const ;
/**
* Computes the solution of a Poisson equation in the shell,
* imposing a boundary condition at the surface of the star
*
* @param source [input] : source of the equation.
* @param limite [input] : \c limite[num_front] contains the angular
* function being the boudary condition.
* @param par [input] : parameters of the computation.
* @param pot [output] : result.
*/
virtual void poisson_interne (const Cmp& source, const Valeur& limite,
Param& par, Cmp& pot) const ;
/**
* Performs the surface integration of \c ci on the sphere of
* radius \c rayon .
*/
double integrale_surface (const Cmp& ci, double rayon) const ;
/**
* Performs the surface integration of \c ci on the sphere of
* radius \c rayon .
*/
double integrale_surface (const Scalar& ci, double rayon) const ;
double integrale_surface_falloff (const Cmp& ci) const ;
/**
* Performs the surface integration of \c ci at infinity.
* \c ci must have \c dzpuis =2.
*/
double integrale_surface_infini (const Cmp& ci) const ;
/**
* Performs the surface integration of \c ci at infinity.
* \c ci must have \c dzpuis =2.
*/
double integrale_surface_infini (const Scalar& ci) const ;
/**
* General elliptic solver. The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
**/
void sol_elliptic (Param_elliptic& params,
const Scalar& so, Scalar& uu) const ;
/**
* General elliptic solver including inner boundary conditions.
* The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
* @param bound [input] : the boundary condition
* @param fact_dir : 1 Dirchlet condition, 0 Neumann condition
* @param fact_neu : 0 Dirchlet condition, 1 Neumann condition
**/
void sol_elliptic_boundary (Param_elliptic& params,
const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
double fact_dir, double fact_neu ) const ;
/**
* General elliptic solver including inner boundary conditions, with
* boundary given as a Scalar on mono-domain angular grid
**/
void sol_elliptic_boundary (Param_elliptic& params,
const Scalar& so, Scalar& uu, const Scalar& bound,
double fact_dir, double fact_neu ) const ;
/**
* General elliptic solver.
* The equation is not solved in the compactified domain.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
* @param val [input] : value at the last shell.
**/
void sol_elliptic_no_zec (Param_elliptic& params,
const Scalar& so, Scalar& uu, double val) const ;
/**
* General elliptic solver.
* The equation is solved only in the compactified domain.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
* @param val [input] : value at the inner boundary.
**/
void sol_elliptic_only_zec (Param_elliptic& params,
const Scalar& so, Scalar& uu, double val) const ;
/**
* General elliptic solver.
* The equation is not solved in the compactified domain and the
* matching is done with an homogeneous solution.
**/
void sol_elliptic_sin_zec (Param_elliptic& params,
const Scalar& so, Scalar& uu,
double* coefs, double*) const ;
/**
* General elliptic solver fixing the derivative at the origin
* and relaxing the continuity of the first derivative at the
* boundary between the nucleus and the first shell.
*
* @param val [input] : valeur of the derivative.
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
**/
void sol_elliptic_fixe_der_zero (double val,
Param_elliptic& params,
const Scalar& so, Scalar& uu) const ;
/** Computes the solution of a 2-D Poisson equation.
* The 2-D Poisson equation writes
* \f[
* {\partial^2 u\over\partial r^2} +
* {1\over r} {\partial u \over \partial r} +
* {1\over r^2} {\partial^2 u\over\partial \theta^2} =
* \sigma \ .
* \f]
*
* @param source_mat [input] Compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* matter terms)
* @param source_quad [input] Non-compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* quadratic terms)
* @param par [output] Parameter which contains the constant
* \f$\lambda\f$ used to fulfill the virial
* identity GRV2 : \\
* \c par.get_double_mod(0) : [output] constant \c lambda
* such that the source of the equation effectively solved
* is \c source_mat + \c lambda * \c source_quad .
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
Param& par, Cmp& uu) const ;
/**
* General elliptic solver in a 2D case. The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
**/
void sol_elliptic_2d(Param_elliptic&,
const Scalar&, Scalar&) const ;
/**
* General elliptic solver in a pseudo 1d case. The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
**/
void sol_elliptic_pseudo_1d(Param_elliptic&,
const Scalar&, Scalar&) const ;
/** Performs one time-step integration of the d'Alembert scalar equation
* @param par [input/output] possible parameters to control the
* resolution of the d'Alembert equation: \\
* \c par.get_double(0) : [input] the time step \e dt ,\\
* \c par.get_int(0) : [input] the type of boundary conditions
* set at the outer boundary (0 : reflexion, 1 : Sommerfeld
* outgoing wave, valid only for \e l=0 components, 2 : Bayliss
* & Turkel outgoing wave, valid for \e l=0, 1, 2 components)\\
* \c par.get_int_mod(0) : [input/output] set to 0 at first
* call, is used as a working flag after (must not be modified after
* first call)\\
* \c par.get_int(1) : [input] (optional) if present, a shift of
* -1 is done in the multipolar spectrum in terms of \f$\ell\f$.
* The value of this variable gives the minimal value of (the shifted)
* \f$\ell\f$ for which the wave equation is solved.\\
* \c par.get_tensor_mod(0) : [input] (optional) if the wave
* equation is on a curved space-time, this is the potential in front
* of the Laplace operator. It has to be updated at every time-step
* (for a potential depending on time).\\
* Note: there are many other working objects attached to this
* \c Param , so one should not modify it.
* @param fJp1 [output] solution \f$f^{J+1}\f$ at time \e J+1
* with boundary conditions defined by \c par.get_int(0)
* @param fJ [input] solution \f$f^J\f$ at time \e J
* @param fJm1 [input] solution \f$f^{J-1}\f$ at time \e J-1
* @param source [input] source \f$\sigma\f$ of the d'Alembert equation
* \f$\diamond u = \sigma\f$.
*/
virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
const Scalar& fJm1, const Scalar& source) const ;
// Building functions for the Coord's
// ----------------------------------
friend Mtbl* map_af_fait_r(const Map* ) ;
friend Mtbl* map_af_fait_tet(const Map* ) ;
friend Mtbl* map_af_fait_phi(const Map* ) ;
friend Mtbl* map_af_fait_sint(const Map* ) ;
friend Mtbl* map_af_fait_cost(const Map* ) ;
friend Mtbl* map_af_fait_sinp(const Map* ) ;
friend Mtbl* map_af_fait_cosp(const Map* ) ;
friend Mtbl* map_af_fait_x(const Map* ) ;
friend Mtbl* map_af_fait_y(const Map* ) ;
friend Mtbl* map_af_fait_z(const Map* ) ;
friend Mtbl* map_af_fait_xa(const Map* ) ;
friend Mtbl* map_af_fait_ya(const Map* ) ;
friend Mtbl* map_af_fait_za(const Map* ) ;
friend Mtbl* map_af_fait_xsr(const Map* ) ;
friend Mtbl* map_af_fait_dxdr(const Map* ) ;
friend Mtbl* map_af_fait_drdt(const Map* ) ;
friend Mtbl* map_af_fait_stdrdp(const Map* ) ;
friend Mtbl* map_af_fait_srdrdt(const Map* ) ;
friend Mtbl* map_af_fait_srstdrdp(const Map* ) ;
friend Mtbl* map_af_fait_sr2drdt(const Map* ) ;
friend Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
friend Mtbl* map_af_fait_d2rdx2(const Map* ) ;
friend Mtbl* map_af_fait_lapr_tp(const Map* ) ;
friend Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
friend Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
friend Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
};
Mtbl* map_af_fait_r(const Map* ) ;
Mtbl* map_af_fait_tet(const Map* ) ;
Mtbl* map_af_fait_phi(const Map* ) ;
Mtbl* map_af_fait_sint(const Map* ) ;
Mtbl* map_af_fait_cost(const Map* ) ;
Mtbl* map_af_fait_sinp(const Map* ) ;
Mtbl* map_af_fait_cosp(const Map* ) ;
Mtbl* map_af_fait_x(const Map* ) ;
Mtbl* map_af_fait_y(const Map* ) ;
Mtbl* map_af_fait_z(const Map* ) ;
Mtbl* map_af_fait_xa(const Map* ) ;
Mtbl* map_af_fait_ya(const Map* ) ;
Mtbl* map_af_fait_za(const Map* ) ;
Mtbl* map_af_fait_xsr(const Map* ) ;
Mtbl* map_af_fait_dxdr(const Map* ) ;
Mtbl* map_af_fait_drdt(const Map* ) ;
Mtbl* map_af_fait_stdrdp(const Map* ) ;
Mtbl* map_af_fait_srdrdt(const Map* ) ;
Mtbl* map_af_fait_srstdrdp(const Map* ) ;
Mtbl* map_af_fait_sr2drdt(const Map* ) ;
Mtbl* map_af_fait_sr2stdrdp(const Map* ) ;
Mtbl* map_af_fait_d2rdx2(const Map* ) ;
Mtbl* map_af_fait_lapr_tp(const Map* ) ;
Mtbl* map_af_fait_d2rdtdx(const Map* ) ;
Mtbl* map_af_fait_sstd2rdpdx(const Map* ) ;
Mtbl* map_af_fait_sr2d2rdt2(const Map* ) ;
//------------------------------------//
// class Map_et //
//------------------------------------//
/**
* Radial mapping of rather general form. \ingroup (map)
*
* This mapping relates the grid coordinates
* \f$(\xi, \theta', \phi')\f$ and the physical coordinates \f$(r, \theta, \phi)\f$
* in the following manner [see Bonazzola, Gourgoulhon & Marck,
* \e Phys. \e Rev. \e D \b 58 , 104020 (1998) for details]:
* \f$\theta=\theta'\f$, \f$\phi=\phi'\f$ and
* \li \f$r = \alpha [\xi + A(\xi) F(\theta', \phi') + B(\xi) G(\theta', \phi')]
* + \beta\f$ in non-compactified domains,
* \li \f$ u={1\over r} = \alpha [\xi + A(\xi) F(\theta', \phi')] + \beta\f$ in
* the (usually outermost) compactified domain,
* where \f$\alpha\f$ and \f$\beta\f$ are constant in each domain, \f$A(\xi)\f$ and
* \f$B(\xi)\f$ are constant polynomials defined by
* \li \f$A(\xi) = 3 \xi^4 - 2 \xi^6\f$ and
* \f$B(\xi) = (5\xi^3 - 3\xi^5)/2\f$ in the nucleus (innermost domain
* which contains \e r =0);
* \li \f$A(\xi) = (\xi^3 - 3\xi + 2)/4\f$ and
* \f$B(\xi) = (-\xi^3 + 3\xi +2)/4\f$ in the other domains.
* The functions \f$F(\theta', \phi')\f$ and \f$G(\theta', \phi')\f$ depend on the
* domain under consideration and define the boundaries of this domain.
*
*
*/
class Map_et : public Map_radial {
// Data :
// ----
private:
/// Array (size: \c mg->nzone ) of the values of \f$\alpha\f$ in each domain
double* alpha ;
/// Array (size: \c mg->nzone ) of the values of \f$\beta\f$ in each domain
double* beta ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$A(\xi)\f$ in each domain
*/
Tbl** aa ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$A'(\xi)\f$ in each domain
*/
Tbl** daa ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$A''(\xi)\f$ in each domain
*/
Tbl** ddaa ;
/// Values at the \c nr collocation points of \f$A(\xi)/\xi\f$ in the nucleus
Tbl aasx ;
/// Values at the \c nr collocation points of \f$A(\xi)/\xi^2\f$ in the nucleus
Tbl aasx2 ;
/** Values at the \c nr collocation points of \f$A(\xi)/(\xi-1)\f$
* in the outermost compactified domain
*/
Tbl zaasx ;
/** Values at the \c nr collocation points of \f$A(\xi)/(\xi-1)^2\f$
* in the outermost compactified domain
*/
Tbl zaasx2 ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$B(\xi)\f$ in each domain
*/
Tbl** bb ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$B'(\xi)\f$ in each domain
*/
Tbl** dbb ;
/** Array (size: \c mg->nzone ) of \c Tbl which stores the
* values of \f$B''(\xi)\f$ in each domain
*/
Tbl** ddbb ;
/// Values at the \c nr collocation points of \f$B(\xi)/\xi\f$ in the nucleus
Tbl bbsx ;
/// Values at the \c nr collocation points of \f$B(\xi)/\xi^2\f$ in the nucleus
Tbl bbsx2 ;
/** Values of the function \f$F(\theta', \phi')\f$ at the \c nt*np
* angular collocation points in each domain.
* The \c Valeur \c ff is defined on the multi-grid \c mg->g_angu
* (cf. class \c Mg3d ).
*/
Valeur ff ;
/** Values of the function \f$G(\theta', \phi')\f$ at the \c nt*np
* angular collocation points in each domain.
* The \c Valeur \c gg is defined on the multi-grid \c mg->g_angu
* (cf. class \c Mg3d ).
*/
Valeur gg ;
public:
/** \f$1/(\partial R/\partial \xi) R/\xi\f$ in the nucleus; \\
* \f$1/(\partial R/\partial \xi) R/(\xi + \beta/\alpha)\f$ in the shells; \\
* \f$1/(\partial U/\partial \xi) U/(\xi-1)\f$ in the outermost
* compactified domain.
*/
Coord rsxdxdr ;
/** \f$[ R/ (\alpha \xi + \beta) ]^2 (\partial R/\partial \xi) / \alpha\f$
* in the nucleus and the shells; \\
* \f$\partial U/\partial \xi / \alpha\f$ in the outermost compactified
* domain.
*/
Coord rsx2drdx ;
// Constructors, destructor :
// ------------------------
public:
/**
* Standard Constructor
* @param mgrille [input] Multi-domain grid on which the mapping is defined
* @param r_limits [input] Array (size: number of domains + 1) of the
* value of \e r at the boundaries of the various
* domains :
* \li \c r_limits[l] : inner boundary of the
* domain no. \c l
* \li \c r_limits[l+1] : outer boundary of the
* domain no. \c l
*/
Map_et(const Mg3d& mgrille, const double* r_limits) ;
/**
* Constructor using the equation of the surface of the star.
* @param mgrille [input] Multi-domain grid on which the mapping is defined
* It must contains at least one shell.
* @param r_limits [input] Array (size: number of domains + 1) of the
* value of \e r at the boundaries of the various
* domains :
* \li \c r_limits[l] : inner boundary of the
* domain no. \c l
* \li \c r_limits[l+1] : outer boundary of the
* domain no. \c l
* The first value is not used.
* @param tab [input] equation of the surface between the nucleus and the first
* shell in the form : \f${\rm tab}(k,j) = r(\phi_k,\theta_j)\f$, where
* \f$\phi_k\f$ and \f$\theta_j\f$ are the values of the angular colocation points.
*/
Map_et(const Mg3d& mgrille, const double* r_limits,const Tbl& tab);
Map_et(const Map_et& ) ; ///< Copy constructor
Map_et(const Mg3d&, FILE* ) ; ///< Constructor from a file (see \c sauve(FILE*) )
virtual ~Map_et() ; ///< Destructor
// Assignment
// ----------
public:
/// Assignment to another \c Map_et
virtual void operator=(const Map_et& mp) ;
/// Assignment to an affine mapping.
virtual void operator=(const Map_af& mpa) ;
/// Assigns a given value to the function \f$F(\theta',\phi')\f$
void set_ff(const Valeur& ) ;
/// Assigns a given value to the function \f$G(\theta',\phi')\f$
void set_gg(const Valeur& ) ;
// Memory management
// -----------------
private:
/// Assignement of the building functions to the member \c Coords
void set_coord() ;
protected:
/// Resets all the member \c Coords
virtual void reset_coord() ;
private:
/// Construction of the polynomials \f$A(\xi)\f$ and \f$B(\xi)\f$
void fait_poly() ;
// Extraction of information
// -------------------------
public:
/** Returns the "angular" mapping for the outside of domain \c l_zone.
* Valid only for the class \c Map_af.
*/
virtual const Map_af& mp_angu(int) const ;
/** Returns a pointer on the array \c alpha (values of \f$\alpha\f$
* in each domain)
*/
const double* get_alpha() const ;
/** Returns a pointer on the array \c beta (values of \f$\beta\f$
* in each domain)
*/
const double* get_beta() const ;
/// Returns a (constant) reference to the function \f$F(\theta',\phi')\f$
const Valeur& get_ff() const ;
/// Returns a (constant) reference to the function \f$G(\theta',\phi')\f$
const Valeur& get_gg() const ;
/**
* Returns the value of the radial coordinate \e r for a given
* \f$(\xi, \theta', \phi')\f$ in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param theta [input] value of \f$\theta'\f$
* @param pphi [input] value of \f$\phi'\f$
* @return value of \f$r=R_l(\xi, \theta', \phi')\f$
*/
virtual double val_r(int l, double xi, double theta, double pphi) const ;
/**
* Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
int& l, double& xi) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* This version enables to pass some parameters to control the
* accuracy of the computation.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param par [input/output] parameters to control the
* accuracy of the computation: \\
* \c par.get_int(0) : [input] maximum number of iterations in the
* secant method to locate \f$\xi\f$ \\
* \c par.get_int_mod(0) : [output] effective number of iterations
* used \\
* \c par.get_double(0) : [input] absolute precision in the secant
* method to locate \f$\xi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx(double rr, double theta, double pphi,
const Param& par, int& l, double& xi) const ;
/// Comparison operator (egality)
virtual bool operator==(const Map& ) const ;
/** Returns the value of the radial coordinate \e r for a given
* \f$\xi\f$ and a given collocation point in \f$(\theta', \phi')\f$
* in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param j [input] index of the collocation point in \f$\theta'\f$
* @param k [input] index of the collocation point in \f$\phi'\f$
* @return value of \f$r=R_l(\xi, {\theta'}_j, {\phi'}_k)\f$
*/
virtual double val_r_jk(int l, double xi, int j, int k) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point of arbitrary \e r but collocation values of \f$(\theta, \phi)\f$
* @param rr [input] value of \e r
* @param j [input] index of the collocation point in \f$\theta\f$
* @param k [input] index of the collocation point in \f$\phi\f$
* @param par [input/output] parameters to control the
* accuracy of the computation: \\
* \c par.get_int(0) : [input] maximum number of iterations in the
* secant method to locate \f$\xi\f$ \\
* \c par.get_int_mod(0) : [output] effective number of iterations
* used \\
* \c par.get_double(0) : [input] absolute precision in the secant
* method to locate \f$\xi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx_jk(double rr, int j, int k, const Param& par,
int& l, double& xi) const ;
// Outputs
// -------
public:
virtual void sauve(FILE* ) const ; ///< Save in a file
private:
virtual ostream& operator>>(ostream &) const ; ///< Operator >>
// Modification of the radial scale
// --------------------------------
public:
/** Sets a new radial scale.
* @param lambda [input] factor by which the value of \e r is to
* be multiplied
*/
virtual void homothetie(double lambda) ;
/** Rescales the outer boundary of one domain.
* The inner boundary is unchanged. The inner boundary
* of the next domain is changed to match the new outer
* boundary.
* @param l [input] index of the domain
* @param lambda [input] factor by which the value of
* \f$R(\theta, \varphi)\f$ defining the outer boundary
* of the domain is to be multiplied.
*/
virtual void resize(int l, double lambda) ;
/** Rescales the outer boundary of the outermost domain
* in the case of non-compactified external domain.
* The inner boundary is unchanged.
* @param lambda [input] factor by which the value of the radius
* of the outermost domain is to be multiplied.
*/
void resize_extr(double lambda) ;
/// Modifies the value of \f$\alpha\f$ in domain no. \e l
void set_alpha(double alpha0, int l) ;
/// Modifies the value of \f$\beta\f$ in domain no. \e l
void set_beta(double beta0, int l) ;
// Modification of the mapping
// ---------------------------
/** Adaptation of the mapping to a given scalar field.
* Computes the functions \f$F(\theta',\phi')\f$ and \f$G(\theta',\phi')\f$
* as well as the factors \f$\alpha\f$ and \f$\beta\f$, so that the
* boundaries of some domains coincide with isosurfaces of the
* scalar field \c ent .
* @param ent [input] scalar field, the isosurfaces of which are
* used to determine the mapping
* @param par [input/output] parameters of the computation: \\
* \c par.get_int(0) : maximum number of iterations to locate
* zeros by the secant method \\
* \c par.get_int(1) : number of domains where the adjustment
* to the isosurfaces of \c ent is to be performed \\
* \c par.get_int(2) : number of domains \c nz_search where
* the isosurfaces will be searched : the routine scans the
* \c nz_search innermost domains, starting from the domain
* of index \c nz_search-1 . NB: the field \c ent must
* be continuous over these domains \\
* \c par.get_int(3) : 1 = performs the full computation,
* 0 = performs only the rescaling
* by the factor
* \c par.get_double_mod(0) \\
* \c par.get_int(4) : theta index of the collocation point
* \f$(\theta_*, \phi_*)\f$ [using the notations
* of Bonazzola, Gourgoulhon & Marck, \e Phys. \e Rev. \e D \b 58 ,
* 104020 (1998)] defining an isosurface of \c ent \\
* \c par.get_int(5) : phi index of the collocation point
* \f$(\theta_*, \phi_*)\f$ [using the notations
* of Bonazzola, Gourgoulhon & Marck, \e Phys. \e Rev. \e D \b 58 ,
* 104020 (1998)] defining an isosurface of \c ent \\
* \c par.get_int_mod(0) [output] : number of iterations
* actually used in the secant method \\
* \c par.get_double(0) : required absolute precision in the
* determination of zeros by the secant method \\
* \c par.get_double(1) : factor by which the values of \f$\lambda\f$
* and \f$\mu\f$ [using the notations
* of Bonazzola, Gourgoulhon & Marck, \e Phys. \e Rev. \e D \b 58 ,
* 104020 (1998)] will be multiplied : 1 = regular mapping,
* 0 = contracting mapping \\
* \c par.get_double(2) : factor by which all the radial distances
* will be multiplied \\
* \c par.get_tbl(0) : array of values of the field \c ent to
* define the isosurfaces.
* @param nbr\_filtre [input] Number of the last coefficients in \f$\varphi\f$ set to zero.
*/
virtual void adapt(const Cmp& ent, const Param& par, int nbr_filtre = 0) ;
// Differential operators:
// ----------------------
public:
/** Computes \f$\partial/ \partial \xi\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = \xi^2 \partial/ \partial \xi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdxi(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = r^2 \partial/ \partial r\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdr(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$1/u \partial/ \partial \theta = r \partial/ \partial \theta\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srdsdt(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Cmp.
* Note that in the compactified external domain (CED), it computes
* \f$1/(u\sin\theta) \partial/ \partial \phi =
* r/\sin\theta \partial/ \partial \phi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void srstdsdp(const Cmp& ci, Cmp& resu) const ;
/** Computes \f$\partial/ \partial \xi\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdxi(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdr(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar if the description is affine and
* \f$\partial/ \partial \ln r\f$ if it is logarithmic.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdradial(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$1/r \partial/ \partial \theta\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srdsdt(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$1/(r\sin\theta) \partial/ \partial \phi\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void srstdsdp(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$\partial/ \partial \theta\f$ of a \c Scalar.
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void dsdt(const Scalar& uu, Scalar& resu) const ;
/** Computes \f$1/\sin\theta \partial/ \partial \varphi\f$ of a \c Scalar.
* @param uu [input] scalar field
* @param resu [output] derivative of \c uu
*/
virtual void stdsdp(const Scalar& uu, Scalar& resu) const ;
/** Computes the Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar )
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param zec_mult_r [input] Determines the quantity computed in
* the compactified external domain (CED) : \\
* zec_mult_r = 0 : \f$\Delta u\f$ \\
* zec_mult_r = 2 : \f$r^2 \, \Delta u\f$ \\
* zec_mult_r = 4 (default) : \f$r^4 \, \Delta u\f$
* @param lap [output] Laplacian of \e u
*/
virtual void laplacien(const Scalar& uu, int zec_mult_r,
Scalar& lap) const ;
/// Computes the Laplacian of a scalar field (\c Cmp version).
virtual void laplacien(const Cmp& uu, int zec_mult_r,
Cmp& lap) const ;
/** Computes the angular Laplacian of a scalar field.
* @param uu [input] Scalar field \e u (represented as a \c Scalar)
* the Laplacian \f$\Delta u\f$ of which is to be computed
* @param lap [output] Angular Laplacian of \e u (see documentation
* of \c Scalar
*/
virtual void lapang(const Scalar& uu, Scalar& lap) const ;
/** Computes the radial primitive which vanishes for \f$r\to \infty\f$.
* i.e. the function
* \f$ F(r,\theta,\varphi) = \int_r^\infty f(r',\theta,\varphi) \, dr' \f$
*
* @param uu [input] function \e f (must have a \c dzpuis = 2)
* @param resu [input] function \e F
* @param null_infty if true (default), the primitive is null
* at infinity (or on the grid boundary). \e F is null at the
* center otherwise
*/
virtual void primr(const Scalar& uu, Scalar& resu,
bool null_infty) const ;
/** Computes the integral over all space of a \c Cmp.
* The computed quantity is
* \f$\int u \, r^2 \sin\theta \, dr\, d\theta \, d\phi\f$.
* The routine allocates a \c Tbl (size: \c mg->nzone ) to store
* the result (partial integral) in each domain and returns a pointer
* to it.
*/
virtual Tbl* integrale(const Cmp&) const ;
// PDE resolution :
// --------------
public:
/** Computes the solution of a scalar Poisson equation.
*
* Following the method explained in Sect. III.C of Bonazzola,
* Gourgoulhon & Marck, \e Phys. \e Rev. \e D \b 58 , 104020 (1998),
* the Poisson equation \f$\Delta u = \sigma\f$ is re-written
* as \f$a \tilde\Delta u = \sigma + R(u)\f$, where \f$\tilde\Delta\f$
* is the Laplacian in an affine mapping and \e R(u) contains the
* terms generated by the deviation of the mapping \c *this
* from spherical symmetry. This equation is solved by iterations.
* At each step \e J the equation effectively solved is
* \f$\tilde\Delta u^{J+1} = s^J\f$ where
* \f[
* s^J = 1/a_l^{\rm max} \{ {\tt source} + R(u^J) + (a_l^{\rm max}-a)
* [ \lambda s^{J-1} + (1-\lambda) s^{J-2} ] \} \ ,
* \f]
* with \f$a_l^{\rm max} := \max(a)\f$ in domain no. \e l and \f$\lambda\f$
* is a relaxation parameter.
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* @param par [input/output] parameters for the iterative method: \\
* \c par.get_int(0) : [input] maximum number of iterations \\
* \c par.get_double(0) : [input] relaxation parameter \f$\lambda\f$ \\
* \c par.get_double(1) : [input] required precision: the iterative
* method is stopped as soon as the relative difference between
* \f$u^J\f$ and \f$u^{J-1}\f$ is greater than \c par.get_double(1) \\
* \c par.get_cmp_mod(0) : [input/output] input : \c Cmp
* containing \f$s^{J-1}\f$ (cf. the above equation) to
* start the iteration (if nothing is known a priori,
* this \c Cmp must be set to zero); output: value
* of \f$s^{J-1}\f$, to used in a next call to the routine \\
* \c par.get_int_mod(0) : [output] number of iterations
* actually used to get the solution.
*
* @param uu [input/output] input : previously computed value of \e u
* to start the iteration (term \e R(u) ) (if nothing is known a
* priori, \c uu must be set to zero); output: solution \e u
* with the boundary condition \e u =0 at spatial infinity.
*/
virtual void poisson(const Cmp& source, Param& par, Cmp& uu) const ;
/** Computes the solution of a scalar Poisson equation with a Tau method.
*
* Following the method explained in Sect. III.C of Bonazzola,
* Gourgoulhon & Marck, \e Phys. \e Rev. \e D \b 58 , 104020 (1998),
* the Poisson equation \f$\Delta u = \sigma\f$ is re-written
* as \f$a \tilde\Delta u = \sigma + R(u)\f$, where \f$\tilde\Delta\f$
* is the Laplacian in an affine mapping and \e R(u) contains the
* terms generated by the deviation of the mapping \c *this
* from spherical symmetry. This equation is solved by iterations.
* At each step \e J the equation effectively solved is
* \f$\tilde\Delta u^{J+1} = s^J\f$ where
* \f[
* s^J = 1/a_l^{\rm max} \{ {\tt source} + R(u^J) + (a_l^{\rm max}-a)
* [ \lambda s^{J-1} + (1-\lambda) s^{J-2} ] \} \ ,
* \f]
* with \f$a_l^{\rm max} := \max(a)\f$ in domain no. \e l and \f$\lambda\f$
* is a relaxation parameter.
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* @param par [input/output] parameters for the iterative method: \\
* \c par.get_int(0) : [input] maximum number of iterations \\
* \c par.get_double(0) : [input] relaxation parameter \f$\lambda\f$ \\
* \c par.get_double(1) : [input] required precision: the iterative
* method is stopped as soon as the relative difference between
* \f$u^J\f$ and \f$u^{J-1}\f$ is greater than \c par.get_double(1) \\
* \c par.get_cmp_mod(0) : [input/output] input : \c Cmp
* containing \f$s^{J-1}\f$ (cf. the above equation) to
* start the iteration (if nothing is known a priori,
* this \c Cmp must be set to zero); output: value
* of \f$s^{J-1}\f$, to used in a next call to the routine \\
* \c par.get_int_mod(0) : [output] number of iterations
* actually used to get the solution.
*
* @param uu [input/output] input : previously computed value of \e u
* to start the iteration (term \e R(u) ) (if nothing is known a
* priori, \c uu must be set to zero); output: solution \e u
* with the boundary condition \e u =0 at spatial infinity.
*/
virtual void poisson_tau(const Cmp& source, Param& par, Cmp& uu) const ;
virtual void poisson_falloff(const Cmp& source, Param& par, Cmp& uu,
int k_falloff) const ;
virtual void poisson_ylm(const Cmp& source, Param& par, Cmp& uu,
int nylm, double* intvec) const ;
/** Computes the solution of a scalar Poisson equation.
* The regularized source
* @param source [input] source \f$\sigma\f$ of the Poisson equation
* \f$\Delta u = \sigma\f$.
* @param k_div [input] regularization degree of the procedure
* @param nzet [input] number of domains covering the star
* @param unsgam1 [input] parameter \f$1/(\gamma-1)\f$ where \f$\gamma\f$
* denotes the adiabatic index.
* @param par [input/output] parameters for the iterative method: \\
* \c par.get_int(0) : [input] maximum number of iterations \\
* \c par.get_double(0) : [input] relaxation parameter
* \f$\lambda\f$ \\
* \c par.get_double(1) : [input] required precision: the
* iterative method is stopped as soon as the relative
* difference between \f$u^J\f$ and \f$u^{J-1}\f$ is greater than
* \c par.get_double(1) \\
* \c par.get_cmp_mod(0) : [input/output] input : \c Cmp
* containing \f$s^{J-1}\f$ (cf. the above equation) to
* start the iteration (if nothing is known a priori,
* this \c Cmp must be set to zero); output: value
* of \f$s^{J-1}\f$, to used in a next call to the routine \\
* \c par.get_int_mod(0) : [output] number of iterations
* actually used to get the solution.
* @param uu [input/output] input : previously computed value of \e u
* to start the iteration (term \e R(u) ) (if nothing is known a
* priori, \c uu must be set to zero); output: solution \e u
* with the boundary condition \e u =0 at spatial infinity.
* @param uu_regu [output] solution of the regular part of
* the source.
* @param uu_div [output] solution of the diverging part of
* the source.
* @param duu_div [output] derivative of the diverging potential
* @param source_regu [output] regularized source
* @param source_div [output] diverging part of the source
*/
virtual void poisson_regular(const Cmp& source, int k_div, int nzet,
double unsgam1, Param& par, Cmp& uu,
Cmp& uu_regu, Cmp& uu_div,
Tenseur& duu_div, Cmp& source_regu,
Cmp& source_div) const ;
/** Computes the solution of the generalized angular Poisson equation.
* The generalized angular Poisson equation is
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$,
* where \f$\Delta_{\theta\varphi} u := \frac{\partial^2 u}
* {\partial \theta^2} + \frac{1}{\tan \theta} \frac{\partial u}
* {\partial \theta} +\frac{1}{\sin^2 \theta}\frac{\partial^2 u}
* {\partial \varphi^2}\f$.
*
* @param source [input] source \f$\sigma\f$ of the equation
* \f$\Delta_{\theta\varphi} u + \lambda u = \sigma\f$.
* @param par [input/output] possible parameters to control the
* resolution of the Poisson equation. See the actual implementation
* in the derived class of \c Map for documentation.
* @param uu [input/output] solution \e u
* @param lambda [input] coefficient \f$\lambda\f$ in the above equation
* (default value = 0)
*/
virtual void poisson_angu(const Scalar& source, Param& par,
Scalar& uu, double lambda=0) const ;
/**
* Internal function intended to be used by \c Map::poisson_vect
* and \c Map::poisson_vect_oohara . It constructs the sets of
* parameters used for each scalar Poisson equation from the one for
* the vectorial one.
*
* @param para [input] : the \c Param used for the resolution of
* the vectorial Poisson equation : \\
* \c para.int() maximum number of iteration.\\
* \c para.double(0) relaxation parameter.\\
* \c para.double(1) required precision. \\
* \c para.tenseur_mod() source of the vectorial part at the previous
* step.\\
* \c para.cmp_mod() source of the scalar part at the previous
* step.
*
* @param i [input] number of the scalar Poisson equation that is being
* solved (values from 0 to 2 for the componants of the vectorial part
* and 3 for the scalar one).
*
* @return the pointer on the parameter set used for solving the scalar
* Poisson equation labelled by \e i .
*/
virtual Param* donne_para_poisson_vect (Param& para, int i) const ;
/**
* Not yet implemented.
*/
virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int,
Cmp&, double = 0., double = 0.) const ;
virtual void poisson_frontiere_double (const Cmp& source,
const Valeur& lim_func, const Valeur& lim_der,
int num_zone, Cmp& pot) const ;
/**
* Computes the solution of a Poisson equation in the shell .
* imposing a boundary condition at the surface of the star
*
* @param source [input] : source of the equation.
* @param limite [input] : \c limite[num_front] contains the angular
* function being the boudary condition.
* @param par [input] : parameters of the computation.
* @param pot [output] : result.
*/
virtual void poisson_interne (const Cmp& source, const Valeur& limite,
Param& par, Cmp& pot) const ;
/** Computes the solution of a 2-D Poisson equation.
* The 2-D Poisson equation writes
* \f[
* {\partial^2 u\over\partial r^2} +
* {1\over r} {\partial u \over \partial r} +
* {1\over r^2} {\partial^2 u\over\partial \theta^2} =
* \sigma \ .
* \f]
*
* @param source_mat [input] Compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* matter terms)
* @param source_quad [input] Non-compactly supported part of
* the source \f$\sigma\f$ of the 2-D Poisson equation (typically
* quadratic terms)
* @param par [input/output] Parameters to control the resolution : \\
* \c par.get_double_mod(0) : [output] constant \c lambda
* such that the source of the equation effectively solved
* is \c source_mat + lambda * source_quad , in order to
* fulfill the virial identity GRV2. \\
* If the theta basis is \c T_SIN_I , the following arguments
* are required: \\
* \c par.get_int(0) : [input] maximum number of iterations \\
* \c par.get_double(0) : [input] relaxation parameter \\
* \c par.get_double(1) : [input] required precision: the iterative
* method is stopped as soon as the relative difference between
* \f$u^J\f$ and \f$u^{J-1}\f$ is greater than \c par.get_double(1) \\
* \c par.get_cmp_mod(0) : [input/output] input : \c Cmp
* containing \f$s^{J-1}\f$ to
* start the iteration (if nothing is known a priori,
* this \c Cmp must be set to zero); output: value
* of \f$s^{J-1}\f$, to used in a next call to the routine \\
* \c par.get_int_mod(0) : [output] number of iterations
* actually used to get the solution.
*
* @param uu [input/output] solution \e u with the boundary condition
* \e u =0 at spatial infinity.
*/
virtual void poisson2d(const Cmp& source_mat, const Cmp& source_quad,
Param& par, Cmp& uu) const ;
/**
* Not yet implemented.
*/
virtual void dalembert(Param& par, Scalar& fJp1, const Scalar& fJ,
const Scalar& fJm1, const Scalar& source) const ;
// Building functions for the Coord's
// ----------------------------------
friend Mtbl* map_et_fait_r(const Map* ) ;
friend Mtbl* map_et_fait_tet(const Map* ) ;
friend Mtbl* map_et_fait_phi(const Map* ) ;
friend Mtbl* map_et_fait_sint(const Map* ) ;
friend Mtbl* map_et_fait_cost(const Map* ) ;
friend Mtbl* map_et_fait_sinp(const Map* ) ;
friend Mtbl* map_et_fait_cosp(const Map* ) ;
friend Mtbl* map_et_fait_x(const Map* ) ;
friend Mtbl* map_et_fait_y(const Map* ) ;
friend Mtbl* map_et_fait_z(const Map* ) ;
friend Mtbl* map_et_fait_xa(const Map* ) ;
friend Mtbl* map_et_fait_ya(const Map* ) ;
friend Mtbl* map_et_fait_za(const Map* ) ;
friend Mtbl* map_et_fait_xsr(const Map* ) ;
friend Mtbl* map_et_fait_dxdr(const Map* ) ;
friend Mtbl* map_et_fait_drdt(const Map* ) ;
friend Mtbl* map_et_fait_stdrdp(const Map* ) ;
friend Mtbl* map_et_fait_srdrdt(const Map* ) ;
friend Mtbl* map_et_fait_srstdrdp(const Map* ) ;
friend Mtbl* map_et_fait_sr2drdt(const Map* ) ;
friend Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
friend Mtbl* map_et_fait_d2rdx2(const Map* ) ;
friend Mtbl* map_et_fait_lapr_tp(const Map* ) ;
friend Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
friend Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
friend Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
friend Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
friend Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
};
Mtbl* map_et_fait_r(const Map* ) ;
Mtbl* map_et_fait_tet(const Map* ) ;
Mtbl* map_et_fait_phi(const Map* ) ;
Mtbl* map_et_fait_sint(const Map* ) ;
Mtbl* map_et_fait_cost(const Map* ) ;
Mtbl* map_et_fait_sinp(const Map* ) ;
Mtbl* map_et_fait_cosp(const Map* ) ;
Mtbl* map_et_fait_x(const Map* ) ;
Mtbl* map_et_fait_y(const Map* ) ;
Mtbl* map_et_fait_z(const Map* ) ;
Mtbl* map_et_fait_xa(const Map* ) ;
Mtbl* map_et_fait_ya(const Map* ) ;
Mtbl* map_et_fait_za(const Map* ) ;
Mtbl* map_et_fait_xsr(const Map* ) ;
Mtbl* map_et_fait_dxdr(const Map* ) ;
Mtbl* map_et_fait_drdt(const Map* ) ;
Mtbl* map_et_fait_stdrdp(const Map* ) ;
Mtbl* map_et_fait_srdrdt(const Map* ) ;
Mtbl* map_et_fait_srstdrdp(const Map* ) ;
Mtbl* map_et_fait_sr2drdt(const Map* ) ;
Mtbl* map_et_fait_sr2stdrdp(const Map* ) ;
Mtbl* map_et_fait_d2rdx2(const Map* ) ;
Mtbl* map_et_fait_lapr_tp(const Map* ) ;
Mtbl* map_et_fait_d2rdtdx(const Map* ) ;
Mtbl* map_et_fait_sstd2rdpdx(const Map* ) ;
Mtbl* map_et_fait_sr2d2rdt2(const Map* ) ;
Mtbl* map_et_fait_rsxdxdr(const Map* ) ;
Mtbl* map_et_fait_rsx2drdx(const Map* ) ;
//------------------------------------//
// class Map_log //
//------------------------------------//
#define AFFINE 0
#define LOG 1
/**
* Logarithmic radial mapping. \ingroup (map)
*
* This mapping is a variation of the affine one.
*
* In each domain the description can be either affine (cf. Map_af documentation) or
* logarithmic. In that case (implemented only in the shells) we have
*
* \li \f$\ln r=\alpha \xi + \beta\f$,
* where \f$\alpha\f$ and \f$\beta\f$ are constant in each domain.
*
*
*/
class Map_log : public Map_radial {
// Data :
// ----
private:
/// Array (size: \c mg->nzone ) of the values of \f$\alpha\f$ in each domain
Tbl alpha ;
/// Array (size: \c mg->nzone ) of the values of \f$\beta\f$ in each domain
Tbl beta ;
/** Array (size: \c mg->nzone ) of the type of variable in each domain.
* The possibles types are AFFINE and LOG.
**/
Itbl type_var ;
public:
/**
* Same as dxdr if the domains where the description is affine and
* \f$ \partial x / \partial \ln r\f$ where it is logarithmic.
*/
Coord dxdlnr ;
private:
void set_coord() ;
// Constructors, destructor :
// ------------------------
public:
/**
* Standard Constructor
* @param mgrille [input] Multi-domain grid on which the mapping is defined
* @param r_limits [input] Tbl (size: number of domains + 1) of the
* value of \e r at the boundaries of the various
* domains :
* \li \c r_limits[l] : inner boundary of the
* domain no. \c l
* \li \c r_limits[l+1] : outer boundary of the
* domain no. \c l
* @param type_var [input] Array (size: number of domains) defining the type f mapping in each domain.
*/
Map_log (const Mg3d& mgrille, const Tbl& r_limits, const Itbl& typevar) ;
Map_log (const Map_log& ) ; ///< Copy constructor
Map_log (const Mg3d&, FILE* ) ; ///< Constructor from a file (see \c sauve(FILE*)
virtual ~Map_log() ; ///< Destructor
/** Returns the "angular" mapping for the outside of domain \c l_zone.
* Valid only for the class \c Map_af.
*/
virtual const Map_af& mp_angu(int) const ;
/// Returns \f$\alpha\f$ in the domain \c l
double get_alpha (int l) const {return alpha(l) ;} ;
/// Returns \f$\beta\f$ in the domain \c l
double get_beta (int l) const {return beta(l) ;} ;
/// Returns the type of description in the domain \c l
int get_type (int l) const {return type_var(l) ;} ;
/**
* General elliptic solver. The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
**/
void sol_elliptic (Param_elliptic& params,
const Scalar& so, Scalar& uu) const ;
/**
* General elliptic solver including inner boundary conditions.
* The field is zero at infinity.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
* @param bound [input] : the boundary condition
* @param fact_dir : 1 Dirchlet condition, 0 Neumann condition
* @param fact_neu : 0 Dirchlet condition, 1 Neumann condition
**/
void sol_elliptic_boundary (Param_elliptic& params,
const Scalar& so, Scalar& uu, const Mtbl_cf& bound,
double fact_dir, double fact_neu ) const ;
/** General elliptic solver including inner boundary conditions, the bound being
* given as a Scalar on a mono-domain angular grid.
**/
void sol_elliptic_boundary (Param_elliptic& params,
const Scalar& so, Scalar& uu, const Scalar& bound,
double fact_dir, double fact_neu ) const ;
/**
* General elliptic solver.
* The equation is not solved in the compactified domain.
*
* @param params [input] : the operators and variables to be uses.
* @param so [input] : the source.
* @param uu [output] : the solution.
* @param val [input] : value at the last shell.
**/
void sol_elliptic_no_zec (Param_elliptic& params,
const Scalar& so, Scalar& uu, double) const ;
virtual void sauve(FILE*) const ; ///< Save in a file
/// Assignment to an affine mapping.
virtual void operator=(const Map_af& mpa) ;
virtual ostream& operator>> (ostream&) const ; ///< Operator >>
/**
* Returns the value of the radial coordinate \e r for a given
* \f$(\xi, \theta', \phi')\f$ in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param theta [input] value of \f$\theta'\f$
* @param pphi [input] value of \f$\phi'\f$
* @return value of \f$r=R_l(\xi, \theta', \phi')\f$
*/
virtual double val_r (int l, double xi, double theta, double pphi) const ;
/**
* Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx (double rr, double theta, double pphi, int& l, double& xi) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point given by its physical coordinates \f$(r, \theta, \phi)\f$.
* @param rr [input] value of \e r
* @param theta [input] value of \f$\theta\f$
* @param pphi [input] value of \f$\phi\f$
* @param par [] unused by the \c Map_af version
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx (double rr, double theta, double pphi, const Param& par, int& l, double& xi) const ;
virtual bool operator== (const Map&) const ; /// < Comparison operator
/** Returns the value of the radial coordinate \e r for a given
* \f$\xi\f$ and a given collocation point in \f$(\theta', \phi')\f$
* in a given domain.
* @param l [input] index of the domain
* @param xi [input] value of \f$\xi\f$
* @param j [input] index of the collocation point in \f$\theta'\f$
* @param k [input] index of the collocation point in \f$\phi'\f$
* @return value of \f$r=R_l(\xi, {\theta'}_j, {\phi'}_k)\f$
*/
virtual double val_r_jk (int l, double xi, int j, int k) const ;
/** Computes the domain index \e l and the value of \f$\xi\f$ corresponding
* to a point of arbitrary \e r but collocation values of \f$(\theta, \phi)\f$
* @param rr [input] value of \e r
* @param j [input] index of the collocation point in \f$\theta\f$
* @param k [input] index of the collocation point in \f$\phi\f$
* @param par [] unused by the \c Map_af version
* @param l [output] value of the domain index
* @param xi [output] value of \f$\xi\f$
*/
virtual void val_lx_jk (double rr, int j, int k, const Param& par, int& l, double& xi) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = r^2 \partial/ \partial r\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdr (const Scalar& ci, Scalar& resu) const ;
/** Computes \f$\partial/ \partial \xi\f$ of a \c Scalar.
* Note that in the compactified external domain (CED), it computes
* \f$-\partial/ \partial u = \xi^2 \partial/ \partial \xi\f$.
* @param ci [input] field to consider
* @param resu [output] derivative of \c ci
*/
virtual void dsdxi (const Scalar& ci, Scalar& resu) const ;
/** Computes \f$\partial/ \partial r\f$ of a \c Scalar if the description is affine and
* \f$\partial/ \partial \ln r\f$ if it is logarithmic.
* Note that in the compactified external domain (CED), the \c dzpuis
* flag of the output is 2 if the input has \c dzpuis = 0, and
* is increased by 1 in other cases.
* @param uu [input] field to consider
* @param resu [output] derivative of \c uu
*/
virtual void dsdradial (const Scalar& uu, Scalar& resu) const ;
virtual void homothetie (double) ; /// < Not implemented
virtual void resize (int, double) ;/// < Not implemented
virtual void adapt (const Cmp&, const Param&, int) ;/// < Not implemented
virtual void dsdr (const Cmp&, Cmp&) const ;/// < Not implemented
virtual void dsdxi (const Cmp&, Cmp&) const ;/// < Not implemented
virtual void srdsdt (const Cmp&, Cmp&) const ;/// < Not implemented
virtual void srstdsdp (const Cmp&, Cmp&) const ;/// < Not implemented
virtual void srdsdt (const Scalar&, Scalar&) const ;/// < Not implemented
virtual void srstdsdp (const Scalar&, Scalar&) const ;/// < Not implemented
virtual void dsdt (const Scalar&, Scalar&) const ;/// < Not implemented
virtual void stdsdp (const Scalar&, Scalar&) const ;/// < Not implemented
virtual void laplacien (const Scalar&, int, Scalar&) const ;/// < Not implemented
virtual void laplacien (const Cmp&, int, Cmp&) const ;/// < Not implemented
virtual void lapang (const Scalar&, Scalar&) const ;/// < Not implemented
virtual void primr(const Scalar&, Scalar&, bool) const ;/// < Not implemented
virtual Tbl* integrale (const Cmp&) const ;/// < Not implemented
virtual void poisson (const Cmp&, Param&, Cmp&) const ;/// < Not implemented
virtual void poisson_tau (const Cmp&, Param&, Cmp&) const ;/// < Not implemented
virtual void poisson_falloff(const Cmp&, Param&, Cmp&, int) const ;/// < Not implemented
virtual void poisson_ylm(const Cmp&, Param&, Cmp&, int, double*) const ;/// < Not implemented
virtual void poisson_regular (const Cmp&, int, int, double, Param&, Cmp&, Cmp&, Cmp&,
Tenseur&, Cmp&, Cmp&) const ;/// < Not implemented
virtual void poisson_angu (const Scalar&, Param&, Scalar&, double=0) const ;/// < Not implemented
virtual Param* donne_para_poisson_vect (Param&, int) const ;/// < Not implemented
virtual void poisson_frontiere (const Cmp&, const Valeur&, int, int, Cmp&, double = 0., double = 0.) const ;/// < Not implemented
virtual void poisson_frontiere_double (const Cmp&, const Valeur&, const Valeur&, int, Cmp&) const ;/// < Not implemented
virtual void poisson_interne (const Cmp&, const Valeur&, Param&, Cmp&) const ;/// < Not implemented
virtual void poisson2d (const Cmp&, const Cmp&, Param&, Cmp&) const ;/// < Not implemented
virtual void dalembert (Param&, Scalar&, const Scalar&, const Scalar&, const Scalar&) const ;/// < Not implemented
// Building functions for the Coord's
// ----------------------------------
friend Mtbl* map_log_fait_r(const Map* ) ;
friend Mtbl* map_log_fait_tet(const Map* ) ;
friend Mtbl* map_log_fait_phi(const Map* ) ;
friend Mtbl* map_log_fait_sint(const Map* ) ;
friend Mtbl* map_log_fait_cost(const Map* ) ;
friend Mtbl* map_log_fait_sinp(const Map* ) ;
friend Mtbl* map_log_fait_cosp(const Map* ) ;
friend Mtbl* map_log_fait_x(const Map* ) ;
friend Mtbl* map_log_fait_y(const Map* ) ;
friend Mtbl* map_log_fait_z(const Map* ) ;
friend Mtbl* map_log_fait_xa(const Map* ) ;
friend Mtbl* map_log_fait_ya(const Map* ) ;
friend Mtbl* map_log_fait_za(const Map* ) ;
friend Mtbl* map_log_fait_xsr(const Map* ) ;
friend Mtbl* map_log_fait_dxdr(const Map* ) ;
friend Mtbl* map_log_fait_drdt(const Map* ) ;
friend Mtbl* map_log_fait_stdrdp(const Map* ) ;
friend Mtbl* map_log_fait_srdrdt(const Map* ) ;
friend Mtbl* map_log_fait_srstdrdp(const Map* ) ;
friend Mtbl* map_log_fait_sr2drdt(const Map* ) ;
friend Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
friend Mtbl* map_log_fait_d2rdx2(const Map* ) ;
friend Mtbl* map_log_fait_lapr_tp(const Map* ) ;
friend Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
friend Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
friend Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
friend Mtbl* map_log_fait_dxdlnr(const Map* ) ;
};
Mtbl* map_log_fait_r(const Map* ) ;
Mtbl* map_log_fait_tet(const Map* ) ;
Mtbl* map_log_fait_phi(const Map* ) ;
Mtbl* map_log_fait_sint(const Map* ) ;
Mtbl* map_log_fait_cost(const Map* ) ;
Mtbl* map_log_fait_sinp(const Map* ) ;
Mtbl* map_log_fait_cosp(const Map* ) ;
Mtbl* map_log_fait_x(const Map* ) ;
Mtbl* map_log_fait_y(const Map* ) ;
Mtbl* map_log_fait_z(const Map* ) ;
Mtbl* map_log_fait_xa(const Map* ) ;
Mtbl* map_log_fait_ya(const Map* ) ;
Mtbl* map_log_fait_za(const Map* ) ;
Mtbl* map_log_fait_xsr(const Map* ) ;
Mtbl* map_log_fait_dxdr(const Map* ) ;
Mtbl* map_log_fait_drdt(const Map* ) ;
Mtbl* map_log_fait_stdrdp(const Map* ) ;
Mtbl* map_log_fait_srdrdt(const Map* ) ;
Mtbl* map_log_fait_srstdrdp(const Map* ) ;
Mtbl* map_log_fait_sr2drdt(const Map* ) ;
Mtbl* map_log_fait_sr2stdrdp(const Map* ) ;
Mtbl* map_log_fait_d2rdx2(const Map* ) ;
Mtbl* map_log_fait_lapr_tp(const Map* ) ;
Mtbl* map_log_fait_d2rdtdx(const Map* ) ;
Mtbl* map_log_fait_sstd2rdpdx(const Map* ) ;
Mtbl* map_log_fait_sr2d2rdt2(const Map* ) ;
Mtbl* map_log_fait_dxdlnr (const Map*) ;
}
#endif
|