--- /srv/reproducible-results/rbuild-debian/r-b-build.RkUrBWsX/b1/dune-localfunctions_2.9.0-2_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.RkUrBWsX/b2/dune-localfunctions_2.9.0-2_amd64.changes ├── Files │ @@ -1,3 +1,3 @@ │ │ 34db63be240b2e1d3335c0aa875d4f76 123744 libdevel optional libdune-localfunctions-dev_2.9.0-2_amd64.deb │ - 79bebb3df13e9ff200dc64883b1e1a67 4999800 doc optional libdune-localfunctions-doc_2.9.0-2_all.deb │ + 2bc0a47d9b7099697429bd65ce1cf14b 4995268 doc optional libdune-localfunctions-doc_2.9.0-2_all.deb ├── libdune-localfunctions-doc_2.9.0-2_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2023-01-12 22:15:36.000000 debian-binary │ │ --rw-r--r-- 0 0 0 34600 2023-01-12 22:15:36.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 4965008 2023-01-12 22:15:36.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 34640 2023-01-12 22:15:36.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 4960436 2023-01-12 22:15:36.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ │ │ │ ├── line order │ │ │ │ │ @@ -5,18 +5,26 @@ │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00005.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00011_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00014_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00017_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00020.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00020_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00023.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00023_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00029.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00029_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00032_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00035.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00035_source.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00038.html │ │ │ │ │ +usr/share/doc/libdune-localfunctions-doc/doxygen/a00038_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00041_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00044_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00047_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ │ @@ -55,18 +63,14 @@ │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00098_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00101_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00104.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00104_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00107.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00107_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00110.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00110_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00113.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00113_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00116_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00119_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00122_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ │ @@ -265,22 +269,18 @@ │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00413_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00416.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00416_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00419_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00422.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00422_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00425.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00425_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00428_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00431_source.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00434.html │ │ │ │ │ -usr/share/doc/libdune-localfunctions-doc/doxygen/a00434_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00437_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00440_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00443_source.html │ │ │ │ │ usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -5,376 +5,376 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 901 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2523 2022-10-20 18:18:11.000000 ./usr/share/doc/libdune-localfunctions-doc/changelog.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2895 2023-01-12 15:07:33.000000 ./usr/share/doc/libdune-localfunctions-doc/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3061 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00002.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3059 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00005.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6548 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 44400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5232 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23868 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3691 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5776 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27028 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5288 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5421 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18599 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7278 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45331 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5966 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30300 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5112 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13287 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21392 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6922 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45375 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5364 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21379 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6740 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119958 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5718 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41175 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5007 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22753 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5297 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12420 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25785 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13745 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5027 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16874 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12405 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3901 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4724 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12770 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15535 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5237 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5162 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9899 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29438 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5034 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00110.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27566 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00110_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6113 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24674 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00113_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10752 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5015 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21493 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5195 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4912 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19133 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6689 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7961 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 80165 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4911 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15970 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5273 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21612 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 29864 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6025 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 37712 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5615 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 67254 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5147 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12107 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6990 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 151840 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5637 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76509 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5593 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 63478 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6316 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 96772 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 101142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5605 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40262 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6075 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21598 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 274916 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 189048 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5667 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 39248 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55095 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20136 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6434 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53845 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5536 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 30828 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5592 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 57998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60168 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5880 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17597 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5214 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 10366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3744 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6044 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5489 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36739 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6239 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23788 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5061 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33501 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5266 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7725 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7043 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27987 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27987 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5630 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102194 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5067 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11639 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11955 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19041 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6230 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13798 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 119945 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 42738 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5642 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 110872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5257 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7700 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5265 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5226 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7674 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4985 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14588 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5062 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7775 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7791 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50578 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5054 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7741 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5247 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7695 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5221 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7727 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13307 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4996 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24190 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5243 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7684 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5715 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 132591 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5256 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7790 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21863 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5193 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21017 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15467 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12353 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5129 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25087 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5189 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 11956 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5624 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53711 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14897 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23995 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6450 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40561 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21550 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21884 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5169 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19436 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5102 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13010 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5158 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 34490 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5182 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24609 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13456 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5176 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 90391 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21031 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5768 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21521 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5104 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15517 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5167 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24423 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12272 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5380 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21828 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5397 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21982 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5388 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21879 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5180 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51963 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21322 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 9091 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 35935 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 45785 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5185 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19289 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13244 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5179 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00416.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 31463 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00416_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5356 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21678 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13542 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 26806 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00425_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 112001 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21879 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00434.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 92562 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00434_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5186 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 25485 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13457 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5117 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5177 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8318 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 60254 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4720 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00455.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 8887 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00455_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5559 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00458.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 61782 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00458_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7329 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 76679 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5511 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22820 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5635 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40032 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4833 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20084 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7727 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53428 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 7817 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 43351 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5014 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18914 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4967 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12218 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6951 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 51494 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4742 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19584 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6401 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15842 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4036 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5073 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5283 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48607 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5204 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23377 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5482 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22236 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5481 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22348 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5460 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5459 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22111 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 33235 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20220 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12594 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6373 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19545 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5137 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12770 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5293 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 49681 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 19690 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5455 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 22139 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5707 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 15528 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13614 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5211 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23936 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5295 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48547 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12553 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5217 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 21160 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5296 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36399 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4173 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5446 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3686 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 6376 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7043 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27987 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27987 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6230 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13798 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33501 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00020_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5715 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 132591 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00023_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5062 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7775 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5221 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7727 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6239 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23788 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00035_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5630 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102194 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00038_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119945 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5257 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7700 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5247 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7695 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5243 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7684 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5642 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 110872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13307 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5256 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7790 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4985 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14588 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5265 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7791 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 50578 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5061 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5266 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7725 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4996 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24190 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19041 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5067 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11639 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11955 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5226 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7674 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5054 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7741 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7362 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 42738 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3744 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6044 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4036 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5073 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10752 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6113 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24674 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6316 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 96772 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5592 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 57998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5536 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30828 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55095 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 189048 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5605 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40262 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6434 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53845 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21598 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 274916 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20136 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 101142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21998 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60168 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5880 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17597 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5667 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 39248 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6075 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5195 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7961 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 80165 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5015 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21493 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21612 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5273 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4911 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15970 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4912 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19133 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6689 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60063 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21884 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5189 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 11956 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7053 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5624 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53711 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5461 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21521 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21879 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5388 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21872 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14897 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12251 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23995 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13244 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5185 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19289 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5179 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 31463 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5389 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21879 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9091 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 35935 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21550 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5356 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21678 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21863 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5397 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21982 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5182 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24609 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5176 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 90391 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13456 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5380 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21828 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 26806 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13542 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 112001 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5181 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21322 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5180 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51963 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5118 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12353 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5016 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15467 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5129 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25087 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5768 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19910 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6450 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40561 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5117 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15589 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5177 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24628 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5186 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25485 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5110 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13457 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5223 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 92562 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6444 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45785 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5158 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 34490 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5169 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19436 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5102 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13010 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5193 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21017 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5098 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12272 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5104 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15517 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5167 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24423 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21031 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5773 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29864 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3901 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4724 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5188 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12770 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6401 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15842 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00344_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13614 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00347_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5295 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48547 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00350_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5211 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23936 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00353_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5455 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22139 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00356_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19690 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00359_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5293 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 49681 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00362_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5137 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12770 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00365_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5204 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23377 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00368_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5283 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48607 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00371_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13126 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00374_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5707 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15528 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00377_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6373 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19545 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00380_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5460 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22085 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00383_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5217 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21160 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00386_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5142 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12553 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00389_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5296 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36399 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00392_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5459 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22111 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00395_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12594 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00398_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5224 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20220 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00401_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5303 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 33235 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00404_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5481 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22348 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00407_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5482 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22236 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00410_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8318 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 60254 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00413_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4720 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00416.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 8887 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00416_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5559 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 61782 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00419_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7727 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53428 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00422_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4833 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20084 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00428_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7329 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76679 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00431_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5635 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40032 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00437_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5511 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22820 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00440_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7817 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 43351 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00443_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4173 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5446 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00446_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5364 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21379 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00449_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5966 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 30300 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00452_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5112 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00455.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13287 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00455_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5310 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00458.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 21392 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00458_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6922 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45375 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00461_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 7278 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 45331 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00464_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6740 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 119958 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00467_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6025 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 37712 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00470_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5232 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23868 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00473_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6548 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 44400 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00476_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3691 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5776 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00479_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3686 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6376 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00482_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5162 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 9899 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00485_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5033 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29438 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00488_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5237 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00491_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 15535 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00494_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5034 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27566 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00497_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4967 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12218 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00500_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5014 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18914 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00503_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6951 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 51494 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00506_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5288 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00509_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5421 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18599 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00512_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5593 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 63478 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00515_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5637 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 76509 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00518_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5615 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 67254 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00521_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6990 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 151840 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00524_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5147 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12107 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00527_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4742 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 19584 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00530_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5108 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12405 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00533_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5198 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 29359 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00536_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5027 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16874 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00539_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5718 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41175 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00542_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5007 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 22753 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00545_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5297 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20462 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00548_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4867 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13745 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00551_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5079 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12420 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00554_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5149 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 25785 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00557_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5489 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36739 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00560_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5214 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 10366 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00563_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 6301 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27028 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00566_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22404 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00569.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9062 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00570.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7360 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00571.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 35668 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00571.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4382 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00572.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5396 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00572.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6390 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00573.html │ │ │ │ @@ -1264,30 +1264,30 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 62202 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04461_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4800 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04464.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12225 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04464_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5569 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04467.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 39808 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04467_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4166 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04470.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13911 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04470_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5547 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5919 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 41305 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5058 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13851 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5184 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 13538 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5345 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36449 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5194 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17793 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18721 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 5298 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 20105 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5345 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36449 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04473_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5194 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17793 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04476_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5212 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18721 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04479_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5298 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 20105 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04482_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5547 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23259 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04485_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5919 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 41305 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04488_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5058 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13851 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04491_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 5184 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 13538 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04494_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 7069 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04497.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 43909 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04497_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5618 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04500.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 18653 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/a04500_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 125994 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/annotated.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 676 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/bc_s.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 635 2023-01-12 22:15:36.000000 ./usr/share/doc/libdune-localfunctions-doc/doxygen/bc_sd.png │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalcompute.hh File Reference │ │ │ │ +dune-localfunctions: pk2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,54 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces | │ │ │ │ -Functions
│ │ │ │ -
orthonormalcompute.hh File Reference
│ │ │ │ +Typedefs
│ │ │ │ +
pk2d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <fstream>
│ │ │ │ -#include <iomanip>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <map>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │ -#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  ONBCompute::Integral< geometryId >
class  Dune::Pk2DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
 
class  ONBCompute::ONBMatrix< geometryId, scalar_t >
struct  Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits
 
struct  Dune::Pk2DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk2DFiniteElement objects. More...
 
│ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  ONBCompute
namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Functions

template<class scalar_t >
scalar_t ONBCompute::factorial (int start, int end)
 

│ │ │ │ +Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 2, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,34 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _o_r_t_h_o_n_o_r_m_a_l │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -orthonormalcompute.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pk2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_<_ _g_e_o_m_e_t_r_y_I_d_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ +  Langrange finite element of arbitrary order on triangles. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ - class   _O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _s_c_a_l_a_r___t_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ +  Factory for _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t objects. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ -namespace   _O_N_B_C_o_m_p_u_t_e │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -scalar_t  _O_N_B_C_o_m_p_u_t_e_:_:_f_a_c_t_o_r_i_a_l (int start, int end) │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_k_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 2, k > │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00011_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalcompute.hh Source File │ │ │ │ +dune-localfunctions: pk2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,270 +70,152 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormalcompute.hh
│ │ │ │ +
pk2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_ORTHONORMALCOMPUTE_HH
│ │ │ │ -
6#define DUNE_ORTHONORMALCOMPUTE_HH
│ │ │ │ +
5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <fstream>
│ │ │ │ -
11#include <iomanip>
│ │ │ │ -
12#include <utility>
│ │ │ │ -
13#include <map>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ -
16
│ │ │ │ -
17#include <dune/geometry/type.hh>
│ │ │ │ -
18
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
│ │ │ │ -
24namespace ONBCompute
│ │ │ │ -
25{
│ │ │ │ -
26
│ │ │ │ -
27 template< class scalar_t >
│ │ │ │ -
│ │ │ │ -
28 scalar_t factorial( int start, int end )
│ │ │ │ -
29 {
│ │ │ │ -
30 scalar_t ret( 1 );
│ │ │ │ -
31 for( int j = start; j <= end; ++j )
│ │ │ │ -
32 ret *= scalar_t( j );
│ │ │ │ -
33 return ret;
│ │ │ │ -
34 }
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
36
│ │ │ │ -
37
│ │ │ │ -
38 // Integral
│ │ │ │ -
39 // --------
│ │ │ │ -
40
│ │ │ │ -
41 template< Dune::GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
42 struct Integral
│ │ │ │ -
43 {
│ │ │ │ -
44 static constexpr Dune::GeometryType geometry = geometryId;
│ │ │ │ -
45 static constexpr int dimension = geometry.dim();
│ │ │ │ -
46
│ │ │ │ -
47 template< int dim, class scalar_t >
│ │ │ │ -
│ │ │ │ -
48 static int compute ( const Dune::MultiIndex< dim, scalar_t > &alpha,
│ │ │ │ -
49 scalar_t &p, scalar_t &q )
│ │ │ │ -
50 {
│ │ │ │ -
51 return compute(alpha, p, q, std::make_integer_sequence<int,dimension>{});
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
54 template< int dim, class scalar_t , int ...ints>
│ │ │ │ -
│ │ │ │ -
55 static int compute ( const Dune::MultiIndex< dim, scalar_t > &alpha,
│ │ │ │ -
56 scalar_t &p, scalar_t &q, std::integer_sequence<int,ints...> intS)
│ │ │ │ -
57 {
│ │ │ │ -
58 p = scalar_t( 1 );
│ │ │ │ -
59 q = scalar_t( 1 );
│ │ │ │ -
60
│ │ │ │ -
61 int ord = 0;
│ │ │ │ -
62 ((computeIntegral<ints>(alpha,p,q,ord)),...);
│ │ │ │ -
63
│ │ │ │ -
64 return ord;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
15
│ │ │ │ +
16#warning This header is deprecated
│ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
20
│ │ │ │ +
25 template<class D, class R, unsigned int k>
│ │ │ │ + │ │ │ │ +
27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
29
│ │ │ │ +
30
│ │ │ │ +
32
│ │ │ │ +
39 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 typedef typename Geometry::ctype DF;
│ │ │ │ +
42 typedef Impl::LagrangeSimplexLocalBasis<DF,RF,2,k> LocalBasis;
│ │ │ │ +
43 typedef Impl::LagrangeSimplexLocalInterpolation<LocalBasis> LocalInterpolation;
│ │ │ │ +
44
│ │ │ │ +
45 public:
│ │ │ │ +
│ │ │ │ +
49 struct Traits {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52 LocalInterpolation,
│ │ │ │ +
53 typename Basis::Traits
│ │ │ │ + │ │ │ │ +
55 typedef Impl::LagrangeSimplexLocalCoefficients<2,k> Coefficients;
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 private:
│ │ │ │ +
59 static const GeometryType gt;
│ │ │ │ +
60 static const LocalBasis localBasis;
│ │ │ │ +
61 static const LocalInterpolation localInterpolation;
│ │ │ │ +
62
│ │ │ │ +
63 typename Traits::Basis basis_;
│ │ │ │ +
64 typename Traits::Interpolation interpolation_;
│ │ │ │ +
65 typename Traits::Coefficients coefficients_;
│ │ │ │
66
│ │ │ │ -
67 template< int step, int dim, class scalar_t >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 scalar_t &p, scalar_t &q, int& ord)
│ │ │ │ -
70 {
│ │ │ │ -
71 int i = alpha.z( step );
│ │ │ │ -
72
│ │ │ │ -
73 if constexpr ( geometry.isPrismatic(step))
│ │ │ │ -
74 {
│ │ │ │ -
75 //p *= scalar_t( 1 );
│ │ │ │ -
76 q *= scalar_t( i+1 );
│ │ │ │ -
77 }
│ │ │ │ -
78 else
│ │ │ │ -
79 {
│ │ │ │ -
80 p *= factorial< scalar_t >( 1, i );
│ │ │ │ -
81 q *= factorial< scalar_t >( step+1 + ord, step+1 + ord + i );
│ │ │ │ -
82 }
│ │ │ │ -
83 ord +=i;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 };
│ │ │ │ +
67 public:
│ │ │ │ +
69
│ │ │ │ +
82 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
83 Pk2DFiniteElement(const Geometry &geometry,
│ │ │ │ +
84 const VertexOrder& vertexOrder) :
│ │ │ │ +
85 basis_(localBasis, geometry), interpolation_(localInterpolation),
│ │ │ │ +
86 coefficients_(vertexOrder.begin(0, 0))
│ │ │ │ +
87 { }
│ │ │ │
│ │ │ │ -
87
│ │ │ │
88
│ │ │ │ -
89 // ONBMatrix
│ │ │ │ -
90 // ---------
│ │ │ │ -
91
│ │ │ │ -
92 template< Dune::GeometryType::Id geometryId, class scalar_t >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
94 : public Dune::LFEMatrix< scalar_t >
│ │ │ │ -
95 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
98
│ │ │ │ -
99 public:
│ │ │ │ -
100 typedef std::vector< scalar_t > vec_t;
│ │ │ │ - │ │ │ │ -
102
│ │ │ │ -
│ │ │ │ -
103 explicit ONBMatrix ( unsigned int order )
│ │ │ │ -
104 {
│ │ │ │ -
105 // get all multiindecies for monomial basis
│ │ │ │ -
106 constexpr Dune::GeometryType geometry = geometryId;
│ │ │ │ -
107 constexpr unsigned int dim = geometry.dim();
│ │ │ │ - │ │ │ │ - │ │ │ │ -
110 const std::size_t size = basis.size();
│ │ │ │ -
111 std::vector< Dune::FieldVector< MI, 1 > > y( size );
│ │ │ │ -
112 Dune::FieldVector< MI, dim > x;
│ │ │ │ -
113 for( unsigned int i = 0; i < dim; ++i )
│ │ │ │ -
114 x[ i ].set( i );
│ │ │ │ -
115 basis.evaluate( x, y );
│ │ │ │ -
116
│ │ │ │ -
117 // set bounds of data
│ │ │ │ -
118 Base::resize( size, size );
│ │ │ │ -
119 S.resize( size, size );
│ │ │ │ -
120 d.resize( size );
│ │ │ │ -
121
│ │ │ │ -
122 // setup matrix for bilinear form x^T S y: S_ij = int_A x^(i+j)
│ │ │ │ -
123 scalar_t p, q;
│ │ │ │ -
124 for( std::size_t i = 0; i < size; ++i )
│ │ │ │ -
125 {
│ │ │ │ -
126 for( std::size_t j = 0; j < size; ++j )
│ │ │ │ -
127 {
│ │ │ │ -
128 Integral< geometryId >::compute( y[ i ][ 0 ] * y[ j ][ 0 ], p, q );
│ │ │ │ -
129 S( i, j ) = p;
│ │ │ │ -
130 S( i, j ) /= q;
│ │ │ │ -
131 }
│ │ │ │ -
132 }
│ │ │ │ -
133
│ │ │ │ -
134 // orthonormalize
│ │ │ │ -
135 gramSchmidt();
│ │ │ │ -
136 }
│ │ │ │ -
│ │ │ │ -
137
│ │ │ │ -
138 template< class Vector >
│ │ │ │ -
│ │ │ │ -
139 void row ( unsigned int row, Vector &vec ) const
│ │ │ │ -
140 {
│ │ │ │ -
141 // transposed matrix is required
│ │ │ │ -
142 assert( row < Base::cols() );
│ │ │ │ -
143 for( std::size_t i = 0; i < Base::rows(); ++i )
│ │ │ │ -
144 Dune::field_cast( Base::operator()( i, row ), vec[ i ] );
│ │ │ │ -
145 }
│ │ │ │ +
89 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ +
│ │ │ │ +
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ +
91 { return interpolation_; }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
92 const typename Traits::Coefficients& coefficients() const
│ │ │ │ +
93 { return coefficients_; }
│ │ │ │ +
│ │ │ │ +
94 const GeometryType &type() const { return gt; }
│ │ │ │ +
95 };
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
98 const GeometryType
│ │ │ │ +
99 Pk2DFiniteElement<Geometry, RF, k>::gt(GeometryTypes::simplex(2));
│ │ │ │ +
100
│ │ │ │ +
101 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
102 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalBasis
│ │ │ │ +
103 Pk2DFiniteElement<Geometry, RF, k>::localBasis = LocalBasis();
│ │ │ │ +
104
│ │ │ │ +
105 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
106 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalInterpolation
│ │ │ │ +
107 Pk2DFiniteElement<Geometry, RF, k>::localInterpolation =
│ │ │ │ +
108 LocalInterpolation();
│ │ │ │ +
109
│ │ │ │ +
111
│ │ │ │ +
121 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
124
│ │ │ │ +
126
│ │ │ │ +
140 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
141 const FiniteElement make(const Geometry& geometry,
│ │ │ │ +
142 const VertexOrder& vertexOrder)
│ │ │ │ +
143 { return FiniteElement(geometry, vertexOrder); }
│ │ │ │ +
│ │ │ │ +
144 };
│ │ │ │
│ │ │ │ +
145}
│ │ │ │
146
│ │ │ │ -
147 private:
│ │ │ │ -
148 void sprod ( int col1, int col2, scalar_t &ret )
│ │ │ │ -
149 {
│ │ │ │ -
150 ret = 0;
│ │ │ │ -
151 for( int k = 0; k <= col1; ++k )
│ │ │ │ -
152 {
│ │ │ │ -
153 for( int l = 0; l <=col2; ++l )
│ │ │ │ -
154 ret += Base::operator()( l, col2 ) * S( l, k ) * Base::operator()( k, col1 );
│ │ │ │ -
155 }
│ │ │ │ -
156 }
│ │ │ │ -
157
│ │ │ │ -
158 void vmul ( std::size_t col, std::size_t rowEnd, const scalar_t &s )
│ │ │ │ -
159 {
│ │ │ │ -
160 for( std::size_t i = 0; i <= rowEnd; ++i )
│ │ │ │ -
161 Base::operator()( i, col ) *= s;
│ │ │ │ -
162 }
│ │ │ │ -
163
│ │ │ │ -
164 void vsub ( std::size_t coldest, std::size_t colsrc, std::size_t rowEnd, const scalar_t &s )
│ │ │ │ -
165 {
│ │ │ │ -
166 for( std::size_t i = 0; i <= rowEnd; ++i )
│ │ │ │ -
167 Base::operator()( i, coldest ) -= s * Base::operator()( i, colsrc );
│ │ │ │ -
168 }
│ │ │ │ -
169
│ │ │ │ -
170 void gramSchmidt ()
│ │ │ │ -
171 {
│ │ │ │ -
172 using std::sqrt;
│ │ │ │ -
173 // setup identity
│ │ │ │ -
174 const std::size_t N = Base::rows();
│ │ │ │ -
175 for( std::size_t i = 0; i < N; ++i )
│ │ │ │ -
176 {
│ │ │ │ -
177 for( std::size_t j = 0; j < N; ++j )
│ │ │ │ -
178 Base::operator()( i, j ) = scalar_t( i == j ? 1 : 0 );
│ │ │ │ -
179 }
│ │ │ │ -
180
│ │ │ │ -
181 // perform Gram-Schmidt procedure
│ │ │ │ -
182 scalar_t s;
│ │ │ │ -
183 sprod( 0, 0, s );
│ │ │ │ -
184 vmul( 0, 0, scalar_t( 1 ) / sqrt( s ) );
│ │ │ │ -
185 for( std::size_t i = 1; i < N; ++i )
│ │ │ │ -
186 {
│ │ │ │ -
187 for( std::size_t k = 0; k < i; ++k )
│ │ │ │ -
188 {
│ │ │ │ -
189 sprod( i, k, s );
│ │ │ │ -
190 vsub( i, k, i, s );
│ │ │ │ -
191 }
│ │ │ │ -
192 sprod( i, i, s );
│ │ │ │ -
193 vmul( i, i, scalar_t( 1 ) / sqrt( s ) );
│ │ │ │ -
194 }
│ │ │ │ -
195 }
│ │ │ │ -
196
│ │ │ │ -
197 vec_t d;
│ │ │ │ -
198 mat_t S;
│ │ │ │ -
199 };
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201} // namespace ONBCompute
│ │ │ │ -
│ │ │ │ -
202
│ │ │ │ -
203#endif // #ifndef DUNE_ORTHONORMALCOMPUTE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition orthonormalcompute.hh:25
│ │ │ │ -
scalar_t factorial(int start, int end)
Definition orthonormalcompute.hh:28
│ │ │ │ -
Definition orthonormalcompute.hh:43
│ │ │ │ -
static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, scalar_t &q)
Definition orthonormalcompute.hh:48
│ │ │ │ -
static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, scalar_t &q, std::integer_sequence< int, ints... > intS)
Definition orthonormalcompute.hh:55
│ │ │ │ -
static void computeIntegral(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, scalar_t &q, int &ord)
Definition orthonormalcompute.hh:68
│ │ │ │ -
static constexpr int dimension
Definition orthonormalcompute.hh:45
│ │ │ │ -
static constexpr Dune::GeometryType geometry
Definition orthonormalcompute.hh:44
│ │ │ │ -
Definition orthonormalcompute.hh:95
│ │ │ │ -
ONBMatrix(unsigned int order)
Definition orthonormalcompute.hh:103
│ │ │ │ -
std::vector< scalar_t > vec_t
Definition orthonormalcompute.hh:100
│ │ │ │ -
void row(unsigned int row, Vector &vec) const
Definition orthonormalcompute.hh:139
│ │ │ │ -
Dune::LFEMatrix< scalar_t > mat_t
Definition orthonormalcompute.hh:101
│ │ │ │ -
Definition lfematrix.hh:18
│ │ │ │ -
unsigned int cols() const
Definition lfematrix.hh:63
│ │ │ │ -
void resize(const unsigned int rows, const unsigned int cols)
Definition lfematrix.hh:80
│ │ │ │ -
const Field & operator()(const unsigned int row, const unsigned int col) const
Definition lfematrix.hh:44
│ │ │ │ -
unsigned int rows() const
Definition lfematrix.hh:58
│ │ │ │ -
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ -
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ -
Definition monomialbasis.hh:571
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
int z(int i) const
Definition multiindex.hh:91
│ │ │ │ +
147#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ +
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ +
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Langrange finite element of arbitrary order on triangles.
Definition pk2d.hh:40
│ │ │ │ +
Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder)
construct a Pk2DFiniteElement
Definition pk2d.hh:83
│ │ │ │ +
const Traits::Interpolation & interpolation() const
Definition pk2d.hh:90
│ │ │ │ +
const Traits::Basis & basis() const
Definition pk2d.hh:89
│ │ │ │ +
const Traits::Coefficients & coefficients() const
Definition pk2d.hh:92
│ │ │ │ +
const GeometryType & type() const
Definition pk2d.hh:94
│ │ │ │ +
Definition pk2d.hh:49
│ │ │ │ +
ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis
Definition pk2d.hh:50
│ │ │ │ +
Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients
Definition pk2d.hh:55
│ │ │ │ +
LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > Interpolation
Definition pk2d.hh:54
│ │ │ │ +
Factory for Pk2DFiniteElement objects.
Definition pk2d.hh:122
│ │ │ │ +
Pk2DFiniteElement< Geometry, RF, k > FiniteElement
Definition pk2d.hh:123
│ │ │ │ +
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct Pk2DFiniteElementFactory
Definition pk2d.hh:141
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,293 +1,169 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _o_r_t_h_o_n_o_r_m_a_l │ │ │ │ │ -orthonormalcompute.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pk2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_ORTHONORMALCOMPUTE_HH │ │ │ │ │ -6#define DUNE_ORTHONORMALCOMPUTE_HH │ │ │ │ │ +5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include │ │ │ │ │ -18 │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -22#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -23 │ │ │ │ │ -_2_4namespace _O_N_B_C_o_m_p_u_t_e │ │ │ │ │ -25{ │ │ │ │ │ -26 │ │ │ │ │ -27 template< class scalar_t > │ │ │ │ │ -_2_8 scalar_t _f_a_c_t_o_r_i_a_l( int start, int end ) │ │ │ │ │ -29 { │ │ │ │ │ -30 scalar_t ret( 1 ); │ │ │ │ │ -31 for( int j = start; j <= end; ++j ) │ │ │ │ │ -32 ret *= scalar_t( j ); │ │ │ │ │ -33 return ret; │ │ │ │ │ -34 } │ │ │ │ │ -35 │ │ │ │ │ -36 │ │ │ │ │ -37 │ │ │ │ │ -38 // Integral │ │ │ │ │ -39 // -------- │ │ │ │ │ -40 │ │ │ │ │ -41 template< Dune::GeometryType::Id geometryId > │ │ │ │ │ -_4_2 struct _I_n_t_e_g_r_a_l │ │ │ │ │ -43 { │ │ │ │ │ -_4_4 static constexpr Dune::GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ -_4_5 static constexpr int _d_i_m_e_n_s_i_o_n = _g_e_o_m_e_t_r_y.dim(); │ │ │ │ │ -46 │ │ │ │ │ -47 template< int dim, class scalar_t > │ │ │ │ │ -_4_8 static int _c_o_m_p_u_t_e ( const _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _s_c_a_l_a_r___t_ _> &alpha, │ │ │ │ │ -49 scalar_t &p, scalar_t &q ) │ │ │ │ │ -50 { │ │ │ │ │ -51 return _c_o_m_p_u_t_e(alpha, p, q, std::make_integer_sequence{}); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -54 template< int dim, class scalar_t , int ...ints> │ │ │ │ │ -_5_5 static int _c_o_m_p_u_t_e ( const _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _s_c_a_l_a_r___t_ _> &alpha, │ │ │ │ │ -56 scalar_t &p, scalar_t &q, std::integer_sequence intS) │ │ │ │ │ -57 { │ │ │ │ │ -58 p = scalar_t( 1 ); │ │ │ │ │ -59 q = scalar_t( 1 ); │ │ │ │ │ -60 │ │ │ │ │ -61 int ord = 0; │ │ │ │ │ -62 ((computeIntegral(alpha,p,q,ord)),...); │ │ │ │ │ -63 │ │ │ │ │ -64 return ord; │ │ │ │ │ -65 } │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +15 │ │ │ │ │ +16#warning This header is deprecated │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +20 │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 using _P_k_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +28 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_k_>; │ │ │ │ │ +29 │ │ │ │ │ +30 │ │ │ │ │ +32 │ │ │ │ │ +39 template │ │ │ │ │ +_4_0 class _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ +41 typedef typename Geometry::ctype DF; │ │ │ │ │ +42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ +43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ +LocalInterpolation; │ │ │ │ │ +44 │ │ │ │ │ +45 public: │ │ │ │ │ +_4_9 struct _T_r_a_i_t_s { │ │ │ │ │ +_5_0 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_<_L_o_c_a_l_B_a_s_i_s_,_ _G_e_o_m_e_t_r_y_> _B_a_s_i_s; │ │ │ │ │ +51 typedef _L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r< │ │ │ │ │ +52 LocalInterpolation, │ │ │ │ │ +53 typename _B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +_5_4 > _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +_5_5 typedef Impl::LagrangeSimplexLocalCoefficients<2,k> _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ +56 }; │ │ │ │ │ +57 │ │ │ │ │ +58 private: │ │ │ │ │ +59 static const GeometryType gt; │ │ │ │ │ +60 static const LocalBasis localBasis; │ │ │ │ │ +61 static const LocalInterpolation localInterpolation; │ │ │ │ │ +62 │ │ │ │ │ +63 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ +64 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ +65 typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s coefficients_; │ │ │ │ │ 66 │ │ │ │ │ -67 template< int step, int dim, class scalar_t > │ │ │ │ │ -_6_8 static void _c_o_m_p_u_t_e_I_n_t_e_g_r_a_l ( const _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _s_c_a_l_a_r___t_ _> │ │ │ │ │ -&alpha, │ │ │ │ │ -69 scalar_t &p, scalar_t &q, int& ord) │ │ │ │ │ -70 { │ │ │ │ │ -71 int i = alpha._z( step ); │ │ │ │ │ -72 │ │ │ │ │ -73 if constexpr ( _g_e_o_m_e_t_r_y.isPrismatic(step)) │ │ │ │ │ -74 { │ │ │ │ │ -75 //p *= scalar_t( 1 ); │ │ │ │ │ -76 q *= scalar_t( i+1 ); │ │ │ │ │ -77 } │ │ │ │ │ -78 else │ │ │ │ │ -79 { │ │ │ │ │ -80 p *= factorial< scalar_t >( 1, i ); │ │ │ │ │ -81 q *= factorial< scalar_t >( step+1 + ord, step+1 + ord + i ); │ │ │ │ │ -82 } │ │ │ │ │ -83 ord +=i; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -86 }; │ │ │ │ │ -87 │ │ │ │ │ +67 public: │ │ │ │ │ +69 │ │ │ │ │ +82 template │ │ │ │ │ +_8_3 _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t(const Geometry &geometry, │ │ │ │ │ +84 const VertexOrder& vertexOrder) : │ │ │ │ │ +85 basis_(localBasis, geometry), interpolation_(localInterpolation), │ │ │ │ │ +86 coefficients_(vertexOrder.begin(0, 0)) │ │ │ │ │ +87 { } │ │ │ │ │ 88 │ │ │ │ │ -89 // ONBMatrix │ │ │ │ │ -90 // --------- │ │ │ │ │ -91 │ │ │ │ │ -92 template< Dune::GeometryType::Id geometryId, class scalar_t > │ │ │ │ │ -_9_3 class _O_N_B_M_a_t_r_i_x │ │ │ │ │ -94 : public _D_u_n_e_:_:_L_F_E_M_a_t_r_i_x< scalar_t > │ │ │ │ │ -95 { │ │ │ │ │ -96 typedef _O_N_B_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _s_c_a_l_a_r___t_ _> _T_h_i_s; │ │ │ │ │ -97 typedef _D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _> _B_a_s_e; │ │ │ │ │ -98 │ │ │ │ │ -99 public: │ │ │ │ │ -_1_0_0 typedef std::vector< scalar_t > _v_e_c___t; │ │ │ │ │ -_1_0_1 typedef _D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _> _m_a_t___t; │ │ │ │ │ -102 │ │ │ │ │ -_1_0_3 explicit _O_N_B_M_a_t_r_i_x ( unsigned int order ) │ │ │ │ │ -104 { │ │ │ │ │ -105 // get all multiindecies for monomial basis │ │ │ │ │ -106 constexpr Dune::GeometryType geometry = geometryId; │ │ │ │ │ -107 constexpr unsigned int dim = geometry.dim(); │ │ │ │ │ -108 typedef _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _s_c_a_l_a_r___t_ _> MI; │ │ │ │ │ -109 _D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _M_I_ _> basis( order ); │ │ │ │ │ -110 const std::size_t size = basis._s_i_z_e(); │ │ │ │ │ -111 std::vector< Dune::FieldVector< MI, 1 > > y( size ); │ │ │ │ │ -112 Dune::FieldVector< MI, dim > x; │ │ │ │ │ -113 for( unsigned int i = 0; i < dim; ++i ) │ │ │ │ │ -114 x[ i ].set( i ); │ │ │ │ │ -115 basis._e_v_a_l_u_a_t_e( x, y ); │ │ │ │ │ -116 │ │ │ │ │ -117 // set bounds of data │ │ │ │ │ -118 _B_a_s_e_:_:_r_e_s_i_z_e( size, size ); │ │ │ │ │ -119 S._r_e_s_i_z_e( size, size ); │ │ │ │ │ -120 d.resize( size ); │ │ │ │ │ -121 │ │ │ │ │ -122 // setup matrix for bilinear form x^T S y: S_ij = int_A x^(i+j) │ │ │ │ │ -123 scalar_t p, q; │ │ │ │ │ -124 for( std::size_t i = 0; i < size; ++i ) │ │ │ │ │ -125 { │ │ │ │ │ -126 for( std::size_t j = 0; j < size; ++j ) │ │ │ │ │ -127 { │ │ │ │ │ -128 _I_n_t_e_g_r_a_l_<_ _g_e_o_m_e_t_r_y_I_d_ _>_:_:_c_o_m_p_u_t_e( y[ i ][ 0 ] * y[ j ][ 0 ], p, q ); │ │ │ │ │ -129 S( i, j ) = p; │ │ │ │ │ -130 S( i, j ) /= q; │ │ │ │ │ -131 } │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -134 // orthonormalize │ │ │ │ │ -135 gramSchmidt(); │ │ │ │ │ -136 } │ │ │ │ │ -137 │ │ │ │ │ -138 template< class Vector > │ │ │ │ │ -_1_3_9 void _r_o_w ( unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ -140 { │ │ │ │ │ -141 // transposed matrix is required │ │ │ │ │ -142 assert( _r_o_w < _B_a_s_e_:_:_c_o_l_s() ); │ │ │ │ │ -143 for( std::size_t i = 0; i < _B_a_s_e_:_:_r_o_w_s(); ++i ) │ │ │ │ │ -144 _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t( Base::operator()( i, _r_o_w ), vec[ i ] ); │ │ │ │ │ -145 } │ │ │ │ │ +_8_9 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ +_9_0 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ +91 { return interpolation_; } │ │ │ │ │ +_9_2 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ +93 { return coefficients_; } │ │ │ │ │ +_9_4 const GeometryType &_t_y_p_e() const { return gt; } │ │ │ │ │ +95 }; │ │ │ │ │ +96 │ │ │ │ │ +97 template │ │ │ │ │ +98 const GeometryType │ │ │ │ │ +99 Pk2DFiniteElement::gt(GeometryTypes::simplex(2)); │ │ │ │ │ +100 │ │ │ │ │ +101 template │ │ │ │ │ +102 const typename Pk2DFiniteElement::LocalBasis │ │ │ │ │ +103 Pk2DFiniteElement::localBasis = LocalBasis(); │ │ │ │ │ +104 │ │ │ │ │ +105 template │ │ │ │ │ +106 const typename Pk2DFiniteElement::LocalInterpolation │ │ │ │ │ +107 Pk2DFiniteElement::localInterpolation = │ │ │ │ │ +108 LocalInterpolation(); │ │ │ │ │ +109 │ │ │ │ │ +111 │ │ │ │ │ +121 template │ │ │ │ │ +_1_2_2 struct _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ +_1_2_3 typedef _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ +124 │ │ │ │ │ +126 │ │ │ │ │ +140 template │ │ │ │ │ +_1_4_1 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry, │ │ │ │ │ +142 const VertexOrder& vertexOrder) │ │ │ │ │ +143 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(geometry, vertexOrder); } │ │ │ │ │ +144 }; │ │ │ │ │ +145} │ │ │ │ │ 146 │ │ │ │ │ -147 private: │ │ │ │ │ -148 void sprod ( int col1, int col2, scalar_t &ret ) │ │ │ │ │ -149 { │ │ │ │ │ -150 ret = 0; │ │ │ │ │ -151 for( int k = 0; k <= col1; ++k ) │ │ │ │ │ -152 { │ │ │ │ │ -153 for( int l = 0; l <=col2; ++l ) │ │ │ │ │ -154 ret += Base::operator()( l, col2 ) * S( l, k ) * _B_a_s_e_:_:_o_p_e_r_a_t_o_r_(_)( k, col1 │ │ │ │ │ -); │ │ │ │ │ -155 } │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 void vmul ( std::size_t col, std::size_t rowEnd, const scalar_t &s ) │ │ │ │ │ -159 { │ │ │ │ │ -160 for( std::size_t i = 0; i <= rowEnd; ++i ) │ │ │ │ │ -161 Base::operator()( i, col ) *= s; │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -164 void vsub ( std::size_t coldest, std::size_t colsrc, std::size_t rowEnd, │ │ │ │ │ -const scalar_t &s ) │ │ │ │ │ -165 { │ │ │ │ │ -166 for( std::size_t i = 0; i <= rowEnd; ++i ) │ │ │ │ │ -167 Base::operator()( i, coldest ) -= s * Base::operator()( i, colsrc ); │ │ │ │ │ -168 } │ │ │ │ │ -169 │ │ │ │ │ -170 void gramSchmidt () │ │ │ │ │ -171 { │ │ │ │ │ -172 using std::sqrt; │ │ │ │ │ -173 // setup identity │ │ │ │ │ -174 const std::size_t N = _B_a_s_e_:_:_r_o_w_s(); │ │ │ │ │ -175 for( std::size_t i = 0; i < N; ++i ) │ │ │ │ │ -176 { │ │ │ │ │ -177 for( std::size_t j = 0; j < N; ++j ) │ │ │ │ │ -178 Base::operator()( i, j ) = scalar_t( i == j ? 1 : 0 ); │ │ │ │ │ -179 } │ │ │ │ │ -180 │ │ │ │ │ -181 // perform Gram-Schmidt procedure │ │ │ │ │ -182 scalar_t s; │ │ │ │ │ -183 sprod( 0, 0, s ); │ │ │ │ │ -184 vmul( 0, 0, scalar_t( 1 ) / sqrt( s ) ); │ │ │ │ │ -185 for( std::size_t i = 1; i < N; ++i ) │ │ │ │ │ -186 { │ │ │ │ │ -187 for( std::size_t k = 0; k < i; ++k ) │ │ │ │ │ -188 { │ │ │ │ │ -189 sprod( i, k, s ); │ │ │ │ │ -190 vsub( i, k, i, s ); │ │ │ │ │ -191 } │ │ │ │ │ -192 sprod( i, i, s ); │ │ │ │ │ -193 vmul( i, i, scalar_t( 1 ) / sqrt( s ) ); │ │ │ │ │ -194 } │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -197 _v_e_c___t d; │ │ │ │ │ -198 _m_a_t___t S; │ │ │ │ │ -199 }; │ │ │ │ │ -200 │ │ │ │ │ -201} // namespace ONBCompute │ │ │ │ │ -202 │ │ │ │ │ -203#endif // #ifndef DUNE_ORTHONORMALCOMPUTE_HH │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ -_l_f_e_m_a_t_r_i_x_._h_h │ │ │ │ │ -_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:25 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_f_a_c_t_o_r_i_a_l │ │ │ │ │ -scalar_t factorial(int start, int end) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:28 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:43 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_:_:_c_o_m_p_u_t_e │ │ │ │ │ -static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, │ │ │ │ │ -scalar_t &q) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:48 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_:_:_c_o_m_p_u_t_e │ │ │ │ │ -static int compute(const Dune::MultiIndex< dim, scalar_t > &alpha, scalar_t &p, │ │ │ │ │ -scalar_t &q, std::integer_sequence< int, ints... > intS) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:55 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_:_:_c_o_m_p_u_t_e_I_n_t_e_g_r_a_l │ │ │ │ │ -static void computeIntegral(const Dune::MultiIndex< dim, scalar_t > &alpha, │ │ │ │ │ -scalar_t &p, scalar_t &q, int &ord) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:68 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static constexpr int dimension │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:45 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_I_n_t_e_g_r_a_l_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr Dune::GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:44 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:95 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_:_:_O_N_B_M_a_t_r_i_x │ │ │ │ │ -ONBMatrix(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:103 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_:_:_v_e_c___t │ │ │ │ │ -std::vector< scalar_t > vec_t │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:100 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ -void row(unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:139 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_:_:_m_a_t___t │ │ │ │ │ -Dune::LFEMatrix< scalar_t > mat_t │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _>_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _>_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _s_c_a_l_a_r___t_ _>_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:571 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:91 │ │ │ │ │ +147#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_T_r_a_i_t_s │ │ │ │ │ +Traits class for local-to-global basis adaptors. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r │ │ │ │ │ +Convert a local interpolation into a global interpolation. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Langrange finite element of arbitrary order on triangles. │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ +construct a Pk2DFiniteElement │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +const GeometryType & type() const │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ +Interpolation │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory for Pk2DFiniteElement objects. │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Pk2DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ +&vertexOrder) │ │ │ │ │ +construct Pk2DFiniteElementFactory │ │ │ │ │ +DDeeffiinniittiioonn pk2d.hh:141 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalbasis.hh File Reference │ │ │ │ +dune-localfunctions: pk1d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,55 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
orthonormalbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk1d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <sstream>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/orthonormal/orthonormalcompute.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::OrthonormalBasisFactory< dim, SF, CF >
class  Dune::Pk1DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
 
struct  Dune::OrthonormalBasisFactory< dim, SF, CF >::EvaluationBasisFactory< dd, FF >
struct  Dune::Pk1DFiniteElement< Geometry, RF, k >::Traits
 
struct  Dune::Pk1DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk1DFiniteElement objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk1DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 1, k >
 Lagrange finite element on the unit interval with arbitrary compile-time order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,36 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _o_r_t_h_o_n_o_r_m_a_l │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -orthonormalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_c_o_m_p_u_t_e_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pk1d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ +  Langrange finite element of arbitrary order on triangles. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _S_F_,_ _C_F_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_< │ │ │ │ │ - _d_d_,_ _F_F_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ +  Factory for _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t objects. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_k_1_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 1, k > │ │ │ │ │ +  Lagrange finite element on the unit interval with arbitrary compile-time │ │ │ │ │ + order. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00014_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormalbasis.hh Source File │ │ │ │ +dune-localfunctions: pk1d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,115 +70,152 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormalbasis.hh
│ │ │ │ +
pk1d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_ORTHONORMALBASIS_HH
│ │ │ │ -
6#define DUNE_ORTHONORMALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <sstream>
│ │ │ │ +
8#include <cstddef>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
16 // OrthonormalBasisFactory
│ │ │ │ -
17 // -----------------------
│ │ │ │ -
18 template< int dim, class SF, class CF = typename ComputeField< SF, 512 >::Type >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
20 {
│ │ │ │ -
21 static const unsigned int dimension = dim;
│ │ │ │ -
22 typedef SF StorageField;
│ │ │ │ -
23 typedef CF ComputeField;
│ │ │ │ -
24
│ │ │ │ -
25 template <unsigned int dd, class FF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ - │ │ │ │ -
29 };
│ │ │ │ -
│ │ │ │ +
16#warning This header is deprecated
│ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
20
│ │ │ │ +
25 template<class D, class R, unsigned int k>
│ │ │ │ + │ │ │ │ +
27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
29
│ │ │ │
30
│ │ │ │ - │ │ │ │ -
32 typedef typename MonomialBasisProviderType::Object MonomialBasisType;
│ │ │ │ -
33
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
37
│ │ │ │ -
38 typedef unsigned int Key;
│ │ │ │ -
39 typedef const Basis Object;
│ │ │ │ -
40
│ │ │ │ -
41 static constexpr GeometryType SimplexGeometry = GeometryTypes::simplex(dim);
│ │ │ │ -
42
│ │ │ │ -
43 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
44 static Object *create ( const unsigned int order )
│ │ │ │ -
45 {
│ │ │ │ -
46 const MonomialBasisType &monomialBasis = *MonomialBasisProviderType::template create< SimplexGeometry >( order );
│ │ │ │ -
47
│ │ │ │ -
48 static CoefficientMatrix _coeffs;
│ │ │ │ -
49 if( _coeffs.size() <= monomialBasis.size() )
│ │ │ │ -
50 {
│ │ │ │ - │ │ │ │ -
52 _coeffs.fill( matrix );
│ │ │ │ -
53 }
│ │ │ │ -
54
│ │ │ │ -
55 return new Basis( monomialBasis, _coeffs, monomialBasis.size() );
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57 static void release( Object *object ) { delete object; }
│ │ │ │ -
58 };
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
60}
│ │ │ │ -
61
│ │ │ │ -
62#endif // #ifndef DUNE_ORTHONORMALBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
32
│ │ │ │ +
39 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
41 typedef typename Geometry::ctype DF;
│ │ │ │ +
42 typedef Impl::LagrangeSimplexLocalBasis<DF,RF,1,k> LocalBasis;
│ │ │ │ +
43 typedef Impl::LagrangeSimplexLocalInterpolation<LocalBasis> LocalInterpolation;
│ │ │ │ +
44
│ │ │ │ +
45 public:
│ │ │ │ +
│ │ │ │ +
49 struct Traits {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52 LocalInterpolation,
│ │ │ │ +
53 typename Basis::Traits
│ │ │ │ + │ │ │ │ +
55 typedef Impl::LagrangeSimplexLocalCoefficients<1,k> Coefficients;
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 private:
│ │ │ │ +
59 static const GeometryType gt;
│ │ │ │ +
60 static const LocalBasis localBasis;
│ │ │ │ +
61 static const LocalInterpolation localInterpolation;
│ │ │ │ +
62
│ │ │ │ +
63 typename Traits::Basis basis_;
│ │ │ │ +
64 typename Traits::Interpolation interpolation_;
│ │ │ │ +
65 typename Traits::Coefficients coefficients_;
│ │ │ │ +
66
│ │ │ │ +
67 public:
│ │ │ │ +
69
│ │ │ │ +
82 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
83 Pk1DFiniteElement(const Geometry &geometry,
│ │ │ │ +
84 const VertexOrder& vertexOrder) :
│ │ │ │ +
85 basis_(localBasis, geometry), interpolation_(localInterpolation),
│ │ │ │ +
86 coefficients_(vertexOrder.begin(0, 0))
│ │ │ │ +
87 { }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
89 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ +
│ │ │ │ +
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ +
91 { return interpolation_; }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
92 const typename Traits::Coefficients& coefficients() const
│ │ │ │ +
93 { return coefficients_; }
│ │ │ │ +
│ │ │ │ +
94 const GeometryType &type() const { return gt; }
│ │ │ │ +
95 };
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
97 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
98 const GeometryType
│ │ │ │ +
99 Pk1DFiniteElement<Geometry, RF, k>::gt(GeometryTypes::simplex(2));
│ │ │ │ +
100
│ │ │ │ +
101 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
102 const typename Pk1DFiniteElement<Geometry, RF, k>::LocalBasis
│ │ │ │ +
103 Pk1DFiniteElement<Geometry, RF, k>::localBasis = LocalBasis();
│ │ │ │ +
104
│ │ │ │ +
105 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
106 const typename Pk1DFiniteElement<Geometry, RF, k>::LocalInterpolation
│ │ │ │ +
107 Pk1DFiniteElement<Geometry, RF, k>::localInterpolation =
│ │ │ │ +
108 LocalInterpolation();
│ │ │ │ +
109
│ │ │ │ +
111
│ │ │ │ +
121 template<class Geometry, class RF, std::size_t k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
124
│ │ │ │ +
126
│ │ │ │ +
140 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
141 const FiniteElement make(const Geometry& geometry,
│ │ │ │ +
142 const VertexOrder& vertexOrder)
│ │ │ │ +
143 { return FiniteElement(geometry, vertexOrder); }
│ │ │ │ +
│ │ │ │ +
144 };
│ │ │ │ +
│ │ │ │ +
145}
│ │ │ │ +
146
│ │ │ │ +
147#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition orthonormalbasis.hh:20
│ │ │ │ -
SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix
Definition orthonormalbasis.hh:34
│ │ │ │ -
static Object * create(const unsigned int order)
Definition orthonormalbasis.hh:44
│ │ │ │ -
StandardEvaluator< MonomialBasisType > Evaluator
Definition orthonormalbasis.hh:35
│ │ │ │ -
SF StorageField
Definition orthonormalbasis.hh:22
│ │ │ │ -
static constexpr GeometryType SimplexGeometry
Definition orthonormalbasis.hh:41
│ │ │ │ -
PolynomialBasis< Evaluator, CoefficientMatrix > Basis
Definition orthonormalbasis.hh:36
│ │ │ │ -
EvaluationBasisFactory< dimension, StorageField >::Type MonomialBasisProviderType
Definition orthonormalbasis.hh:31
│ │ │ │ -
CF ComputeField
Definition orthonormalbasis.hh:23
│ │ │ │ -
const Basis Object
Definition orthonormalbasis.hh:39
│ │ │ │ -
unsigned int Key
Definition orthonormalbasis.hh:38
│ │ │ │ -
static void release(Object *object)
Definition orthonormalbasis.hh:57
│ │ │ │ -
static const unsigned int dimension
Definition orthonormalbasis.hh:21
│ │ │ │ -
MonomialBasisProviderType::Object MonomialBasisType
Definition orthonormalbasis.hh:32
│ │ │ │ - │ │ │ │ -
MonomialBasisProvider< dd, FF > Type
Definition orthonormalbasis.hh:28
│ │ │ │ -
Definition orthonormalcompute.hh:95
│ │ │ │ -
Definition basisevaluator.hh:131
│ │ │ │ -
Definition coeffmatrix.hh:48
│ │ │ │ -
unsigned int size() const
Definition coeffmatrix.hh:69
│ │ │ │ -
void fill(const RowMatrix &mat, bool verbose=false)
Definition coeffmatrix.hh:160
│ │ │ │ -
Definition monomialbasis.hh:780
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ +
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ +
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ +
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Langrange finite element of arbitrary order on triangles.
Definition pk1d.hh:40
│ │ │ │ +
Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder)
construct a Pk1DFiniteElement
Definition pk1d.hh:83
│ │ │ │ +
const Traits::Basis & basis() const
Definition pk1d.hh:89
│ │ │ │ +
const GeometryType & type() const
Definition pk1d.hh:94
│ │ │ │ +
const Traits::Coefficients & coefficients() const
Definition pk1d.hh:92
│ │ │ │ +
const Traits::Interpolation & interpolation() const
Definition pk1d.hh:90
│ │ │ │ +
Definition pk1d.hh:49
│ │ │ │ +
ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis
Definition pk1d.hh:50
│ │ │ │ +
LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > Interpolation
Definition pk1d.hh:54
│ │ │ │ +
Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients
Definition pk1d.hh:55
│ │ │ │ +
Factory for Pk1DFiniteElement objects.
Definition pk1d.hh:122
│ │ │ │ +
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct Pk1DFiniteElementFactory
Definition pk1d.hh:141
│ │ │ │ +
Pk1DFiniteElement< Geometry, RF, k > FiniteElement
Definition pk1d.hh:123
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,144 +1,169 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _o_r_t_h_o_n_o_r_m_a_l │ │ │ │ │ -orthonormalbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pk1d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ -6#define DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_c_o_m_p_u_t_e_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ 15 │ │ │ │ │ -16 // OrthonormalBasisFactory │ │ │ │ │ -17 // ----------------------- │ │ │ │ │ -18 template< int dim, class SF, class CF = typename ComputeField< SF, 512 >:: │ │ │ │ │ -Type > │ │ │ │ │ -_1_9 struct _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -20 { │ │ │ │ │ -_2_1 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_2_2 typedef SF _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -_2_3 typedef CF _C_o_m_p_u_t_e_F_i_e_l_d; │ │ │ │ │ -24 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -27 { │ │ │ │ │ -_2_8 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ -29 }; │ │ │ │ │ +16#warning This header is deprecated │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +20 │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 using _P_k_1_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +28 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_,_k_>; │ │ │ │ │ +29 │ │ │ │ │ 30 │ │ │ │ │ -_3_1 typedef typename _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_,_ _S_t_o_r_a_g_e_F_i_e_l_d_ _>_:_:_T_y_p_e │ │ │ │ │ -_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_T_y_p_e; │ │ │ │ │ -_3_2 typedef typename MonomialBasisProviderType::Object _M_o_n_o_m_i_a_l_B_a_s_i_s_T_y_p_e; │ │ │ │ │ -33 │ │ │ │ │ -_3_4 typedef _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_ _S_t_o_r_a_g_e_F_i_e_l_d_,_ _1_ _> _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x; │ │ │ │ │ -_3_5 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _M_o_n_o_m_i_a_l_B_a_s_i_s_T_y_p_e_ _> _E_v_a_l_u_a_t_o_r; │ │ │ │ │ -_3_6 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_u_a_t_o_r_,_ _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x_ _> _B_a_s_i_s; │ │ │ │ │ -37 │ │ │ │ │ -_3_8 typedef unsigned int _K_e_y; │ │ │ │ │ -_3_9 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ -40 │ │ │ │ │ -_4_1 static constexpr GeometryType _S_i_m_p_l_e_x_G_e_o_m_e_t_r_y = GeometryTypes::simplex(dim); │ │ │ │ │ -42 │ │ │ │ │ -43 template< GeometryType::Id geometryId > │ │ │ │ │ -_4_4 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const unsigned int order ) │ │ │ │ │ -45 { │ │ │ │ │ -46 const _M_o_n_o_m_i_a_l_B_a_s_i_s_T_y_p_e &monomialBasis = *MonomialBasisProviderType:: │ │ │ │ │ -template create< SimplexGeometry >( order ); │ │ │ │ │ -47 │ │ │ │ │ -48 static _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x _coeffs; │ │ │ │ │ -49 if( _coeffs._s_i_z_e() <= monomialBasis.size() ) │ │ │ │ │ -50 { │ │ │ │ │ -51 _O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _C_o_m_p_u_t_e_F_i_e_l_d_ _> matrix( order ); │ │ │ │ │ -52 _coeffs._f_i_l_l( matrix ); │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -55 return new _B_a_s_i_s( monomialBasis, _coeffs, monomialBasis._s_i_z_e() ); │ │ │ │ │ -56 } │ │ │ │ │ -_5_7 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -58 }; │ │ │ │ │ -59 │ │ │ │ │ -60} │ │ │ │ │ -61 │ │ │ │ │ -62#endif // #ifndef DUNE_ORTHONORMALBASIS_HH │ │ │ │ │ -_o_r_t_h_o_n_o_r_m_a_l_c_o_m_p_u_t_e_._h_h │ │ │ │ │ -_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +32 │ │ │ │ │ +39 template │ │ │ │ │ +_4_0 class _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ +41 typedef typename Geometry::ctype DF; │ │ │ │ │ +42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ +43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ +LocalInterpolation; │ │ │ │ │ +44 │ │ │ │ │ +45 public: │ │ │ │ │ +_4_9 struct _T_r_a_i_t_s { │ │ │ │ │ +_5_0 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_<_L_o_c_a_l_B_a_s_i_s_,_ _G_e_o_m_e_t_r_y_> _B_a_s_i_s; │ │ │ │ │ +51 typedef _L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r< │ │ │ │ │ +52 LocalInterpolation, │ │ │ │ │ +53 typename _B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +_5_4 > _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +_5_5 typedef Impl::LagrangeSimplexLocalCoefficients<1,k> _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ +56 }; │ │ │ │ │ +57 │ │ │ │ │ +58 private: │ │ │ │ │ +59 static const GeometryType gt; │ │ │ │ │ +60 static const LocalBasis localBasis; │ │ │ │ │ +61 static const LocalInterpolation localInterpolation; │ │ │ │ │ +62 │ │ │ │ │ +63 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ +64 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ +65 typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s coefficients_; │ │ │ │ │ +66 │ │ │ │ │ +67 public: │ │ │ │ │ +69 │ │ │ │ │ +82 template │ │ │ │ │ +_8_3 _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t(const Geometry &geometry, │ │ │ │ │ +84 const VertexOrder& vertexOrder) : │ │ │ │ │ +85 basis_(localBasis, geometry), interpolation_(localInterpolation), │ │ │ │ │ +86 coefficients_(vertexOrder.begin(0, 0)) │ │ │ │ │ +87 { } │ │ │ │ │ +88 │ │ │ │ │ +_8_9 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ +_9_0 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ +91 { return interpolation_; } │ │ │ │ │ +_9_2 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ +93 { return coefficients_; } │ │ │ │ │ +_9_4 const GeometryType &_t_y_p_e() const { return gt; } │ │ │ │ │ +95 }; │ │ │ │ │ +96 │ │ │ │ │ +97 template │ │ │ │ │ +98 const GeometryType │ │ │ │ │ +99 Pk1DFiniteElement::gt(GeometryTypes::simplex(2)); │ │ │ │ │ +100 │ │ │ │ │ +101 template │ │ │ │ │ +102 const typename Pk1DFiniteElement::LocalBasis │ │ │ │ │ +103 Pk1DFiniteElement::localBasis = LocalBasis(); │ │ │ │ │ +104 │ │ │ │ │ +105 template │ │ │ │ │ +106 const typename Pk1DFiniteElement::LocalInterpolation │ │ │ │ │ +107 Pk1DFiniteElement::localInterpolation = │ │ │ │ │ +108 LocalInterpolation(); │ │ │ │ │ +109 │ │ │ │ │ +111 │ │ │ │ │ +121 template │ │ │ │ │ +_1_2_2 struct _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ +_1_2_3 typedef _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ +124 │ │ │ │ │ +126 │ │ │ │ │ +140 template │ │ │ │ │ +_1_4_1 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry, │ │ │ │ │ +142 const VertexOrder& vertexOrder) │ │ │ │ │ +143 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(geometry, vertexOrder); } │ │ │ │ │ +144 }; │ │ │ │ │ +145} │ │ │ │ │ +146 │ │ │ │ │ +147#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x │ │ │ │ │ -SparseCoeffMatrix< StorageField, 1 > CoefficientMatrix │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_o_r │ │ │ │ │ -StandardEvaluator< MonomialBasisType > Evaluator │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ -SF StorageField │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_S_i_m_p_l_e_x_G_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType SimplexGeometry │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ -PolynomialBasis< Evaluator, CoefficientMatrix > Basis │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_T_y_p_e │ │ │ │ │ -EvaluationBasisFactory< dimension, StorageField >::Type │ │ │ │ │ -MonomialBasisProviderType │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ -CF ComputeField │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const Basis Object │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -unsigned int Key │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -MonomialBasisProviderType::Object MonomialBasisType │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:28 │ │ │ │ │ -_O_N_B_C_o_m_p_u_t_e_:_:_O_N_B_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn orthonormalcompute.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ -void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_T_r_a_i_t_s │ │ │ │ │ +Traits class for local-to-global basis adaptors. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r │ │ │ │ │ +Convert a simple scalar local basis into a global basis. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r │ │ │ │ │ +Convert a local interpolation into a global interpolation. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Langrange finite element of arbitrary order on triangles. │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ +construct a Pk1DFiniteElement │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +const GeometryType & type() const │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:92 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ +ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ +Interpolation │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory for Pk1DFiniteElement objects. │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ +&vertexOrder) │ │ │ │ │ +construct Pk1DFiniteElementFactory │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Pk1DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ +DDeeffiinniittiioonn pk1d.hh:123 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualmortarbasis.hh File Reference │ │ │ │ +dune-localfunctions: q1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,25 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualmortarbasis.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
q1.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/dualmortarbasis/dualp1.hh>
│ │ │ │ -#include <dune/localfunctions/dualmortarbasis/dualq1.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::Q1FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q1 elements. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Typedefs

template<class D , class R , int dim>
using Dune::Q1LocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, dim, 1 >
 The local Q1 finite element on cubes.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,12 +1,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -dualmortarbasis.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_/_d_u_a_l_p_1_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_/_d_u_a_l_q_1_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +q1.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ +  Factory for global-valued Q1 elements. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, dim, │ │ │ │ │ + 1 > │ │ │ │ │ +  The local Q1 finite element on cubes. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00017_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualmortarbasis.hh Source File │ │ │ │ +dune-localfunctions: q1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,34 +70,83 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualmortarbasis.hh
│ │ │ │ +
q1.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │
10
│ │ │ │ -
11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15#warning This header is deprecated
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
27 template<class D, class R, int dim>
│ │ │ │ + │ │ │ │ +
29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
32
│ │ │ │ +
34
│ │ │ │ +
39 template<class Geometry, class RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
42 LagrangeCubeLocalFiniteElement<
│ │ │ │ +
43 typename Geometry::ctype, RF, Geometry::mydimension, 1
│ │ │ │ +
44 >,
│ │ │ │ +
45 Geometry
│ │ │ │ +
46 >
│ │ │ │ +
47 {
│ │ │ │ + │ │ │ │ +
49 typename Geometry::ctype, RF, Geometry::mydimension, 1
│ │ │ │ +
50 > LFE;
│ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
53 static const LFE lfe;
│ │ │ │ +
54
│ │ │ │ +
55 public:
│ │ │ │ + │ │ │ │ +
58 };
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
60 template<class Geometry, class RF>
│ │ │ │ +
61 const typename Q1FiniteElementFactory<Geometry, RF>::LFE
│ │ │ │ +
62 Q1FiniteElementFactory<Geometry, RF>::lfe;
│ │ │ │ +
63}
│ │ │ │ +
64
│ │ │ │ +
65#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
Factory for global-valued Q1 elements.
Definition q1.hh:47
│ │ │ │ +
Q1FiniteElementFactory()
default constructor
Definition q1.hh:57
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,83 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -dualmortarbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +q1.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_/_d_u_a_l_p_1_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_/_d_u_a_l_q_1_._h_h> │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ +7#define DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#endif // #ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_HH │ │ │ │ │ -_d_u_a_l_q_1_._h_h │ │ │ │ │ -_d_u_a_l_p_1_._h_h │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15#warning This header is deprecated │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 using _Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ +30 = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_1_>; │ │ │ │ │ +31 │ │ │ │ │ +32 │ │ │ │ │ +34 │ │ │ │ │ +39 template │ │ │ │ │ +_4_0 class _Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y : │ │ │ │ │ +41 public _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y< │ │ │ │ │ +42 LagrangeCubeLocalFiniteElement< │ │ │ │ │ +43 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ +44 >, │ │ │ │ │ +45 Geometry │ │ │ │ │ +46 > │ │ │ │ │ +47 { │ │ │ │ │ +48 typedef _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ +49 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ +50 > _L_F_E; │ │ │ │ │ +51 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y_<_L_F_E_,_ _G_e_o_m_e_t_r_y_> _B_a_s_e; │ │ │ │ │ +52 │ │ │ │ │ +53 static const _L_F_E lfe; │ │ │ │ │ +54 │ │ │ │ │ +55 public: │ │ │ │ │ +_5_7 _Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y() : _B_a_s_e(lfe) {} │ │ │ │ │ +58 }; │ │ │ │ │ +59 │ │ │ │ │ +60 template │ │ │ │ │ +61 const typename Q1FiniteElementFactory::LFE │ │ │ │ │ +62 Q1FiniteElementFactory::lfe; │ │ │ │ │ +63} │ │ │ │ │ +64 │ │ │ │ │ +65#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory for global-valued Q1 elements. │ │ │ │ │ +DDeeffiinniittiioonn q1.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Q1FiniteElementFactory() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn q1.hh:57 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: power.hh File Reference │ │ │ │ +dune-localfunctions: pk3d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,49 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
power.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk3d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/meta/power/basis.hh>
│ │ │ │ -#include <dune/localfunctions/meta/power/coefficients.hh>
│ │ │ │ -#include <dune/localfunctions/meta/power/interpolation.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::PowerFiniteElement< Backend, dimR >
 Meta-finite element turning a scalar finite element into vector-valued one. More...
 
struct  Dune::PowerFiniteElement< Backend, dimR >::Traits
 types of component objects More...
 
class  Dune::PowerFiniteElementFactory< BackendFiniteElement, dimR >
 Factory for meta-finite elements turning scalar finite elements into vector-valued ones. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,33 +1,21 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _m_e_t_a │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -power.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pk3d.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _B_a_c_k_e_n_d_,_ _d_i_m_R_ _> │ │ │ │ │ -  Meta-finite element turning a scalar finite element into vector-valued │ │ │ │ │ - one. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _B_a_c_k_e_n_d_,_ _d_i_m_R_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -  types of component objects _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _B_a_c_k_e_n_d_F_i_n_i_t_e_E_l_e_m_e_n_t_,_ _d_i_m_R_ _> │ │ │ │ │ -  Factory for meta-finite elements turning scalar finite elements into │ │ │ │ │ - vector-valued ones. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_k_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 3, k > │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00029_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: power.hh Source File │ │ │ │ +dune-localfunctions: pk3d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,144 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
power.hh
│ │ │ │ +
pk3d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ -
10#include <memory>
│ │ │ │ +
5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │
11
│ │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune {
│ │ │ │ -
19
│ │ │ │ -
22
│ │ │ │ -
28 template<class Backend, std::size_t dimR>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 public:
│ │ │ │ -
│ │ │ │ -
32 struct Traits {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
38 typedef PowerInterpolation<typename Backend::Traits::Interpolation,
│ │ │ │ -
39 typename Basis::Traits> Interpolation;
│ │ │ │ -
40 };
│ │ │ │ -
│ │ │ │ -
41 private:
│ │ │ │ -
42 std::shared_ptr<const Backend> backend;
│ │ │ │ -
43 typename Traits::Basis basis_;
│ │ │ │ -
44 typename Traits::Coefficients coefficients_;
│ │ │ │ -
45 typename Traits::Interpolation interpolation_;
│ │ │ │ -
46
│ │ │ │ -
47 public:
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
53 PowerFiniteElement(const Backend &backend_) :
│ │ │ │ -
54 backend(new Backend(backend_)),
│ │ │ │ -
55 basis_(backend->basis()),
│ │ │ │ -
56 coefficients_(backend->coefficients(), dimR),
│ │ │ │ -
57 interpolation_(backend->interpolation())
│ │ │ │ -
58 { }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
65 PowerFiniteElement(const std::shared_ptr<const Backend> &backendSPtr) :
│ │ │ │ -
66 backend(backendSPtr),
│ │ │ │ -
67 basis_(backend->basis()),
│ │ │ │ -
68 coefficients_(backend->coefficients(), dimR),
│ │ │ │ -
69 interpolation_(backend->interpolation())
│ │ │ │ -
70 { }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
73
│ │ │ │ -
77 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
83 const typename Traits::Coefficients& coefficients() const
│ │ │ │ -
84 { return coefficients_; }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ -
91 { return interpolation_; }
│ │ │ │ -
│ │ │ │ -
93 GeometryType type() const { return backend->type(); }
│ │ │ │ -
94 };
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ -
98
│ │ │ │ -
105 template<class BackendFiniteElement, std::size_t dimR>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
107 {
│ │ │ │ -
108 public:
│ │ │ │ - │ │ │ │ -
111
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
117 const FiniteElement make(const BackendFiniteElement &backend) const
│ │ │ │ -
118 { return FiniteElement(backend); }
│ │ │ │ -
│ │ │ │ -
120
│ │ │ │ -
124 const FiniteElement
│ │ │ │ -
│ │ │ │ -
125 make(const std::shared_ptr<const BackendFiniteElement> &backendSPtr) const
│ │ │ │ -
126 { return FiniteElement(backendSPtr); }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
128 };
│ │ │ │ -
│ │ │ │ -
129
│ │ │ │ -
130} // namespace Dune
│ │ │ │ -
131
│ │ │ │ -
132#endif // DUNE_LOCALFUNCTIONS_META_POWER_HH
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
19 template<class D, class R, unsigned int k>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Meta-finite element turning a scalar finite element into vector-valued one.
Definition power.hh:29
│ │ │ │ -
const Traits::Basis & basis() const
Extract basis of this finite element.
Definition power.hh:77
│ │ │ │ -
GeometryType type() const
Extract geometry type of this finite element.
Definition power.hh:93
│ │ │ │ -
const Traits::Interpolation & interpolation() const
Extract interpolation of this finite element.
Definition power.hh:90
│ │ │ │ -
PowerFiniteElement(const Backend &backend_)
Construct a finite element.
Definition power.hh:53
│ │ │ │ -
PowerFiniteElement(const std::shared_ptr< const Backend > &backendSPtr)
Construct a finite element.
Definition power.hh:65
│ │ │ │ -
const Traits::Coefficients & coefficients() const
Extract coefficients of this finite element.
Definition power.hh:83
│ │ │ │ -
types of component objects
Definition power.hh:32
│ │ │ │ -
PowerBasis< typename Backend::Traits::Basis, dimR > Basis
type of the Basis
Definition power.hh:34
│ │ │ │ -
PowerCoefficients Coefficients
type of the Coefficients
Definition power.hh:36
│ │ │ │ -
PowerInterpolation< typename Backend::Traits::Interpolation, typename Basis::Traits > Interpolation
type of the Interpolation
Definition power.hh:39
│ │ │ │ -
Factory for meta-finite elements turning scalar finite elements into vector-valued ones.
Definition power.hh:107
│ │ │ │ -
const FiniteElement make(const std::shared_ptr< const BackendFiniteElement > &backendSPtr) const
create a finite element
Definition power.hh:125
│ │ │ │ -
const FiniteElement make(const BackendFiniteElement &backend) const
create a finite element
Definition power.hh:117
│ │ │ │ -
PowerFiniteElement< BackendFiniteElement, dimR > FiniteElement
Type of the finite element.
Definition power.hh:110
│ │ │ │ -
Meta-basis turning a scalar basis into vector-valued basis.
Definition meta/power/basis.hh:26
│ │ │ │ -
Meta-coefficients turning a scalar coefficients into vector-valued coefficients.
Definition meta/power/coefficients.hh:22
│ │ │ │ -
Meta-interpolation turning a scalar interpolation into vector-valued interpolation.
Definition meta/power/interpolation.hh:26
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,171 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _m_e_t_a │ │ │ │ │ -power.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pk3d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ -7#define DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ +5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ 11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_b_a_s_i_s_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_m_e_t_a_/_p_o_w_e_r_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e { │ │ │ │ │ -19 │ │ │ │ │ -22 │ │ │ │ │ -28 template │ │ │ │ │ -_2_9 class _P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ -30 public: │ │ │ │ │ -_3_2 struct _T_r_a_i_t_s { │ │ │ │ │ -_3_4 typedef _P_o_w_e_r_B_a_s_i_s_<_t_y_p_e_n_a_m_e_ _B_a_c_k_e_n_d_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s_,_ _d_i_m_R_> _B_a_s_i_s; │ │ │ │ │ -_3_6 typedef _P_o_w_e_r_C_o_e_f_f_i_c_i_e_n_t_s _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ -38 typedef _P_o_w_e_r_I_n_t_e_r_p_o_l_a_t_i_o_n _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -40 }; │ │ │ │ │ -41 private: │ │ │ │ │ -42 std::shared_ptr backend; │ │ │ │ │ -43 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ -44 typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s coefficients_; │ │ │ │ │ -45 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ -46 │ │ │ │ │ -47 public: │ │ │ │ │ -49 │ │ │ │ │ -_5_3 _P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t(const Backend &backend_) : │ │ │ │ │ -54 backend(new Backend(backend_)), │ │ │ │ │ -55 basis_(backend->_b_a_s_i_s()), │ │ │ │ │ -56 coefficients_(backend->_c_o_e_f_f_i_c_i_e_n_t_s(), dimR), │ │ │ │ │ -57 interpolation_(backend->_i_n_t_e_r_p_o_l_a_t_i_o_n()) │ │ │ │ │ -58 { } │ │ │ │ │ -59 │ │ │ │ │ -61 │ │ │ │ │ -_6_5 _P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t(const std::shared_ptr &backendSPtr) : │ │ │ │ │ -66 backend(backendSPtr), │ │ │ │ │ -67 basis_(backend->_b_a_s_i_s()), │ │ │ │ │ -68 coefficients_(backend->_c_o_e_f_f_i_c_i_e_n_t_s(), dimR), │ │ │ │ │ -69 interpolation_(backend->_i_n_t_e_r_p_o_l_a_t_i_o_n()) │ │ │ │ │ -70 { } │ │ │ │ │ -71 │ │ │ │ │ -73 │ │ │ │ │ -_7_7 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ -79 │ │ │ │ │ -_8_3 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ -84 { return coefficients_; } │ │ │ │ │ -86 │ │ │ │ │ -_9_0 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ -91 { return interpolation_; } │ │ │ │ │ -_9_3 GeometryType _t_y_p_e() const { return backend->type(); } │ │ │ │ │ -94 }; │ │ │ │ │ -95 │ │ │ │ │ -98 │ │ │ │ │ -105 template │ │ │ │ │ -_1_0_6 class _P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -107 { │ │ │ │ │ -108 public: │ │ │ │ │ -_1_1_0 typedef _P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_<_B_a_c_k_e_n_d_F_i_n_i_t_e_E_l_e_m_e_n_t_,_ _d_i_m_R_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ -111 │ │ │ │ │ -113 │ │ │ │ │ -_1_1_7 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const BackendFiniteElement &backend) const │ │ │ │ │ -118 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(backend); } │ │ │ │ │ -120 │ │ │ │ │ -124 const _F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -_1_2_5 _m_a_k_e(const std::shared_ptr &backendSPtr) const │ │ │ │ │ -126 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(backendSPtr); } │ │ │ │ │ -127 │ │ │ │ │ -128 }; │ │ │ │ │ -129 │ │ │ │ │ -130} // namespace Dune │ │ │ │ │ -131 │ │ │ │ │ -132#endif // DUNE_LOCALFUNCTIONS_META_POWER_HH │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 using _P_k_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +22 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_,_k_>; │ │ │ │ │ +23 │ │ │ │ │ +24} │ │ │ │ │ +25 │ │ │ │ │ +26#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Meta-finite element turning a scalar finite element into vector-valued one. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -Extract basis of this finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -Extract geometry type of this finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -Extract interpolation of this finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -PowerFiniteElement(const Backend &backend_) │ │ │ │ │ -Construct a finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -PowerFiniteElement(const std::shared_ptr< const Backend > &backendSPtr) │ │ │ │ │ -Construct a finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -Extract coefficients of this finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -types of component objects │ │ │ │ │ -DDeeffiinniittiioonn power.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ -PowerBasis< typename Backend::Traits::Basis, dimR > Basis │ │ │ │ │ -type of the Basis │ │ │ │ │ -DDeeffiinniittiioonn power.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -PowerCoefficients Coefficients │ │ │ │ │ -type of the Coefficients │ │ │ │ │ -DDeeffiinniittiioonn power.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -PowerInterpolation< typename Backend::Traits::Interpolation, typename Basis:: │ │ │ │ │ -Traits > Interpolation │ │ │ │ │ -type of the Interpolation │ │ │ │ │ -DDeeffiinniittiioonn power.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for meta-finite elements turning scalar finite elements into vector- │ │ │ │ │ -valued ones. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -const FiniteElement make(const std::shared_ptr< const BackendFiniteElement > │ │ │ │ │ -&backendSPtr) const │ │ │ │ │ -create a finite element │ │ │ │ │ -DDeeffiinniittiioonn power.hh:125 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -const FiniteElement make(const BackendFiniteElement &backend) const │ │ │ │ │ -create a finite element │ │ │ │ │ -DDeeffiinniittiioonn power.hh:117 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -PowerFiniteElement< BackendFiniteElement, dimR > FiniteElement │ │ │ │ │ -Type of the finite element. │ │ │ │ │ -DDeeffiinniittiioonn power.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_B_a_s_i_s │ │ │ │ │ -Meta-basis turning a scalar basis into vector-valued basis. │ │ │ │ │ -DDeeffiinniittiioonn meta/power/basis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Meta-coefficients turning a scalar coefficients into vector-valued │ │ │ │ │ -coefficients. │ │ │ │ │ -DDeeffiinniittiioonn meta/power/coefficients.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_P_o_w_e_r_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -Meta-interpolation turning a scalar interpolation into vector-valued │ │ │ │ │ -interpolation. │ │ │ │ │ -DDeeffiinniittiioonn meta/power/interpolation.hh:26 │ │ │ │ │ -_b_a_s_i_s_._h_h │ │ │ │ │ -_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: p1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
localcoefficients.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/common/rangeutilities.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::BDFMCubeLocalCoefficients< D, R, dim, order >
 Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , int dim>
using Dune::P1LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, dim, 1 >
 The local p1 finite element on simplices.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i │ │ │ │ │ - * _c_u_b_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +p1.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _D_,_ _R_,_ _d_i_m_,_ _o_r_d_e_r_ _> │ │ │ │ │ -  Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + dim, 1 > │ │ │ │ │ +  The local p1 finite element on simplices. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00032_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: p1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,102 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
localcoefficients.hh
│ │ │ │ +
p1.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ -
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH
│ │ │ │ -
4#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH
│ │ │ │ -
5
│ │ │ │ -
6#include <cstddef>
│ │ │ │ -
7#include <vector>
│ │ │ │ -
8
│ │ │ │ -
9#include <dune/common/math.hh>
│ │ │ │ -
10#include <dune/common/rangeutilities.hh>
│ │ │ │ -
11#include <dune/common/typetraits.hh>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ +Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ +
5#ifndef DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
31 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ -
34 static constexpr unsigned int interiorDofs = dim*binomial(dim+order-2, order-2);
│ │ │ │ -
35 static constexpr unsigned int faceDofs = binomial(dim+order-2, order-1);
│ │ │ │ -
36
│ │ │ │ -
37 static constexpr std::size_t numFaces = 2*dim;
│ │ │ │ -
38 static constexpr std::size_t numDofs = numFaces*faceDofs + interiorDofs;
│ │ │ │ -
39
│ │ │ │ -
40 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
43 {
│ │ │ │ -
44 for (auto j : range(numFaces))
│ │ │ │ -
45 for (auto i : range(faceDofs))
│ │ │ │ -
46 li[j*faceDofs + i] = LocalKey(j, 1, i);
│ │ │ │ -
47
│ │ │ │ -
48 for (auto i : range(interiorDofs))
│ │ │ │ -
49 li[numFaces*faceDofs + i] = LocalKey(0, 0, i);
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
53 std::size_t size () const { return numDofs; }
│ │ │ │ -
54
│ │ │ │ -
56 auto localKey (std::size_t i) const -> const LocalKey& { return li[i]; }
│ │ │ │ -
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 std::vector<LocalKey> li;
│ │ │ │ -
60 };
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
63 constexpr unsigned int BDFMCubeLocalCoefficients<D, R, dim, order>::interiorDofs;
│ │ │ │ -
64
│ │ │ │ -
65 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
66 constexpr unsigned int BDFMCubeLocalCoefficients<D, R, dim, order>::faceDofs;
│ │ │ │ -
67
│ │ │ │ -
68 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
69 constexpr std::size_t BDFMCubeLocalCoefficients<D, R, dim, order>::numFaces;
│ │ │ │ -
70
│ │ │ │ -
71 // template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
72 // constexpr std::size_t BDFMCubeLocalCoefficients<D, R, dim, order>::numDofs;
│ │ │ │ -
73
│ │ │ │ -
74
│ │ │ │ -
75#ifndef DOXYGEN
│ │ │ │ -
76 template<class D, class R, unsigned int dim>
│ │ │ │ -
77 class BDFMCubeLocalCoefficients<D, R, dim, 0>
│ │ │ │ -
78 {
│ │ │ │ -
79 static_assert( AlwaysFalse<D>::value,
│ │ │ │ -
80 "`BDFMCubeLocalCoefficients` not defined for order 0." );
│ │ │ │ -
81 };
│ │ │ │ -
82#endif // #ifndef DOXYGEN
│ │ │ │ -
83
│ │ │ │ -
84} // namespace Dune
│ │ │ │ -
85
│ │ │ │ -
86#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH
│ │ │ │ - │ │ │ │ +
22 template<class D, class R, int dim>
│ │ │ │ + │ │ │ │ +
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │ +
28
│ │ │ │ +
29#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes.
Definition localcoefficients.hh:33
│ │ │ │ -
BDFMCubeLocalCoefficients()
Standard constructor.
Definition localcoefficients.hh:42
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition localcoefficients.hh:53
│ │ │ │ -
auto localKey(std::size_t i) const -> const LocalKey &
geth i'th index
Definition localcoefficients.hh:56
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,111 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i │ │ │ │ │ - * _c_u_b_e │ │ │ │ │ -localcoefficients.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +p1.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ +3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ -2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH │ │ │ │ │ -4#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH │ │ │ │ │ -5 │ │ │ │ │ -6#include │ │ │ │ │ -7#include │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ +5#ifndef DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ 14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 class _B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -33 { │ │ │ │ │ -34 static constexpr unsigned int interiorDofs = dim*binomial(dim+order-2, │ │ │ │ │ -order-2); │ │ │ │ │ -35 static constexpr unsigned int faceDofs = binomial(dim+order-2, order-1); │ │ │ │ │ -36 │ │ │ │ │ -37 static constexpr std::size_t numFaces = 2*dim; │ │ │ │ │ -38 static constexpr std::size_t numDofs = numFaces*faceDofs + interiorDofs; │ │ │ │ │ -39 │ │ │ │ │ -40 public: │ │ │ │ │ -_4_2 _B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(numDofs) │ │ │ │ │ -43 { │ │ │ │ │ -44 for (auto j : range(numFaces)) │ │ │ │ │ -45 for (auto i : range(faceDofs)) │ │ │ │ │ -46 li[j*faceDofs + i] = _L_o_c_a_l_K_e_y(j, 1, i); │ │ │ │ │ -47 │ │ │ │ │ -48 for (auto i : range(interiorDofs)) │ │ │ │ │ -49 li[numFaces*faceDofs + i] = _L_o_c_a_l_K_e_y(0, 0, i); │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -_5_3 std::size_t _s_i_z_e () const { return numDofs; } │ │ │ │ │ -54 │ │ │ │ │ -_5_6 auto _l_o_c_a_l_K_e_y (std::size_t i) const -> const _L_o_c_a_l_K_e_y& { return li[i]; } │ │ │ │ │ -57 │ │ │ │ │ -58 private: │ │ │ │ │ -59 std::vector li; │ │ │ │ │ -60 }; │ │ │ │ │ -61 │ │ │ │ │ -62 template │ │ │ │ │ -63 constexpr unsigned int BDFMCubeLocalCoefficients:: │ │ │ │ │ -interiorDofs; │ │ │ │ │ -64 │ │ │ │ │ -65 template │ │ │ │ │ -66 constexpr unsigned int BDFMCubeLocalCoefficients:: │ │ │ │ │ -faceDofs; │ │ │ │ │ -67 │ │ │ │ │ -68 template │ │ │ │ │ -69 constexpr std::size_t BDFMCubeLocalCoefficients::numFaces; │ │ │ │ │ -70 │ │ │ │ │ -71 // template │ │ │ │ │ -72 // constexpr std::size_t BDFMCubeLocalCoefficients:: │ │ │ │ │ -numDofs; │ │ │ │ │ -73 │ │ │ │ │ -74 │ │ │ │ │ -75#ifndef DOXYGEN │ │ │ │ │ -76 template │ │ │ │ │ -77 class BDFMCubeLocalCoefficients │ │ │ │ │ -78 { │ │ │ │ │ -79 static_assert( AlwaysFalse::value, │ │ │ │ │ -80 "`BDFMCubeLocalCoefficients` not defined for order 0." ); │ │ │ │ │ -81 }; │ │ │ │ │ -82#endif // #ifndef DOXYGEN │ │ │ │ │ -83 │ │ │ │ │ -84} // namespace Dune │ │ │ │ │ -85 │ │ │ │ │ -86#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_CUBE_LOCALCOEFFICIENTS_HH │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 using _P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +25 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_1_>; │ │ │ │ │ +26 │ │ │ │ │ +27} │ │ │ │ │ +28 │ │ │ │ │ +29#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ -DDeeffiinniittiioonn localcoefficients.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -BDFMCubeLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn localcoefficients.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn localcoefficients.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -auto localKey(std::size_t i) const -> const LocalKey & │ │ │ │ │ -geth i'th index │ │ │ │ │ -DDeeffiinniittiioonn localcoefficients.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: bdfmcube.hh File Reference │ │ │ │ +dune-localfunctions: lagrangepyramid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,41 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
bdfmcube.hh File Reference
│ │ │ │ +
lagrangepyramid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasfortinmarini/cube/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasfortinmarini/cube/localcoefficients.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasfortinmarini/cube/localinterpolation.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::BDFMCubeLocalFiniteElement< D, R, dim, order >
 Brezzi-Douglas-Fortin-Marini finite elements for cubes. More...
class  Dune::LagrangePyramidLocalFiniteElement< D, R, k >
 Lagrange finite element for 3d pyramids with compile-time polynomial order. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -bdfmcube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +lagrangepyramid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/ │ │ │ │ │ -_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/ │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _o_r_d_e_r_ _> │ │ │ │ │ -  Brezzi-Douglas-Fortin-Marini finite elements for cubes. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _k_ _> │ │ │ │ │ +  Lagrange finite element for 3d pyramids with compile-time polynomial │ │ │ │ │ + order. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00041_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: bdfmcube.hh Source File │ │ │ │ +dune-localfunctions: lagrangepyramid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,95 +70,831 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
bdfmcube.hh
│ │ │ │ +
lagrangepyramid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ │ +
13#include <dune/common/math.hh>
│ │ │ │ +
14
│ │ │ │ +
15#include <dune/geometry/referenceelements.hh>
│ │ │ │
16
│ │ │ │ -
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
43 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
49
│ │ │ │ -
50 public:
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ - │ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
61 BDFMCubeLocalFiniteElement (std::bitset<2*dim> s)
│ │ │ │ -
62 : basis( s ), interpolation( s )
│ │ │ │ -
63 {}
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
65 auto localBasis () const -> const LocalBasis& { return basis; }
│ │ │ │ -
66 auto localCoefficients () const -> const LocalCoefficients& { return coefficients; }
│ │ │ │ -
67 auto localInterpolation () const -> const LocalInterpolation& { return interpolation; }
│ │ │ │ -
68
│ │ │ │ -
70 unsigned int size () const { return basis.size(); }
│ │ │ │ -
71 static constexpr auto type () -> GeometryType { return GeometryTypes::cube(dim); }
│ │ │ │ -
72
│ │ │ │ -
73 private:
│ │ │ │ -
74 LocalBasis basis;
│ │ │ │ -
75 LocalCoefficients coefficients;
│ │ │ │ -
76 LocalInterpolation interpolation;
│ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22namespace Dune { namespace Impl
│ │ │ │ +
23{
│ │ │ │ +
33 template<class D, class R, unsigned int k>
│ │ │ │ +
34 class LagrangePyramidLocalBasis
│ │ │ │ +
35 {
│ │ │ │ +
36 public:
│ │ │ │ +
37 using Traits = LocalBasisTraits<D,3,FieldVector<D,3>,R,1,FieldVector<R,1>,FieldMatrix<R,1,3> >;
│ │ │ │ +
38
│ │ │ │ +
41 static constexpr std::size_t size ()
│ │ │ │ +
42 {
│ │ │ │ +
43 std::size_t result = 0;
│ │ │ │ +
44 for (unsigned int i=0; i<=k; i++)
│ │ │ │ +
45 result += power(i+1,2);
│ │ │ │ +
46 return result;
│ │ │ │ +
47 }
│ │ │ │ +
48
│ │ │ │ +
50 void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ +
51 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
52 {
│ │ │ │ +
53 out.resize(size());
│ │ │ │ +
54
│ │ │ │ +
55 // Specialization for zero-order case
│ │ │ │ +
56 if (k==0)
│ │ │ │ +
57 {
│ │ │ │ +
58 out[0] = 1;
│ │ │ │ +
59 return;
│ │ │ │ +
60 }
│ │ │ │ +
61
│ │ │ │ +
62 if (k==1)
│ │ │ │ +
63 {
│ │ │ │ +
64 if(in[0] > in[1])
│ │ │ │ +
65 {
│ │ │ │ +
66 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[1]);
│ │ │ │ +
67 out[1] = in[0]*(1-in[1])-in[2]*in[1];
│ │ │ │ +
68 out[2] = (1-in[0])*in[1]-in[2]*in[1];
│ │ │ │ +
69 out[3] = in[0]*in[1]+in[2]*in[1];
│ │ │ │ +
70 }
│ │ │ │ +
71 else
│ │ │ │ +
72 {
│ │ │ │ +
73 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[0]);
│ │ │ │ +
74 out[1] = in[0]*(1-in[1])-in[2]*in[0];
│ │ │ │ +
75 out[2] = (1-in[0])*in[1]-in[2]*in[0];
│ │ │ │ +
76 out[3] = in[0]*in[1]+in[2]*in[0];
│ │ │ │ +
77 }
│ │ │ │
78
│ │ │ │ -
79} // namespace Dune
│ │ │ │ -
│ │ │ │ +
79 out[4] = in[2];
│ │ │ │
80
│ │ │ │ -
81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
81 return;
│ │ │ │ +
82 }
│ │ │ │ +
83
│ │ │ │ +
84 if (k==2)
│ │ │ │ +
85 {
│ │ │ │ +
86 // transform to reference element with base [-1,1]^2
│ │ │ │ +
87 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ +
88 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ +
89 const R z = in[2];
│ │ │ │ +
90
│ │ │ │ +
91 if (x > y)
│ │ │ │ +
92 {
│ │ │ │ +
93 // vertices
│ │ │ │ +
94 out[0] = 0.25*(x + z)*(x + z - 1)*(y - z - 1)*(y - z);
│ │ │ │ +
95 out[1] = -0.25*(x + z)*(y - z)*((x + z + 1)*(-y + z + 1) - 4*z) - z*(x - y);
│ │ │ │ +
96 out[2] = 0.25*(x + z)*(y - z)*(y - z + 1)*(x + z - 1);
│ │ │ │ +
97 out[3] = 0.25*(y - z)*(x + z)*(y - z + 1)*(x + z + 1);
│ │ │ │ +
98 out[4] = z*(2*z - 1);
│ │ │ │ +
99
│ │ │ │ +
100 // lower edges
│ │ │ │ +
101 out[5] = -0.5*(y - z + 1)*(x + z - 1)*(y - 1)*x;
│ │ │ │ +
102 out[6] = -0.5*(y - z + 1)*(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1));
│ │ │ │ +
103 out[7] = -0.5*(x + z - 1)*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1));
│ │ │ │ +
104 out[8] = -0.5*(y - z + 1)*(x + z - 1)*(x + 1)*y;
│ │ │ │ +
105
│ │ │ │ +
106 // upper edges
│ │ │ │ +
107 out[9] = z*(x + z - 1)*(y - z - 1);
│ │ │ │ +
108 out[10] = -z*((x + z + 1)*(y - z - 1) + 4*z);
│ │ │ │ +
109 out[11] = -z*(y - z + 1)*(x + z - 1);
│ │ │ │ +
110 out[12] = z*(y - z + 1)*(x + z + 1);
│ │ │ │ +
111
│ │ │ │ +
112 // base face
│ │ │ │ +
113 out[13] = (y - z + 1)*(x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1));
│ │ │ │ +
114 }
│ │ │ │ +
115 else
│ │ │ │ +
116 {
│ │ │ │ +
117 // vertices
│ │ │ │ +
118 out[0] = 0.25*(y + z)*(y + z - 1)*(x - z - 1)*(x - z);
│ │ │ │ +
119 out[1] = -0.25*(x - z)*(y + z)*(x - z + 1)*(-y - z + 1);
│ │ │ │ +
120 out[2] = 0.25*(x - z)*(y + z)*((x - z - 1)*(y + z + 1) + 4*z) + z*(x - y);
│ │ │ │ +
121 out[3] = 0.25*(y + z)*(x - z)*(x - z + 1)*(y + z + 1);
│ │ │ │ +
122 out[4] = z*(2*z - 1);
│ │ │ │ +
123
│ │ │ │ +
124 // lower edges
│ │ │ │ +
125 out[5] = -0.5*(y + z - 1)*(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1));
│ │ │ │ +
126 out[6] = -0.5*(x - z + 1)*(y + z - 1)*(y + 1)*x;
│ │ │ │ +
127 out[7] = -0.5*(x - z + 1)*(y + z - 1)*(x - 1)*y;
│ │ │ │ +
128 out[8] = -0.5*(x - z + 1)*(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1));
│ │ │ │ +
129
│ │ │ │ +
130 // upper edges
│ │ │ │ +
131 out[9] = z*(y + z - 1)*(x - z - 1);
│ │ │ │ +
132 out[10] = -z*(x - z + 1)*(y + z - 1);
│ │ │ │ +
133 out[11] = -z*((y + z + 1)*(x - z - 1) + 4*z);
│ │ │ │ +
134 out[12] = z*(x - z + 1)*(y + z + 1);
│ │ │ │ +
135
│ │ │ │ +
136 // base face
│ │ │ │ +
137 out[13] = (x - z + 1)*(y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1));
│ │ │ │ +
138 }
│ │ │ │ +
139
│ │ │ │ +
140 return;
│ │ │ │ +
141 }
│ │ │ │ +
142
│ │ │ │ +
143 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateFunction for order " << k);
│ │ │ │ +
144 }
│ │ │ │ +
145
│ │ │ │ +
151 void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ +
152 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
153 {
│ │ │ │ +
154 out.resize(size());
│ │ │ │ +
155
│ │ │ │ +
156 // Specialization for k==0
│ │ │ │ +
157 if (k==0)
│ │ │ │ +
158 {
│ │ │ │ +
159 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ +
160 return;
│ │ │ │ +
161 }
│ │ │ │ +
162
│ │ │ │ +
163 if (k==1)
│ │ │ │ +
164 {
│ │ │ │ +
165 if(in[0] > in[1])
│ │ │ │ +
166 {
│ │ │ │ +
167 out[0][0] = {-1 + in[1], -1 + in[0] + in[2], -1 + in[1]};
│ │ │ │ +
168 out[1][0] = { 1 - in[1], -in[0] - in[2], -in[1]};
│ │ │ │ +
169 out[2][0] = { -in[1], 1 - in[0] - in[2], -in[1]};
│ │ │ │ +
170 out[3][0] = { in[1], in[0] + in[2], in[1]};
│ │ │ │ +
171 }
│ │ │ │ +
172 else
│ │ │ │ +
173 {
│ │ │ │ +
174 out[0][0] = {-1 + in[1] + in[2], -1 + in[0], -1 + in[0]};
│ │ │ │ +
175 out[1][0] = { 1 - in[1] - in[2], -in[0], -in[0]};
│ │ │ │ +
176 out[2][0] = { -in[1] - in[2], 1 - in[0], -in[0]};
│ │ │ │ +
177 out[3][0] = { in[1] + in[2], in[0], in[0]};
│ │ │ │ +
178 }
│ │ │ │ +
179
│ │ │ │ +
180 out[4][0] = {0, 0, 1};
│ │ │ │ +
181 return;
│ │ │ │ +
182 }
│ │ │ │ +
183
│ │ │ │ +
184 if (k==2)
│ │ │ │ +
185 {
│ │ │ │ +
186 // transform to reference element with base [-1,1]^2
│ │ │ │ +
187 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ +
188 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ +
189 const R z = in[2];
│ │ │ │ +
190
│ │ │ │ +
191 // transformation of the gradient leads to a multiplication
│ │ │ │ +
192 // with the Jacobian [2 0 0; 0 2 0; 1 1 1]
│ │ │ │ +
193 if (x > y)
│ │ │ │ +
194 {
│ │ │ │ +
195 // vertices
│ │ │ │ +
196 out[0][0][0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1);
│ │ │ │ +
197 out[0][0][1] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1);
│ │ │ │ +
198 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1])
│ │ │ │ +
199 + 0.25*((2*x + 2*z - 1)*(y - z - 1)*(y - z)
│ │ │ │ +
200 + (x + z)*(x + z - 1)*(-2*y + 2*z + 1));
│ │ │ │ +
201
│ │ │ │ +
202 out[1][0][0] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ +
203 + (x + z)*(y - z)*(-y + z + 1)) - z);
│ │ │ │ +
204 out[1][0][1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ +
205 + (x + z)*(y - z)*(-(x + z + 1))) + z);
│ │ │ │ +
206 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1])
│ │ │ │ +
207 - 0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ +
208 - (x + z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ +
209 + (x + z)*(y - z)*(x - y + 2*z - 2))
│ │ │ │ +
210 - (x - y);
│ │ │ │ +
211
│ │ │ │ +
212 out[2][0][0] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1);
│ │ │ │ +
213 out[2][0][1] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1);
│ │ │ │ +
214 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1])
│ │ │ │ +
215 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z - 1)
│ │ │ │ +
216 + (x + z)*(y - z)*(y - x - 2*z + 2));
│ │ │ │ +
217
│ │ │ │ +
218 out[3][0][0] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1);
│ │ │ │ +
219 out[3][0][1] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1);
│ │ │ │ +
220 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1])
│ │ │ │ +
221 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z + 1)
│ │ │ │ +
222 + (y - z)*(x + z)*(y - x - 2*z));
│ │ │ │ +
223
│ │ │ │ +
224 out[4][0][0] = 0;
│ │ │ │ +
225 out[4][0][1] = 0;
│ │ │ │ +
226 out[4][0][2] = 4*z - 1;
│ │ │ │ +
227
│ │ │ │ +
228 // lower edges
│ │ │ │ +
229 out[5][0][0] = -(y - z + 1)*(y - 1)*(2*x + z - 1);
│ │ │ │ +
230 out[5][0][1] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x;
│ │ │ │ +
231 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1])
│ │ │ │ +
232 + 0.5*(x + z - 1)*(y - 1)*x - 0.5*(y - z + 1)*(y - 1)*x;
│ │ │ │ +
233
│ │ │ │ +
234 out[6][0][0] = -(y - z + 1)*(2*x + z + 1)*(y - 1);
│ │ │ │ +
235 out[6][0][1] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)
│ │ │ │ +
236 + (y - z + 1)*((x + z + 1)*x + 2*z));
│ │ │ │ +
237 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1])
│ │ │ │ +
238 - 0.5*(-(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1))
│ │ │ │ +
239 + (y - z + 1)*(((y - 1)*x - 1) + 2*y + 1));
│ │ │ │ +
240
│ │ │ │ +
241 out[7][0][0] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)
│ │ │ │ +
242 + (x + z - 1)*((y - z - 1)*y + 2*z));
│ │ │ │ +
243 out[7][0][1] = -(x + z - 1)*(2*y - z - 1)*(x + 1);
│ │ │ │ +
244 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1])
│ │ │ │ +
245 - 0.5*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)
│ │ │ │ +
246 + (x + z - 1)*((-(x + 1)*y - 1) + 2*x + 1));
│ │ │ │ +
247
│ │ │ │ +
248 out[8][0][0] = -(y - z + 1)*(2*x + z)*y;
│ │ │ │ +
249 out[8][0][1] = -(2*y - z + 1)*(x + z - 1)*(x + 1);
│ │ │ │ +
250 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1])
│ │ │ │ +
251 - 0.5*(-x + y - 2*z + 2)*(x + 1)*y;
│ │ │ │ +
252
│ │ │ │ +
253 // upper edges
│ │ │ │ +
254 out[9][0][0] = 2*z*(y - z - 1);
│ │ │ │ +
255 out[9][0][1] = 2*z*(x + z - 1);
│ │ │ │ +
256 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1])
│ │ │ │ +
257 + (x + z - 1)*(y - z - 1) + z*(-x + y - 2*z);
│ │ │ │ +
258
│ │ │ │ +
259 out[10][0][0] = -2*z*(y - z - 1);
│ │ │ │ +
260 out[10][0][1] = -2*z*(x + z + 1);
│ │ │ │ +
261 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1])
│ │ │ │ +
262 - ((x + z + 1)*(y - z - 1) + 4*z)
│ │ │ │ +
263 - z*(-x + y - 2*z + 2);
│ │ │ │ +
264
│ │ │ │ +
265 out[11][0][0] = -2*z*(y - z + 1);
│ │ │ │ +
266 out[11][0][1] = -2*z*(x + z - 1);
│ │ │ │ +
267 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1])
│ │ │ │ +
268 - (y - z + 1)*(x + z - 1) - z*(-x + y - 2*z + 2);
│ │ │ │ +
269
│ │ │ │ +
270 out[12][0][0] = 2*z*(y - z + 1);
│ │ │ │ +
271 out[12][0][1] = 2*z*(x + z + 1);
│ │ │ │ +
272 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1])
│ │ │ │ +
273 + (y - z + 1)*(x + z + 1) + z*(-x + y - 2*z);
│ │ │ │ +
274
│ │ │ │ +
275 // base face
│ │ │ │ +
276 out[13][0][0] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ +
277 + (y - z + 1)*(x + z - 1)*(y - 1 + z));
│ │ │ │ +
278 out[13][0][1] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ +
279 + (y - z + 1)*(x + z - 1)*(x + 1 - z));
│ │ │ │ +
280 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1])
│ │ │ │ +
281 + ((-x + y - 2*z + 2)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ +
282 + (y - z + 1)*(x + z - 1)*(x - y + 2*z + 1));
│ │ │ │ +
283 }
│ │ │ │ +
284 else
│ │ │ │ +
285 {
│ │ │ │ +
286 // vertices
│ │ │ │ +
287 out[0][0][0] = 0.5*(y + z)*(y + z - 1)*(2*x - 2*z - 1);
│ │ │ │ +
288 out[0][0][1] = 0.5*(2*y + 2*z - 1)*(x - z - 1)*(x - z);
│ │ │ │ +
289 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1])
│ │ │ │ +
290 + 0.25*((2*y + 2*z - 1)*(x - z - 1)*(x - z)
│ │ │ │ +
291 + (y + z)*(y + z - 1)*(-2*x + 2*z + 1));
│ │ │ │ +
292
│ │ │ │ +
293 out[1][0][0] = -0.5*(y + z)*(2*x - 2*z + 1)*(-y - z + 1);
│ │ │ │ +
294 out[1][0][1] = -0.5*(x - z)*(x - z + 1)*(-2*y - 2*z + 1);
│ │ │ │ +
295 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1])
│ │ │ │ +
296 - 0.25*((x - y - 2*z)*(x - z + 1)*(-y - z + 1)
│ │ │ │ +
297 + (x - z)*(y + z)*(-x + y + 2*z - 2));
│ │ │ │ +
298
│ │ │ │ +
299 out[2][0][0] = 0.5*((y + z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ +
300 + (x - z)*(y + z)*(y + z + 1) + 4*z);
│ │ │ │ +
301 out[2][0][1] = 0.5*((x - z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ +
302 + (x - z)*(y + z)*(x - z - 1) - 4*z);
│ │ │ │ +
303 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1])
│ │ │ │ +
304 + 0.25*((x - y - 2*z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ +
305 + (x - z)*(y + z)*(x - y - 2*z + 2) + 4*(x - y));
│ │ │ │ +
306
│ │ │ │ +
307 out[3][0][0] = 0.5*(y + z)*(2*x - 2*z + 1)*(y + z + 1);
│ │ │ │ +
308 out[3][0][1] = 0.5*(x - z)*(x - z + 1)*(2*y + 2*z + 1);
│ │ │ │ +
309 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1])
│ │ │ │ +
310 + 0.25*((x - y - 2*z)*(x - z + 1)*(y + z + 1)
│ │ │ │ +
311 + (y + z)*(x - z)*(x - y - 2*z));
│ │ │ │ +
312
│ │ │ │ +
313 out[4][0][0] = 0;
│ │ │ │ +
314 out[4][0][1] = 0;
│ │ │ │ +
315 out[4][0][2] = 4*z - 1;
│ │ │ │ +
316
│ │ │ │ +
317 // lower edges
│ │ │ │ +
318 out[5][0][0] = -(y + z - 1)*(2*x - z - 1)*(y + 1);
│ │ │ │ +
319 out[5][0][1] = -(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)
│ │ │ │ +
320 + (y + z - 1)*((x - z - 1)*x + 2*z));
│ │ │ │ +
321 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1])
│ │ │ │ +
322 - 0.5*((((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1))
│ │ │ │ +
323 + (y + z - 1)*((-(y + 1)*x - 1) + 2*y + 1));
│ │ │ │ +
324
│ │ │ │ +
325 out[6][0][0] = -(2*x - z + 1)*(y + z - 1)*(y + 1);
│ │ │ │ +
326 out[6][0][1] = -(x - z + 1)*(2*y + z)*x;
│ │ │ │ +
327 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1])
│ │ │ │ +
328 - 0.5*(x - y - 2*z + 2)*(y + 1)*x;
│ │ │ │ +
329
│ │ │ │ +
330 out[7][0][0] = -(2*x - z)*(y + z - 1)*y;
│ │ │ │ +
331 out[7][0][1] = -(x - z + 1)*(2*y + z - 1)*(x - 1);
│ │ │ │ +
332 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1])
│ │ │ │ +
333 - 0.5*(x - y - 2*z + 2)*(x - 1)*y;
│ │ │ │ +
334
│ │ │ │ +
335 out[8][0][0] = -(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)
│ │ │ │ +
336 + (x - z + 1)*((y + z + 1)*y + 2*z));
│ │ │ │ +
337 out[8][0][1] = -(x - z + 1)*(2*y + z + 1)*(x - 1);
│ │ │ │ +
338 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1])
│ │ │ │ +
339 - 0.5*(-(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1))
│ │ │ │ +
340 + (x - z + 1)*(((x - 1)*y - 1) + 2*x + 1));
│ │ │ │ +
341
│ │ │ │ +
342 // upper edges
│ │ │ │ +
343 out[9][0][0] = 2*z*(y + z - 1);
│ │ │ │ +
344 out[9][0][1] = 2*z*(x - z - 1);
│ │ │ │ +
345 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1])
│ │ │ │ +
346 + (y + z - 1)*(x - z - 1) + z*(x - y - 2*z);
│ │ │ │ +
347
│ │ │ │ +
348 out[10][0][0] = -2*z*(y + z - 1);
│ │ │ │ +
349 out[10][0][1] = -2*z*(x - z + 1);
│ │ │ │ +
350 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1])
│ │ │ │ +
351 - (x - z + 1)*(y + z - 1) - z*(x - y - 2*z + 2);
│ │ │ │ +
352
│ │ │ │ +
353 out[11][0][0] = -2*z*(y + z + 1);
│ │ │ │ +
354 out[11][0][1] = -2*z*(x - z - 1);
│ │ │ │ +
355 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1])
│ │ │ │ +
356 - ((y + z + 1)*(x - z - 1) + 4*z) - z*(x - y - 2*z + 2);
│ │ │ │ +
357
│ │ │ │ +
358 out[12][0][0] = 2*z*(y + z + 1);
│ │ │ │ +
359 out[12][0][1] = 2*z*(x - z + 1);
│ │ │ │ +
360 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1])
│ │ │ │ +
361 + (x - z + 1)*(y + z + 1) + z*(x - y - 2*z);
│ │ │ │ +
362
│ │ │ │ +
363 // base face
│ │ │ │ +
364 out[13][0][0] = 2*((y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ +
365 + (x - z + 1)*(y + z - 1)*(y + 1 - z));
│ │ │ │ +
366 out[13][0][1] = 2*((x - z + 1)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ +
367 + (x - z + 1)*(y + z - 1)*(x - 1 + z));
│ │ │ │ +
368 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1])
│ │ │ │ +
369 + (x - y - 2*z + 2)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ +
370 + (x - z + 1)*(y + z - 1)*(-(x - y - 2*z - 1));
│ │ │ │ +
371 }
│ │ │ │ +
372
│ │ │ │ +
373 return;
│ │ │ │ +
374 }
│ │ │ │ +
375
│ │ │ │ +
376 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateJacobian for order " << k);
│ │ │ │ +
377 }
│ │ │ │ +
378
│ │ │ │ +
385 void partial(const std::array<unsigned int,3>& order,
│ │ │ │ +
386 const typename Traits::DomainType& in,
│ │ │ │ +
387 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
388 {
│ │ │ │ +
389 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
390
│ │ │ │ +
391 out.resize(size());
│ │ │ │ +
392
│ │ │ │ +
393 if (totalOrder == 0)
│ │ │ │ +
394 {
│ │ │ │ +
395 evaluateFunction(in, out);
│ │ │ │ +
396 return;
│ │ │ │ +
397 }
│ │ │ │ +
398
│ │ │ │ +
399 if (k==0)
│ │ │ │ +
400 {
│ │ │ │ +
401 out[0] = 0;
│ │ │ │ +
402 return;
│ │ │ │ +
403 }
│ │ │ │ +
404
│ │ │ │ +
405 if (k==1)
│ │ │ │ +
406 {
│ │ │ │ +
407 if (totalOrder == 1)
│ │ │ │ +
408 {
│ │ │ │ +
409 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
410 if (in[0] > in[1])
│ │ │ │ +
411 {
│ │ │ │ +
412 switch (direction)
│ │ │ │ +
413 {
│ │ │ │ +
414 case 0:
│ │ │ │ +
415 out[0] = -1 + in[1];
│ │ │ │ +
416 out[1] = 1 - in[1];
│ │ │ │ +
417 out[2] = -in[1];
│ │ │ │ +
418 out[3] = in[1];
│ │ │ │ +
419 out[4] = 0;
│ │ │ │ +
420 break;
│ │ │ │ +
421 case 1:
│ │ │ │ +
422 out[0] = -1 + in[0] + in[2];
│ │ │ │ +
423 out[1] = -in[0] - in[2];
│ │ │ │ +
424 out[2] = 1 - in[0] - in[2];
│ │ │ │ +
425 out[3] = in[0]+in[2];
│ │ │ │ +
426 out[4] = 0;
│ │ │ │ +
427 break;
│ │ │ │ +
428 case 2:
│ │ │ │ +
429 out[0] = -1 + in[1];
│ │ │ │ +
430 out[1] = -in[1];
│ │ │ │ +
431 out[2] = -in[1];
│ │ │ │ +
432 out[3] = in[1];
│ │ │ │ +
433 out[4] = 1;
│ │ │ │ +
434 break;
│ │ │ │ +
435 default:
│ │ │ │ +
436 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
437 }
│ │ │ │ +
438 }
│ │ │ │ +
439 else /* (in[0] <= in[1]) */
│ │ │ │ +
440 {
│ │ │ │ +
441 switch (direction)
│ │ │ │ +
442 {
│ │ │ │ +
443 case 0:
│ │ │ │ +
444 out[0] = -1 + in[1] + in[2];
│ │ │ │ +
445 out[1] = 1 - in[1] - in[2];
│ │ │ │ +
446 out[2] = -in[1] - in[2];
│ │ │ │ +
447 out[3] = in[1] + in[2];
│ │ │ │ +
448 out[4] = 0;
│ │ │ │ +
449 break;
│ │ │ │ +
450 case 1:
│ │ │ │ +
451 out[0] = -1 + in[0];
│ │ │ │ +
452 out[1] = -in[0];
│ │ │ │ +
453 out[2] = 1 - in[0];
│ │ │ │ +
454 out[3] = in[0];
│ │ │ │ +
455 out[4] = 0;
│ │ │ │ +
456 break;
│ │ │ │ +
457 case 2:
│ │ │ │ +
458 out[0] = -1 + in[0];
│ │ │ │ +
459 out[1] = -in[0];
│ │ │ │ +
460 out[2] = -in[0];
│ │ │ │ +
461 out[3] = in[0];
│ │ │ │ +
462 out[4] = 1;
│ │ │ │ +
463 break;
│ │ │ │ +
464 default:
│ │ │ │ +
465 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
466 }
│ │ │ │ +
467 }
│ │ │ │ +
468 } else if (totalOrder == 2)
│ │ │ │ +
469 {
│ │ │ │ +
470 if ((order[0] == 1 && order[1] == 1) ||
│ │ │ │ +
471 (order[1] == 1 && order[2] == 1 && in[0] > in[1]) ||
│ │ │ │ +
472 (order[0] == 1 && order[2] == 1 && in[0] <=in[1]))
│ │ │ │ +
473 {
│ │ │ │ +
474 out = {1, -1, -1, 1, 0};
│ │ │ │ +
475 } else
│ │ │ │ +
476 {
│ │ │ │ +
477 out = {0, 0, 0, 0, 0};
│ │ │ │ +
478 }
│ │ │ │ +
479
│ │ │ │ +
480 } else
│ │ │ │ +
481 {
│ │ │ │ +
482 out = {0, 0, 0, 0, 0};
│ │ │ │ +
483 }
│ │ │ │ +
484
│ │ │ │ +
485 return;
│ │ │ │ +
486 }
│ │ │ │ +
487
│ │ │ │ +
488 if (k==2)
│ │ │ │ +
489 {
│ │ │ │ +
490 if (totalOrder == 1)
│ │ │ │ +
491 {
│ │ │ │ +
492 // transform to reference element with base [-1,1]^2
│ │ │ │ +
493 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ +
494 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ +
495 const R z = in[2];
│ │ │ │ +
496
│ │ │ │ +
497 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
498
│ │ │ │ +
499 // transformation of the gradient leads to a multiplication
│ │ │ │ +
500 // with the Jacobian [2 0 0; 0 2 0; 1 1 1]
│ │ │ │ +
501 if (x > y)
│ │ │ │ +
502 {
│ │ │ │ +
503 switch (direction)
│ │ │ │ +
504 {
│ │ │ │ +
505 case 0:
│ │ │ │ +
506 out[0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1);
│ │ │ │ +
507 out[1] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - z)*(-y + z + 1)) - z);
│ │ │ │ +
508 out[2] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1);
│ │ │ │ +
509 out[3] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1);
│ │ │ │ +
510 out[4] = 0;
│ │ │ │ +
511 out[5] = -(y - z + 1)*(2*x + z - 1)*(y - 1);
│ │ │ │ +
512 out[6] = -(y - z + 1)*(2*x + z + 1)*(y - 1);
│ │ │ │ +
513 out[7] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) + (x + z - 1)*((y - z - 1)*y + 2*z));
│ │ │ │ +
514 out[8] = -(y - z + 1)*(2*x + z)*y;
│ │ │ │ +
515 out[9] = 2*z*(y - z - 1);
│ │ │ │ +
516 out[10] = -2*z*(y - z - 1);
│ │ │ │ +
517 out[11] = -2*z*(y - z + 1);
│ │ │ │ +
518 out[12] = 2*z*(y - z + 1);
│ │ │ │ +
519 out[13] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + 1)*(x + z - 1)*(y - 1 + z));
│ │ │ │ +
520 break;
│ │ │ │ +
521 case 1:
│ │ │ │ +
522 out[0] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1);
│ │ │ │ +
523 out[1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - z)*(-(x + z + 1))) + z);
│ │ │ │ +
524 out[2] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1);
│ │ │ │ +
525 out[3] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1);
│ │ │ │ +
526 out[4] = 0;
│ │ │ │ +
527 out[5] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x;
│ │ │ │ +
528 out[6] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) + (y - z + 1)*((x + z + 1)*x + 2*z));
│ │ │ │ +
529 out[7] = -(x + z - 1)*(2*y - z - 1)*(x + 1);
│ │ │ │ +
530 out[8] = -(2*y - z + 1)*(x + z - 1)*(x + 1);
│ │ │ │ +
531 out[9] = 2*z*(x + z - 1);
│ │ │ │ +
532 out[10] = -2*z*(x + z + 1);
│ │ │ │ +
533 out[11] = -2*z*(x + z - 1);
│ │ │ │ +
534 out[12] = 2*z*(x + z + 1);
│ │ │ │ +
535 out[13] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + 1)*(x + z - 1)*(x + 1 - z));
│ │ │ │ +
536 break;
│ │ │ │ +
537 case 2:
│ │ │ │ +
538 out[0] = -((y - z)*(2*x + 2*z - 1)*(z - y + 1))/2;
│ │ │ │ +
539 out[1] = ((y - z + 1)*(y - 2*x + z + 2*x*y - 2*x*z + 2*y*z - 2*z*z))/2;
│ │ │ │ +
540 out[2] = ((y - z)*(2*x + 2*z - 1)*(y - z + 1))/2;
│ │ │ │ +
541 out[3] = ((y - z)*(2*x + 2*z + 1)*(y - z + 1))/2;
│ │ │ │ +
542 out[4] = 4*z - 1;
│ │ │ │ +
543 out[5] = (-(y - z + 1)*(2*x + z - 1)*(y - 1) - (x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x + (x + z - 1)*(y - 1)*x - (y - z + 1)*(y - 1)*x)/2;
│ │ │ │ +
544 out[6] = -((y - z + 1)*(3*y - 2*x + z + 3*x*y + x*z + y*z + x*x - 1))/2;
│ │ │ │ +
545 out[7] = z - z*(2*x + 1) - ((2*z - y*(z - y + 1))*(x + z - 1))/2 - ((2*x - y*(x + 1))*(x + z - 1))/2 + ((x + 1)*(x + z - 1)*(z - 2*y + 1))/2 + y*(x + 1)*(z - y + 1);
│ │ │ │ +
546 out[8] = -((y - z + 1)*(y + z + 3*x*y + x*z + y*z + x*x - 1))/2;
│ │ │ │ +
547 out[9] = -(x + 3*z - 1)*(z - y + 1);
│ │ │ │ +
548 out[10] = (x + z + 1)*(z - y + 1) - 2*y*z - 6*z + 2*z*z;
│ │ │ │ +
549 out[11] = -(x + 3*z - 1)*(y - z + 1);
│ │ │ │ +
550 out[12] = (x + 3*z + 1)*(y - z + 1);
│ │ │ │ +
551 out[13] = (y - z + 1)*(2*y - 3*x + z + 2*x*y + 6*x*z - 2*y*z + 2*x*x + 4*z*z - 3);
│ │ │ │ +
552 break;
│ │ │ │ +
553 default:
│ │ │ │ +
554 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
555 }
│ │ │ │ +
556 }
│ │ │ │ +
557 else // x <= y
│ │ │ │ +
558 {
│ │ │ │ +
559 switch (direction)
│ │ │ │ +
560 {
│ │ │ │ +
561 case 0:
│ │ │ │ +
562 out[0] = -((y + z)*(2*z - 2*x + 1)*(y + z - 1))/2;
│ │ │ │ +
563 out[1] = ((y + z)*(2*x - 2*z + 1)*(y + z - 1))/2;
│ │ │ │ +
564 out[2] = -((y + z + 1)*(y - 3*z - 2*x*y - 2*x*z + 2*y*z + 2*z*z))/2;
│ │ │ │ +
565 out[3] = ((y + z)*(2*x - 2*z + 1)*(y + z + 1))/2;
│ │ │ │ +
566 out[4] = 0;
│ │ │ │ +
567 out[5] = (y + 1)*(y + z - 1)*(z - 2*x + 1);
│ │ │ │ +
568 out[6] = -(y + 1)*(2*x - z + 1)*(y + z - 1);
│ │ │ │ +
569 out[7] = -y*(2*x - z)*(y + z - 1);
│ │ │ │ +
570 out[8] = z - z*(2*x + 1) - (2*z + y*(y + z + 1))*(x - z + 1) - y*(x - 1)*(y + z + 1);
│ │ │ │ +
571 out[9] = 2*z*(y + z - 1);
│ │ │ │ +
572 out[10] = -2*z*(y + z - 1);
│ │ │ │ +
573 out[11] = -2*z*(y + z + 1);
│ │ │ │ +
574 out[12] = 2*z*(y + z + 1);
│ │ │ │ +
575 out[13] = 2*(y + z - 1)*(2*x - z + 2*x*y - 2*x*z + 2*z*z);
│ │ │ │ +
576 break;
│ │ │ │ +
577 case 1:
│ │ │ │ +
578 out[0] = -(x - z)*(y + z - 0.5)*(z - x + 1);
│ │ │ │ +
579 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2;
│ │ │ │ +
580 out[2] = -((z - x + 1)*(x + 3*z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2;
│ │ │ │ +
581 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2;
│ │ │ │ +
582 out[4] = 0;
│ │ │ │ +
583 out[5] = z - z*(2*y + 1) - (2*z - x*(z - x + 1))*(y + z - 1) + x*(y + 1)*(z - x + 1);
│ │ │ │ +
584 out[6] = -x*(2*y + z)*(x - z + 1);
│ │ │ │ +
585 out[7] = -(x - 1)*(x - z + 1)*(2*y + z - 1);
│ │ │ │ +
586 out[8] = -(x - 1)*(x - z + 1)*(2*y + z + 1);
│ │ │ │ +
587 out[9] = -2*z*(z - x + 1);
│ │ │ │ +
588 out[10] = -2*z*(x - z + 1);
│ │ │ │ +
589 out[11] = 2*z*(z - x + 1);
│ │ │ │ +
590 out[12] = 2*z*(x - z + 1);
│ │ │ │ +
591 out[13] = 2*(x - z + 1)*(2*x*y - z - 2*y + 2*y*z + 2*z*z);
│ │ │ │ +
592 break;
│ │ │ │ +
593 case 2:
│ │ │ │ +
594 out[0] = -((x - z)*(2*y + 2*z - 1)*(z - x + 1))/2;
│ │ │ │ +
595 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2;
│ │ │ │ +
596 out[2] = ((x - z + 1)*(x - 2*y + z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2;
│ │ │ │ +
597 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2;
│ │ │ │ +
598 out[4] = 4*z - 1;
│ │ │ │ +
599 out[5] = z - z*(2*y + 1) - ((2*z - x*(z - x + 1))*(y + z - 1))/2 - ((2*y - x*(y + 1))*(y + z - 1))/2 + ((y + 1)*(y + z - 1)*(z - 2*x + 1))/2 + x*(y + 1)*(z - x + 1);
│ │ │ │ +
600 out[6] = -((x - z + 1)*(x + z + 3*x*y + x*z + y*z + y*y - 1))/2;
│ │ │ │ +
601 out[7] = -((x - z + 1)*(3*x*y - 4*y - z - x + x*z + y*z + y*y + 1))/2;
│ │ │ │ +
602 out[8] = -((x - z + 1)*(3*x - 2*y + z + 3*x*y + x*z + y*z + y*y - 1))/2;
│ │ │ │ +
603 out[9] = -(z - x + 1)*(y + 3*z - 1);
│ │ │ │ +
604 out[10] = -(x - z + 1)*(y + 3*z - 1);
│ │ │ │ +
605 out[11] = (y + z + 1)*(z - x + 1) - 2*x*z - 6*z + 2*z*z;
│ │ │ │ +
606 out[12] = (x - z + 1)*(y + 3*z + 1);
│ │ │ │ +
607 out[13] = (x - z + 1)*(2*x - 3*y + z + 2*x*y - 2*x*z + 6*y*z + 2*y*y + 4*z*z - 3);
│ │ │ │ +
608 break;
│ │ │ │ +
609 default:
│ │ │ │ +
610 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
611 }
│ │ │ │ +
612 }
│ │ │ │ +
613 } else {
│ │ │ │ +
614 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
615 }
│ │ │ │ +
616
│ │ │ │ +
617 return;
│ │ │ │ +
618 }
│ │ │ │ +
619
│ │ │ │ +
620 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::partial for order " << k);
│ │ │ │ +
621 }
│ │ │ │ +
622
│ │ │ │ +
624 static constexpr unsigned int order ()
│ │ │ │ +
625 {
│ │ │ │ +
626 return k;
│ │ │ │ +
627 }
│ │ │ │ +
628 };
│ │ │ │ +
629
│ │ │ │ +
634 template<unsigned int k>
│ │ │ │ +
635 class LagrangePyramidLocalCoefficients
│ │ │ │ +
636 {
│ │ │ │ +
637 public:
│ │ │ │ +
639 LagrangePyramidLocalCoefficients ()
│ │ │ │ +
640 : localKeys_(size())
│ │ │ │ +
641 {
│ │ │ │ +
642 if (k==0)
│ │ │ │ +
643 {
│ │ │ │ +
644 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ +
645 return;
│ │ │ │ +
646 }
│ │ │ │ +
647
│ │ │ │ +
648 if (k==1)
│ │ │ │ +
649 {
│ │ │ │ +
650 for (std::size_t i=0; i<size(); i++)
│ │ │ │ +
651 localKeys_[i] = LocalKey(i,3,0);
│ │ │ │ +
652 return;
│ │ │ │ +
653 }
│ │ │ │ +
654
│ │ │ │ +
655 if (k==2)
│ │ │ │ +
656 {
│ │ │ │ +
657 // Vertex shape functions
│ │ │ │ +
658 localKeys_[0] = LocalKey(0,3,0);
│ │ │ │ +
659 localKeys_[1] = LocalKey(1,3,0);
│ │ │ │ +
660 localKeys_[2] = LocalKey(2,3,0);
│ │ │ │ +
661 localKeys_[3] = LocalKey(3,3,0);
│ │ │ │ +
662 localKeys_[4] = LocalKey(4,3,0);
│ │ │ │ +
663
│ │ │ │ +
664 // Edge shape functions
│ │ │ │ +
665 localKeys_[5] = LocalKey(0,2,0);
│ │ │ │ +
666 localKeys_[6] = LocalKey(1,2,0);
│ │ │ │ +
667 localKeys_[7] = LocalKey(2,2,0);
│ │ │ │ +
668 localKeys_[8] = LocalKey(3,2,0);
│ │ │ │ +
669 localKeys_[9] = LocalKey(4,2,0);
│ │ │ │ +
670 localKeys_[10] = LocalKey(5,2,0);
│ │ │ │ +
671 localKeys_[11] = LocalKey(6,2,0);
│ │ │ │ +
672 localKeys_[12] = LocalKey(7,2,0);
│ │ │ │ +
673
│ │ │ │ +
674 // base face shape function
│ │ │ │ +
675 localKeys_[13] = LocalKey(0,1,0);
│ │ │ │ +
676
│ │ │ │ +
677 return;
│ │ │ │ +
678 }
│ │ │ │ +
679
│ │ │ │ +
680 // No general case
│ │ │ │ +
681 DUNE_THROW(NotImplemented, "LagrangePyramidLocalCoefficients for order " << k);
│ │ │ │ +
682
│ │ │ │ +
683 }
│ │ │ │ +
684
│ │ │ │ +
686 static constexpr std::size_t size ()
│ │ │ │ +
687 {
│ │ │ │ +
688 std::size_t result = 0;
│ │ │ │ +
689 for (unsigned int i=0; i<=k; i++)
│ │ │ │ +
690 result += power(i+1,2);
│ │ │ │ +
691 return result;
│ │ │ │ +
692 }
│ │ │ │ +
693
│ │ │ │ +
695 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
696 {
│ │ │ │ +
697 return localKeys_[i];
│ │ │ │ +
698 }
│ │ │ │ +
699
│ │ │ │ +
700 private:
│ │ │ │ +
701 std::vector<LocalKey> localKeys_;
│ │ │ │ +
702 };
│ │ │ │ +
703
│ │ │ │ +
708 template<class LocalBasis>
│ │ │ │ +
709 class LagrangePyramidLocalInterpolation
│ │ │ │ +
710 {
│ │ │ │ +
711 public:
│ │ │ │ +
712
│ │ │ │ +
720 template<typename F, typename C>
│ │ │ │ +
721 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
722 {
│ │ │ │ +
723 constexpr auto k = LocalBasis::order();
│ │ │ │ +
724 using D = typename LocalBasis::Traits::DomainType;
│ │ │ │ +
725 using DF = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ +
726
│ │ │ │ +
727 auto&& f = Impl::makeFunctionWithCallOperator<D>(ff);
│ │ │ │ +
728
│ │ │ │ +
729 out.resize(LocalBasis::size());
│ │ │ │ +
730
│ │ │ │ +
731 // Specialization for zero-order case
│ │ │ │ +
732 if (k==0)
│ │ │ │ +
733 {
│ │ │ │ +
734 auto center = ReferenceElements<DF,3>::general(GeometryTypes::pyramid).position(0,0);
│ │ │ │ +
735 out[0] = f(center);
│ │ │ │ +
736 return;
│ │ │ │ +
737 }
│ │ │ │ +
738
│ │ │ │ +
739 // Specialization for first-order case
│ │ │ │ +
740 if (k==1)
│ │ │ │ +
741 {
│ │ │ │ +
742 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ +
743 {
│ │ │ │ +
744 auto vertex = ReferenceElements<DF,3>::general(GeometryTypes::pyramid).position(i,3);
│ │ │ │ +
745 out[i] = f(vertex);
│ │ │ │ +
746 }
│ │ │ │ +
747 return;
│ │ │ │ +
748 }
│ │ │ │ +
749
│ │ │ │ +
750 // Specialization for second-order case
│ │ │ │ +
751 if (k==2)
│ │ │ │ +
752 {
│ │ │ │ +
753 out[0] = f( D( {0.0, 0.0, 0.0} ) );
│ │ │ │ +
754 out[1] = f( D( {1.0, 0.0, 0.0} ) );
│ │ │ │ +
755 out[2] = f( D( {0.0, 1.0, 0.0} ) );
│ │ │ │ +
756 out[3] = f( D( {1.0, 1.0, 0.0} ) );
│ │ │ │ +
757 out[4] = f( D( {0.0, 0.0, 1.0} ) );
│ │ │ │ +
758 out[5] = f( D( {0.0, 0.5, 0.0} ) );
│ │ │ │ +
759 out[6] = f( D( {1.0, 0.5, 0.0} ) );
│ │ │ │ +
760 out[7] = f( D( {0.5, 0.0, 0.0} ) );
│ │ │ │ +
761 out[8] = f( D( {0.5, 1.0, 0.0} ) );
│ │ │ │ +
762 out[9] = f( D( {0.0, 0.0, 0.5} ) );
│ │ │ │ +
763 out[10] = f( D( {0.5, 0.0, 0.5} ) );
│ │ │ │ +
764 out[11] = f( D( {0.0, 0.5, 0.5} ) );
│ │ │ │ +
765 out[12] = f( D( {0.5, 0.5, 0.5} ) );
│ │ │ │ +
766 out[13] = f( D( {0.5, 0.5, 0.0} ) );
│ │ │ │ +
767
│ │ │ │ +
768 return;
│ │ │ │ +
769 }
│ │ │ │ +
770
│ │ │ │ +
771 DUNE_THROW(NotImplemented, "LagrangePyramidLocalInterpolation not implemented for order " << k);
│ │ │ │ +
772 }
│ │ │ │ +
773
│ │ │ │ +
774 };
│ │ │ │ +
775
│ │ │ │ +
776} } // namespace Dune::Impl
│ │ │ │ +
777
│ │ │ │ +
778namespace Dune
│ │ │ │ +
779{
│ │ │ │ +
810 template<class D, class R, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
812 {
│ │ │ │ +
813 public:
│ │ │ │ + │ │ │ │ +
817 Impl::LagrangePyramidLocalCoefficients<k>,
│ │ │ │ +
818 Impl::LagrangePyramidLocalInterpolation<Impl::LagrangePyramidLocalBasis<D,R,k> > >;
│ │ │ │ +
819
│ │ │ │ + │ │ │ │ +
826
│ │ │ │ +
│ │ │ │ +
829 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
830 {
│ │ │ │ +
831 return basis_;
│ │ │ │ +
832 }
│ │ │ │ +
│ │ │ │ +
833
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
837 {
│ │ │ │ +
838 return coefficients_;
│ │ │ │ +
839 }
│ │ │ │ +
│ │ │ │ +
840
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
844 {
│ │ │ │ +
845 return interpolation_;
│ │ │ │ +
846 }
│ │ │ │ +
│ │ │ │ +
847
│ │ │ │ +
│ │ │ │ +
849 static constexpr std::size_t size ()
│ │ │ │ +
850 {
│ │ │ │ +
851 return Impl::LagrangePyramidLocalBasis<D,R,k>::size();
│ │ │ │ +
852 }
│ │ │ │ +
│ │ │ │ +
853
│ │ │ │ +
│ │ │ │ +
856 static constexpr GeometryType type ()
│ │ │ │ +
857 {
│ │ │ │ +
858 return GeometryTypes::pyramid;
│ │ │ │ +
859 }
│ │ │ │ +
│ │ │ │ +
860
│ │ │ │ +
861 private:
│ │ │ │ +
862 Impl::LagrangePyramidLocalBasis<D,R,k> basis_;
│ │ │ │ +
863 Impl::LagrangePyramidLocalCoefficients<k> coefficients_;
│ │ │ │ +
864 Impl::LagrangePyramidLocalInterpolation<Impl::LagrangePyramidLocalBasis<D,R,k> > interpolation_;
│ │ │ │ +
865 };
│ │ │ │ +
│ │ │ │ +
866
│ │ │ │ +
867} // namespace Dune
│ │ │ │ +
868
│ │ │ │ +
869#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Brezzi-Douglas-Fortin-Marini finite elements for cubes.
Definition bdfmcube.hh:45
│ │ │ │ -
auto localCoefficients() const -> const LocalCoefficients &
Definition bdfmcube.hh:66
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition bdfmcube.hh:70
│ │ │ │ -
BDFMCubeLocalFiniteElement()
Standard constructor.
Definition bdfmcube.hh:54
│ │ │ │ -
auto localBasis() const -> const LocalBasis &
Definition bdfmcube.hh:65
│ │ │ │ -
static constexpr auto type() -> GeometryType
Definition bdfmcube.hh:71
│ │ │ │ -
auto localInterpolation() const -> const LocalInterpolation &
Definition bdfmcube.hh:67
│ │ │ │ -
BDFMCubeLocalFiniteElement(std::bitset< 2 *dim > s)
Make set number s, where 0 <= s < 2^(2*dim)
Definition bdfmcube.hh:61
│ │ │ │ -
Brezzi-Douglas-Fortin-Marini shape functions on a reference cube.
Definition brezzidouglasfortinmarini/cube/localbasis.hh:37
│ │ │ │ -
Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes.
Definition localcoefficients.hh:33
│ │ │ │ -
Interpolation for Brezzi-Douglas-Fortin-Marini shape functions on cubes.
Definition brezzidouglasfortinmarini/cube/localinterpolation.hh:38
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ - │ │ │ │ - │ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangepyramid.hh:836
│ │ │ │ +
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangepyramid.hh:849
│ │ │ │ +
LagrangePyramidLocalFiniteElement()
Default constructor.
Definition lagrangepyramid.hh:825
│ │ │ │ +
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangepyramid.hh:856
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangepyramid.hh:829
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangepyramid.hh:843
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,114 +1,871 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i │ │ │ │ │ -bdfmcube.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +lagrangepyramid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/ │ │ │ │ │ -_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_f_o_r_t_i_n_m_a_r_i_n_i_/_c_u_b_e_/ │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -15 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ 16 │ │ │ │ │ -_1_7namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -43 template │ │ │ │ │ -_4_4 class _B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -45 { │ │ │ │ │ -46 using _L_o_c_a_l_B_a_s_i_s = _B_D_F_M_C_u_b_e_L_o_c_a_l_B_a_s_i_s_<_D_,_ _R_,_ _d_i_m_,_ _o_r_d_e_r_>; │ │ │ │ │ -47 using _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s = _B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_D_,_ _R_,_ _d_i_m_,_ _o_r_d_e_r_>; │ │ │ │ │ -48 using _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n = _B_D_F_M_C_u_b_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_D_,_ _R_,_ _d_i_m_,_ _o_r_d_e_r_>; │ │ │ │ │ -49 │ │ │ │ │ -50 public: │ │ │ │ │ -_5_1 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_L_o_c_a_l_B_a_s_i_s_,_ _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_, │ │ │ │ │ -_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_ _>; │ │ │ │ │ -52 │ │ │ │ │ -_5_4 _B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () {} │ │ │ │ │ -55 │ │ │ │ │ -_6_1 _B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset<2*dim> s) │ │ │ │ │ -62 : basis( s ), interpolation( s ) │ │ │ │ │ -63 {} │ │ │ │ │ -64 │ │ │ │ │ -_6_5 auto _l_o_c_a_l_B_a_s_i_s () const -> const _L_o_c_a_l_B_a_s_i_s& { return basis; } │ │ │ │ │ -_6_6 auto _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const -> const _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s& { return │ │ │ │ │ -coefficients; } │ │ │ │ │ -_6_7 auto _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const -> const _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n& { return │ │ │ │ │ -interpolation; } │ │ │ │ │ -68 │ │ │ │ │ -_7_0 unsigned int _s_i_z_e () const { return basis.size(); } │ │ │ │ │ -_7_1 static constexpr auto _t_y_p_e () -> GeometryType { return GeometryTypes::cube │ │ │ │ │ -(dim); } │ │ │ │ │ -72 │ │ │ │ │ -73 private: │ │ │ │ │ -74 LocalBasis basis; │ │ │ │ │ -75 LocalCoefficients coefficients; │ │ │ │ │ -76 LocalInterpolation interpolation; │ │ │ │ │ -77 }; │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e { namespace Impl │ │ │ │ │ +23{ │ │ │ │ │ +33 template │ │ │ │ │ +34 class LagrangePyramidLocalBasis │ │ │ │ │ +35 { │ │ │ │ │ +36 public: │ │ │ │ │ +37 using Traits = │ │ │ │ │ +LocalBasisTraits,R,1,FieldVector,FieldMatrix │ │ │ │ │ +>; │ │ │ │ │ +38 │ │ │ │ │ +41 static constexpr std::size_t size () │ │ │ │ │ +42 { │ │ │ │ │ +43 std::size_t result = 0; │ │ │ │ │ +44 for (unsigned int i=0; i<=k; i++) │ │ │ │ │ +45 result += power(i+1,2); │ │ │ │ │ +46 return result; │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +50 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +51 std::vector& out) const │ │ │ │ │ +52 { │ │ │ │ │ +53 out.resize(size()); │ │ │ │ │ +54 │ │ │ │ │ +55 // Specialization for zero-order case │ │ │ │ │ +56 if (k==0) │ │ │ │ │ +57 { │ │ │ │ │ +58 out[0] = 1; │ │ │ │ │ +59 return; │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +62 if (k==1) │ │ │ │ │ +63 { │ │ │ │ │ +64 if(in[0] > in[1]) │ │ │ │ │ +65 { │ │ │ │ │ +66 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[1]); │ │ │ │ │ +67 out[1] = in[0]*(1-in[1])-in[2]*in[1]; │ │ │ │ │ +68 out[2] = (1-in[0])*in[1]-in[2]*in[1]; │ │ │ │ │ +69 out[3] = in[0]*in[1]+in[2]*in[1]; │ │ │ │ │ +70 } │ │ │ │ │ +71 else │ │ │ │ │ +72 { │ │ │ │ │ +73 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[0]); │ │ │ │ │ +74 out[1] = in[0]*(1-in[1])-in[2]*in[0]; │ │ │ │ │ +75 out[2] = (1-in[0])*in[1]-in[2]*in[0]; │ │ │ │ │ +76 out[3] = in[0]*in[1]+in[2]*in[0]; │ │ │ │ │ +77 } │ │ │ │ │ 78 │ │ │ │ │ -79} // namespace Dune │ │ │ │ │ +79 out[4] = in[2]; │ │ │ │ │ 80 │ │ │ │ │ -81#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASFORTINMARINI_BDFMCUBE_HH │ │ │ │ │ -_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +81 return; │ │ │ │ │ +82 } │ │ │ │ │ +83 │ │ │ │ │ +84 if (k==2) │ │ │ │ │ +85 { │ │ │ │ │ +86 // transform to reference element with base [-1,1]^2 │ │ │ │ │ +87 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ +88 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ +89 const R z = in[2]; │ │ │ │ │ +90 │ │ │ │ │ +91 if (x > y) │ │ │ │ │ +92 { │ │ │ │ │ +93 // vertices │ │ │ │ │ +94 out[0] = 0.25*(x + z)*(x + z - 1)*(y - z - 1)*(y - z); │ │ │ │ │ +95 out[1] = -0.25*(x + z)*(y - z)*((x + z + 1)*(-y + z + 1) - 4*z) - z*(x - y); │ │ │ │ │ +96 out[2] = 0.25*(x + z)*(y - z)*(y - z + 1)*(x + z - 1); │ │ │ │ │ +97 out[3] = 0.25*(y - z)*(x + z)*(y - z + 1)*(x + z + 1); │ │ │ │ │ +98 out[4] = z*(2*z - 1); │ │ │ │ │ +99 │ │ │ │ │ +100 // lower edges │ │ │ │ │ +101 out[5] = -0.5*(y - z + 1)*(x + z - 1)*(y - 1)*x; │ │ │ │ │ +102 out[6] = -0.5*(y - z + 1)*(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)); │ │ │ │ │ +103 out[7] = -0.5*(x + z - 1)*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)); │ │ │ │ │ +104 out[8] = -0.5*(y - z + 1)*(x + z - 1)*(x + 1)*y; │ │ │ │ │ +105 │ │ │ │ │ +106 // upper edges │ │ │ │ │ +107 out[9] = z*(x + z - 1)*(y - z - 1); │ │ │ │ │ +108 out[10] = -z*((x + z + 1)*(y - z - 1) + 4*z); │ │ │ │ │ +109 out[11] = -z*(y - z + 1)*(x + z - 1); │ │ │ │ │ +110 out[12] = z*(y - z + 1)*(x + z + 1); │ │ │ │ │ +111 │ │ │ │ │ +112 // base face │ │ │ │ │ +113 out[13] = (y - z + 1)*(x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)); │ │ │ │ │ +114 } │ │ │ │ │ +115 else │ │ │ │ │ +116 { │ │ │ │ │ +117 // vertices │ │ │ │ │ +118 out[0] = 0.25*(y + z)*(y + z - 1)*(x - z - 1)*(x - z); │ │ │ │ │ +119 out[1] = -0.25*(x - z)*(y + z)*(x - z + 1)*(-y - z + 1); │ │ │ │ │ +120 out[2] = 0.25*(x - z)*(y + z)*((x - z - 1)*(y + z + 1) + 4*z) + z*(x - y); │ │ │ │ │ +121 out[3] = 0.25*(y + z)*(x - z)*(x - z + 1)*(y + z + 1); │ │ │ │ │ +122 out[4] = z*(2*z - 1); │ │ │ │ │ +123 │ │ │ │ │ +124 // lower edges │ │ │ │ │ +125 out[5] = -0.5*(y + z - 1)*(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)); │ │ │ │ │ +126 out[6] = -0.5*(x - z + 1)*(y + z - 1)*(y + 1)*x; │ │ │ │ │ +127 out[7] = -0.5*(x - z + 1)*(y + z - 1)*(x - 1)*y; │ │ │ │ │ +128 out[8] = -0.5*(x - z + 1)*(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)); │ │ │ │ │ +129 │ │ │ │ │ +130 // upper edges │ │ │ │ │ +131 out[9] = z*(y + z - 1)*(x - z - 1); │ │ │ │ │ +132 out[10] = -z*(x - z + 1)*(y + z - 1); │ │ │ │ │ +133 out[11] = -z*((y + z + 1)*(x - z - 1) + 4*z); │ │ │ │ │ +134 out[12] = z*(x - z + 1)*(y + z + 1); │ │ │ │ │ +135 │ │ │ │ │ +136 // base face │ │ │ │ │ +137 out[13] = (x - z + 1)*(y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)); │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +140 return; │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +143 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateFunction for │ │ │ │ │ +order " << k); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +151 void evaluateJacobian(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +152 std::vector& out) const │ │ │ │ │ +153 { │ │ │ │ │ +154 out.resize(size()); │ │ │ │ │ +155 │ │ │ │ │ +156 // Specialization for k==0 │ │ │ │ │ +157 if (k==0) │ │ │ │ │ +158 { │ │ │ │ │ +159 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ +160 return; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +163 if (k==1) │ │ │ │ │ +164 { │ │ │ │ │ +165 if(in[0] > in[1]) │ │ │ │ │ +166 { │ │ │ │ │ +167 out[0][0] = {-1 + in[1], -1 + in[0] + in[2], -1 + in[1]}; │ │ │ │ │ +168 out[1][0] = { 1 - in[1], -in[0] - in[2], -in[1]}; │ │ │ │ │ +169 out[2][0] = { -in[1], 1 - in[0] - in[2], -in[1]}; │ │ │ │ │ +170 out[3][0] = { in[1], in[0] + in[2], in[1]}; │ │ │ │ │ +171 } │ │ │ │ │ +172 else │ │ │ │ │ +173 { │ │ │ │ │ +174 out[0][0] = {-1 + in[1] + in[2], -1 + in[0], -1 + in[0]}; │ │ │ │ │ +175 out[1][0] = { 1 - in[1] - in[2], -in[0], -in[0]}; │ │ │ │ │ +176 out[2][0] = { -in[1] - in[2], 1 - in[0], -in[0]}; │ │ │ │ │ +177 out[3][0] = { in[1] + in[2], in[0], in[0]}; │ │ │ │ │ +178 } │ │ │ │ │ +179 │ │ │ │ │ +180 out[4][0] = {0, 0, 1}; │ │ │ │ │ +181 return; │ │ │ │ │ +182 } │ │ │ │ │ +183 │ │ │ │ │ +184 if (k==2) │ │ │ │ │ +185 { │ │ │ │ │ +186 // transform to reference element with base [-1,1]^2 │ │ │ │ │ +187 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ +188 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ +189 const R z = in[2]; │ │ │ │ │ +190 │ │ │ │ │ +191 // transformation of the gradient leads to a multiplication │ │ │ │ │ +192 // with the Jacobian [2 0 0; 0 2 0; 1 1 1] │ │ │ │ │ +193 if (x > y) │ │ │ │ │ +194 { │ │ │ │ │ +195 // vertices │ │ │ │ │ +196 out[0][0][0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1); │ │ │ │ │ +197 out[0][0][1] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1); │ │ │ │ │ +198 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1]) │ │ │ │ │ +199 + 0.25*((2*x + 2*z - 1)*(y - z - 1)*(y - z) │ │ │ │ │ +200 + (x + z)*(x + z - 1)*(-2*y + 2*z + 1)); │ │ │ │ │ +201 │ │ │ │ │ +202 out[1][0][0] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ +203 + (x + z)*(y - z)*(-y + z + 1)) - z); │ │ │ │ │ +204 out[1][0][1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ +205 + (x + z)*(y - z)*(-(x + z + 1))) + z); │ │ │ │ │ +206 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1]) │ │ │ │ │ +207 - 0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ +208 - (x + z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ +209 + (x + z)*(y - z)*(x - y + 2*z - 2)) │ │ │ │ │ +210 - (x - y); │ │ │ │ │ +211 │ │ │ │ │ +212 out[2][0][0] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1); │ │ │ │ │ +213 out[2][0][1] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1); │ │ │ │ │ +214 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1]) │ │ │ │ │ +215 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z - 1) │ │ │ │ │ +216 + (x + z)*(y - z)*(y - x - 2*z + 2)); │ │ │ │ │ +217 │ │ │ │ │ +218 out[3][0][0] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1); │ │ │ │ │ +219 out[3][0][1] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1); │ │ │ │ │ +220 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1]) │ │ │ │ │ +221 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z + 1) │ │ │ │ │ +222 + (y - z)*(x + z)*(y - x - 2*z)); │ │ │ │ │ +223 │ │ │ │ │ +224 out[4][0][0] = 0; │ │ │ │ │ +225 out[4][0][1] = 0; │ │ │ │ │ +226 out[4][0][2] = 4*z - 1; │ │ │ │ │ +227 │ │ │ │ │ +228 // lower edges │ │ │ │ │ +229 out[5][0][0] = -(y - z + 1)*(y - 1)*(2*x + z - 1); │ │ │ │ │ +230 out[5][0][1] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x; │ │ │ │ │ +231 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1]) │ │ │ │ │ +232 + 0.5*(x + z - 1)*(y - 1)*x - 0.5*(y - z + 1)*(y - 1)*x; │ │ │ │ │ +233 │ │ │ │ │ +234 out[6][0][0] = -(y - z + 1)*(2*x + z + 1)*(y - 1); │ │ │ │ │ +235 out[6][0][1] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) │ │ │ │ │ +236 + (y - z + 1)*((x + z + 1)*x + 2*z)); │ │ │ │ │ +237 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1]) │ │ │ │ │ +238 - 0.5*(-(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)) │ │ │ │ │ +239 + (y - z + 1)*(((y - 1)*x - 1) + 2*y + 1)); │ │ │ │ │ +240 │ │ │ │ │ +241 out[7][0][0] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) │ │ │ │ │ +242 + (x + z - 1)*((y - z - 1)*y + 2*z)); │ │ │ │ │ +243 out[7][0][1] = -(x + z - 1)*(2*y - z - 1)*(x + 1); │ │ │ │ │ +244 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1]) │ │ │ │ │ +245 - 0.5*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) │ │ │ │ │ +246 + (x + z - 1)*((-(x + 1)*y - 1) + 2*x + 1)); │ │ │ │ │ +247 │ │ │ │ │ +248 out[8][0][0] = -(y - z + 1)*(2*x + z)*y; │ │ │ │ │ +249 out[8][0][1] = -(2*y - z + 1)*(x + z - 1)*(x + 1); │ │ │ │ │ +250 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1]) │ │ │ │ │ +251 - 0.5*(-x + y - 2*z + 2)*(x + 1)*y; │ │ │ │ │ +252 │ │ │ │ │ +253 // upper edges │ │ │ │ │ +254 out[9][0][0] = 2*z*(y - z - 1); │ │ │ │ │ +255 out[9][0][1] = 2*z*(x + z - 1); │ │ │ │ │ +256 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1]) │ │ │ │ │ +257 + (x + z - 1)*(y - z - 1) + z*(-x + y - 2*z); │ │ │ │ │ +258 │ │ │ │ │ +259 out[10][0][0] = -2*z*(y - z - 1); │ │ │ │ │ +260 out[10][0][1] = -2*z*(x + z + 1); │ │ │ │ │ +261 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1]) │ │ │ │ │ +262 - ((x + z + 1)*(y - z - 1) + 4*z) │ │ │ │ │ +263 - z*(-x + y - 2*z + 2); │ │ │ │ │ +264 │ │ │ │ │ +265 out[11][0][0] = -2*z*(y - z + 1); │ │ │ │ │ +266 out[11][0][1] = -2*z*(x + z - 1); │ │ │ │ │ +267 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1]) │ │ │ │ │ +268 - (y - z + 1)*(x + z - 1) - z*(-x + y - 2*z + 2); │ │ │ │ │ +269 │ │ │ │ │ +270 out[12][0][0] = 2*z*(y - z + 1); │ │ │ │ │ +271 out[12][0][1] = 2*z*(x + z + 1); │ │ │ │ │ +272 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1]) │ │ │ │ │ +273 + (y - z + 1)*(x + z + 1) + z*(-x + y - 2*z); │ │ │ │ │ +274 │ │ │ │ │ +275 // base face │ │ │ │ │ +276 out[13][0][0] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ +277 + (y - z + 1)*(x + z - 1)*(y - 1 + z)); │ │ │ │ │ +278 out[13][0][1] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ +279 + (y - z + 1)*(x + z - 1)*(x + 1 - z)); │ │ │ │ │ +280 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1]) │ │ │ │ │ +281 + ((-x + y - 2*z + 2)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ +282 + (y - z + 1)*(x + z - 1)*(x - y + 2*z + 1)); │ │ │ │ │ +283 } │ │ │ │ │ +284 else │ │ │ │ │ +285 { │ │ │ │ │ +286 // vertices │ │ │ │ │ +287 out[0][0][0] = 0.5*(y + z)*(y + z - 1)*(2*x - 2*z - 1); │ │ │ │ │ +288 out[0][0][1] = 0.5*(2*y + 2*z - 1)*(x - z - 1)*(x - z); │ │ │ │ │ +289 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1]) │ │ │ │ │ +290 + 0.25*((2*y + 2*z - 1)*(x - z - 1)*(x - z) │ │ │ │ │ +291 + (y + z)*(y + z - 1)*(-2*x + 2*z + 1)); │ │ │ │ │ +292 │ │ │ │ │ +293 out[1][0][0] = -0.5*(y + z)*(2*x - 2*z + 1)*(-y - z + 1); │ │ │ │ │ +294 out[1][0][1] = -0.5*(x - z)*(x - z + 1)*(-2*y - 2*z + 1); │ │ │ │ │ +295 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1]) │ │ │ │ │ +296 - 0.25*((x - y - 2*z)*(x - z + 1)*(-y - z + 1) │ │ │ │ │ +297 + (x - z)*(y + z)*(-x + y + 2*z - 2)); │ │ │ │ │ +298 │ │ │ │ │ +299 out[2][0][0] = 0.5*((y + z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ +300 + (x - z)*(y + z)*(y + z + 1) + 4*z); │ │ │ │ │ +301 out[2][0][1] = 0.5*((x - z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ +302 + (x - z)*(y + z)*(x - z - 1) - 4*z); │ │ │ │ │ +303 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1]) │ │ │ │ │ +304 + 0.25*((x - y - 2*z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ +305 + (x - z)*(y + z)*(x - y - 2*z + 2) + 4*(x - y)); │ │ │ │ │ +306 │ │ │ │ │ +307 out[3][0][0] = 0.5*(y + z)*(2*x - 2*z + 1)*(y + z + 1); │ │ │ │ │ +308 out[3][0][1] = 0.5*(x - z)*(x - z + 1)*(2*y + 2*z + 1); │ │ │ │ │ +309 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1]) │ │ │ │ │ +310 + 0.25*((x - y - 2*z)*(x - z + 1)*(y + z + 1) │ │ │ │ │ +311 + (y + z)*(x - z)*(x - y - 2*z)); │ │ │ │ │ +312 │ │ │ │ │ +313 out[4][0][0] = 0; │ │ │ │ │ +314 out[4][0][1] = 0; │ │ │ │ │ +315 out[4][0][2] = 4*z - 1; │ │ │ │ │ +316 │ │ │ │ │ +317 // lower edges │ │ │ │ │ +318 out[5][0][0] = -(y + z - 1)*(2*x - z - 1)*(y + 1); │ │ │ │ │ +319 out[5][0][1] = -(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1) │ │ │ │ │ +320 + (y + z - 1)*((x - z - 1)*x + 2*z)); │ │ │ │ │ +321 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1]) │ │ │ │ │ +322 - 0.5*((((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)) │ │ │ │ │ +323 + (y + z - 1)*((-(y + 1)*x - 1) + 2*y + 1)); │ │ │ │ │ +324 │ │ │ │ │ +325 out[6][0][0] = -(2*x - z + 1)*(y + z - 1)*(y + 1); │ │ │ │ │ +326 out[6][0][1] = -(x - z + 1)*(2*y + z)*x; │ │ │ │ │ +327 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1]) │ │ │ │ │ +328 - 0.5*(x - y - 2*z + 2)*(y + 1)*x; │ │ │ │ │ +329 │ │ │ │ │ +330 out[7][0][0] = -(2*x - z)*(y + z - 1)*y; │ │ │ │ │ +331 out[7][0][1] = -(x - z + 1)*(2*y + z - 1)*(x - 1); │ │ │ │ │ +332 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1]) │ │ │ │ │ +333 - 0.5*(x - y - 2*z + 2)*(x - 1)*y; │ │ │ │ │ +334 │ │ │ │ │ +335 out[8][0][0] = -(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1) │ │ │ │ │ +336 + (x - z + 1)*((y + z + 1)*y + 2*z)); │ │ │ │ │ +337 out[8][0][1] = -(x - z + 1)*(2*y + z + 1)*(x - 1); │ │ │ │ │ +338 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1]) │ │ │ │ │ +339 - 0.5*(-(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)) │ │ │ │ │ +340 + (x - z + 1)*(((x - 1)*y - 1) + 2*x + 1)); │ │ │ │ │ +341 │ │ │ │ │ +342 // upper edges │ │ │ │ │ +343 out[9][0][0] = 2*z*(y + z - 1); │ │ │ │ │ +344 out[9][0][1] = 2*z*(x - z - 1); │ │ │ │ │ +345 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1]) │ │ │ │ │ +346 + (y + z - 1)*(x - z - 1) + z*(x - y - 2*z); │ │ │ │ │ +347 │ │ │ │ │ +348 out[10][0][0] = -2*z*(y + z - 1); │ │ │ │ │ +349 out[10][0][1] = -2*z*(x - z + 1); │ │ │ │ │ +350 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1]) │ │ │ │ │ +351 - (x - z + 1)*(y + z - 1) - z*(x - y - 2*z + 2); │ │ │ │ │ +352 │ │ │ │ │ +353 out[11][0][0] = -2*z*(y + z + 1); │ │ │ │ │ +354 out[11][0][1] = -2*z*(x - z - 1); │ │ │ │ │ +355 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1]) │ │ │ │ │ +356 - ((y + z + 1)*(x - z - 1) + 4*z) - z*(x - y - 2*z + 2); │ │ │ │ │ +357 │ │ │ │ │ +358 out[12][0][0] = 2*z*(y + z + 1); │ │ │ │ │ +359 out[12][0][1] = 2*z*(x - z + 1); │ │ │ │ │ +360 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1]) │ │ │ │ │ +361 + (x - z + 1)*(y + z + 1) + z*(x - y - 2*z); │ │ │ │ │ +362 │ │ │ │ │ +363 // base face │ │ │ │ │ +364 out[13][0][0] = 2*((y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ +365 + (x - z + 1)*(y + z - 1)*(y + 1 - z)); │ │ │ │ │ +366 out[13][0][1] = 2*((x - z + 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ +367 + (x - z + 1)*(y + z - 1)*(x - 1 + z)); │ │ │ │ │ +368 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1]) │ │ │ │ │ +369 + (x - y - 2*z + 2)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ +370 + (x - z + 1)*(y + z - 1)*(-(x - y - 2*z - 1)); │ │ │ │ │ +371 } │ │ │ │ │ +372 │ │ │ │ │ +373 return; │ │ │ │ │ +374 } │ │ │ │ │ +375 │ │ │ │ │ +376 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateJacobian for │ │ │ │ │ +order " << k); │ │ │ │ │ +377 } │ │ │ │ │ +378 │ │ │ │ │ +385 void partial(const std::array& order, │ │ │ │ │ +386 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +387 std::vector& out) const │ │ │ │ │ +388 { │ │ │ │ │ +389 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +390 │ │ │ │ │ +391 out.resize(size()); │ │ │ │ │ +392 │ │ │ │ │ +393 if (totalOrder == 0) │ │ │ │ │ +394 { │ │ │ │ │ +395 evaluateFunction(in, out); │ │ │ │ │ +396 return; │ │ │ │ │ +397 } │ │ │ │ │ +398 │ │ │ │ │ +399 if (k==0) │ │ │ │ │ +400 { │ │ │ │ │ +401 out[0] = 0; │ │ │ │ │ +402 return; │ │ │ │ │ +403 } │ │ │ │ │ +404 │ │ │ │ │ +405 if (k==1) │ │ │ │ │ +406 { │ │ │ │ │ +407 if (totalOrder == 1) │ │ │ │ │ +408 { │ │ │ │ │ +409 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +410 if (in[0] > in[1]) │ │ │ │ │ +411 { │ │ │ │ │ +412 switch (direction) │ │ │ │ │ +413 { │ │ │ │ │ +414 case 0: │ │ │ │ │ +415 out[0] = -1 + in[1]; │ │ │ │ │ +416 out[1] = 1 - in[1]; │ │ │ │ │ +417 out[2] = -in[1]; │ │ │ │ │ +418 out[3] = in[1]; │ │ │ │ │ +419 out[4] = 0; │ │ │ │ │ +420 break; │ │ │ │ │ +421 case 1: │ │ │ │ │ +422 out[0] = -1 + in[0] + in[2]; │ │ │ │ │ +423 out[1] = -in[0] - in[2]; │ │ │ │ │ +424 out[2] = 1 - in[0] - in[2]; │ │ │ │ │ +425 out[3] = in[0]+in[2]; │ │ │ │ │ +426 out[4] = 0; │ │ │ │ │ +427 break; │ │ │ │ │ +428 case 2: │ │ │ │ │ +429 out[0] = -1 + in[1]; │ │ │ │ │ +430 out[1] = -in[1]; │ │ │ │ │ +431 out[2] = -in[1]; │ │ │ │ │ +432 out[3] = in[1]; │ │ │ │ │ +433 out[4] = 1; │ │ │ │ │ +434 break; │ │ │ │ │ +435 default: │ │ │ │ │ +436 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +437 } │ │ │ │ │ +438 } │ │ │ │ │ +439 else /* (in[0] <= in[1]) */ │ │ │ │ │ +440 { │ │ │ │ │ +441 switch (direction) │ │ │ │ │ +442 { │ │ │ │ │ +443 case 0: │ │ │ │ │ +444 out[0] = -1 + in[1] + in[2]; │ │ │ │ │ +445 out[1] = 1 - in[1] - in[2]; │ │ │ │ │ +446 out[2] = -in[1] - in[2]; │ │ │ │ │ +447 out[3] = in[1] + in[2]; │ │ │ │ │ +448 out[4] = 0; │ │ │ │ │ +449 break; │ │ │ │ │ +450 case 1: │ │ │ │ │ +451 out[0] = -1 + in[0]; │ │ │ │ │ +452 out[1] = -in[0]; │ │ │ │ │ +453 out[2] = 1 - in[0]; │ │ │ │ │ +454 out[3] = in[0]; │ │ │ │ │ +455 out[4] = 0; │ │ │ │ │ +456 break; │ │ │ │ │ +457 case 2: │ │ │ │ │ +458 out[0] = -1 + in[0]; │ │ │ │ │ +459 out[1] = -in[0]; │ │ │ │ │ +460 out[2] = -in[0]; │ │ │ │ │ +461 out[3] = in[0]; │ │ │ │ │ +462 out[4] = 1; │ │ │ │ │ +463 break; │ │ │ │ │ +464 default: │ │ │ │ │ +465 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +466 } │ │ │ │ │ +467 } │ │ │ │ │ +468 } else if (totalOrder == 2) │ │ │ │ │ +469 { │ │ │ │ │ +470 if ((order[0] == 1 && order[1] == 1) || │ │ │ │ │ +471 (order[1] == 1 && order[2] == 1 && in[0] > in[1]) || │ │ │ │ │ +472 (order[0] == 1 && order[2] == 1 && in[0] <=in[1])) │ │ │ │ │ +473 { │ │ │ │ │ +474 out = {1, -1, -1, 1, 0}; │ │ │ │ │ +475 } else │ │ │ │ │ +476 { │ │ │ │ │ +477 out = {0, 0, 0, 0, 0}; │ │ │ │ │ +478 } │ │ │ │ │ +479 │ │ │ │ │ +480 } else │ │ │ │ │ +481 { │ │ │ │ │ +482 out = {0, 0, 0, 0, 0}; │ │ │ │ │ +483 } │ │ │ │ │ +484 │ │ │ │ │ +485 return; │ │ │ │ │ +486 } │ │ │ │ │ +487 │ │ │ │ │ +488 if (k==2) │ │ │ │ │ +489 { │ │ │ │ │ +490 if (totalOrder == 1) │ │ │ │ │ +491 { │ │ │ │ │ +492 // transform to reference element with base [-1,1]^2 │ │ │ │ │ +493 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ +494 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ +495 const R z = in[2]; │ │ │ │ │ +496 │ │ │ │ │ +497 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +498 │ │ │ │ │ +499 // transformation of the gradient leads to a multiplication │ │ │ │ │ +500 // with the Jacobian [2 0 0; 0 2 0; 1 1 1] │ │ │ │ │ +501 if (x > y) │ │ │ │ │ +502 { │ │ │ │ │ +503 switch (direction) │ │ │ │ │ +504 { │ │ │ │ │ +505 case 0: │ │ │ │ │ +506 out[0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1); │ │ │ │ │ +507 out[1] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - │ │ │ │ │ +z)*(-y + z + 1)) - z); │ │ │ │ │ +508 out[2] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1); │ │ │ │ │ +509 out[3] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1); │ │ │ │ │ +510 out[4] = 0; │ │ │ │ │ +511 out[5] = -(y - z + 1)*(2*x + z - 1)*(y - 1); │ │ │ │ │ +512 out[6] = -(y - z + 1)*(2*x + z + 1)*(y - 1); │ │ │ │ │ +513 out[7] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) + (x + z - 1)*((y - z │ │ │ │ │ +- 1)*y + 2*z)); │ │ │ │ │ +514 out[8] = -(y - z + 1)*(2*x + z)*y; │ │ │ │ │ +515 out[9] = 2*z*(y - z - 1); │ │ │ │ │ +516 out[10] = -2*z*(y - z - 1); │ │ │ │ │ +517 out[11] = -2*z*(y - z + 1); │ │ │ │ │ +518 out[12] = 2*z*(y - z + 1); │ │ │ │ │ +519 out[13] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + │ │ │ │ │ +1)*(x + z - 1)*(y - 1 + z)); │ │ │ │ │ +520 break; │ │ │ │ │ +521 case 1: │ │ │ │ │ +522 out[0] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1); │ │ │ │ │ +523 out[1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - │ │ │ │ │ +z)*(-(x + z + 1))) + z); │ │ │ │ │ +524 out[2] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1); │ │ │ │ │ +525 out[3] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1); │ │ │ │ │ +526 out[4] = 0; │ │ │ │ │ +527 out[5] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x; │ │ │ │ │ +528 out[6] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) + (y - z + 1)*((x + z │ │ │ │ │ ++ 1)*x + 2*z)); │ │ │ │ │ +529 out[7] = -(x + z - 1)*(2*y - z - 1)*(x + 1); │ │ │ │ │ +530 out[8] = -(2*y - z + 1)*(x + z - 1)*(x + 1); │ │ │ │ │ +531 out[9] = 2*z*(x + z - 1); │ │ │ │ │ +532 out[10] = -2*z*(x + z + 1); │ │ │ │ │ +533 out[11] = -2*z*(x + z - 1); │ │ │ │ │ +534 out[12] = 2*z*(x + z + 1); │ │ │ │ │ +535 out[13] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + │ │ │ │ │ +1)*(x + z - 1)*(x + 1 - z)); │ │ │ │ │ +536 break; │ │ │ │ │ +537 case 2: │ │ │ │ │ +538 out[0] = -((y - z)*(2*x + 2*z - 1)*(z - y + 1))/2; │ │ │ │ │ +539 out[1] = ((y - z + 1)*(y - 2*x + z + 2*x*y - 2*x*z + 2*y*z - 2*z*z))/2; │ │ │ │ │ +540 out[2] = ((y - z)*(2*x + 2*z - 1)*(y - z + 1))/2; │ │ │ │ │ +541 out[3] = ((y - z)*(2*x + 2*z + 1)*(y - z + 1))/2; │ │ │ │ │ +542 out[4] = 4*z - 1; │ │ │ │ │ +543 out[5] = (-(y - z + 1)*(2*x + z - 1)*(y - 1) - (x + z - 1)*(y - 1)*x - (y - │ │ │ │ │ +z + 1)*(x + z - 1)*x + (x + z - 1)*(y - 1)*x - (y - z + 1)*(y - 1)*x)/2; │ │ │ │ │ +544 out[6] = -((y - z + 1)*(3*y - 2*x + z + 3*x*y + x*z + y*z + x*x - 1))/2; │ │ │ │ │ +545 out[7] = z - z*(2*x + 1) - ((2*z - y*(z - y + 1))*(x + z - 1))/2 - ((2*x - │ │ │ │ │ +y*(x + 1))*(x + z - 1))/2 + ((x + 1)*(x + z - 1)*(z - 2*y + 1))/2 + y*(x + 1)* │ │ │ │ │ +(z - y + 1); │ │ │ │ │ +546 out[8] = -((y - z + 1)*(y + z + 3*x*y + x*z + y*z + x*x - 1))/2; │ │ │ │ │ +547 out[9] = -(x + 3*z - 1)*(z - y + 1); │ │ │ │ │ +548 out[10] = (x + z + 1)*(z - y + 1) - 2*y*z - 6*z + 2*z*z; │ │ │ │ │ +549 out[11] = -(x + 3*z - 1)*(y - z + 1); │ │ │ │ │ +550 out[12] = (x + 3*z + 1)*(y - z + 1); │ │ │ │ │ +551 out[13] = (y - z + 1)*(2*y - 3*x + z + 2*x*y + 6*x*z - 2*y*z + 2*x*x + │ │ │ │ │ +4*z*z - 3); │ │ │ │ │ +552 break; │ │ │ │ │ +553 default: │ │ │ │ │ +554 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +555 } │ │ │ │ │ +556 } │ │ │ │ │ +557 else // x <= y │ │ │ │ │ +558 { │ │ │ │ │ +559 switch (direction) │ │ │ │ │ +560 { │ │ │ │ │ +561 case 0: │ │ │ │ │ +562 out[0] = -((y + z)*(2*z - 2*x + 1)*(y + z - 1))/2; │ │ │ │ │ +563 out[1] = ((y + z)*(2*x - 2*z + 1)*(y + z - 1))/2; │ │ │ │ │ +564 out[2] = -((y + z + 1)*(y - 3*z - 2*x*y - 2*x*z + 2*y*z + 2*z*z))/2; │ │ │ │ │ +565 out[3] = ((y + z)*(2*x - 2*z + 1)*(y + z + 1))/2; │ │ │ │ │ +566 out[4] = 0; │ │ │ │ │ +567 out[5] = (y + 1)*(y + z - 1)*(z - 2*x + 1); │ │ │ │ │ +568 out[6] = -(y + 1)*(2*x - z + 1)*(y + z - 1); │ │ │ │ │ +569 out[7] = -y*(2*x - z)*(y + z - 1); │ │ │ │ │ +570 out[8] = z - z*(2*x + 1) - (2*z + y*(y + z + 1))*(x - z + 1) - y*(x - 1)*(y │ │ │ │ │ ++ z + 1); │ │ │ │ │ +571 out[9] = 2*z*(y + z - 1); │ │ │ │ │ +572 out[10] = -2*z*(y + z - 1); │ │ │ │ │ +573 out[11] = -2*z*(y + z + 1); │ │ │ │ │ +574 out[12] = 2*z*(y + z + 1); │ │ │ │ │ +575 out[13] = 2*(y + z - 1)*(2*x - z + 2*x*y - 2*x*z + 2*z*z); │ │ │ │ │ +576 break; │ │ │ │ │ +577 case 1: │ │ │ │ │ +578 out[0] = -(x - z)*(y + z - 0.5)*(z - x + 1); │ │ │ │ │ +579 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2; │ │ │ │ │ +580 out[2] = -((z - x + 1)*(x + 3*z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2; │ │ │ │ │ +581 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2; │ │ │ │ │ +582 out[4] = 0; │ │ │ │ │ +583 out[5] = z - z*(2*y + 1) - (2*z - x*(z - x + 1))*(y + z - 1) + x*(y + 1)*(z │ │ │ │ │ +- x + 1); │ │ │ │ │ +584 out[6] = -x*(2*y + z)*(x - z + 1); │ │ │ │ │ +585 out[7] = -(x - 1)*(x - z + 1)*(2*y + z - 1); │ │ │ │ │ +586 out[8] = -(x - 1)*(x - z + 1)*(2*y + z + 1); │ │ │ │ │ +587 out[9] = -2*z*(z - x + 1); │ │ │ │ │ +588 out[10] = -2*z*(x - z + 1); │ │ │ │ │ +589 out[11] = 2*z*(z - x + 1); │ │ │ │ │ +590 out[12] = 2*z*(x - z + 1); │ │ │ │ │ +591 out[13] = 2*(x - z + 1)*(2*x*y - z - 2*y + 2*y*z + 2*z*z); │ │ │ │ │ +592 break; │ │ │ │ │ +593 case 2: │ │ │ │ │ +594 out[0] = -((x - z)*(2*y + 2*z - 1)*(z - x + 1))/2; │ │ │ │ │ +595 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2; │ │ │ │ │ +596 out[2] = ((x - z + 1)*(x - 2*y + z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2; │ │ │ │ │ +597 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2; │ │ │ │ │ +598 out[4] = 4*z - 1; │ │ │ │ │ +599 out[5] = z - z*(2*y + 1) - ((2*z - x*(z - x + 1))*(y + z - 1))/2 - ((2*y - │ │ │ │ │ +x*(y + 1))*(y + z - 1))/2 + ((y + 1)*(y + z - 1)*(z - 2*x + 1))/2 + x*(y + 1)* │ │ │ │ │ +(z - x + 1); │ │ │ │ │ +600 out[6] = -((x - z + 1)*(x + z + 3*x*y + x*z + y*z + y*y - 1))/2; │ │ │ │ │ +601 out[7] = -((x - z + 1)*(3*x*y - 4*y - z - x + x*z + y*z + y*y + 1))/2; │ │ │ │ │ +602 out[8] = -((x - z + 1)*(3*x - 2*y + z + 3*x*y + x*z + y*z + y*y - 1))/2; │ │ │ │ │ +603 out[9] = -(z - x + 1)*(y + 3*z - 1); │ │ │ │ │ +604 out[10] = -(x - z + 1)*(y + 3*z - 1); │ │ │ │ │ +605 out[11] = (y + z + 1)*(z - x + 1) - 2*x*z - 6*z + 2*z*z; │ │ │ │ │ +606 out[12] = (x - z + 1)*(y + 3*z + 1); │ │ │ │ │ +607 out[13] = (x - z + 1)*(2*x - 3*y + z + 2*x*y - 2*x*z + 6*y*z + 2*y*y + │ │ │ │ │ +4*z*z - 3); │ │ │ │ │ +608 break; │ │ │ │ │ +609 default: │ │ │ │ │ +610 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +611 } │ │ │ │ │ +612 } │ │ │ │ │ +613 } else { │ │ │ │ │ +614 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +615 } │ │ │ │ │ +616 │ │ │ │ │ +617 return; │ │ │ │ │ +618 } │ │ │ │ │ +619 │ │ │ │ │ +620 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::partial for order " │ │ │ │ │ +<< k); │ │ │ │ │ +621 } │ │ │ │ │ +622 │ │ │ │ │ +624 static constexpr unsigned int order () │ │ │ │ │ +625 { │ │ │ │ │ +626 return k; │ │ │ │ │ +627 } │ │ │ │ │ +628 }; │ │ │ │ │ +629 │ │ │ │ │ +634 template │ │ │ │ │ +635 class LagrangePyramidLocalCoefficients │ │ │ │ │ +636 { │ │ │ │ │ +637 public: │ │ │ │ │ +639 LagrangePyramidLocalCoefficients () │ │ │ │ │ +640 : localKeys_(size()) │ │ │ │ │ +641 { │ │ │ │ │ +642 if (k==0) │ │ │ │ │ +643 { │ │ │ │ │ +644 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ +645 return; │ │ │ │ │ +646 } │ │ │ │ │ +647 │ │ │ │ │ +648 if (k==1) │ │ │ │ │ +649 { │ │ │ │ │ +650 for (std::size_t i=0; i localKeys_; │ │ │ │ │ +702 }; │ │ │ │ │ +703 │ │ │ │ │ +708 template │ │ │ │ │ +709 class LagrangePyramidLocalInterpolation │ │ │ │ │ +710 { │ │ │ │ │ +711 public: │ │ │ │ │ +712 │ │ │ │ │ +720 template │ │ │ │ │ +721 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ +722 { │ │ │ │ │ +723 constexpr auto k = LocalBasis::order(); │ │ │ │ │ +724 using D = typename LocalBasis::Traits::DomainType; │ │ │ │ │ +725 using DF = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ +726 │ │ │ │ │ +727 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +728 │ │ │ │ │ +729 out.resize(LocalBasis::size()); │ │ │ │ │ +730 │ │ │ │ │ +731 // Specialization for zero-order case │ │ │ │ │ +732 if (k==0) │ │ │ │ │ +733 { │ │ │ │ │ +734 auto center = ReferenceElements::general(GeometryTypes:: │ │ │ │ │ +pyramid).position(0,0); │ │ │ │ │ +735 out[0] = f(center); │ │ │ │ │ +736 return; │ │ │ │ │ +737 } │ │ │ │ │ +738 │ │ │ │ │ +739 // Specialization for first-order case │ │ │ │ │ +740 if (k==1) │ │ │ │ │ +741 { │ │ │ │ │ +742 for (unsigned int i=0; i::general(GeometryTypes:: │ │ │ │ │ +pyramid).position(i,3); │ │ │ │ │ +745 out[i] = f(vertex); │ │ │ │ │ +746 } │ │ │ │ │ +747 return; │ │ │ │ │ +748 } │ │ │ │ │ +749 │ │ │ │ │ +750 // Specialization for second-order case │ │ │ │ │ +751 if (k==2) │ │ │ │ │ +752 { │ │ │ │ │ +753 out[0] = f( D( {0.0, 0.0, 0.0} ) ); │ │ │ │ │ +754 out[1] = f( D( {1.0, 0.0, 0.0} ) ); │ │ │ │ │ +755 out[2] = f( D( {0.0, 1.0, 0.0} ) ); │ │ │ │ │ +756 out[3] = f( D( {1.0, 1.0, 0.0} ) ); │ │ │ │ │ +757 out[4] = f( D( {0.0, 0.0, 1.0} ) ); │ │ │ │ │ +758 out[5] = f( D( {0.0, 0.5, 0.0} ) ); │ │ │ │ │ +759 out[6] = f( D( {1.0, 0.5, 0.0} ) ); │ │ │ │ │ +760 out[7] = f( D( {0.5, 0.0, 0.0} ) ); │ │ │ │ │ +761 out[8] = f( D( {0.5, 1.0, 0.0} ) ); │ │ │ │ │ +762 out[9] = f( D( {0.0, 0.0, 0.5} ) ); │ │ │ │ │ +763 out[10] = f( D( {0.5, 0.0, 0.5} ) ); │ │ │ │ │ +764 out[11] = f( D( {0.0, 0.5, 0.5} ) ); │ │ │ │ │ +765 out[12] = f( D( {0.5, 0.5, 0.5} ) ); │ │ │ │ │ +766 out[13] = f( D( {0.5, 0.5, 0.0} ) ); │ │ │ │ │ +767 │ │ │ │ │ +768 return; │ │ │ │ │ +769 } │ │ │ │ │ +770 │ │ │ │ │ +771 DUNE_THROW(NotImplemented, "LagrangePyramidLocalInterpolation not │ │ │ │ │ +implemented for order " << k); │ │ │ │ │ +772 } │ │ │ │ │ +773 │ │ │ │ │ +774 }; │ │ │ │ │ +775 │ │ │ │ │ +776} } // namespace Dune::Impl │ │ │ │ │ +777 │ │ │ │ │ +778namespace _D_u_n_e │ │ │ │ │ +779{ │ │ │ │ │ +810 template │ │ │ │ │ +_8_1_1 class _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +812 { │ │ │ │ │ +813 public: │ │ │ │ │ +_8_1_6 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ +_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_k_>, │ │ │ │ │ +817 Impl::LagrangePyramidLocalCoefficients, │ │ │ │ │ +818 Impl::LagrangePyramidLocalInterpolation > >; │ │ │ │ │ +819 │ │ │ │ │ +_8_2_5 _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ +826 │ │ │ │ │ +_8_2_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +830 { │ │ │ │ │ +831 return basis_; │ │ │ │ │ +832 } │ │ │ │ │ +833 │ │ │ │ │ +_8_3_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +837 { │ │ │ │ │ +838 return coefficients_; │ │ │ │ │ +839 } │ │ │ │ │ +840 │ │ │ │ │ +_8_4_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +844 { │ │ │ │ │ +845 return interpolation_; │ │ │ │ │ +846 } │ │ │ │ │ +847 │ │ │ │ │ +_8_4_9 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ +850 { │ │ │ │ │ +851 return Impl::LagrangePyramidLocalBasis::size(); │ │ │ │ │ +852 } │ │ │ │ │ +853 │ │ │ │ │ +_8_5_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +857 { │ │ │ │ │ +858 return GeometryTypes::pyramid; │ │ │ │ │ +859 } │ │ │ │ │ +860 │ │ │ │ │ +861 private: │ │ │ │ │ +862 Impl::LagrangePyramidLocalBasis basis_; │ │ │ │ │ +863 Impl::LagrangePyramidLocalCoefficients coefficients_; │ │ │ │ │ +864 Impl::LagrangePyramidLocalInterpolation > interpolation_; │ │ │ │ │ +865 }; │ │ │ │ │ +866 │ │ │ │ │ +867} // namespace Dune │ │ │ │ │ +868 │ │ │ │ │ +869#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ _l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Brezzi-Douglas-Fortin-Marini finite elements for cubes. │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -auto localCoefficients() const -> const LocalCoefficients & │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -BDFMCubeLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -auto localBasis() const -> const LocalBasis & │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr auto type() -> GeometryType │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -auto localInterpolation() const -> const LocalInterpolation & │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -BDFMCubeLocalFiniteElement(std::bitset< 2 *dim > s) │ │ │ │ │ -Make set number s, where 0 <= s < 2^(2*dim) │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Brezzi-Douglas-Fortin-Marini shape functions on a reference cube. │ │ │ │ │ -DDeeffiinniittiioonn brezzidouglasfortinmarini/cube/localbasis.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for Brezzi-Douglas-Fortin-Marini elements on cubes. │ │ │ │ │ -DDeeffiinniittiioonn localcoefficients.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_B_D_F_M_C_u_b_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -Interpolation for Brezzi-Douglas-Fortin-Marini shape functions on cubes. │ │ │ │ │ -DDeeffiinniittiioonn brezzidouglasfortinmarini/cube/localinterpolation.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ traits helper struct │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:836 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +static constexpr std::size_t size() │ │ │ │ │ +The number of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:849 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +LagrangePyramidLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:825 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The reference element that the local finite element is defined on. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:856 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:829 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Returns object that evaluates degrees of freedom. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:843 │ │ │ │ │ _l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0.hh File Reference │ │ │ │ +dune-localfunctions: p0.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,58 +65,43 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp0.hh File Reference
│ │ │ │ +
p0.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Piecewise P0 finite element. │ │ │ │ -More...

│ │ │ │
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │ -#include "refinedp0/refinedp0localbasis.hh"
│ │ │ │ -#include "refinedp0/refinedp0localcoefficients.hh"
│ │ │ │ -#include "refinedp0/refinedp0localinterpolation.hh"
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "p0/p0localbasis.hh"
│ │ │ │ +#include "p0/p0localcoefficients.hh"
│ │ │ │ +#include "p0/p0localinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RefinedP0LocalFiniteElement< D, R, dim >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 1 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 2 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
 
class  Dune::RefinedP0LocalFiniteElement< D, R, 3 >
 Local finite element that is piecewise P0 on a once uniformly refined reference geometry. More...
class  Dune::P0LocalFiniteElement< D, R, d >
 The local p0 finite element on all types of reference elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Piecewise P0 finite element.

│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp0.hh File Reference │ │ │ │ │ -Piecewise P0 finite element. _M_o_r_e_._._. │ │ │ │ │ +p0.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include "_p_0_/_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_p_0_/_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_p_0_/_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ - reference geometry. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ -  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ - reference geometry. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ -  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ - reference geometry. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ -  Local finite element that is piecewise P0 on a once uniformly refined │ │ │ │ │ - reference geometry. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_ _> │ │ │ │ │ +  The local p0 finite element on all types of reference elements. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Piecewise P0 finite element. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00044_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0.hh Source File │ │ │ │ +dune-localfunctions: p0.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,264 +70,118 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0.hh
│ │ │ │ +
p0.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22
│ │ │ │ -
25 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30 public:
│ │ │ │ -
31 // We steal the p0 traits since they exist for all dim.
│ │ │ │ -
32 // This allows to instantiate the type and access the Traits.
│ │ │ │ - │ │ │ │ -
34 };
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
38 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
40 {
│ │ │ │ -
41 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {}
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
56 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
57 {
│ │ │ │ -
58 return basis_;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 {
│ │ │ │ -
65 return coefficients_;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
71 {
│ │ │ │ -
72 return interpolation_;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
│ │ │ │ -
76 unsigned int size () const
│ │ │ │ -
77 {
│ │ │ │ -
78 return basis_.size();
│ │ │ │ -
79 }
│ │ │ │ + │ │ │ │ +
11#include "p0/p0localbasis.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
23 template<class D, class R, int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
│ │ │ │ +
34 P0LocalFiniteElement (const GeometryType& type)
│ │ │ │ +
35 : interpolation(type), gt(type)
│ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
41 {
│ │ │ │ +
42 return basis;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
48 {
│ │ │ │ +
49 return coefficients;
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return interpolation;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 unsigned int size () const
│ │ │ │ +
61 {
│ │ │ │ +
62 return 1;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ +
67 GeometryType type () const
│ │ │ │ +
68 {
│ │ │ │ +
69 return gt;
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72 private:
│ │ │ │ + │ │ │ │ +
74 P0LocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
76 GeometryType gt;
│ │ │ │ +
77 };
│ │ │ │
│ │ │ │ +
78
│ │ │ │ +
79}
│ │ │ │
80
│ │ │ │ -
│ │ │ │ -
83 static constexpr GeometryType type ()
│ │ │ │ -
84 {
│ │ │ │ -
85 return GeometryTypes::line;
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87
│ │ │ │ -
88 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
92 };
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
96 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
98 {
│ │ │ │ -
99 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
106
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
110 {}
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
│ │ │ │ -
114 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
115 {
│ │ │ │ -
116 return basis_;
│ │ │ │ -
117 }
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
122 {
│ │ │ │ -
123 return coefficients_;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
129 {
│ │ │ │ -
130 return interpolation_;
│ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
│ │ │ │ -
134 unsigned int size () const
│ │ │ │ -
135 {
│ │ │ │ -
136 return basis_.size();
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
│ │ │ │ -
141 static constexpr GeometryType type ()
│ │ │ │ -
142 {
│ │ │ │ -
143 return GeometryTypes::triangle;
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146 private:
│ │ │ │ - │ │ │ │ -
148 RefinedP0LocalCoefficients<2> coefficients_;
│ │ │ │ - │ │ │ │ -
150 };
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
154 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
156 {
│ │ │ │ -
157 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
164
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
168 {}
│ │ │ │ -
│ │ │ │ -
169
│ │ │ │ -
│ │ │ │ -
172 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
173 {
│ │ │ │ -
174 return basis_;
│ │ │ │ -
175 }
│ │ │ │ -
│ │ │ │ -
176
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
180 {
│ │ │ │ -
181 return coefficients_;
│ │ │ │ -
182 }
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
187 {
│ │ │ │ -
188 return interpolation_;
│ │ │ │ -
189 }
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
│ │ │ │ -
192 unsigned int size () const
│ │ │ │ -
193 {
│ │ │ │ -
194 return basis_.size();
│ │ │ │ -
195 }
│ │ │ │ -
│ │ │ │ -
196
│ │ │ │ -
│ │ │ │ -
199 static constexpr GeometryType type ()
│ │ │ │ -
200 {
│ │ │ │ -
201 return GeometryTypes::tetrahedron;
│ │ │ │ -
202 }
│ │ │ │ -
│ │ │ │ -
203
│ │ │ │ -
204 private:
│ │ │ │ - │ │ │ │ -
206 RefinedP0LocalCoefficients<3> coefficients_;
│ │ │ │ - │ │ │ │ -
208 };
│ │ │ │ -
│ │ │ │ -
209
│ │ │ │ -
210
│ │ │ │ -
211}
│ │ │ │ -
212
│ │ │ │ -
213#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Local finite element that is piecewise P0 on a once uniformly refined reference geometry.
Definition refinedp0.hh:27
│ │ │ │ -
P0LocalFiniteElement< D, R, dim >::Traits Traits
Definition refinedp0.hh:33
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition refinedp0.hh:56
│ │ │ │ -
static constexpr GeometryType type()
Definition refinedp0.hh:83
│ │ │ │ -
RefinedP0LocalFiniteElement()
Definition refinedp0.hh:51
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition refinedp0.hh:70
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition refinedp0.hh:63
│ │ │ │ -
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > > > Traits
Definition refinedp0.hh:47
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition refinedp0.hh:76
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition refinedp0.hh:134
│ │ │ │ -
RefinedP0LocalFiniteElement()
Definition refinedp0.hh:109
│ │ │ │ -
static constexpr GeometryType type()
Definition refinedp0.hh:141
│ │ │ │ -
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > > > Traits
Definition refinedp0.hh:105
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition refinedp0.hh:121
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition refinedp0.hh:128
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition refinedp0.hh:114
│ │ │ │ -
RefinedP0LocalFiniteElement()
Definition refinedp0.hh:167
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition refinedp0.hh:172
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition refinedp0.hh:186
│ │ │ │ -
static constexpr GeometryType type()
Definition refinedp0.hh:199
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition refinedp0.hh:192
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition refinedp0.hh:179
│ │ │ │ -
LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > > > Traits
Definition refinedp0.hh:163
│ │ │ │ -
Uniformly refined constant shape functions on a unit simplex in R^dim.
Definition refinedp0localbasis.hh:40
│ │ │ │ -
Layout map for RefinedP0 elements.
Definition refinedp0localcoefficients.hh:25
│ │ │ │ -
Definition refinedp0localinterpolation.hh:15
│ │ │ │ +
The local p0 finite element on all types of reference elements.
Definition p0.hh:25
│ │ │ │ +
P0LocalFiniteElement(const GeometryType &type)
Definition p0.hh:34
│ │ │ │ +
unsigned int size() const
The number of shape functions – here: 1.
Definition p0.hh:60
│ │ │ │ +
GeometryType type() const
Definition p0.hh:67
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition p0.hh:40
│ │ │ │ +
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition p0.hh:30
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition p0.hh:47
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition p0.hh:54
│ │ │ │ +
Constant shape function.
Definition p0localbasis.hh:30
│ │ │ │ +
Layout map for P0 elements.
Definition p0localcoefficients.hh:24
│ │ │ │ +
Definition p0localinterpolation.hh:18
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,184 +1,83 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ -refinedp0.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +p0.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_REFINED_P0_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9 │ │ │ │ │ 10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -14#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -15#include "_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -16 │ │ │ │ │ -20namespace _D_u_n_e │ │ │ │ │ -21{ │ │ │ │ │ -22 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 { │ │ │ │ │ -28 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ -29 │ │ │ │ │ -30 public: │ │ │ │ │ -31 // We steal the p0 traits since they exist for all dim. │ │ │ │ │ -32 // This allows to instantiate the type and access the Traits. │ │ │ │ │ -_3_3 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>_:_:_T_r_a_i_t_s _T_r_a_i_t_s; │ │ │ │ │ -34 }; │ │ │ │ │ -35 │ │ │ │ │ -38 template │ │ │ │ │ -_3_9 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -40 { │ │ │ │ │ -41 public: │ │ │ │ │ -44 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -45 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_1_>, │ │ │ │ │ -46 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_1_>, │ │ │ │ │ -_4_7 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_1_> > > _T_r_a_i_t_s; │ │ │ │ │ -48 │ │ │ │ │ -_5_1 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -52 {} │ │ │ │ │ -53 │ │ │ │ │ -_5_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -57 { │ │ │ │ │ -58 return basis_; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -64 { │ │ │ │ │ -65 return coefficients_; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_7_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -71 { │ │ │ │ │ -72 return interpolation_; │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -_7_6 unsigned int _s_i_z_e () const │ │ │ │ │ -77 { │ │ │ │ │ -78 return basis_.size(); │ │ │ │ │ -79 } │ │ │ │ │ +11#include "_p_0_/_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_p_0_/_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_p_0_/_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 │ │ │ │ │ +23 template │ │ │ │ │ +_2_4 class _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +25 { │ │ │ │ │ +26 public: │ │ │ │ │ +29 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_>, _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_0 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_> > > _T_r_a_i_t_s; │ │ │ │ │ +31 │ │ │ │ │ +_3_4 _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (const GeometryType& _t_y_p_e) │ │ │ │ │ +35 : interpolation(_t_y_p_e), gt(_t_y_p_e) │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +_4_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +41 { │ │ │ │ │ +42 return basis; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +48 { │ │ │ │ │ +49 return coefficients; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return interpolation; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 unsigned int _s_i_z_e () const │ │ │ │ │ +61 { │ │ │ │ │ +62 return 1; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +_6_7 GeometryType _t_y_p_e () const │ │ │ │ │ +68 { │ │ │ │ │ +69 return gt; │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +72 private: │ │ │ │ │ +73 _P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_> basis; │ │ │ │ │ +74 _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +75 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_> > interpolation; │ │ │ │ │ +76 GeometryType gt; │ │ │ │ │ +77 }; │ │ │ │ │ +78 │ │ │ │ │ +79} │ │ │ │ │ 80 │ │ │ │ │ -_8_3 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -84 { │ │ │ │ │ -85 return GeometryTypes::line; │ │ │ │ │ -86 } │ │ │ │ │ -87 │ │ │ │ │ -88 private: │ │ │ │ │ -89 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_1_> basis_; │ │ │ │ │ -90 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_1_> coefficients_; │ │ │ │ │ -91 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_1_> > interpolation_; │ │ │ │ │ -92 }; │ │ │ │ │ -93 │ │ │ │ │ -96 template │ │ │ │ │ -_9_7 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -98 { │ │ │ │ │ -99 public: │ │ │ │ │ -102 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -103 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_2_>, │ │ │ │ │ -104 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_2_>, │ │ │ │ │ -_1_0_5 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_2_> > > _T_r_a_i_t_s; │ │ │ │ │ -106 │ │ │ │ │ -_1_0_9 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -110 {} │ │ │ │ │ -111 │ │ │ │ │ -_1_1_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -115 { │ │ │ │ │ -116 return basis_; │ │ │ │ │ -117 } │ │ │ │ │ -118 │ │ │ │ │ -_1_2_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -122 { │ │ │ │ │ -123 return coefficients_; │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -129 { │ │ │ │ │ -130 return interpolation_; │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -_1_3_4 unsigned int _s_i_z_e () const │ │ │ │ │ -135 { │ │ │ │ │ -136 return basis_.size(); │ │ │ │ │ -137 } │ │ │ │ │ -138 │ │ │ │ │ -_1_4_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -142 { │ │ │ │ │ -143 return GeometryTypes::triangle; │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 private: │ │ │ │ │ -147 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_2_> basis_; │ │ │ │ │ -148 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_2_> coefficients_; │ │ │ │ │ -149 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_2_> > interpolation_; │ │ │ │ │ -150 }; │ │ │ │ │ -151 │ │ │ │ │ -154 template │ │ │ │ │ -_1_5_5 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -156 { │ │ │ │ │ -157 public: │ │ │ │ │ -160 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -161 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_3_>, │ │ │ │ │ -162 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_3_>, │ │ │ │ │ -_1_6_3 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_3_> > > _T_r_a_i_t_s; │ │ │ │ │ -164 │ │ │ │ │ -_1_6_7 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -168 {} │ │ │ │ │ -169 │ │ │ │ │ -_1_7_2 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -173 { │ │ │ │ │ -174 return basis_; │ │ │ │ │ -175 } │ │ │ │ │ -176 │ │ │ │ │ -_1_7_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -180 { │ │ │ │ │ -181 return coefficients_; │ │ │ │ │ -182 } │ │ │ │ │ -183 │ │ │ │ │ -_1_8_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -187 { │ │ │ │ │ -188 return interpolation_; │ │ │ │ │ -189 } │ │ │ │ │ -190 │ │ │ │ │ -_1_9_2 unsigned int _s_i_z_e () const │ │ │ │ │ -193 { │ │ │ │ │ -194 return basis_.size(); │ │ │ │ │ -195 } │ │ │ │ │ -196 │ │ │ │ │ -_1_9_9 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -200 { │ │ │ │ │ -201 return GeometryTypes::tetrahedron; │ │ │ │ │ -202 } │ │ │ │ │ -203 │ │ │ │ │ -204 private: │ │ │ │ │ -205 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_3_> basis_; │ │ │ │ │ -206 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_3_> coefficients_; │ │ │ │ │ -207 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_3_> > interpolation_; │ │ │ │ │ -208 }; │ │ │ │ │ -209 │ │ │ │ │ -210 │ │ │ │ │ -211} │ │ │ │ │ -212 │ │ │ │ │ -213#endif │ │ │ │ │ -_r_e_f_i_n_e_d_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_r_e_f_i_n_e_d_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_p_0_._h_h │ │ │ │ │ +81#endif │ │ │ │ │ +_p_0_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ _l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ traits helper struct │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ @@ -186,96 +85,43 @@ │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Local finite element that is piecewise P0 on a once uniformly refined reference │ │ │ │ │ -geometry. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -P0LocalFiniteElement< D, R, dim >::Traits Traits │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 1 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 1 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 1 > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +The local p0 finite element on all types of reference elements. │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +P0LocalFiniteElement(const GeometryType &type) │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:109 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 2 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 2 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 2 > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_ _>_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RefinedP0LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +The number of shape functions – here: 1. │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, │ │ │ │ │ +P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RefinedP0LocalBasis< D, R, 3 >, │ │ │ │ │ -RefinedP0LocalCoefficients< 3 >, RefinedP0LocalInterpolation< │ │ │ │ │ -RefinedP0LocalBasis< D, R, 3 > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn refinedp0.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RefinedP0 elements. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localcoefficients.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:15 │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Constant shape function. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for P0 elements. │ │ │ │ │ +DDeeffiinniittiioonn p0localcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn p0localinterpolation.hh:18 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: pyramidp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,39 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp0localinterpolation.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pyramidp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/refined/refinedp0/refinedp0localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RefinedP0LocalInterpolation< LB >
 
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 1 > >
 
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 2 > >
 
class  Dune::RefinedP0LocalInterpolation< RefinedP0LocalBasis< D, R, 3 > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R >
using Dune::PyramidP2LocalFiniteElement = LagrangePyramidLocalFiniteElement< D, R, 2 >
 Second-order Lagrangian finite element on a three-dimensional pyramid.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp0localinterpolation.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pyramidp2.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_y_r_a_m_i_d_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ + D, R, 2 > │ │ │ │ │ +  Second-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00047_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: pyramidp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,205 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localinterpolation.hh
│ │ │ │ +
pyramidp2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_P0_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
15 {};
│ │ │ │ -
│ │ │ │ -
16
│ │ │ │ -
17 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 {
│ │ │ │ - │ │ │ │ -
21 typedef typename LB::Traits::DomainType DT;
│ │ │ │ -
22
│ │ │ │ -
23 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 interpolationPoints_(2)
│ │ │ │ -
26 {
│ │ │ │ -
27 // Interpolation is done by evaluating at the halved segments centers
│ │ │ │ -
28 interpolationPoints_[0][0] = 1.0/4.0;
│ │ │ │ -
29
│ │ │ │ -
30 interpolationPoints_[1][0] = 3.0/4.0;
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
33
│ │ │ │ -
34 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
35 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
36 {
│ │ │ │ -
37 auto&& f = Impl::makeFunctionWithCallOperator<DT>(ff);
│ │ │ │ -
38
│ │ │ │ -
39 out.resize(interpolationPoints_.size());
│ │ │ │ -
40 for (size_t i = 0; i < out.size(); ++i)
│ │ │ │ -
41 {
│ │ │ │ -
42 out[i] = f(interpolationPoints_[i]);
│ │ │ │ -
43 }
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<DT> interpolationPoints_;
│ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ - │ │ │ │ -
54 typedef typename LB::Traits::DomainType DT;
│ │ │ │ -
55
│ │ │ │ -
56 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 interpolationPoints_(4)
│ │ │ │ -
59 {
│ │ │ │ -
60 // Interpolation is done by evaluating at the subtriangle centers
│ │ │ │ -
61 interpolationPoints_[0][0] = 1.0/6;
│ │ │ │ -
62 interpolationPoints_[0][1] = 1.0/6;
│ │ │ │ -
63
│ │ │ │ -
64 interpolationPoints_[1][0] = 4.0/6;
│ │ │ │ -
65 interpolationPoints_[1][1] = 1.0/6;
│ │ │ │ -
66
│ │ │ │ -
67 interpolationPoints_[2][0] = 1.0/6;
│ │ │ │ -
68 interpolationPoints_[2][1] = 4.0/6;
│ │ │ │ -
69
│ │ │ │ -
70 interpolationPoints_[3][0] = 2.0/6;
│ │ │ │ -
71 interpolationPoints_[3][1] = 2.0/6;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74
│ │ │ │ -
75 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
76 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
77 {
│ │ │ │ -
78 auto&& f = Impl::makeFunctionWithCallOperator<DT>(ff);
│ │ │ │ -
79
│ │ │ │ -
80 out.resize(interpolationPoints_.size());
│ │ │ │ -
81 for (size_t i = 0; i < out.size(); ++i)
│ │ │ │ -
82 {
│ │ │ │ -
83 out[i] = f(interpolationPoints_[i]);
│ │ │ │ -
84 }
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
87 private:
│ │ │ │ -
88 std::vector<DT> interpolationPoints_;
│ │ │ │ -
89 };
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
91 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
93 {
│ │ │ │ - │ │ │ │ -
95 typedef typename LB::Traits::DomainType DT;
│ │ │ │ -
96
│ │ │ │ -
97 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
99 interpolationPoints_(8)
│ │ │ │ -
100 {
│ │ │ │ -
101 // Interpolation is done by evaluating at the subtriangle centers
│ │ │ │ -
102 interpolationPoints_[0][0] = 1.0/8;
│ │ │ │ -
103 interpolationPoints_[0][1] = 1.0/8;
│ │ │ │ -
104 interpolationPoints_[0][2] = 1.0/8;
│ │ │ │ -
105
│ │ │ │ -
106 interpolationPoints_[1][0] = 5.0/8;
│ │ │ │ -
107 interpolationPoints_[1][1] = 1.0/8;
│ │ │ │ -
108 interpolationPoints_[1][2] = 1.0/8;
│ │ │ │ -
109
│ │ │ │ -
110 interpolationPoints_[2][0] = 1.0/8;
│ │ │ │ -
111 interpolationPoints_[2][1] = 5.0/8;
│ │ │ │ -
112 interpolationPoints_[2][2] = 1.0/8;
│ │ │ │ -
113
│ │ │ │ -
114 interpolationPoints_[3][0] = 1.0/8;
│ │ │ │ -
115 interpolationPoints_[3][1] = 1.0/8;
│ │ │ │ -
116 interpolationPoints_[3][2] = 5.0/8;
│ │ │ │ -
117
│ │ │ │ -
118 interpolationPoints_[4][0] = 1.0/4;
│ │ │ │ -
119 interpolationPoints_[4][1] = 1.0/8;
│ │ │ │ -
120 interpolationPoints_[4][2] = 1.0/4;
│ │ │ │ -
121
│ │ │ │ -
122 interpolationPoints_[5][0] = 3.0/8;
│ │ │ │ -
123 interpolationPoints_[5][1] = 1.0/4;
│ │ │ │ -
124 interpolationPoints_[5][2] = 1.0/8;
│ │ │ │ -
125
│ │ │ │ -
126 interpolationPoints_[6][0] = 1.0/8;
│ │ │ │ -
127 interpolationPoints_[6][1] = 1.0/4;
│ │ │ │ -
128 interpolationPoints_[6][2] = 3.0/8;
│ │ │ │ -
129
│ │ │ │ -
130 interpolationPoints_[7][0] = 1.0/4;
│ │ │ │ -
131 interpolationPoints_[7][1] = 3.0/8;
│ │ │ │ -
132 interpolationPoints_[7][2] = 1.0/4;
│ │ │ │ -
133 }
│ │ │ │ -
│ │ │ │ -
134
│ │ │ │ -
135
│ │ │ │ -
136 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
137 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
138 {
│ │ │ │ -
139 auto&& f = Impl::makeFunctionWithCallOperator<DT>(ff);
│ │ │ │ -
140
│ │ │ │ -
141 out.resize(interpolationPoints_.size());
│ │ │ │ -
142 for (size_t i = 0; i < out.size(); ++i)
│ │ │ │ -
143 {
│ │ │ │ -
144 out[i] = f(interpolationPoints_[i]);
│ │ │ │ -
145 }
│ │ │ │ -
146 }
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
148 private:
│ │ │ │ -
149 std::vector<DT> interpolationPoints_;
│ │ │ │ -
150 };
│ │ │ │ -
│ │ │ │ -
151}
│ │ │ │ -
152
│ │ │ │ -
153#endif
│ │ │ │ - │ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
19 template<class D, class R>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Uniformly refined constant shape functions on a unit simplex in R^dim.
Definition refinedp0localbasis.hh:40
│ │ │ │ -
Definition refinedp0localinterpolation.hh:15
│ │ │ │ -
RefinedP0LocalInterpolation()
Definition refinedp0localinterpolation.hh:24
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition refinedp0localinterpolation.hh:35
│ │ │ │ -
RefinedP0LocalInterpolation()
Definition refinedp0localinterpolation.hh:57
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition refinedp0localinterpolation.hh:76
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition refinedp0localinterpolation.hh:137
│ │ │ │ -
RefinedP0LocalInterpolation()
Definition refinedp0localinterpolation.hh:98
│ │ │ │ - │ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,199 +1,40 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -refinedp0localinterpolation.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pyramidp2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_P0_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_REFINED_P0_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_0_/_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 template │ │ │ │ │ -_1_4 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -15 {}; │ │ │ │ │ -16 │ │ │ │ │ -17 template │ │ │ │ │ -_1_8 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s > │ │ │ │ │ -19 { │ │ │ │ │ -20 typedef _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_1_> _L_B; │ │ │ │ │ -21 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ -22 │ │ │ │ │ -23 public: │ │ │ │ │ -_2_4 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n() : │ │ │ │ │ -25 interpolationPoints_(2) │ │ │ │ │ -26 { │ │ │ │ │ -27 // Interpolation is done by evaluating at the halved segments centers │ │ │ │ │ -28 interpolationPoints_[0][0] = 1.0/4.0; │ │ │ │ │ -29 │ │ │ │ │ -30 interpolationPoints_[1][0] = 3.0/4.0; │ │ │ │ │ -31 } │ │ │ │ │ -32 │ │ │ │ │ -33 │ │ │ │ │ -34 template │ │ │ │ │ -_3_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -36 { │ │ │ │ │ -37 auto&& f = Impl::makeFunctionWithCallOperator
(ff); │ │ │ │ │ -38 │ │ │ │ │ -39 out.resize(interpolationPoints_.size()); │ │ │ │ │ -40 for (size_t i = 0; i < out.size(); ++i) │ │ │ │ │ -41 { │ │ │ │ │ -42 out[i] = f(interpolationPoints_[i]); │ │ │ │ │ -43 } │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -46 private: │ │ │ │ │ -47 std::vector
interpolationPoints_; │ │ │ │ │ -48 }; │ │ │ │ │ -49 │ │ │ │ │ -50 template │ │ │ │ │ -_5_1 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s > │ │ │ │ │ -52 { │ │ │ │ │ -53 typedef _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_2_> _L_B; │ │ │ │ │ -54 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ -55 │ │ │ │ │ -56 public: │ │ │ │ │ -_5_7 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n() : │ │ │ │ │ -58 interpolationPoints_(4) │ │ │ │ │ -59 { │ │ │ │ │ -60 // Interpolation is done by evaluating at the subtriangle centers │ │ │ │ │ -61 interpolationPoints_[0][0] = 1.0/6; │ │ │ │ │ -62 interpolationPoints_[0][1] = 1.0/6; │ │ │ │ │ -63 │ │ │ │ │ -64 interpolationPoints_[1][0] = 4.0/6; │ │ │ │ │ -65 interpolationPoints_[1][1] = 1.0/6; │ │ │ │ │ -66 │ │ │ │ │ -67 interpolationPoints_[2][0] = 1.0/6; │ │ │ │ │ -68 interpolationPoints_[2][1] = 4.0/6; │ │ │ │ │ -69 │ │ │ │ │ -70 interpolationPoints_[3][0] = 2.0/6; │ │ │ │ │ -71 interpolationPoints_[3][1] = 2.0/6; │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 │ │ │ │ │ -75 template │ │ │ │ │ -_7_6 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -77 { │ │ │ │ │ -78 auto&& f = Impl::makeFunctionWithCallOperator
(ff); │ │ │ │ │ -79 │ │ │ │ │ -80 out.resize(interpolationPoints_.size()); │ │ │ │ │ -81 for (size_t i = 0; i < out.size(); ++i) │ │ │ │ │ -82 { │ │ │ │ │ -83 out[i] = f(interpolationPoints_[i]); │ │ │ │ │ -84 } │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -87 private: │ │ │ │ │ -88 std::vector
interpolationPoints_; │ │ │ │ │ -89 }; │ │ │ │ │ -90 │ │ │ │ │ -91 template │ │ │ │ │ -_9_2 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n<_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s > │ │ │ │ │ -93 { │ │ │ │ │ -94 typedef _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_3_> _L_B; │ │ │ │ │ -95 typedef typename LB::Traits::DomainType DT; │ │ │ │ │ -96 │ │ │ │ │ -97 public: │ │ │ │ │ -_9_8 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n() : │ │ │ │ │ -99 interpolationPoints_(8) │ │ │ │ │ -100 { │ │ │ │ │ -101 // Interpolation is done by evaluating at the subtriangle centers │ │ │ │ │ -102 interpolationPoints_[0][0] = 1.0/8; │ │ │ │ │ -103 interpolationPoints_[0][1] = 1.0/8; │ │ │ │ │ -104 interpolationPoints_[0][2] = 1.0/8; │ │ │ │ │ -105 │ │ │ │ │ -106 interpolationPoints_[1][0] = 5.0/8; │ │ │ │ │ -107 interpolationPoints_[1][1] = 1.0/8; │ │ │ │ │ -108 interpolationPoints_[1][2] = 1.0/8; │ │ │ │ │ -109 │ │ │ │ │ -110 interpolationPoints_[2][0] = 1.0/8; │ │ │ │ │ -111 interpolationPoints_[2][1] = 5.0/8; │ │ │ │ │ -112 interpolationPoints_[2][2] = 1.0/8; │ │ │ │ │ -113 │ │ │ │ │ -114 interpolationPoints_[3][0] = 1.0/8; │ │ │ │ │ -115 interpolationPoints_[3][1] = 1.0/8; │ │ │ │ │ -116 interpolationPoints_[3][2] = 5.0/8; │ │ │ │ │ -117 │ │ │ │ │ -118 interpolationPoints_[4][0] = 1.0/4; │ │ │ │ │ -119 interpolationPoints_[4][1] = 1.0/8; │ │ │ │ │ -120 interpolationPoints_[4][2] = 1.0/4; │ │ │ │ │ -121 │ │ │ │ │ -122 interpolationPoints_[5][0] = 3.0/8; │ │ │ │ │ -123 interpolationPoints_[5][1] = 1.0/4; │ │ │ │ │ -124 interpolationPoints_[5][2] = 1.0/8; │ │ │ │ │ -125 │ │ │ │ │ -126 interpolationPoints_[6][0] = 1.0/8; │ │ │ │ │ -127 interpolationPoints_[6][1] = 1.0/4; │ │ │ │ │ -128 interpolationPoints_[6][2] = 3.0/8; │ │ │ │ │ -129 │ │ │ │ │ -130 interpolationPoints_[7][0] = 1.0/4; │ │ │ │ │ -131 interpolationPoints_[7][1] = 3.0/8; │ │ │ │ │ -132 interpolationPoints_[7][2] = 1.0/4; │ │ │ │ │ -133 } │ │ │ │ │ -134 │ │ │ │ │ -135 │ │ │ │ │ -136 template │ │ │ │ │ -_1_3_7 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -138 { │ │ │ │ │ -139 auto&& f = Impl::makeFunctionWithCallOperator
(ff); │ │ │ │ │ -140 │ │ │ │ │ -141 out.resize(interpolationPoints_.size()); │ │ │ │ │ -142 for (size_t i = 0; i < out.size(); ++i) │ │ │ │ │ -143 { │ │ │ │ │ -144 out[i] = f(interpolationPoints_[i]); │ │ │ │ │ -145 } │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -148 private: │ │ │ │ │ -149 std::vector
interpolationPoints_; │ │ │ │ │ -150 }; │ │ │ │ │ -151} │ │ │ │ │ -152 │ │ │ │ │ -153#endif │ │ │ │ │ -_r_e_f_i_n_e_d_p_0_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 using _P_y_r_a_m_i_d_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ +22 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ +23 │ │ │ │ │ +24} │ │ │ │ │ +25 │ │ │ │ │ +26#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:15 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_ _>_:_: │ │ │ │ │ -_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_ _>_:_: │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_ _>_:_: │ │ │ │ │ -_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_ _>_:_: │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_ _>_:_: │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_ _>_:_: │ │ │ │ │ -_R_e_f_i_n_e_d_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RefinedP0LocalInterpolation() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localinterpolation.hh:98 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: p23d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp0localcoefficients.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p23d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RefinedP0LocalCoefficients< k >
 Layout map for RefinedP0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R >
using Dune::P23DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, 2 >
 Second-order Lagrange local finite element on the reference tetrahedron.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp0localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +p23d.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _k_ _> │ │ │ │ │ -  Layout map for RefinedP0 elements. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_2_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 3, 2 > │ │ │ │ │ +  Second-order Lagrange local finite element on the reference tetrahedron. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00050_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: p23d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,85 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localcoefficients.hh
│ │ │ │ +
p23d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
23 template<unsigned int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26 // 2 to the k-th power
│ │ │ │ -
27 constexpr static int N = 1<<k;
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
22 template<class D, class R>
│ │ │ │ + │ │ │ │ +
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │
28
│ │ │ │ -
29 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 localKeys_(N)
│ │ │ │ -
32 {
│ │ │ │ -
33 // All functions are associated to the element
│ │ │ │ -
34 for (int i = 0; i < N; ++i)
│ │ │ │ -
35 localKeys_[i] = LocalKey(0,0,i);
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 std::size_t size () const
│ │ │ │ -
40 {
│ │ │ │ -
41 return N;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
46 {
│ │ │ │ -
47 return localKeys_[i];
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50 private:
│ │ │ │ -
51 std::vector<LocalKey> localKeys_;
│ │ │ │ -
52
│ │ │ │ -
53 };
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55}
│ │ │ │ -
56
│ │ │ │ -
57#endif
│ │ │ │ - │ │ │ │ +
29#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for RefinedP0 elements.
Definition refinedp0localcoefficients.hh:25
│ │ │ │ -
RefinedP0LocalCoefficients()
Definition refinedp0localcoefficients.hh:30
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition refinedp0localcoefficients.hh:39
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition refinedp0localcoefficients.hh:45
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,82 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -refinedp0localcoefficients.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +p23d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_REFINED_P0_LOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ 11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -23 template │ │ │ │ │ -_2_4 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -25 { │ │ │ │ │ -26 // 2 to the k-th power │ │ │ │ │ -27 constexpr static int N = 1< │ │ │ │ │ +_2_3 using _P_2_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +25 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_,_2_>; │ │ │ │ │ +26 │ │ │ │ │ +27} │ │ │ │ │ 28 │ │ │ │ │ -29 public: │ │ │ │ │ -_3_0 _R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : │ │ │ │ │ -31 localKeys_(N) │ │ │ │ │ -32 { │ │ │ │ │ -33 // All functions are associated to the element │ │ │ │ │ -34 for (int i = 0; i < N; ++i) │ │ │ │ │ -35 localKeys_[i] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ -36 } │ │ │ │ │ -37 │ │ │ │ │ -_3_9 std::size_t _s_i_z_e () const │ │ │ │ │ -40 { │ │ │ │ │ -41 return N; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_5 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ -46 { │ │ │ │ │ -47 return localKeys_[i]; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -50 private: │ │ │ │ │ -51 std::vector localKeys_; │ │ │ │ │ -52 │ │ │ │ │ -53 }; │ │ │ │ │ -54 │ │ │ │ │ -55} │ │ │ │ │ -56 │ │ │ │ │ -57#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +29#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RefinedP0 elements. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localcoefficients.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RefinedP0LocalCoefficients() │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localcoefficients.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localcoefficients.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localcoefficients.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localbasis.hh File Reference │ │ │ │ +dune-localfunctions: prismp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp0localbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
prismp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RefinedP0LocalBasis< D, R, dim >
 Uniformly refined constant shape functions on a unit simplex in R^dim. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R >
using Dune::PrismP2LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, 2 >
 Second-order Lagrange finite element on a three-dimensional prism.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp0localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_c_o_m_m_o_n_/_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +prismp2.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 2 > │ │ │ │ │ +  Second-order Lagrange finite element on a three-dimensional prism. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00053_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp0localbasis.hh Source File │ │ │ │ +dune-localfunctions: prismp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,119 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp0localbasis.hh
│ │ │ │ +
prismp2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_P0_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_REFINED_P0_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
37 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 : public RefinedSimplexLocalBasis<D,dim>
│ │ │ │ -
40 {
│ │ │ │ -
41 // 2 to the k-th power
│ │ │ │ -
42 constexpr static int N = 1<<dim;
│ │ │ │ -
43 public:
│ │ │ │ -
45 typedef LocalBasisTraits<D,dim,Dune::FieldVector<D,dim>,R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,dim> > Traits;
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
48 unsigned int size () const
│ │ │ │ -
49 {
│ │ │ │ -
50 return N;
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ -
54 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
55 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
56 {
│ │ │ │ -
57 int subElement = this->getSubElement(in);
│ │ │ │ -
58 out.resize(N);
│ │ │ │ -
59 for(int i=0; i<N; ++i)
│ │ │ │ -
60 out[i] = (i==subElement) ? 1 : 0;
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
63 inline void
│ │ │ │ -
│ │ │ │ -
64 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
65 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
66 {
│ │ │ │ -
67 out.resize(N);
│ │ │ │ -
68 for(int i=0; i<N; ++i)
│ │ │ │ -
69 out[i][0] = 0;
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ -
73 void partial (const std::array<unsigned int, dim>& order,
│ │ │ │ -
74 const typename Traits::DomainType& in, // position
│ │ │ │ -
75 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
76 {
│ │ │ │ -
77 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
78 if (totalOrder == 0) {
│ │ │ │ -
79 evaluateFunction(in, out);
│ │ │ │ -
80 } else {
│ │ │ │ -
81 out.resize(size());
│ │ │ │ -
82 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
83 out[i] = 0;
│ │ │ │ -
84 }
│ │ │ │ -
85 }
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
│ │ │ │ -
91 unsigned int order () const
│ │ │ │ -
92 {
│ │ │ │ -
93 return 0;
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98}
│ │ │ │ -
99#endif
│ │ │ │ -
Contains a base class for LocalBasis classes based on uniform refinement.
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
19 template<class D, class R>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Definition refinedsimplexlocalbasis.hh:20
│ │ │ │ -
Uniformly refined constant shape functions on a unit simplex in R^dim.
Definition refinedp0localbasis.hh:40
│ │ │ │ -
void partial(const std::array< unsigned int, dim > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition refinedp0localbasis.hh:73
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition refinedp0localbasis.hh:54
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Definition refinedp0localbasis.hh:64
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition refinedp0localbasis.hh:91
│ │ │ │ -
LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
export type traits for function signature
Definition refinedp0localbasis.hh:45
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition refinedp0localbasis.hh:48
│ │ │ │ - │ │ │ │ +
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,131 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_0 │ │ │ │ │ -refinedp0localbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +prismp2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_REFINED_P0_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_c_o_m_m_o_n_/_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 │ │ │ │ │ -37 template │ │ │ │ │ -_3_8 class _R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -39 : public _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -40 { │ │ │ │ │ -41 // 2 to the k-th power │ │ │ │ │ -42 constexpr static int N = 1<,R,1,Dune:: │ │ │ │ │ -FieldVector, Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -46 │ │ │ │ │ -_4_8 unsigned int _s_i_z_e () const │ │ │ │ │ -49 { │ │ │ │ │ -50 return N; │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_4 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -55 std::vector& out) const │ │ │ │ │ -56 { │ │ │ │ │ -57 int subElement = this->getSubElement(in); │ │ │ │ │ -58 out.resize(N); │ │ │ │ │ -59 for(int i=0; i& out) const // return value │ │ │ │ │ -66 { │ │ │ │ │ -67 out.resize(N); │ │ │ │ │ -68 for(int i=0; i& _o_r_d_e_r, │ │ │ │ │ -74 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -75 std::vector& out) const // return value │ │ │ │ │ -76 { │ │ │ │ │ -77 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -78 if (totalOrder == 0) { │ │ │ │ │ -79 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -80 } else { │ │ │ │ │ -81 out.resize(_s_i_z_e()); │ │ │ │ │ -82 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -83 out[i] = 0; │ │ │ │ │ -84 } │ │ │ │ │ -85 } │ │ │ │ │ -86 │ │ │ │ │ -_9_1 unsigned int _o_r_d_e_r () const │ │ │ │ │ -92 { │ │ │ │ │ -93 return 0; │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98} │ │ │ │ │ -99#endif │ │ │ │ │ -_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 using _P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ +22 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ +23 │ │ │ │ │ +24} │ │ │ │ │ +25 │ │ │ │ │ +26#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Uniformly refined constant shape functions on a unit simplex in R^dim. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, dim > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< │ │ │ │ │ -R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_0_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn refinedp0localbasis.hh:48 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedsimplexlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: lagrangecube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,48 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedsimplexlocalbasis.hh File Reference
│ │ │ │ +
lagrangecube.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ -More...

│ │ │ │ -
#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ +
#include <array>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/math.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RefinedSimplexLocalBasis< D, dim >
 
class  Dune::RefinedSimplexLocalBasis< D, 1 >
 Base class for LocalBasis classes based on uniform refinement in 1D; provides numbering and local coordinates of subelements. More...
 
class  Dune::RefinedSimplexLocalBasis< D, 2 >
 Base class for LocalBasis classes based on uniform refinement in 2D; provides numbering and local coordinates of subelements. More...
 
class  Dune::RefinedSimplexLocalBasis< D, 3 >
 Base class for LocalBasis classes based on uniform refinement in 3D; provides numbering and local coordinates of subelements. More...
class  Dune::LagrangeCubeLocalFiniteElement< D, R, dim, k >
 Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Contains a base class for LocalBasis classes based on uniform refinement.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,38 +1,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedsimplexlocalbasis.hh File Reference │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ +lagrangecube.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _1_ _> │ │ │ │ │ -  Base class for LocalBasis classes based on uniform refinement in 1D; │ │ │ │ │ - provides numbering and local coordinates of subelements. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _2_ _> │ │ │ │ │ -  Base class for LocalBasis classes based on uniform refinement in 2D; │ │ │ │ │ - provides numbering and local coordinates of subelements. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _3_ _> │ │ │ │ │ -  Base class for LocalBasis classes based on uniform refinement in 3D; │ │ │ │ │ - provides numbering and local coordinates of subelements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ +  Lagrange finite element for cubes with arbitrary compile-time dimension │ │ │ │ │ + and polynomial order. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00056_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedsimplexlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: lagrangecube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,291 +70,747 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedsimplexlocalbasis.hh
│ │ │ │ +
lagrangecube.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_SIMPLEX_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_REFINED_SIMPLEX_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │
7
│ │ │ │ +
8#include <array>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
12#include <dune/common/fvector.hh>
│ │ │ │ -
13#include <dune/common/exceptions.hh>
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18 template<class D, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
20 {
│ │ │ │ -
21 protected:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 DUNE_THROW(Dune::NotImplemented,"RefinedSimplexLocalBasis not implemented for dim > 3.");
│ │ │ │ -
25 }
│ │ │ │ -
│ │ │ │ -
26 };
│ │ │ │ -
│ │ │ │ +
13#include <dune/common/math.hh>
│ │ │ │ +
14
│ │ │ │ +
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
16
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22namespace Dune { namespace Impl
│ │ │ │ +
23{
│ │ │ │ +
24 // Forward declaration
│ │ │ │ +
25 template<class LocalBasis>
│ │ │ │ +
26 class LagrangeCubeLocalInterpolation;
│ │ │ │
27
│ │ │ │ -
35 template<class D>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {
│ │ │ │ -
38 protected:
│ │ │ │ -
39
│ │ │ │ - │ │ │ │ +
38 template<class D, class R, unsigned int dim, unsigned int k>
│ │ │ │ +
39 class LagrangeCubeLocalBasis
│ │ │ │ +
40 {
│ │ │ │ +
41 friend class LagrangeCubeLocalInterpolation<LagrangeCubeLocalBasis<D,R,dim,k> >;
│ │ │ │
42
│ │ │ │ -
│ │ │ │ -
53 static int getSubElement(const FieldVector<D,1>& global)
│ │ │ │ +
43 // i-th Lagrange polynomial of degree k in one dimension
│ │ │ │ +
44 static R p(unsigned int i, D x)
│ │ │ │ +
45 {
│ │ │ │ +
46 R result(1.0);
│ │ │ │ +
47 for (unsigned int j=0; j<=k; j++)
│ │ │ │ +
48 if (j!=i) result *= (k*x-j)/((int)i-(int)j);
│ │ │ │ +
49 return result;
│ │ │ │ +
50 }
│ │ │ │ +
51
│ │ │ │ +
52 // derivative of ith Lagrange polynomial of degree k in one dimension
│ │ │ │ +
53 static R dp(unsigned int i, D x)
│ │ │ │
54 {
│ │ │ │ -
55 if (global[0] <= 0.5)
│ │ │ │ -
56 return 0;
│ │ │ │ -
57 else if (global[0] <= 1.0)
│ │ │ │ -
58 return 1;
│ │ │ │ -
59
│ │ │ │ -
60 DUNE_THROW(InvalidStateException, "no subelement defined");
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
69 static void getSubElement(const FieldVector<D,1>& global,
│ │ │ │ -
70 int& subElement,
│ │ │ │ -
71 FieldVector<D,1>& local)
│ │ │ │ -
72 {
│ │ │ │ -
73 if (global[0] <= 0.5) {
│ │ │ │ -
74 subElement = 0;
│ │ │ │ -
75 local[0] = 2.0 * global[0];
│ │ │ │ -
76 return;
│ │ │ │ -
77 }
│ │ │ │ -
78
│ │ │ │ -
79 subElement = 1;
│ │ │ │ -
80 local[0] = 2.0 * global[0] - 1.0;
│ │ │ │ -
81 }
│ │ │ │ -
│ │ │ │ -
82
│ │ │ │ -
83 };
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
85
│ │ │ │ -
96 template<class D>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
98 {
│ │ │ │ -
99 protected:
│ │ │ │ -
100
│ │ │ │ - │ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
119 static int getSubElement(const FieldVector<D,2>& global)
│ │ │ │ +
55 R result(0.0);
│ │ │ │ +
56
│ │ │ │ +
57 for (unsigned int j=0; j<=k; j++)
│ │ │ │ +
58 {
│ │ │ │ +
59 if (j!=i)
│ │ │ │ +
60 {
│ │ │ │ +
61 R prod( (k*1.0)/((int)i-(int)j) );
│ │ │ │ +
62 for (unsigned int l=0; l<=k; l++)
│ │ │ │ +
63 if (l!=i && l!=j)
│ │ │ │ +
64 prod *= (k*x-l)/((int)i-(int)l);
│ │ │ │ +
65 result += prod;
│ │ │ │ +
66 }
│ │ │ │ +
67 }
│ │ │ │ +
68 return result;
│ │ │ │ +
69 }
│ │ │ │ +
70
│ │ │ │ +
71 // Second derivative of j-th Lagrange polynomial of degree k in one dimension
│ │ │ │ +
72 // Formula and notation taken from https://en.wikipedia.org/wiki/Lagrange_polynomial#Derivatives
│ │ │ │ +
73 static R ddp(unsigned int j, D x)
│ │ │ │ +
74 {
│ │ │ │ +
75 R result(0.0);
│ │ │ │ +
76
│ │ │ │ +
77 for (unsigned int i=0; i<=k; i++)
│ │ │ │ +
78 {
│ │ │ │ +
79 if (i==j)
│ │ │ │ +
80 continue;
│ │ │ │ +
81
│ │ │ │ +
82 R sum(0);
│ │ │ │ +
83
│ │ │ │ +
84 for (unsigned int m=0; m<=k; m++)
│ │ │ │ +
85 {
│ │ │ │ +
86 if (m==i || m==j)
│ │ │ │ +
87 continue;
│ │ │ │ +
88
│ │ │ │ +
89 R prod( (k*1.0)/((int)j-(int)m) );
│ │ │ │ +
90 for (unsigned int l=0; l<=k; l++)
│ │ │ │ +
91 if (l!=i && l!=j && l!=m)
│ │ │ │ +
92 prod *= (k*x-l)/((int)j-(int)l);
│ │ │ │ +
93 sum += prod;
│ │ │ │ +
94 }
│ │ │ │ +
95
│ │ │ │ +
96 result += sum * ( (k*1.0)/((int)j-(int)i) );
│ │ │ │ +
97 }
│ │ │ │ +
98
│ │ │ │ +
99 return result;
│ │ │ │ +
100 }
│ │ │ │ +
101
│ │ │ │ +
102 // Return i as a d-digit number in the (k+1)-nary system
│ │ │ │ +
103 static std::array<unsigned int,dim> multiindex (unsigned int i)
│ │ │ │ +
104 {
│ │ │ │ +
105 std::array<unsigned int,dim> alpha;
│ │ │ │ +
106 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
107 {
│ │ │ │ +
108 alpha[j] = i % (k+1);
│ │ │ │ +
109 i = i/(k+1);
│ │ │ │ +
110 }
│ │ │ │ +
111 return alpha;
│ │ │ │ +
112 }
│ │ │ │ +
113
│ │ │ │ +
114 public:
│ │ │ │ +
115 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,R,1,FieldVector<R,1>,FieldMatrix<R,1,dim> >;
│ │ │ │ +
116
│ │ │ │ +
119 static constexpr unsigned int size ()
│ │ │ │
120 {
│ │ │ │ -
121 if (global[0] + global[1] <= 0.5)
│ │ │ │ -
122 return 0;
│ │ │ │ -
123 else if (global[0] >= 0.5)
│ │ │ │ -
124 return 1;
│ │ │ │ -
125 else if (global[1] >= 0.5)
│ │ │ │ -
126 return 2;
│ │ │ │ -
127
│ │ │ │ -
128 return 3;
│ │ │ │ -
129 }
│ │ │ │ -
│ │ │ │ -
130
│ │ │ │ -
│ │ │ │ -
137 static void getSubElement(const FieldVector<D,2>& global,
│ │ │ │ -
138 int& subElement,
│ │ │ │ -
139 FieldVector<D,2>& local)
│ │ │ │ -
140 {
│ │ │ │ -
141 if (global[0] + global[1] <= 0.5) {
│ │ │ │ -
142 subElement = 0;
│ │ │ │ -
143 local[0] = 2*global[0];
│ │ │ │ -
144 local[1] = 2*global[1];
│ │ │ │ -
145 return;
│ │ │ │ -
146 } else if (global[0] >= 0.5) {
│ │ │ │ -
147 subElement = 1;
│ │ │ │ -
148 local[0] = 2*global[0]-1;
│ │ │ │ -
149 local[1] = 2*global[1];
│ │ │ │ -
150 return;
│ │ │ │ -
151 } else if (global[1] >= 0.5) {
│ │ │ │ -
152 subElement = 2;
│ │ │ │ -
153 local[0] = 2*global[0];
│ │ │ │ -
154 local[1] = 2*global[1]-1;
│ │ │ │ -
155 return;
│ │ │ │ -
156 }
│ │ │ │ -
157
│ │ │ │ -
158 subElement = 3;
│ │ │ │ -
159 local[0] = -2 * global[0] + 1;
│ │ │ │ -
160 local[1] = -2 * global[1] + 1;
│ │ │ │ -
161
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ +
121 return power(k+1, dim);
│ │ │ │ +
122 }
│ │ │ │ +
123
│ │ │ │ +
125 void evaluateFunction(const typename Traits::DomainType& x,
│ │ │ │ +
126 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
127 {
│ │ │ │ +
128 out.resize(size());
│ │ │ │ +
129
│ │ │ │ +
130 // Specialization for zero-order case
│ │ │ │ +
131 if (k==0)
│ │ │ │ +
132 {
│ │ │ │ +
133 out[0] = 1;
│ │ │ │ +
134 return;
│ │ │ │ +
135 }
│ │ │ │ +
136
│ │ │ │ +
137 if (k==1)
│ │ │ │ +
138 {
│ │ │ │ +
139 for (size_t i=0; i<size(); i++)
│ │ │ │ +
140 {
│ │ │ │ +
141 out[i] = 1;
│ │ │ │ +
142
│ │ │ │ +
143 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
144 // if j-th bit of i is set multiply with x[j], else with 1-x[j]
│ │ │ │ +
145 out[i] *= (i & (1<<j)) ? x[j] : 1-x[j];
│ │ │ │ +
146 }
│ │ │ │ +
147 return;
│ │ │ │ +
148 }
│ │ │ │ +
149
│ │ │ │ +
150 // General case
│ │ │ │ +
151 for (size_t i=0; i<size(); i++)
│ │ │ │ +
152 {
│ │ │ │ +
153 // convert index i to multiindex
│ │ │ │ +
154 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ +
155
│ │ │ │ +
156 // initialize product
│ │ │ │ +
157 out[i] = 1.0;
│ │ │ │ +
158
│ │ │ │ +
159 // dimension by dimension
│ │ │ │ +
160 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
161 out[i] *= p(alpha[j],x[j]);
│ │ │ │ +
162 }
│ │ │ │ +
163 }
│ │ │ │
164
│ │ │ │ -
165 };
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
177 template<class D>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
179 {
│ │ │ │ -
180 protected:
│ │ │ │ +
170 void evaluateJacobian(const typename Traits::DomainType& x,
│ │ │ │ +
171 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
172 {
│ │ │ │ +
173 out.resize(size());
│ │ │ │ +
174
│ │ │ │ +
175 // Specialization for k==0
│ │ │ │ +
176 if (k==0)
│ │ │ │ +
177 {
│ │ │ │ +
178 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ +
179 return;
│ │ │ │ +
180 }
│ │ │ │
181
│ │ │ │ - │ │ │ │ -
184
│ │ │ │ -
│ │ │ │ -
215 static int getSubElement(const FieldVector<D,3>& global)
│ │ │ │ -
216 {
│ │ │ │ -
217 if (global[0] + global[1] + global[2] <= 0.5)
│ │ │ │ -
218 return 0;
│ │ │ │ -
219 else if (global[0] >= 0.5)
│ │ │ │ -
220 return 1;
│ │ │ │ -
221 else if (global[1] >= 0.5)
│ │ │ │ -
222 return 2;
│ │ │ │ -
223 else if (global[2] >= 0.5)
│ │ │ │ -
224 return 3;
│ │ │ │ -
225 else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] <= 0.5))
│ │ │ │ -
226 return 4;
│ │ │ │ -
227 else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] <= 0.5))
│ │ │ │ -
228 return 5;
│ │ │ │ -
229 else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] >= 0.5))
│ │ │ │ -
230 return 6;
│ │ │ │ -
231 else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] >= 0.5))
│ │ │ │ -
232 return 7;
│ │ │ │ -
233
│ │ │ │ -
234 DUNE_THROW(InvalidStateException, "no subelement defined");
│ │ │ │ -
235
│ │ │ │ -
236 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
243 static void getSubElement(const FieldVector<D,3>& global,
│ │ │ │ -
244 int& subElement,
│ │ │ │ -
245 FieldVector<D,3>& local)
│ │ │ │ -
246 {
│ │ │ │ -
247 if (global[0] + global[1] + global[2] <= 0.5) {
│ │ │ │ -
248 subElement = 0;
│ │ │ │ -
249 local = global;
│ │ │ │ -
250 local *= 2.0;
│ │ │ │ -
251 return;
│ │ │ │ -
252 } else if (global[0] >= 0.5) {
│ │ │ │ -
253 subElement = 1;
│ │ │ │ -
254 local = global;
│ │ │ │ -
255 local[0] -= 0.5;
│ │ │ │ -
256 local *= 2.0;
│ │ │ │ -
257 return;
│ │ │ │ -
258 } else if (global[1] >= 0.5) {
│ │ │ │ -
259 subElement = 2;
│ │ │ │ -
260 local = global;
│ │ │ │ -
261 local[1] -= 0.5;
│ │ │ │ -
262 local *= 2.0;
│ │ │ │ -
263 return;
│ │ │ │ -
264 } else if (global[2] >= 0.5) {
│ │ │ │ -
265 subElement = 3;
│ │ │ │ -
266 local = global;
│ │ │ │ -
267 local[2] -= 0.5;
│ │ │ │ -
268 local *= 2.0;
│ │ │ │ -
269 return;
│ │ │ │ -
270 } else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] <= 0.5)) {
│ │ │ │ -
271 subElement = 4;
│ │ │ │ -
272 local[0] = 2.0 * global[1];
│ │ │ │ -
273 local[1] = 2.0 * (0.5 - global[0] - global[1]);
│ │ │ │ -
274 local[2] = 2.0 * (-0.5 + global[0] + global[1] + global[2]);
│ │ │ │ -
275 // Dune::FieldMatrix<double,3,3> A(0.0);
│ │ │ │ -
276 // A[0][1] = 2.0;
│ │ │ │ -
277 // A[1][0] = -2.0;
│ │ │ │ -
278 // A[1][1] = -2.0;
│ │ │ │ -
279 // A[2][0] = 2.0;
│ │ │ │ -
280 // A[2][1] = 2.0;
│ │ │ │ -
281 // A[2][2] = 2.0;
│ │ │ │ -
282 // A.mv(global,local);
│ │ │ │ -
283 // local[1] += 1.0;
│ │ │ │ -
284 // local[2] -= 1.0;
│ │ │ │ -
285 return;
│ │ │ │ -
286 } else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] <= 0.5)) {
│ │ │ │ -
287 subElement = 5;
│ │ │ │ -
288 local[0] = 2.0 * (0.5 - global[0]);
│ │ │ │ -
289 local[1] = 2.0 * (0.5 - global[1] - global[2]);
│ │ │ │ -
290 local[2] = 2.0 * global[2];
│ │ │ │ -
291 // Dune::FieldMatrix<double,3,3> A(0.0);
│ │ │ │ -
292 // A[0][0] = -2.0;
│ │ │ │ -
293 // A[1][1] = -2.0;
│ │ │ │ -
294 // A[1][2] = -2.0;
│ │ │ │ -
295 // A[2][2] = 2.0;
│ │ │ │ -
296 // A.mv(global,local);
│ │ │ │ -
297 // local[0] += 1.0;
│ │ │ │ -
298 // local[1] += 1.0;
│ │ │ │ -
299 return;
│ │ │ │ -
300 } else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] >= 0.5)) {
│ │ │ │ -
301 subElement = 6;
│ │ │ │ -
302 local[0] = 2.0 * (0.5 - global[0] - global[1]);
│ │ │ │ -
303 local[1] = 2.0 * global[0];
│ │ │ │ -
304 local[2] = 2.0 * (-0.5 + global[1] + global[2]);
│ │ │ │ -
305 // Dune::FieldMatrix<double,3,3> A(0.0);
│ │ │ │ -
306 // A[0][0] = -2.0;
│ │ │ │ -
307 // A[0][1] = -2.0;
│ │ │ │ -
308 // A[1][0] = 2.0;
│ │ │ │ -
309 // A[2][1] = 2.0;
│ │ │ │ -
310 // A[2][2] = 2.0;
│ │ │ │ -
311 // A.mv(global,local);
│ │ │ │ -
312 // local[0] += 1.0;
│ │ │ │ -
313 // local[2] -= 1.0;
│ │ │ │ -
314 return;
│ │ │ │ -
315 } else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] >= 0.5)) {
│ │ │ │ -
316 subElement = 7;
│ │ │ │ -
317 local[0] = 2.0 * (-0.5 + global[1] + global[2]);
│ │ │ │ -
318 local[1] = 2.0 * (0.5 - global[1]);
│ │ │ │ -
319 local[2] = 2.0 * (-0.5 + global[0] + global[1]);
│ │ │ │ -
320 // Dune::FieldMatrix<double,3,3> A(0.0);
│ │ │ │ -
321 // A[0][1] = 2.0;
│ │ │ │ -
322 // A[0][2] = 2.0;
│ │ │ │ -
323 // A[1][1] = -2.0;
│ │ │ │ -
324 // A[2][0] = 2.0;
│ │ │ │ -
325 // A[2][1] = 2.0;
│ │ │ │ -
326 // A.mv(global,local);
│ │ │ │ -
327 // local[0] -= 1.0;
│ │ │ │ -
328 // local[1] += 1.0;
│ │ │ │ -
329 // local[2] -= 1.0;
│ │ │ │ -
330 return;
│ │ │ │ -
331 }
│ │ │ │ -
332
│ │ │ │ -
333 DUNE_THROW(InvalidStateException, "no subelement defined");
│ │ │ │ -
334
│ │ │ │ -
335 }
│ │ │ │ -
│ │ │ │ -
336
│ │ │ │ -
337 };
│ │ │ │ -
│ │ │ │ -
338
│ │ │ │ -
339
│ │ │ │ -
340}
│ │ │ │ -
341
│ │ │ │ -
342#endif
│ │ │ │ +
182 // Specialization for k==1
│ │ │ │ +
183 if (k==1)
│ │ │ │ +
184 {
│ │ │ │ +
185 // Loop over all shape functions
│ │ │ │ +
186 for (size_t i=0; i<size(); i++)
│ │ │ │ +
187 {
│ │ │ │ +
188 // Loop over all coordinate directions
│ │ │ │ +
189 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
190 {
│ │ │ │ +
191 // Initialize: the overall expression is a product
│ │ │ │ +
192 // if j-th bit of i is set to 1, else -11
│ │ │ │ +
193 out[i][0][j] = (i & (1<<j)) ? 1 : -1;
│ │ │ │ +
194
│ │ │ │ +
195 for (unsigned int l=0; l<dim; l++)
│ │ │ │ +
196 {
│ │ │ │ +
197 if (j!=l)
│ │ │ │ +
198 // if l-th bit of i is set multiply with x[l], else with 1-x[l]
│ │ │ │ +
199 out[i][0][j] *= (i & (1<<l)) ? x[l] : 1-x[l];
│ │ │ │ +
200 }
│ │ │ │ +
201 }
│ │ │ │ +
202 }
│ │ │ │ +
203 return;
│ │ │ │ +
204 }
│ │ │ │ +
205
│ │ │ │ +
206 // The general case
│ │ │ │ +
207
│ │ │ │ +
208 // Loop over all shape functions
│ │ │ │ +
209 for (size_t i=0; i<size(); i++)
│ │ │ │ +
210 {
│ │ │ │ +
211 // convert index i to multiindex
│ │ │ │ +
212 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ +
213
│ │ │ │ +
214 // Loop over all coordinate directions
│ │ │ │ +
215 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
216 {
│ │ │ │ +
217 // Initialize: the overall expression is a product
│ │ │ │ +
218 // if j-th bit of i is set to -1, else 1
│ │ │ │ +
219 out[i][0][j] = dp(alpha[j],x[j]);
│ │ │ │ +
220
│ │ │ │ +
221 // rest of the product
│ │ │ │ +
222 for (unsigned int l=0; l<dim; l++)
│ │ │ │ +
223 if (l!=j)
│ │ │ │ +
224 out[i][0][j] *= p(alpha[l],x[l]);
│ │ │ │ +
225 }
│ │ │ │ +
226 }
│ │ │ │ +
227 }
│ │ │ │ +
228
│ │ │ │ +
235 void partial(const std::array<unsigned int,dim>& order,
│ │ │ │ +
236 const typename Traits::DomainType& in,
│ │ │ │ +
237 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
238 {
│ │ │ │ +
239 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
240
│ │ │ │ +
241 out.resize(size());
│ │ │ │ +
242
│ │ │ │ +
243 if (k==0)
│ │ │ │ +
244 {
│ │ │ │ +
245 out[0] = (totalOrder==0);
│ │ │ │ +
246 return;
│ │ │ │ +
247 }
│ │ │ │ +
248
│ │ │ │ +
249 if (k==1)
│ │ │ │ +
250 {
│ │ │ │ +
251 if (totalOrder == 0)
│ │ │ │ +
252 {
│ │ │ │ +
253 evaluateFunction(in, out);
│ │ │ │ +
254 }
│ │ │ │ +
255 else if (totalOrder == 1)
│ │ │ │ +
256 {
│ │ │ │ +
257 out.resize(size());
│ │ │ │ +
258
│ │ │ │ +
259 auto direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
260 if (direction >= dim)
│ │ │ │ +
261 DUNE_THROW(RangeError, "Direction of partial derivative not found!");
│ │ │ │ +
262
│ │ │ │ +
263 // Loop over all shape functions
│ │ │ │ +
264 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
265 {
│ │ │ │ +
266 // Initialize: the overall expression is a product
│ │ │ │ +
267 // if j-th bit of i is set to 1, otherwise to -1
│ │ │ │ +
268 out[i] = (i & (1<<direction)) ? 1 : -1;
│ │ │ │ +
269
│ │ │ │ +
270 for (unsigned int j = 0; j < dim; ++j)
│ │ │ │ +
271 {
│ │ │ │ +
272 if (direction != j)
│ │ │ │ +
273 // if j-th bit of i is set multiply with in[j], else with 1-in[j]
│ │ │ │ +
274 out[i] *= (i & (1<<j)) ? in[j] : 1-in[j];
│ │ │ │ +
275 }
│ │ │ │ +
276 }
│ │ │ │ +
277 }
│ │ │ │ +
278 else if (totalOrder == 2)
│ │ │ │ +
279 {
│ │ │ │ +
280
│ │ │ │ +
281 for (size_t i=0; i<size(); i++)
│ │ │ │ +
282 {
│ │ │ │ +
283 // convert index i to multiindex
│ │ │ │ +
284 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ +
285
│ │ │ │ +
286 // Initialize: the overall expression is a product
│ │ │ │ +
287 out[i][0] = 1.0;
│ │ │ │ +
288
│ │ │ │ +
289 // rest of the product
│ │ │ │ +
290 for (std::size_t l=0; l<dim; l++)
│ │ │ │ +
291 {
│ │ │ │ +
292 switch (order[l])
│ │ │ │ +
293 {
│ │ │ │ +
294 case 0:
│ │ │ │ +
295 out[i][0] *= p(alpha[l],in[l]);
│ │ │ │ +
296 break;
│ │ │ │ +
297 case 1:
│ │ │ │ +
298 //std::cout << "dp: " << dp(alpha[l],in[l]) << std::endl;
│ │ │ │ +
299 out[i][0] *= dp(alpha[l],in[l]);
│ │ │ │ +
300 break;
│ │ │ │ +
301 case 2:
│ │ │ │ +
302 out[i][0] *= 0;
│ │ │ │ +
303 break;
│ │ │ │ +
304 default:
│ │ │ │ +
305 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
306 }
│ │ │ │ +
307 }
│ │ │ │ +
308 }
│ │ │ │ +
309 }
│ │ │ │ +
310 else
│ │ │ │ +
311 DUNE_THROW(NotImplemented, "Partial derivative of order " << totalOrder << " is not implemented!");
│ │ │ │ +
312
│ │ │ │ +
313 return;
│ │ │ │ +
314 }
│ │ │ │ +
315
│ │ │ │ +
316 // The case k>1
│ │ │ │ +
317
│ │ │ │ +
318 // Loop over all shape functions
│ │ │ │ +
319 for (size_t i=0; i<size(); i++)
│ │ │ │ +
320 {
│ │ │ │ +
321 // convert index i to multiindex
│ │ │ │ +
322 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ +
323
│ │ │ │ +
324 // Initialize: the overall expression is a product
│ │ │ │ +
325 out[i][0] = 1.0;
│ │ │ │ +
326
│ │ │ │ +
327 // rest of the product
│ │ │ │ +
328 for (std::size_t l=0; l<dim; l++)
│ │ │ │ +
329 {
│ │ │ │ +
330 switch (order[l])
│ │ │ │ +
331 {
│ │ │ │ +
332 case 0:
│ │ │ │ +
333 out[i][0] *= p(alpha[l],in[l]);
│ │ │ │ +
334 break;
│ │ │ │ +
335 case 1:
│ │ │ │ +
336 out[i][0] *= dp(alpha[l],in[l]);
│ │ │ │ +
337 break;
│ │ │ │ +
338 case 2:
│ │ │ │ +
339 out[i][0] *= ddp(alpha[l],in[l]);
│ │ │ │ +
340 break;
│ │ │ │ +
341 default:
│ │ │ │ +
342 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
343 }
│ │ │ │ +
344 }
│ │ │ │ +
345 }
│ │ │ │ +
346 }
│ │ │ │ +
347
│ │ │ │ +
349 static constexpr unsigned int order ()
│ │ │ │ +
350 {
│ │ │ │ +
351 return k;
│ │ │ │ +
352 }
│ │ │ │ +
353 };
│ │ │ │ +
354
│ │ │ │ +
360 template<unsigned int dim, unsigned int k>
│ │ │ │ +
361 class LagrangeCubeLocalCoefficients
│ │ │ │ +
362 {
│ │ │ │ +
363 // Return i as a d-digit number in the (k+1)-nary system
│ │ │ │ +
364 static std::array<unsigned int,dim> multiindex (unsigned int i)
│ │ │ │ +
365 {
│ │ │ │ +
366 std::array<unsigned int,dim> alpha;
│ │ │ │ +
367 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
368 {
│ │ │ │ +
369 alpha[j] = i % (k+1);
│ │ │ │ +
370 i = i/(k+1);
│ │ │ │ +
371 }
│ │ │ │ +
372 return alpha;
│ │ │ │ +
373 }
│ │ │ │ +
374
│ │ │ │ +
376 void setup1d(std::vector<unsigned int>& subEntity)
│ │ │ │ +
377 {
│ │ │ │ +
378 assert(k>0);
│ │ │ │ +
379
│ │ │ │ +
380 unsigned lastIndex=0;
│ │ │ │ +
381
│ │ │ │ +
382 /* edge and vertex numbering
│ │ │ │ +
383 0----0----1
│ │ │ │ +
384 */
│ │ │ │ +
385
│ │ │ │ +
386 // edge (0)
│ │ │ │ +
387 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ +
388 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
389 subEntity[lastIndex++] = 0; // inner dofs of element (0)
│ │ │ │ +
390
│ │ │ │ +
391 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ +
392
│ │ │ │ +
393 assert(power(k+1,dim)==lastIndex);
│ │ │ │ +
394 }
│ │ │ │ +
395
│ │ │ │ +
396 void setup2d(std::vector<unsigned int>& subEntity)
│ │ │ │ +
397 {
│ │ │ │ +
398 assert(k>0);
│ │ │ │ +
399
│ │ │ │ +
400 unsigned lastIndex=0;
│ │ │ │ +
401
│ │ │ │ +
402 // LocalKey: entity number, entity codim, dof indices within each entity
│ │ │ │ +
403 /* edge and vertex numbering
│ │ │ │ +
404 2----3----3
│ │ │ │ +
405 | |
│ │ │ │ +
406 | |
│ │ │ │ +
407 0 1
│ │ │ │ +
408 | |
│ │ │ │ +
409 | |
│ │ │ │ +
410 0----2----1
│ │ │ │ +
411 */
│ │ │ │ +
412
│ │ │ │ +
413 // lower edge (2)
│ │ │ │ +
414 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ +
415 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
416 subEntity[lastIndex++] = 2; // inner dofs of lower edge (2)
│ │ │ │ +
417
│ │ │ │ +
418 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ +
419
│ │ │ │ +
420 // iterate from bottom to top over inner edge dofs
│ │ │ │ +
421 for (unsigned e = 0; e < k - 1; ++e) {
│ │ │ │ +
422 subEntity[lastIndex++] = 0; // left edge (0)
│ │ │ │ +
423 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
424 subEntity[lastIndex++] = 0; // face dofs
│ │ │ │ +
425 subEntity[lastIndex++] = 1; // right edge (1)
│ │ │ │ +
426 }
│ │ │ │ +
427
│ │ │ │ +
428 // upper edge (3)
│ │ │ │ +
429 subEntity[lastIndex++] = 2; // corner 2
│ │ │ │ +
430 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
431 subEntity[lastIndex++] = 3; // inner dofs of upper edge (3)
│ │ │ │ +
432
│ │ │ │ +
433 subEntity[lastIndex++] = 3; // corner 3
│ │ │ │ +
434
│ │ │ │ +
435 assert(power(k+1,dim)==lastIndex);
│ │ │ │ +
436 }
│ │ │ │ +
437
│ │ │ │ +
438 void setup3d(std::vector<unsigned int>& subEntity)
│ │ │ │ +
439 {
│ │ │ │ +
440 assert(k>0);
│ │ │ │ +
441
│ │ │ │ +
442 unsigned lastIndex=0;
│ │ │ │ +
443#ifndef NDEBUG
│ │ │ │ +
444 const unsigned numIndices = power(k+1,dim);
│ │ │ │ +
445 const unsigned numFaceIndices = power(k+1,dim-1);
│ │ │ │ +
446#endif
│ │ │ │ +
447 const unsigned numInnerEdgeDofs = k-1;
│ │ │ │ +
448
│ │ │ │ +
449 // LocalKey: entity number, entity codim, dof indices within each entity
│ │ │ │ +
450 /* edge and vertex numbering
│ │ │ │ +
451
│ │ │ │ +
452 6---(11)--7 6---------7
│ │ │ │ +
453 /| /| /| (5) /|
│ │ │ │ +
454 (8)| (9)| / | top / |
│ │ │ │ +
455 / (2) / (3) / |(3)bac/k |
│ │ │ │ +
456 4---(10)--5 | 4---------5 |
│ │ │ │ +
457 | | | | left|(0)| |(1)|right
│ │ │ │ +
458 | 2--(7)|---3 | 2-----|---3
│ │ │ │ +
459 (0) / (1) / |(2)front | /
│ │ │ │ +
460 |(4) |(5) | / (4) | /
│ │ │ │ +
461 |/ |/ |/ bottom |/
│ │ │ │ +
462 0---(6)---1 0---------1
│ │ │ │ +
463 */
│ │ │ │ +
464
│ │ │ │ +
465 // bottom face (4)
│ │ │ │ +
466 lastIndex=0;
│ │ │ │ +
467 // lower edge (6)
│ │ │ │ +
468 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ +
469 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ +
470 subEntity[lastIndex++] = 6; // inner dofs of lower edge (6)
│ │ │ │ +
471
│ │ │ │ +
472 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ +
473
│ │ │ │ +
474 // iterate from bottom to top over inner edge dofs
│ │ │ │ +
475 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) {
│ │ │ │ +
476 subEntity[lastIndex++] = 4; // left edge (4)
│ │ │ │ +
477 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ +
478 subEntity[lastIndex++] = 4; // inner face dofs
│ │ │ │ +
479 subEntity[lastIndex++] = 5; // right edge (5)
│ │ │ │ +
480 }
│ │ │ │ +
481
│ │ │ │ +
482 // upper edge (7)
│ │ │ │ +
483 subEntity[lastIndex++] = 2; // corner 2
│ │ │ │ +
484 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
485 subEntity[lastIndex++] = 7; // inner dofs of upper edge (7)
│ │ │ │ +
486 subEntity[lastIndex++] = 3; // corner 3
│ │ │ │ +
487
│ │ │ │ +
488 assert(numFaceIndices==lastIndex); // added 1 face so far
│ │ │ │ +
490
│ │ │ │ +
492 for(unsigned f = 0; f < numInnerEdgeDofs; ++f) {
│ │ │ │ +
493
│ │ │ │ +
494 // lower edge (connecting edges 0 and 1)
│ │ │ │ +
495 subEntity[lastIndex++] = 0; // dof on edge 0
│ │ │ │ +
496 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ +
497 subEntity[lastIndex++] = 2; // dof in front face
│ │ │ │ +
498 subEntity[lastIndex++] = 1; // dof on edge 1
│ │ │ │ +
499
│ │ │ │ +
500 // iterate from bottom to top over inner edge dofs
│ │ │ │ +
501 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) {
│ │ │ │ +
502 subEntity[lastIndex++] = 0; // on left face (0)
│ │ │ │ +
503 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ +
504 subEntity[lastIndex++] = 0; // volume dofs
│ │ │ │ +
505 subEntity[lastIndex++] = 1; // right face (1)
│ │ │ │ +
506 }
│ │ │ │ +
507
│ │ │ │ +
508 // upper edge (connecting edges 0 and 1)
│ │ │ │ +
509 subEntity[lastIndex++] = 2; // dof on edge 2
│ │ │ │ +
510 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ +
511 subEntity[lastIndex++] = 3; // dof on rear face (3)
│ │ │ │ +
512 subEntity[lastIndex++] = 3; // dof on edge 3
│ │ │ │ +
513
│ │ │ │ +
514 assert(lastIndex==(f+1+1)*numFaceIndices);
│ │ │ │ +
515 }
│ │ │ │ +
516
│ │ │ │ +
518 // lower edge (10)
│ │ │ │ +
519 subEntity[lastIndex++] = 4; // corner 4
│ │ │ │ +
520 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
521 subEntity[lastIndex++] = 10; // inner dofs on lower edge (10)
│ │ │ │ +
522 subEntity[lastIndex++] = 5; // corner 5
│ │ │ │ +
523
│ │ │ │ +
524 // iterate from bottom to top over inner edge dofs
│ │ │ │ +
525 for (unsigned e = 0; e < k - 1; ++e) {
│ │ │ │ +
526 subEntity[lastIndex++] = 8; // left edge (8)
│ │ │ │ +
527 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
528 subEntity[lastIndex++] = 5; // face dofs
│ │ │ │ +
529 subEntity[lastIndex++] = 9; // right edge (9)
│ │ │ │ +
530 }
│ │ │ │ +
531
│ │ │ │ +
532 // upper edge (11)
│ │ │ │ +
533 subEntity[lastIndex++] = 6; // corner 6
│ │ │ │ +
534 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ +
535 subEntity[lastIndex++] = 11; // inner dofs of upper edge (11)
│ │ │ │ +
536 subEntity[lastIndex++] = 7; // corner 7
│ │ │ │ +
537
│ │ │ │ +
538 assert(numIndices==lastIndex);
│ │ │ │ +
539 }
│ │ │ │ +
540
│ │ │ │ +
541 public:
│ │ │ │ +
543 LagrangeCubeLocalCoefficients ()
│ │ │ │ +
544 : localKeys_(size())
│ │ │ │ +
545 {
│ │ │ │ +
546 if (k==0)
│ │ │ │ +
547 {
│ │ │ │ +
548 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ +
549 return;
│ │ │ │ +
550 }
│ │ │ │ +
551
│ │ │ │ +
552 if (k==1)
│ │ │ │ +
553 {
│ │ │ │ +
554 for (std::size_t i=0; i<size(); i++)
│ │ │ │ +
555 localKeys_[i] = LocalKey(i,dim,0);
│ │ │ │ +
556 return;
│ │ │ │ +
557 }
│ │ │ │ +
558
│ │ │ │ +
559 // Now: the general case
│ │ │ │ +
560
│ │ │ │ +
561 // Set up array of codimension-per-dof-number
│ │ │ │ +
562 std::vector<unsigned int> codim(size());
│ │ │ │ +
563
│ │ │ │ +
564 for (std::size_t i=0; i<codim.size(); i++)
│ │ │ │ +
565 {
│ │ │ │ +
566 codim[i] = 0;
│ │ │ │ +
567
│ │ │ │ +
568 // Codimension gets increased by 1 for each coordinate direction
│ │ │ │ +
569 // where dof is on boundary
│ │ │ │ +
570 std::array<unsigned int,dim> mIdx = multiindex(i);
│ │ │ │ +
571 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
572 if (mIdx[j]==0 or mIdx[j]==k)
│ │ │ │ +
573 codim[i]++;
│ │ │ │ +
574 }
│ │ │ │ +
575
│ │ │ │ +
576 // Set up index vector (the index of the dof in the set of dofs of a given subentity)
│ │ │ │ +
577 // Algorithm: the 'index' has the same ordering as the dof number 'i'.
│ │ │ │ +
578 // To make it consecutive we interpret 'i' in the (k+1)-adic system, omit all digits
│ │ │ │ +
579 // that correspond to axes where the dof is on the element boundary, and transform the
│ │ │ │ +
580 // rest to the (k-1)-adic system.
│ │ │ │ +
581 std::vector<unsigned int> index(size());
│ │ │ │ +
582
│ │ │ │ +
583 for (std::size_t i=0; i<size(); i++)
│ │ │ │ +
584 {
│ │ │ │ +
585 index[i] = 0;
│ │ │ │ +
586
│ │ │ │ +
587 std::array<unsigned int,dim> mIdx = multiindex(i);
│ │ │ │ +
588
│ │ │ │ +
589 for (int j=dim-1; j>=0; j--)
│ │ │ │ +
590 if (mIdx[j]>0 && mIdx[j]<k)
│ │ │ │ +
591 index[i] = (k-1)*index[i] + (mIdx[j]-1);
│ │ │ │ +
592 }
│ │ │ │ +
593
│ │ │ │ +
594 // Set up entity and dof numbers for each (supported) dimension separately
│ │ │ │ +
595 std::vector<unsigned int> subEntity(size());
│ │ │ │ +
596
│ │ │ │ +
597 if (dim==1) {
│ │ │ │ +
598
│ │ │ │ +
599 setup1d(subEntity);
│ │ │ │ +
600
│ │ │ │ +
601 } else if (dim==2) {
│ │ │ │ +
602
│ │ │ │ +
603 setup2d(subEntity);
│ │ │ │ +
604
│ │ │ │ +
605 } else if (dim==3) {
│ │ │ │ +
606
│ │ │ │ +
607 setup3d(subEntity);
│ │ │ │ +
608
│ │ │ │ +
609 } else
│ │ │ │ +
610 DUNE_THROW(Dune::NotImplemented, "LagrangeCubeLocalCoefficients for order " << k << " and dim == " << dim);
│ │ │ │ +
611
│ │ │ │ +
612 for (size_t i=0; i<size(); i++)
│ │ │ │ +
613 localKeys_[i] = LocalKey(subEntity[i], codim[i], index[i]);
│ │ │ │ +
614 }
│ │ │ │ +
615
│ │ │ │ +
617 static constexpr std::size_t size ()
│ │ │ │ +
618 {
│ │ │ │ +
619 return power(k+1,dim);
│ │ │ │ +
620 }
│ │ │ │ +
621
│ │ │ │ +
623 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
624 {
│ │ │ │ +
625 return localKeys_[i];
│ │ │ │ +
626 }
│ │ │ │ +
627
│ │ │ │ +
628 private:
│ │ │ │ +
629 std::vector<LocalKey> localKeys_;
│ │ │ │ +
630 };
│ │ │ │ +
631
│ │ │ │ +
636 template<class LocalBasis>
│ │ │ │ +
637 class LagrangeCubeLocalInterpolation
│ │ │ │ +
638 {
│ │ │ │ +
639 public:
│ │ │ │ +
640
│ │ │ │ +
648 template<typename F, typename C>
│ │ │ │ +
649 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
650 {
│ │ │ │ +
651 constexpr auto dim = LocalBasis::Traits::dimDomain;
│ │ │ │ +
652 constexpr auto k = LocalBasis::order();
│ │ │ │ +
653 using D = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ +
654
│ │ │ │ +
655 typename LocalBasis::Traits::DomainType x;
│ │ │ │ +
656 auto&& f = Impl::makeFunctionWithCallOperator<typename LocalBasis::Traits::DomainType>(ff);
│ │ │ │ +
657
│ │ │ │ +
658 out.resize(LocalBasis::size());
│ │ │ │ +
659
│ │ │ │ +
660 // Specialization for zero-order case
│ │ │ │ +
661 if (k==0)
│ │ │ │ +
662 {
│ │ │ │ +
663 auto center = ReferenceElements<D,dim>::cube().position(0,0);
│ │ │ │ +
664 out[0] = f(center);
│ │ │ │ +
665 return;
│ │ │ │ +
666 }
│ │ │ │ +
667
│ │ │ │ +
668 // Specialization for first-order case
│ │ │ │ +
669 if (k==1)
│ │ │ │ +
670 {
│ │ │ │ +
671 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ +
672 {
│ │ │ │ +
673 // Generate coordinate of the i-th corner of the reference cube
│ │ │ │ +
674 for (int j=0; j<dim; j++)
│ │ │ │ +
675 x[j] = (i & (1<<j)) ? 1.0 : 0.0;
│ │ │ │ +
676
│ │ │ │ +
677 out[i] = f(x);
│ │ │ │ +
678 }
│ │ │ │ +
679 return;
│ │ │ │ +
680 }
│ │ │ │ +
681
│ │ │ │ +
682 // The general case
│ │ │ │ +
683 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ +
684 {
│ │ │ │ +
685 // convert index i to multiindex
│ │ │ │ +
686 std::array<unsigned int,dim> alpha(LocalBasis::multiindex(i));
│ │ │ │ +
687
│ │ │ │ +
688 // Generate coordinate of the i-th Lagrange point
│ │ │ │ +
689 for (unsigned int j=0; j<dim; j++)
│ │ │ │ +
690 x[j] = (1.0*alpha[j])/k;
│ │ │ │ +
691
│ │ │ │ +
692 out[i] = f(x);
│ │ │ │ +
693 }
│ │ │ │ +
694 }
│ │ │ │ +
695
│ │ │ │ +
696 };
│ │ │ │ +
697
│ │ │ │ +
698} } // namespace Dune::Impl
│ │ │ │ +
699
│ │ │ │ +
700namespace Dune
│ │ │ │ +
701{
│ │ │ │ +
709 template<class D, class R, int dim, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
711 {
│ │ │ │ +
712 public:
│ │ │ │ + │ │ │ │ +
716 Impl::LagrangeCubeLocalCoefficients<dim,k>,
│ │ │ │ +
717 Impl::LagrangeCubeLocalInterpolation<Impl::LagrangeCubeLocalBasis<D,R,dim,k> > >;
│ │ │ │ +
718
│ │ │ │ + │ │ │ │ +
725
│ │ │ │ +
│ │ │ │ +
728 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
729 {
│ │ │ │ +
730 return basis_;
│ │ │ │ +
731 }
│ │ │ │ +
│ │ │ │ +
732
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
736 {
│ │ │ │ +
737 return coefficients_;
│ │ │ │ +
738 }
│ │ │ │ +
│ │ │ │ +
739
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
743 {
│ │ │ │ +
744 return interpolation_;
│ │ │ │ +
745 }
│ │ │ │ +
│ │ │ │ +
746
│ │ │ │ +
│ │ │ │ +
748 static constexpr std::size_t size ()
│ │ │ │ +
749 {
│ │ │ │ +
750 return power(k+1,dim);
│ │ │ │ +
751 }
│ │ │ │ +
│ │ │ │ +
752
│ │ │ │ +
│ │ │ │ +
755 static constexpr GeometryType type ()
│ │ │ │ +
756 {
│ │ │ │ +
757 return GeometryTypes::cube(dim);
│ │ │ │ +
758 }
│ │ │ │ +
│ │ │ │ +
759
│ │ │ │ +
760 private:
│ │ │ │ +
761 Impl::LagrangeCubeLocalBasis<D,R,dim,k> basis_;
│ │ │ │ +
762 Impl::LagrangeCubeLocalCoefficients<dim,k> coefficients_;
│ │ │ │ +
763 Impl::LagrangeCubeLocalInterpolation<Impl::LagrangeCubeLocalBasis<D,R,dim,k> > interpolation_;
│ │ │ │ +
764 };
│ │ │ │ +
│ │ │ │ +
765
│ │ │ │ +
766} // namespace Dune
│ │ │ │ +
767
│ │ │ │ +
768#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition refinedsimplexlocalbasis.hh:20
│ │ │ │ -
RefinedSimplexLocalBasis()
Definition refinedsimplexlocalbasis.hh:22
│ │ │ │ -
RefinedSimplexLocalBasis()
Protected default constructor so this class can only be instantiated as a base class.
Definition refinedsimplexlocalbasis.hh:41
│ │ │ │ -
static void getSubElement(const FieldVector< D, 1 > &global, int &subElement, FieldVector< D, 1 > &local)
Get local coordinates in the subelement.
Definition refinedsimplexlocalbasis.hh:69
│ │ │ │ -
static int getSubElement(const FieldVector< D, 1 > &global)
Get the number of the subelement containing a given point.
Definition refinedsimplexlocalbasis.hh:53
│ │ │ │ -
RefinedSimplexLocalBasis()
Protected default constructor so this class can only be instantiated as a base class.
Definition refinedsimplexlocalbasis.hh:102
│ │ │ │ -
static int getSubElement(const FieldVector< D, 2 > &global)
Get the number of the subtriangle containing a given point.
Definition refinedsimplexlocalbasis.hh:119
│ │ │ │ -
static void getSubElement(const FieldVector< D, 2 > &global, int &subElement, FieldVector< D, 2 > &local)
Get local coordinates in the subtriangle.
Definition refinedsimplexlocalbasis.hh:137
│ │ │ │ -
static void getSubElement(const FieldVector< D, 3 > &global, int &subElement, FieldVector< D, 3 > &local)
Get local coordinates in the subsimplex.
Definition refinedsimplexlocalbasis.hh:243
│ │ │ │ -
RefinedSimplexLocalBasis()
Protected default constructor so this class can only be instantiated as a base class.
Definition refinedsimplexlocalbasis.hh:183
│ │ │ │ -
static int getSubElement(const FieldVector< D, 3 > &global)
Get the number of the subsimplex containing a given point in the reference element.
Definition refinedsimplexlocalbasis.hh:215
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangecube.hh:728
│ │ │ │ +
LagrangeCubeLocalFiniteElement()
Default constructor.
Definition lagrangecube.hh:724
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangecube.hh:742
│ │ │ │ +
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangecube.hh:755
│ │ │ │ +
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangecube.hh:748
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangecube.hh:735
│ │ │ │ │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,304 +1,774 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _c_o_m_m_o_n │ │ │ │ │ -refinedsimplexlocalbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +lagrangecube.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_SIMPLEX_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_REFINED_SIMPLEX_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ 7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ 12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 class _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -20 { │ │ │ │ │ -21 protected: │ │ │ │ │ -_2_2 _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ -23 { │ │ │ │ │ -24 DUNE_THROW(Dune::NotImplemented,"RefinedSimplexLocalBasis not implemented │ │ │ │ │ -for dim > 3."); │ │ │ │ │ -25 } │ │ │ │ │ -26 }; │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e { namespace Impl │ │ │ │ │ +23{ │ │ │ │ │ +24 // Forward declaration │ │ │ │ │ +25 template │ │ │ │ │ +26 class LagrangeCubeLocalInterpolation; │ │ │ │ │ 27 │ │ │ │ │ -35 template │ │ │ │ │ -_3_6 class _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -37 { │ │ │ │ │ -38 protected: │ │ │ │ │ -39 │ │ │ │ │ -_4_1 _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s() {} │ │ │ │ │ +38 template │ │ │ │ │ +39 class LagrangeCubeLocalBasis │ │ │ │ │ +40 { │ │ │ │ │ +41 friend class │ │ │ │ │ +LagrangeCubeLocalInterpolation >; │ │ │ │ │ 42 │ │ │ │ │ -_5_3 static int _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global) │ │ │ │ │ +43 // i-th Lagrange polynomial of degree k in one dimension │ │ │ │ │ +44 static R p(unsigned int i, D x) │ │ │ │ │ +45 { │ │ │ │ │ +46 R result(1.0); │ │ │ │ │ +47 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ +48 if (j!=i) result *= (k*x-j)/((int)i-(int)j); │ │ │ │ │ +49 return result; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +52 // derivative of ith Lagrange polynomial of degree k in one dimension │ │ │ │ │ +53 static R dp(unsigned int i, D x) │ │ │ │ │ 54 { │ │ │ │ │ -55 if (global[0] <= 0.5) │ │ │ │ │ -56 return 0; │ │ │ │ │ -57 else if (global[0] <= 1.0) │ │ │ │ │ -58 return 1; │ │ │ │ │ -59 │ │ │ │ │ -60 DUNE_THROW(InvalidStateException, "no subelement defined"); │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -_6_9 static void _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global, │ │ │ │ │ -70 int& subElement, │ │ │ │ │ -71 FieldVector& local) │ │ │ │ │ -72 { │ │ │ │ │ -73 if (global[0] <= 0.5) { │ │ │ │ │ -74 subElement = 0; │ │ │ │ │ -75 local[0] = 2.0 * global[0]; │ │ │ │ │ -76 return; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79 subElement = 1; │ │ │ │ │ -80 local[0] = 2.0 * global[0] - 1.0; │ │ │ │ │ -81 } │ │ │ │ │ -82 │ │ │ │ │ -83 }; │ │ │ │ │ -84 │ │ │ │ │ -85 │ │ │ │ │ -96 template │ │ │ │ │ -_9_7 class _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -98 { │ │ │ │ │ -99 protected: │ │ │ │ │ -100 │ │ │ │ │ -_1_0_2 _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s() {} │ │ │ │ │ -103 │ │ │ │ │ -_1_1_9 static int _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global) │ │ │ │ │ +55 R result(0.0); │ │ │ │ │ +56 │ │ │ │ │ +57 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ +58 { │ │ │ │ │ +59 if (j!=i) │ │ │ │ │ +60 { │ │ │ │ │ +61 R prod( (k*1.0)/((int)i-(int)j) ); │ │ │ │ │ +62 for (unsigned int l=0; l<=k; l++) │ │ │ │ │ +63 if (l!=i && l!=j) │ │ │ │ │ +64 prod *= (k*x-l)/((int)i-(int)l); │ │ │ │ │ +65 result += prod; │ │ │ │ │ +66 } │ │ │ │ │ +67 } │ │ │ │ │ +68 return result; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 // Second derivative of j-th Lagrange polynomial of degree k in one │ │ │ │ │ +dimension │ │ │ │ │ +72 // Formula and notation taken from https://en.wikipedia.org/wiki/ │ │ │ │ │ +Lagrange_polynomial#Derivatives │ │ │ │ │ +73 static R ddp(unsigned int j, D x) │ │ │ │ │ +74 { │ │ │ │ │ +75 R result(0.0); │ │ │ │ │ +76 │ │ │ │ │ +77 for (unsigned int i=0; i<=k; i++) │ │ │ │ │ +78 { │ │ │ │ │ +79 if (i==j) │ │ │ │ │ +80 continue; │ │ │ │ │ +81 │ │ │ │ │ +82 R sum(0); │ │ │ │ │ +83 │ │ │ │ │ +84 for (unsigned int m=0; m<=k; m++) │ │ │ │ │ +85 { │ │ │ │ │ +86 if (m==i || m==j) │ │ │ │ │ +87 continue; │ │ │ │ │ +88 │ │ │ │ │ +89 R prod( (k*1.0)/((int)j-(int)m) ); │ │ │ │ │ +90 for (unsigned int l=0; l<=k; l++) │ │ │ │ │ +91 if (l!=i && l!=j && l!=m) │ │ │ │ │ +92 prod *= (k*x-l)/((int)j-(int)l); │ │ │ │ │ +93 sum += prod; │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +96 result += sum * ( (k*1.0)/((int)j-(int)i) ); │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99 return result; │ │ │ │ │ +100 } │ │ │ │ │ +101 │ │ │ │ │ +102 // Return i as a d-digit number in the (k+1)-nary system │ │ │ │ │ +103 static std::array multiindex (unsigned int i) │ │ │ │ │ +104 { │ │ │ │ │ +105 std::array alpha; │ │ │ │ │ +106 for (unsigned int j=0; j,R,1,FieldVector,FieldMatrix │ │ │ │ │ +>; │ │ │ │ │ +116 │ │ │ │ │ +119 static constexpr unsigned int size () │ │ │ │ │ 120 { │ │ │ │ │ -121 if (global[0] + global[1] <= 0.5) │ │ │ │ │ -122 return 0; │ │ │ │ │ -123 else if (global[0] >= 0.5) │ │ │ │ │ -124 return 1; │ │ │ │ │ -125 else if (global[1] >= 0.5) │ │ │ │ │ -126 return 2; │ │ │ │ │ -127 │ │ │ │ │ -128 return 3; │ │ │ │ │ -129 } │ │ │ │ │ -130 │ │ │ │ │ -_1_3_7 static void _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global, │ │ │ │ │ -138 int& subElement, │ │ │ │ │ -139 FieldVector& local) │ │ │ │ │ +121 return power(k+1, dim); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +125 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ +126 std::vector& out) const │ │ │ │ │ +127 { │ │ │ │ │ +128 out.resize(size()); │ │ │ │ │ +129 │ │ │ │ │ +130 // Specialization for zero-order case │ │ │ │ │ +131 if (k==0) │ │ │ │ │ +132 { │ │ │ │ │ +133 out[0] = 1; │ │ │ │ │ +134 return; │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +137 if (k==1) │ │ │ │ │ +138 { │ │ │ │ │ +139 for (size_t i=0; i= 0.5) { │ │ │ │ │ -147 subElement = 1; │ │ │ │ │ -148 local[0] = 2*global[0]-1; │ │ │ │ │ -149 local[1] = 2*global[1]; │ │ │ │ │ -150 return; │ │ │ │ │ -151 } else if (global[1] >= 0.5) { │ │ │ │ │ -152 subElement = 2; │ │ │ │ │ -153 local[0] = 2*global[0]; │ │ │ │ │ -154 local[1] = 2*global[1]-1; │ │ │ │ │ -155 return; │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 subElement = 3; │ │ │ │ │ -159 local[0] = -2 * global[0] + 1; │ │ │ │ │ -160 local[1] = -2 * global[1] + 1; │ │ │ │ │ -161 │ │ │ │ │ +141 out[i] = 1; │ │ │ │ │ +142 │ │ │ │ │ +143 for (unsigned int j=0; j alpha(multiindex(i)); │ │ │ │ │ +155 │ │ │ │ │ +156 // initialize product │ │ │ │ │ +157 out[i] = 1.0; │ │ │ │ │ +158 │ │ │ │ │ +159 // dimension by dimension │ │ │ │ │ +160 for (unsigned int j=0; j │ │ │ │ │ -_1_7_8 class _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -179 { │ │ │ │ │ -180 protected: │ │ │ │ │ +170 void evaluateJacobian(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ +171 std::vector& out) const │ │ │ │ │ +172 { │ │ │ │ │ +173 out.resize(size()); │ │ │ │ │ +174 │ │ │ │ │ +175 // Specialization for k==0 │ │ │ │ │ +176 if (k==0) │ │ │ │ │ +177 { │ │ │ │ │ +178 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ +179 return; │ │ │ │ │ +180 } │ │ │ │ │ 181 │ │ │ │ │ -_1_8_3 _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s() {} │ │ │ │ │ -184 │ │ │ │ │ -_2_1_5 static int _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global) │ │ │ │ │ +182 // Specialization for k==1 │ │ │ │ │ +183 if (k==1) │ │ │ │ │ +184 { │ │ │ │ │ +185 // Loop over all shape functions │ │ │ │ │ +186 for (size_t i=0; i alpha(multiindex(i)); │ │ │ │ │ +213 │ │ │ │ │ +214 // Loop over all coordinate directions │ │ │ │ │ +215 for (unsigned int j=0; j= 0.5) │ │ │ │ │ -220 return 1; │ │ │ │ │ -221 else if (global[1] >= 0.5) │ │ │ │ │ -222 return 2; │ │ │ │ │ -223 else if (global[2] >= 0.5) │ │ │ │ │ -224 return 3; │ │ │ │ │ -225 else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] <= 0.5)) │ │ │ │ │ -226 return 4; │ │ │ │ │ -227 else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] <= 0.5)) │ │ │ │ │ -228 return 5; │ │ │ │ │ -229 else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] >= 0.5)) │ │ │ │ │ -230 return 6; │ │ │ │ │ -231 else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] >= 0.5)) │ │ │ │ │ -232 return 7; │ │ │ │ │ -233 │ │ │ │ │ -234 DUNE_THROW(InvalidStateException, "no subelement defined"); │ │ │ │ │ -235 │ │ │ │ │ -236 } │ │ │ │ │ -_2_4_3 static void _g_e_t_S_u_b_E_l_e_m_e_n_t(const FieldVector& global, │ │ │ │ │ -244 int& subElement, │ │ │ │ │ -245 FieldVector& local) │ │ │ │ │ -246 { │ │ │ │ │ -247 if (global[0] + global[1] + global[2] <= 0.5) { │ │ │ │ │ -248 subElement = 0; │ │ │ │ │ -249 local = global; │ │ │ │ │ -250 local *= 2.0; │ │ │ │ │ -251 return; │ │ │ │ │ -252 } else if (global[0] >= 0.5) { │ │ │ │ │ -253 subElement = 1; │ │ │ │ │ -254 local = global; │ │ │ │ │ -255 local[0] -= 0.5; │ │ │ │ │ -256 local *= 2.0; │ │ │ │ │ -257 return; │ │ │ │ │ -258 } else if (global[1] >= 0.5) { │ │ │ │ │ -259 subElement = 2; │ │ │ │ │ -260 local = global; │ │ │ │ │ -261 local[1] -= 0.5; │ │ │ │ │ -262 local *= 2.0; │ │ │ │ │ -263 return; │ │ │ │ │ -264 } else if (global[2] >= 0.5) { │ │ │ │ │ -265 subElement = 3; │ │ │ │ │ -266 local = global; │ │ │ │ │ -267 local[2] -= 0.5; │ │ │ │ │ -268 local *= 2.0; │ │ │ │ │ -269 return; │ │ │ │ │ -270 } else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] <= │ │ │ │ │ -0.5)) { │ │ │ │ │ -271 subElement = 4; │ │ │ │ │ -272 local[0] = 2.0 * global[1]; │ │ │ │ │ -273 local[1] = 2.0 * (0.5 - global[0] - global[1]); │ │ │ │ │ -274 local[2] = 2.0 * (-0.5 + global[0] + global[1] + global[2]); │ │ │ │ │ -275 // Dune::FieldMatrix A(0.0); │ │ │ │ │ -276 // A[0][1] = 2.0; │ │ │ │ │ -277 // A[1][0] = -2.0; │ │ │ │ │ -278 // A[1][1] = -2.0; │ │ │ │ │ -279 // A[2][0] = 2.0; │ │ │ │ │ -280 // A[2][1] = 2.0; │ │ │ │ │ -281 // A[2][2] = 2.0; │ │ │ │ │ -282 // A.mv(global,local); │ │ │ │ │ -283 // local[1] += 1.0; │ │ │ │ │ -284 // local[2] -= 1.0; │ │ │ │ │ -285 return; │ │ │ │ │ -286 } else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] <= │ │ │ │ │ -0.5)) { │ │ │ │ │ -287 subElement = 5; │ │ │ │ │ -288 local[0] = 2.0 * (0.5 - global[0]); │ │ │ │ │ -289 local[1] = 2.0 * (0.5 - global[1] - global[2]); │ │ │ │ │ -290 local[2] = 2.0 * global[2]; │ │ │ │ │ -291 // Dune::FieldMatrix A(0.0); │ │ │ │ │ -292 // A[0][0] = -2.0; │ │ │ │ │ -293 // A[1][1] = -2.0; │ │ │ │ │ -294 // A[1][2] = -2.0; │ │ │ │ │ -295 // A[2][2] = 2.0; │ │ │ │ │ -296 // A.mv(global,local); │ │ │ │ │ -297 // local[0] += 1.0; │ │ │ │ │ -298 // local[1] += 1.0; │ │ │ │ │ -299 return; │ │ │ │ │ -300 } else if ((global[0] + global[1] <= 0.5)and (global[1] + global[2] >= │ │ │ │ │ -0.5)) { │ │ │ │ │ -301 subElement = 6; │ │ │ │ │ -302 local[0] = 2.0 * (0.5 - global[0] - global[1]); │ │ │ │ │ -303 local[1] = 2.0 * global[0]; │ │ │ │ │ -304 local[2] = 2.0 * (-0.5 + global[1] + global[2]); │ │ │ │ │ -305 // Dune::FieldMatrix A(0.0); │ │ │ │ │ -306 // A[0][0] = -2.0; │ │ │ │ │ -307 // A[0][1] = -2.0; │ │ │ │ │ -308 // A[1][0] = 2.0; │ │ │ │ │ -309 // A[2][1] = 2.0; │ │ │ │ │ -310 // A[2][2] = 2.0; │ │ │ │ │ -311 // A.mv(global,local); │ │ │ │ │ -312 // local[0] += 1.0; │ │ │ │ │ -313 // local[2] -= 1.0; │ │ │ │ │ -314 return; │ │ │ │ │ -315 } else if ((global[0] + global[1] >= 0.5)and (global[1] + global[2] >= │ │ │ │ │ -0.5)) { │ │ │ │ │ -316 subElement = 7; │ │ │ │ │ -317 local[0] = 2.0 * (-0.5 + global[1] + global[2]); │ │ │ │ │ -318 local[1] = 2.0 * (0.5 - global[1]); │ │ │ │ │ -319 local[2] = 2.0 * (-0.5 + global[0] + global[1]); │ │ │ │ │ -320 // Dune::FieldMatrix A(0.0); │ │ │ │ │ -321 // A[0][1] = 2.0; │ │ │ │ │ -322 // A[0][2] = 2.0; │ │ │ │ │ -323 // A[1][1] = -2.0; │ │ │ │ │ -324 // A[2][0] = 2.0; │ │ │ │ │ -325 // A[2][1] = 2.0; │ │ │ │ │ -326 // A.mv(global,local); │ │ │ │ │ -327 // local[0] -= 1.0; │ │ │ │ │ -328 // local[1] += 1.0; │ │ │ │ │ -329 // local[2] -= 1.0; │ │ │ │ │ -330 return; │ │ │ │ │ -331 } │ │ │ │ │ -332 │ │ │ │ │ -333 DUNE_THROW(InvalidStateException, "no subelement defined"); │ │ │ │ │ -334 │ │ │ │ │ -335 } │ │ │ │ │ -336 │ │ │ │ │ -337 }; │ │ │ │ │ -338 │ │ │ │ │ -339 │ │ │ │ │ -340} │ │ │ │ │ -341 │ │ │ │ │ -342#endif │ │ │ │ │ +217 // Initialize: the overall expression is a product │ │ │ │ │ +218 // if j-th bit of i is set to -1, else 1 │ │ │ │ │ +219 out[i][0][j] = dp(alpha[j],x[j]); │ │ │ │ │ +220 │ │ │ │ │ +221 // rest of the product │ │ │ │ │ +222 for (unsigned int l=0; l& order, │ │ │ │ │ +236 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +237 std::vector& out) const │ │ │ │ │ +238 { │ │ │ │ │ +239 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +240 │ │ │ │ │ +241 out.resize(size()); │ │ │ │ │ +242 │ │ │ │ │ +243 if (k==0) │ │ │ │ │ +244 { │ │ │ │ │ +245 out[0] = (totalOrder==0); │ │ │ │ │ +246 return; │ │ │ │ │ +247 } │ │ │ │ │ +248 │ │ │ │ │ +249 if (k==1) │ │ │ │ │ +250 { │ │ │ │ │ +251 if (totalOrder == 0) │ │ │ │ │ +252 { │ │ │ │ │ +253 evaluateFunction(in, out); │ │ │ │ │ +254 } │ │ │ │ │ +255 else if (totalOrder == 1) │ │ │ │ │ +256 { │ │ │ │ │ +257 out.resize(size()); │ │ │ │ │ +258 │ │ │ │ │ +259 auto direction = std::distance(order.begin(), std::find(order.begin(), │ │ │ │ │ +order.end(), 1)); │ │ │ │ │ +260 if (direction >= dim) │ │ │ │ │ +261 DUNE_THROW(RangeError, "Direction of partial derivative not found!"); │ │ │ │ │ +262 │ │ │ │ │ +263 // Loop over all shape functions │ │ │ │ │ +264 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ +265 { │ │ │ │ │ +266 // Initialize: the overall expression is a product │ │ │ │ │ +267 // if j-th bit of i is set to 1, otherwise to -1 │ │ │ │ │ +268 out[i] = (i & (1< alpha(multiindex(i)); │ │ │ │ │ +285 │ │ │ │ │ +286 // Initialize: the overall expression is a product │ │ │ │ │ +287 out[i][0] = 1.0; │ │ │ │ │ +288 │ │ │ │ │ +289 // rest of the product │ │ │ │ │ +290 for (std::size_t l=0; l1 │ │ │ │ │ +317 │ │ │ │ │ +318 // Loop over all shape functions │ │ │ │ │ +319 for (size_t i=0; i alpha(multiindex(i)); │ │ │ │ │ +323 │ │ │ │ │ +324 // Initialize: the overall expression is a product │ │ │ │ │ +325 out[i][0] = 1.0; │ │ │ │ │ +326 │ │ │ │ │ +327 // rest of the product │ │ │ │ │ +328 for (std::size_t l=0; l │ │ │ │ │ +361 class LagrangeCubeLocalCoefficients │ │ │ │ │ +362 { │ │ │ │ │ +363 // Return i as a d-digit number in the (k+1)-nary system │ │ │ │ │ +364 static std::array multiindex (unsigned int i) │ │ │ │ │ +365 { │ │ │ │ │ +366 std::array alpha; │ │ │ │ │ +367 for (unsigned int j=0; j& subEntity) │ │ │ │ │ +377 { │ │ │ │ │ +378 assert(k>0); │ │ │ │ │ +379 │ │ │ │ │ +380 unsigned lastIndex=0; │ │ │ │ │ +381 │ │ │ │ │ +382 /* edge and vertex numbering │ │ │ │ │ +383 0----0----1 │ │ │ │ │ +384 */ │ │ │ │ │ +385 │ │ │ │ │ +386 // edge (0) │ │ │ │ │ +387 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ +388 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +389 subEntity[lastIndex++] = 0; // inner dofs of element (0) │ │ │ │ │ +390 │ │ │ │ │ +391 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ +392 │ │ │ │ │ +393 assert(power(k+1,dim)==lastIndex); │ │ │ │ │ +394 } │ │ │ │ │ +395 │ │ │ │ │ +396 void setup2d(std::vector& subEntity) │ │ │ │ │ +397 { │ │ │ │ │ +398 assert(k>0); │ │ │ │ │ +399 │ │ │ │ │ +400 unsigned lastIndex=0; │ │ │ │ │ +401 │ │ │ │ │ +402 // LocalKey: entity number, entity codim, dof indices within each entity │ │ │ │ │ +403 /* edge and vertex numbering │ │ │ │ │ +404 2----3----3 │ │ │ │ │ +405 | | │ │ │ │ │ +406 | | │ │ │ │ │ +407 0 1 │ │ │ │ │ +408 | | │ │ │ │ │ +409 | | │ │ │ │ │ +410 0----2----1 │ │ │ │ │ +411 */ │ │ │ │ │ +412 │ │ │ │ │ +413 // lower edge (2) │ │ │ │ │ +414 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ +415 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +416 subEntity[lastIndex++] = 2; // inner dofs of lower edge (2) │ │ │ │ │ +417 │ │ │ │ │ +418 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ +419 │ │ │ │ │ +420 // iterate from bottom to top over inner edge dofs │ │ │ │ │ +421 for (unsigned e = 0; e < k - 1; ++e) { │ │ │ │ │ +422 subEntity[lastIndex++] = 0; // left edge (0) │ │ │ │ │ +423 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +424 subEntity[lastIndex++] = 0; // face dofs │ │ │ │ │ +425 subEntity[lastIndex++] = 1; // right edge (1) │ │ │ │ │ +426 } │ │ │ │ │ +427 │ │ │ │ │ +428 // upper edge (3) │ │ │ │ │ +429 subEntity[lastIndex++] = 2; // corner 2 │ │ │ │ │ +430 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +431 subEntity[lastIndex++] = 3; // inner dofs of upper edge (3) │ │ │ │ │ +432 │ │ │ │ │ +433 subEntity[lastIndex++] = 3; // corner 3 │ │ │ │ │ +434 │ │ │ │ │ +435 assert(power(k+1,dim)==lastIndex); │ │ │ │ │ +436 } │ │ │ │ │ +437 │ │ │ │ │ +438 void setup3d(std::vector& subEntity) │ │ │ │ │ +439 { │ │ │ │ │ +440 assert(k>0); │ │ │ │ │ +441 │ │ │ │ │ +442 unsigned lastIndex=0; │ │ │ │ │ +443#ifndef NDEBUG │ │ │ │ │ +444 const unsigned numIndices = power(k+1,dim); │ │ │ │ │ +445 const unsigned numFaceIndices = power(k+1,dim-1); │ │ │ │ │ +446#endif │ │ │ │ │ +447 const unsigned numInnerEdgeDofs = k-1; │ │ │ │ │ +448 │ │ │ │ │ +449 // LocalKey: entity number, entity codim, dof indices within each entity │ │ │ │ │ +450 /* edge and vertex numbering │ │ │ │ │ +451 │ │ │ │ │ +452 6---(11)--7 6---------7 │ │ │ │ │ +453 /| /| /| (5) /| │ │ │ │ │ +454 (8)| (9)| / | top / | │ │ │ │ │ +455 / (2) / (3) / |(3)bac/k | │ │ │ │ │ +456 4---(10)--5 | 4---------5 | │ │ │ │ │ +457 | | | | left|(0)| |(1)|right │ │ │ │ │ +458 | 2--(7)|---3 | 2-----|---3 │ │ │ │ │ +459 (0) / (1) / |(2)front | / │ │ │ │ │ +460 |(4) |(5) | / (4) | / │ │ │ │ │ +461 |/ |/ |/ bottom |/ │ │ │ │ │ +462 0---(6)---1 0---------1 │ │ │ │ │ +463 */ │ │ │ │ │ +464 │ │ │ │ │ +465 // bottom face (4) │ │ │ │ │ +466 lastIndex=0; │ │ │ │ │ +467 // lower edge (6) │ │ │ │ │ +468 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ +469 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ +470 subEntity[lastIndex++] = 6; // inner dofs of lower edge (6) │ │ │ │ │ +471 │ │ │ │ │ +472 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ +473 │ │ │ │ │ +474 // iterate from bottom to top over inner edge dofs │ │ │ │ │ +475 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) { │ │ │ │ │ +476 subEntity[lastIndex++] = 4; // left edge (4) │ │ │ │ │ +477 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ +478 subEntity[lastIndex++] = 4; // inner face dofs │ │ │ │ │ +479 subEntity[lastIndex++] = 5; // right edge (5) │ │ │ │ │ +480 } │ │ │ │ │ +481 │ │ │ │ │ +482 // upper edge (7) │ │ │ │ │ +483 subEntity[lastIndex++] = 2; // corner 2 │ │ │ │ │ +484 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +485 subEntity[lastIndex++] = 7; // inner dofs of upper edge (7) │ │ │ │ │ +486 subEntity[lastIndex++] = 3; // corner 3 │ │ │ │ │ +487 │ │ │ │ │ +488 assert(numFaceIndices==lastIndex); // added 1 face so far │ │ │ │ │ +490 │ │ │ │ │ +492 for(unsigned f = 0; f < numInnerEdgeDofs; ++f) { │ │ │ │ │ +493 │ │ │ │ │ +494 // lower edge (connecting edges 0 and 1) │ │ │ │ │ +495 subEntity[lastIndex++] = 0; // dof on edge 0 │ │ │ │ │ +496 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ +497 subEntity[lastIndex++] = 2; // dof in front face │ │ │ │ │ +498 subEntity[lastIndex++] = 1; // dof on edge 1 │ │ │ │ │ +499 │ │ │ │ │ +500 // iterate from bottom to top over inner edge dofs │ │ │ │ │ +501 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) { │ │ │ │ │ +502 subEntity[lastIndex++] = 0; // on left face (0) │ │ │ │ │ +503 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ +504 subEntity[lastIndex++] = 0; // volume dofs │ │ │ │ │ +505 subEntity[lastIndex++] = 1; // right face (1) │ │ │ │ │ +506 } │ │ │ │ │ +507 │ │ │ │ │ +508 // upper edge (connecting edges 0 and 1) │ │ │ │ │ +509 subEntity[lastIndex++] = 2; // dof on edge 2 │ │ │ │ │ +510 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ +511 subEntity[lastIndex++] = 3; // dof on rear face (3) │ │ │ │ │ +512 subEntity[lastIndex++] = 3; // dof on edge 3 │ │ │ │ │ +513 │ │ │ │ │ +514 assert(lastIndex==(f+1+1)*numFaceIndices); │ │ │ │ │ +515 } │ │ │ │ │ +516 │ │ │ │ │ +518 // lower edge (10) │ │ │ │ │ +519 subEntity[lastIndex++] = 4; // corner 4 │ │ │ │ │ +520 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +521 subEntity[lastIndex++] = 10; // inner dofs on lower edge (10) │ │ │ │ │ +522 subEntity[lastIndex++] = 5; // corner 5 │ │ │ │ │ +523 │ │ │ │ │ +524 // iterate from bottom to top over inner edge dofs │ │ │ │ │ +525 for (unsigned e = 0; e < k - 1; ++e) { │ │ │ │ │ +526 subEntity[lastIndex++] = 8; // left edge (8) │ │ │ │ │ +527 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +528 subEntity[lastIndex++] = 5; // face dofs │ │ │ │ │ +529 subEntity[lastIndex++] = 9; // right edge (9) │ │ │ │ │ +530 } │ │ │ │ │ +531 │ │ │ │ │ +532 // upper edge (11) │ │ │ │ │ +533 subEntity[lastIndex++] = 6; // corner 6 │ │ │ │ │ +534 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ +535 subEntity[lastIndex++] = 11; // inner dofs of upper edge (11) │ │ │ │ │ +536 subEntity[lastIndex++] = 7; // corner 7 │ │ │ │ │ +537 │ │ │ │ │ +538 assert(numIndices==lastIndex); │ │ │ │ │ +539 } │ │ │ │ │ +540 │ │ │ │ │ +541 public: │ │ │ │ │ +543 LagrangeCubeLocalCoefficients () │ │ │ │ │ +544 : localKeys_(size()) │ │ │ │ │ +545 { │ │ │ │ │ +546 if (k==0) │ │ │ │ │ +547 { │ │ │ │ │ +548 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ +549 return; │ │ │ │ │ +550 } │ │ │ │ │ +551 │ │ │ │ │ +552 if (k==1) │ │ │ │ │ +553 { │ │ │ │ │ +554 for (std::size_t i=0; i codim(size()); │ │ │ │ │ +563 │ │ │ │ │ +564 for (std::size_t i=0; i mIdx = multiindex(i); │ │ │ │ │ +571 for (unsigned int j=0; j index(size()); │ │ │ │ │ +582 │ │ │ │ │ +583 for (std::size_t i=0; i mIdx = multiindex(i); │ │ │ │ │ +588 │ │ │ │ │ +589 for (int j=dim-1; j>=0; j--) │ │ │ │ │ +590 if (mIdx[j]>0 && mIdx[j] subEntity(size()); │ │ │ │ │ +596 │ │ │ │ │ +597 if (dim==1) { │ │ │ │ │ +598 │ │ │ │ │ +599 setup1d(subEntity); │ │ │ │ │ +600 │ │ │ │ │ +601 } else if (dim==2) { │ │ │ │ │ +602 │ │ │ │ │ +603 setup2d(subEntity); │ │ │ │ │ +604 │ │ │ │ │ +605 } else if (dim==3) { │ │ │ │ │ +606 │ │ │ │ │ +607 setup3d(subEntity); │ │ │ │ │ +608 │ │ │ │ │ +609 } else │ │ │ │ │ +610 DUNE_THROW(Dune::NotImplemented, "LagrangeCubeLocalCoefficients for order " │ │ │ │ │ +<< k << " and dim == " << dim); │ │ │ │ │ +611 │ │ │ │ │ +612 for (size_t i=0; i localKeys_; │ │ │ │ │ +630 }; │ │ │ │ │ +631 │ │ │ │ │ +636 template │ │ │ │ │ +637 class LagrangeCubeLocalInterpolation │ │ │ │ │ +638 { │ │ │ │ │ +639 public: │ │ │ │ │ +640 │ │ │ │ │ +648 template │ │ │ │ │ +649 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ +650 { │ │ │ │ │ +651 constexpr auto dim = LocalBasis::Traits::dimDomain; │ │ │ │ │ +652 constexpr auto k = LocalBasis::order(); │ │ │ │ │ +653 using D = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ +654 │ │ │ │ │ +655 typename LocalBasis::Traits::DomainType x; │ │ │ │ │ +656 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +657 │ │ │ │ │ +658 out.resize(LocalBasis::size()); │ │ │ │ │ +659 │ │ │ │ │ +660 // Specialization for zero-order case │ │ │ │ │ +661 if (k==0) │ │ │ │ │ +662 { │ │ │ │ │ +663 auto center = ReferenceElements::cube().position(0,0); │ │ │ │ │ +664 out[0] = f(center); │ │ │ │ │ +665 return; │ │ │ │ │ +666 } │ │ │ │ │ +667 │ │ │ │ │ +668 // Specialization for first-order case │ │ │ │ │ +669 if (k==1) │ │ │ │ │ +670 { │ │ │ │ │ +671 for (unsigned int i=0; i alpha(LocalBasis::multiindex(i)); │ │ │ │ │ +687 │ │ │ │ │ +688 // Generate coordinate of the i-th Lagrange point │ │ │ │ │ +689 for (unsigned int j=0; j │ │ │ │ │ +_7_1_0 class _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +711 { │ │ │ │ │ +712 public: │ │ │ │ │ +_7_1_5 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ +_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_k_>, │ │ │ │ │ +716 Impl::LagrangeCubeLocalCoefficients, │ │ │ │ │ +717 Impl::LagrangeCubeLocalInterpolation > >; │ │ │ │ │ +718 │ │ │ │ │ +_7_2_4 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ +725 │ │ │ │ │ +_7_2_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +729 { │ │ │ │ │ +730 return basis_; │ │ │ │ │ +731 } │ │ │ │ │ +732 │ │ │ │ │ +_7_3_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +736 { │ │ │ │ │ +737 return coefficients_; │ │ │ │ │ +738 } │ │ │ │ │ +739 │ │ │ │ │ +_7_4_2 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +743 { │ │ │ │ │ +744 return interpolation_; │ │ │ │ │ +745 } │ │ │ │ │ +746 │ │ │ │ │ +_7_4_8 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ +749 { │ │ │ │ │ +750 return power(k+1,dim); │ │ │ │ │ +751 } │ │ │ │ │ +752 │ │ │ │ │ +_7_5_5 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +756 { │ │ │ │ │ +757 return GeometryTypes::cube(dim); │ │ │ │ │ +758 } │ │ │ │ │ +759 │ │ │ │ │ +760 private: │ │ │ │ │ +761 Impl::LagrangeCubeLocalBasis basis_; │ │ │ │ │ +762 Impl::LagrangeCubeLocalCoefficients coefficients_; │ │ │ │ │ +763 Impl::LagrangeCubeLocalInterpolation > interpolation_; │ │ │ │ │ +764 }; │ │ │ │ │ +765 │ │ │ │ │ +766} // namespace Dune │ │ │ │ │ +767 │ │ │ │ │ +768#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _1_ _>_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _1_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static void getSubElement(const FieldVector< D, 1 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 1 > &local) │ │ │ │ │ -Get local coordinates in the subelement. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _1_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static int getSubElement(const FieldVector< D, 1 > &global) │ │ │ │ │ -Get the number of the subelement containing a given point. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _2_ _>_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _2_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static int getSubElement(const FieldVector< D, 2 > &global) │ │ │ │ │ -Get the number of the subtriangle containing a given point. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _2_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static void getSubElement(const FieldVector< D, 2 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 2 > &local) │ │ │ │ │ -Get local coordinates in the subtriangle. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _3_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static void getSubElement(const FieldVector< D, 3 > &global, int &subElement, │ │ │ │ │ -FieldVector< D, 3 > &local) │ │ │ │ │ -Get local coordinates in the subsimplex. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:243 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _3_ _>_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RefinedSimplexLocalBasis() │ │ │ │ │ -Protected default constructor so this class can only be instantiated as a base │ │ │ │ │ -class. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _3_ _>_:_:_g_e_t_S_u_b_E_l_e_m_e_n_t │ │ │ │ │ -static int getSubElement(const FieldVector< D, 3 > &global) │ │ │ │ │ -Get the number of the subsimplex containing a given point in the reference │ │ │ │ │ -element. │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:215 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:728 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +LagrangeCubeLocalFiniteElement() │ │ │ │ │ +Default constructor. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:724 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Returns object that evaluates degrees of freedom. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:742 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +The reference element that the local finite element is defined on. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:755 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +static constexpr std::size_t size() │ │ │ │ │ +The number of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:748 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:735 │ │ │ │ │ _l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1.hh File Reference │ │ │ │ +dune-localfunctions: q2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,37 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
refinedp1.hh File Reference
│ │ │ │ +
q2.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/refined/refinedp1/refinedp1localbasis.hh>
│ │ │ │ +
#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RefinedP1LocalFiniteElement< D, R, dim >
 Piecewise linear continuous Lagrange functions on a uniformly refined simplex element. More...
class  Dune::Q2FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q23D elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp1.hh File Reference │ │ │ │ │ +q2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_1_/_r_e_f_i_n_e_d_p_1_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  Piecewise linear continuous Lagrange functions on a uniformly refined │ │ │ │ │ - simplex element. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ +  Factory for global-valued Q23D elements. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00059_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1.hh Source File │ │ │ │ +dune-localfunctions: q2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,120 +70,77 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp1.hh
│ │ │ │ +
q2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │ +
5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
25 template<class D, class R, int dim>
│ │ │ │ +
8#include <dune/common/typetraits.hh>
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
20
│ │ │ │ +
25 template<class Geometry, class RF>
│ │ │ │
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28 public:
│ │ │ │ - │ │ │ │ -
32 Impl::LagrangeSimplexLocalCoefficients<dim,2>,
│ │ │ │ -
33 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > > Traits;
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ +
28 typename std::conditional<Geometry::mydimension == 1,
│ │ │ │ +
29 LagrangeSimplexLocalFiniteElement<typename Geometry::ctype, RF, 1, 2>,
│ │ │ │ +
30 LagrangeCubeLocalFiniteElement<typename Geometry::ctype, RF, Geometry::mydimension, 2> >::type,
│ │ │ │ +
31 Geometry>
│ │ │ │ +
32 {
│ │ │ │ +
33 typedef typename std::conditional<Geometry::mydimension == 1,
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
37
│ │ │ │ +
38 static const LFE lfe;
│ │ │ │
39
│ │ │ │ -
│ │ │ │ -
42 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
43 {
│ │ │ │ -
44 return basis_;
│ │ │ │ -
45 }
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ -
51 return coefficients_;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return interpolation_;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
62 unsigned int size () const
│ │ │ │ -
63 {
│ │ │ │ -
64 return basis_.size();
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
69 static constexpr GeometryType type ()
│ │ │ │ -
70 {
│ │ │ │ -
71 return GeometryTypes::simplex(dim);
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74 private:
│ │ │ │ - │ │ │ │ -
76 Impl::LagrangeSimplexLocalCoefficients<dim,2> coefficients_;
│ │ │ │ -
77 // Yes, the template argument here really is LagrangeSimplexLocalBasis, even though this is not
│ │ │ │ -
78 // the local basis of the refined locale finite element: The reason is that LagrangeSimplexLocalInterpolation
│ │ │ │ -
79 // uses this argument to determine the polynomial order, and RefinedP1LocalBasis returns order 1
│ │ │ │ -
80 // whereas order 2 is needed here.
│ │ │ │ -
81 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,dim,2> > interpolation_;
│ │ │ │ -
82 };
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
84}
│ │ │ │ -
85
│ │ │ │ -
86#endif // DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH
│ │ │ │ -
Linear Lagrange shape functions on a uniformly refined reference element.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
40 public:
│ │ │ │ + │ │ │ │ +
43 };
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45 template<class Geometry, class RF>
│ │ │ │ +
46 const typename Q2FiniteElementFactory<Geometry, RF>::LFE
│ │ │ │ +
47 Q2FiniteElementFactory<Geometry, RF>::lfe;
│ │ │ │ +
48}
│ │ │ │ +
49
│ │ │ │ +
50#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Piecewise linear continuous Lagrange functions on a uniformly refined simplex element.
Definition refinedp1.hh:27
│ │ │ │ -
static constexpr GeometryType type()
The element type that this finite element is defined on.
Definition refinedp1.hh:69
│ │ │ │ -
unsigned int size() const
Number of shape functions of this finite element.
Definition refinedp1.hh:62
│ │ │ │ -
RefinedP1LocalFiniteElement()
Default constructor.
Definition refinedp1.hh:37
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Evaluates all degrees of freedom for a given function.
Definition refinedp1.hh:56
│ │ │ │ -
LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, dim >, Impl::LagrangeSimplexLocalCoefficients< dim, 2 >, Impl::LagrangeSimplexLocalInterpolation< Impl::LagrangeSimplexLocalBasis< D, R, dim, 2 > > > Traits
Export all types used by this implementation.
Definition refinedp1.hh:33
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Produces the assignments of the degrees of freedom to the element subentities.
Definition refinedp1.hh:49
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
The set of shape functions.
Definition refinedp1.hh:42
│ │ │ │ -
Definition refinedp1localbasis.hh:23
│ │ │ │ +
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Factory for global-valued Q23D elements.
Definition q2.hh:32
│ │ │ │ +
Q2FiniteElementFactory()
default constructor
Definition q2.hh:42
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,140 +1,82 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ -refinedp1.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +q2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ +5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_1_/_r_e_f_i_n_e_d_p_1_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 class _R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 { │ │ │ │ │ -28 public: │ │ │ │ │ -31 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ -32 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ -_3_3 Impl::LagrangeSimplexLocalInterpolation > > _T_r_a_i_t_s; │ │ │ │ │ -34 │ │ │ │ │ -_3_7 _R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -38 {} │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +20 │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y : │ │ │ │ │ +27 public _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y< │ │ │ │ │ +28 typename std::conditional, │ │ │ │ │ +30 LagrangeCubeLocalFiniteElement >::type, │ │ │ │ │ +31 Geometry> │ │ │ │ │ +32 { │ │ │ │ │ +33 typedef typename std::conditional, │ │ │ │ │ +35 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_t_y_p_e_n_a_m_e_ _G_e_o_m_e_t_r_y_:_:_c_t_y_p_e_,_ _R_F_,_ _G_e_o_m_e_t_r_y_:_: │ │ │ │ │ +_m_y_d_i_m_e_n_s_i_o_n_,_ _2_> >::type LFE; │ │ │ │ │ +36 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y_<_L_F_E_,_ _G_e_o_m_e_t_r_y_> _B_a_s_e; │ │ │ │ │ +37 │ │ │ │ │ +38 static const LFE lfe; │ │ │ │ │ 39 │ │ │ │ │ -_4_2 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -43 { │ │ │ │ │ -44 return basis_; │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -50 { │ │ │ │ │ -51 return coefficients_; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -57 { │ │ │ │ │ -58 return interpolation_; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_2 unsigned int _s_i_z_e () const │ │ │ │ │ -63 { │ │ │ │ │ -64 return basis_.size(); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_9 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -70 { │ │ │ │ │ -71 return GeometryTypes::simplex(dim); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -74 private: │ │ │ │ │ -75 _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis_; │ │ │ │ │ -76 Impl::LagrangeSimplexLocalCoefficients coefficients_; │ │ │ │ │ -77 // Yes, the template argument here really is LagrangeSimplexLocalBasis, even │ │ │ │ │ -though this is not │ │ │ │ │ -78 // the local basis of the refined locale finite element: The reason is that │ │ │ │ │ -LagrangeSimplexLocalInterpolation │ │ │ │ │ -79 // uses this argument to determine the polynomial order, and │ │ │ │ │ -RefinedP1LocalBasis returns order 1 │ │ │ │ │ -80 // whereas order 2 is needed here. │ │ │ │ │ -81 Impl::LagrangeSimplexLocalInterpolation > interpolation_; │ │ │ │ │ -82 }; │ │ │ │ │ -83 │ │ │ │ │ -84} │ │ │ │ │ -85 │ │ │ │ │ -86#endif // DUNE_LOCALFUNCTIONS_REFINED_REFINEDP1_HH │ │ │ │ │ -_r_e_f_i_n_e_d_p_1_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ +40 public: │ │ │ │ │ +_4_2 _Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y() : _B_a_s_e(lfe) {} │ │ │ │ │ +43 }; │ │ │ │ │ +44 │ │ │ │ │ +45 template │ │ │ │ │ +46 const typename Q2FiniteElementFactory::LFE │ │ │ │ │ +47 Q2FiniteElementFactory::lfe; │ │ │ │ │ +48} │ │ │ │ │ +49 │ │ │ │ │ +50#endif │ │ │ │ │ _l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_p_0_._h_h │ │ │ │ │ +_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ _l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Piecewise linear continuous Lagrange functions on a uniformly refined simplex │ │ │ │ │ -element. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The element type that this finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions of this finite element. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RefinedP1LocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Evaluates all degrees of freedom for a given function. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RefinedP1LocalBasis< D, R, dim >, Impl:: │ │ │ │ │ -LagrangeSimplexLocalCoefficients< dim, 2 >, Impl:: │ │ │ │ │ -LagrangeSimplexLocalInterpolation< Impl::LagrangeSimplexLocalBasis< D, R, dim, │ │ │ │ │ -2 > > > Traits │ │ │ │ │ -Export all types used by this implementation. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Produces the assignments of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -The set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ +Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ +DDeeffiinniittiioonn localtoglobaladaptors.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory for global-valued Q23D elements. │ │ │ │ │ +DDeeffiinniittiioonn q2.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Q2FiniteElementFactory() │ │ │ │ │ +default constructor │ │ │ │ │ +DDeeffiinniittiioonn q2.hh:42 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: pyramidp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,54 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
refinedp1localbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pyramidp1.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ - │ │ │ │ -

Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ -More...

│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/refined/common/refinedsimplexlocalbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RefinedP1LocalBasis< D, R, dim >
 
class  Dune::RefinedP1LocalBasis< D, R, 1 >
 Uniformly refined linear Lagrange shape functions in 1D. More...
 
class  Dune::RefinedP1LocalBasis< D, R, 2 >
 Uniformly refined linear Lagrange shape functions on the triangle. More...
 
class  Dune::RefinedP1LocalBasis< D, R, 3 >
 Uniformly refined linear Lagrange shape functions on the 3D-simplex (tetrahedron). More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R >
using Dune::PyramidP1LocalFiniteElement = LagrangePyramidLocalFiniteElement< D, R, 1 >
 First-order Lagrangian finite element on a three-dimensional pyramid.
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Linear Lagrange shape functions on a uniformly refined reference element.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,37 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_1 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -refinedp1localbasis.hh File Reference │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ -_M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_c_o_m_m_o_n_/_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pyramidp1.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ -  Uniformly refined linear Lagrange shape functions in 1D. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ -  Uniformly refined linear Lagrange shape functions on the triangle. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ -  Uniformly refined linear Lagrange shape functions on the 3D-simplex │ │ │ │ │ - (tetrahedron). _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Linear Lagrange shape functions on a uniformly refined reference element. │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_y_r_a_m_i_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ + D, R, 1 > │ │ │ │ │ +  First-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00062_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: refinedp1localbasis.hh Source File │ │ │ │ +dune-localfunctions: pyramidp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,831 +70,47 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
refinedp1localbasis.hh
│ │ │ │ +
pyramidp1.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_REFINED_P1_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_REFINED_P1_LOCALBASIS_HH
│ │ │ │ -
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/fmatrix.hh>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#warning This header is deprecated
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public RefinedSimplexLocalBasis<D,dim>
│ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 DUNE_THROW(Dune::NotImplemented,"RefinedP1LocalBasis not implemented for dim > 3.");
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
29 };
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ -
52 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 : public RefinedSimplexLocalBasis<D,1>
│ │ │ │ -
55 {
│ │ │ │ -
56 public:
│ │ │ │ -
58 typedef LocalBasisTraits<D,1,Dune::FieldVector<D,1>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
59 Dune::FieldMatrix<R,1,1> > Traits;
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
62 static constexpr unsigned int size ()
│ │ │ │ -
63 {
│ │ │ │ -
64 return 3;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
68 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
69 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
70 {
│ │ │ │ -
71 out.resize(3);
│ │ │ │ -
72
│ │ │ │ -
73 int subElement;
│ │ │ │ -
74 typename Traits::DomainType local;
│ │ │ │ -
75 this->getSubElement(in, subElement, local);
│ │ │ │ -
76
│ │ │ │ -
77 switch (subElement) {
│ │ │ │ -
78 case 0 :
│ │ │ │ -
79
│ │ │ │ -
80 out[0] = 1 - local[0];
│ │ │ │ -
81 out[1] = local[0];
│ │ │ │ -
82 out[2] = 0;
│ │ │ │ -
83 break;
│ │ │ │ -
84
│ │ │ │ -
85 case 1 :
│ │ │ │ -
86
│ │ │ │ -
87 out[0] = 0;
│ │ │ │ -
88 out[1] = 1 - local[0];
│ │ │ │ -
89 out[2] = local[0];
│ │ │ │ -
90 break;
│ │ │ │ -
91
│ │ │ │ -
92 }
│ │ │ │ -
93
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
95
│ │ │ │ -
97 inline void
│ │ │ │ -
│ │ │ │ -
98 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
99 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
100 {
│ │ │ │ -
101 out.resize(3);
│ │ │ │ -
102
│ │ │ │ -
103 int subElement;
│ │ │ │ -
104 typename Traits::DomainType local;
│ │ │ │ -
105 this->getSubElement(in, subElement, local);
│ │ │ │ -
106
│ │ │ │ -
107 switch (subElement) {
│ │ │ │ -
108 case 0 :
│ │ │ │ -
109
│ │ │ │ -
110 out[0][0][0] = -2;
│ │ │ │ -
111 out[1][0][0] = 2;
│ │ │ │ -
112 out[2][0][0] = 0;
│ │ │ │ -
113 break;
│ │ │ │ -
114
│ │ │ │ -
115 case 1 :
│ │ │ │ -
116
│ │ │ │ -
117 out[0][0][0] = 0;
│ │ │ │ -
118 out[1][0][0] = -2;
│ │ │ │ -
119 out[2][0][0] = 2;
│ │ │ │ -
120 break;
│ │ │ │ -
121
│ │ │ │ -
122 }
│ │ │ │ -
123 }
│ │ │ │ -
│ │ │ │ -
124
│ │ │ │ -
│ │ │ │ -
126 void partial (const std::array<unsigned int, 1>& order,
│ │ │ │ -
127 const typename Traits::DomainType& in, // position
│ │ │ │ -
128 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
129 {
│ │ │ │ -
130 auto totalOrder = order[0];
│ │ │ │ -
131 if (totalOrder == 0) {
│ │ │ │ -
132 evaluateFunction(in, out);
│ │ │ │ -
133 } else if (totalOrder == 1)
│ │ │ │ -
134 {
│ │ │ │ -
135 out.resize(3);
│ │ │ │ -
136
│ │ │ │ -
137 int subElement;
│ │ │ │ -
138 typename Traits::DomainType local;
│ │ │ │ -
139 this->getSubElement(in, subElement, local);
│ │ │ │ -
140
│ │ │ │ -
141 switch (subElement) {
│ │ │ │ -
142 case 0:
│ │ │ │ -
143 out[0] = -2;
│ │ │ │ -
144 out[1] = 2;
│ │ │ │ -
145 out[2] = 0;
│ │ │ │ -
146 break;
│ │ │ │ -
147 case 1:
│ │ │ │ -
148 out[0] = 0;
│ │ │ │ -
149 out[1] = -2;
│ │ │ │ -
150 out[2] = 2;
│ │ │ │ -
151 break;
│ │ │ │ -
152 }
│ │ │ │ -
153 } else {
│ │ │ │ -
154 out.resize(3);
│ │ │ │ -
155 out[0] = out[1] = out[2] = 0;
│ │ │ │ -
156 }
│ │ │ │ -
157 }
│ │ │ │ -
│ │ │ │ -
158
│ │ │ │ -
│ │ │ │ -
162 static constexpr unsigned int order ()
│ │ │ │ -
163 {
│ │ │ │ -
164 return 1;
│ │ │ │ -
165 }
│ │ │ │ -
│ │ │ │ -
166
│ │ │ │ -
167 };
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
193 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
195 : public RefinedSimplexLocalBasis<D,2>
│ │ │ │ -
196 {
│ │ │ │ -
197 public:
│ │ │ │ -
199 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
200 Dune::FieldMatrix<R,1,2> > Traits;
│ │ │ │ -
201
│ │ │ │ -
│ │ │ │ -
203 static constexpr unsigned int size ()
│ │ │ │ -
204 {
│ │ │ │ -
205 return 6;
│ │ │ │ -
206 }
│ │ │ │ -
│ │ │ │ -
207
│ │ │ │ -
│ │ │ │ -
209 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
210 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
211 {
│ │ │ │ -
212 out.resize(6);
│ │ │ │ -
213
│ │ │ │ -
214 int subElement;
│ │ │ │ -
215 typename Traits::DomainType local;
│ │ │ │ -
216 this->getSubElement(in, subElement, local);
│ │ │ │ -
217
│ │ │ │ -
218 switch (subElement) {
│ │ │ │ -
219 case 0 :
│ │ │ │ -
220
│ │ │ │ -
221 out[0] = 1 - local[0] - local[1];
│ │ │ │ -
222 out[1] = local[0];
│ │ │ │ -
223 out[2] = 0;
│ │ │ │ -
224 out[3] = local[1];
│ │ │ │ -
225 out[4] = 0;
│ │ │ │ -
226 out[5] = 0;
│ │ │ │ -
227 break;
│ │ │ │ -
228
│ │ │ │ -
229 case 1 :
│ │ │ │ -
230
│ │ │ │ -
231 out[0] = 0;
│ │ │ │ -
232 out[1] = 1 - local[0] - local[1];
│ │ │ │ -
233 out[2] = local[0];
│ │ │ │ -
234 out[3] = 0;
│ │ │ │ -
235 out[4] = local[1];
│ │ │ │ -
236 out[5] = 0;
│ │ │ │ -
237 break;
│ │ │ │ -
238
│ │ │ │ -
239 case 2 :
│ │ │ │ -
240
│ │ │ │ -
241 out[0] = 0;
│ │ │ │ -
242 out[1] = 0;
│ │ │ │ -
243 out[2] = 0;
│ │ │ │ -
244 out[3] = 1 - local[0] - local[1];
│ │ │ │ -
245 out[4] = local[0];
│ │ │ │ -
246 out[5] = local[1];
│ │ │ │ -
247 break;
│ │ │ │ -
248 case 3 :
│ │ │ │ -
249
│ │ │ │ -
250 out[0] = 0;
│ │ │ │ -
251 out[1] = local[1];
│ │ │ │ -
252 out[2] = 0;
│ │ │ │ -
253 out[3] = local[0];
│ │ │ │ -
254 out[4] = 1 - local[0] - local[1];
│ │ │ │ -
255 out[5] = 0;
│ │ │ │ -
256 }
│ │ │ │ -
257
│ │ │ │ -
258 }
│ │ │ │ -
│ │ │ │ -
259
│ │ │ │ -
261 inline void
│ │ │ │ -
│ │ │ │ -
262 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
263 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
264 {
│ │ │ │ -
265 out.resize(6);
│ │ │ │ -
266
│ │ │ │ -
267 int subElement;
│ │ │ │ -
268 typename Traits::DomainType local;
│ │ │ │ -
269 this->getSubElement(in, subElement, local);
│ │ │ │ -
270
│ │ │ │ -
271 switch (subElement) {
│ │ │ │ -
272 case 0 :
│ │ │ │ -
273
│ │ │ │ -
274 out[0][0][0] = -2; out[0][0][1] = -2;
│ │ │ │ -
275 out[1][0][0] = 2; out[1][0][1] = 0;
│ │ │ │ -
276 out[2][0][0] = 0; out[2][0][1] = 0;
│ │ │ │ -
277 out[3][0][0] = 0; out[3][0][1] = 2;
│ │ │ │ -
278 out[4][0][0] = 0; out[4][0][1] = 0;
│ │ │ │ -
279 out[5][0][0] = 0; out[5][0][1] = 0;
│ │ │ │ -
280 break;
│ │ │ │ -
281
│ │ │ │ -
282 case 1 :
│ │ │ │ -
283
│ │ │ │ -
284 out[0][0][0] = 0; out[0][0][1] = 0;
│ │ │ │ -
285 out[1][0][0] = -2; out[1][0][1] = -2;
│ │ │ │ -
286 out[2][0][0] = 2; out[2][0][1] = 0;
│ │ │ │ -
287 out[3][0][0] = 0; out[3][0][1] = 0;
│ │ │ │ -
288 out[4][0][0] = 0; out[4][0][1] = 2;
│ │ │ │ -
289 out[5][0][0] = 0; out[5][0][1] = 0;
│ │ │ │ -
290 break;
│ │ │ │ -
291
│ │ │ │ -
292 case 2 :
│ │ │ │ -
293
│ │ │ │ -
294 out[0][0][0] = 0; out[0][0][1] = 0;
│ │ │ │ -
295 out[1][0][0] = 0; out[1][0][1] = 0;
│ │ │ │ -
296 out[2][0][0] = 0; out[2][0][1] = 0;
│ │ │ │ -
297 out[3][0][0] = -2; out[3][0][1] = -2;
│ │ │ │ -
298 out[4][0][0] = 2; out[4][0][1] = 0;
│ │ │ │ -
299 out[5][0][0] = 0; out[5][0][1] = 2;
│ │ │ │ -
300 break;
│ │ │ │ -
301 case 3 :
│ │ │ │ -
302
│ │ │ │ -
303 out[0][0][0] = 0; out[0][0][1] = 0;
│ │ │ │ -
304 out[1][0][0] = 0; out[1][0][1] = -2;
│ │ │ │ -
305 out[2][0][0] = 0; out[2][0][1] = 0;
│ │ │ │ -
306 out[3][0][0] = -2; out[3][0][1] = 0;
│ │ │ │ -
307 out[4][0][0] = 2; out[4][0][1] = 2;
│ │ │ │ -
308 out[5][0][0] = 0; out[5][0][1] = 0;
│ │ │ │ -
309 }
│ │ │ │ -
310 }
│ │ │ │ -
│ │ │ │ -
311
│ │ │ │ -
│ │ │ │ -
313 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
314 const typename Traits::DomainType& in, // position
│ │ │ │ -
315 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
316 {
│ │ │ │ -
317 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
318 if (totalOrder == 0) {
│ │ │ │ -
319 evaluateFunction(in, out);
│ │ │ │ -
320 } else if (totalOrder == 1) {
│ │ │ │ -
321 int subElement;
│ │ │ │ -
322 typename Traits::DomainType local;
│ │ │ │ -
323 this->getSubElement(in, subElement, local);
│ │ │ │ -
324
│ │ │ │ -
325 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
326 out.resize(size());
│ │ │ │ -
327
│ │ │ │ -
328 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
329 out[i] = 0;
│ │ │ │ -
330
│ │ │ │ -
331 switch (direction) {
│ │ │ │ -
332 case 0: // direction == 0
│ │ │ │ -
333
│ │ │ │ -
334 switch (subElement) {
│ │ │ │ -
335 case 0 :
│ │ │ │ -
336 out[0] = -2;
│ │ │ │ -
337 out[1] = 2;
│ │ │ │ -
338 break;
│ │ │ │ -
339 case 1 :
│ │ │ │ -
340 out[1] = -2;
│ │ │ │ -
341 out[2] = 2;
│ │ │ │ -
342 break;
│ │ │ │ -
343 case 2 :
│ │ │ │ -
344 out[3] = -2;
│ │ │ │ -
345 out[4] = 2;
│ │ │ │ -
346 break;
│ │ │ │ -
347 case 3 :
│ │ │ │ -
348 out[3] = -2;
│ │ │ │ -
349 out[4] = 2;
│ │ │ │ -
350 }
│ │ │ │ -
351 break;
│ │ │ │ -
352
│ │ │ │ -
353 case 1: // direction == 1
│ │ │ │ -
354
│ │ │ │ -
355 switch (subElement) {
│ │ │ │ -
356 case 0 :
│ │ │ │ -
357 out[0] = -2;
│ │ │ │ -
358 out[3] = 2;
│ │ │ │ -
359 break;
│ │ │ │ -
360 case 1 :
│ │ │ │ -
361 out[1] = -2;
│ │ │ │ -
362 out[4] = 2;
│ │ │ │ -
363 break;
│ │ │ │ -
364 case 2 :
│ │ │ │ -
365 out[3] = -2;
│ │ │ │ -
366 out[5] = 2;
│ │ │ │ -
367 break;
│ │ │ │ -
368 case 3 :
│ │ │ │ -
369 out[1] = -2;
│ │ │ │ -
370 out[4] = 2;
│ │ │ │ -
371 }
│ │ │ │ -
372 break;
│ │ │ │ -
373
│ │ │ │ -
374 default:
│ │ │ │ -
375 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
376 }
│ │ │ │ -
377 } else {
│ │ │ │ -
378 out.resize(size());
│ │ │ │ -
379 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
380 out[i] = 0;
│ │ │ │ -
381 }
│ │ │ │ -
382 }
│ │ │ │ -
│ │ │ │ -
383
│ │ │ │ -
│ │ │ │ -
387 static constexpr unsigned int order ()
│ │ │ │ -
388 {
│ │ │ │ -
389 return 1;
│ │ │ │ -
390 }
│ │ │ │ -
│ │ │ │ -
391
│ │ │ │ -
392 };
│ │ │ │ -
│ │ │ │ -
393
│ │ │ │ -
422 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
424 : public RefinedSimplexLocalBasis<D,3>
│ │ │ │ -
425 {
│ │ │ │ -
426 public:
│ │ │ │ -
428 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
429 Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ -
430
│ │ │ │ -
│ │ │ │ -
432 static constexpr unsigned int size ()
│ │ │ │ -
433 {
│ │ │ │ -
434 return 10;
│ │ │ │ -
435 }
│ │ │ │ -
│ │ │ │ -
436
│ │ │ │ -
│ │ │ │ -
438 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
439 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
440 {
│ │ │ │ -
441 out.resize(10);
│ │ │ │ -
442
│ │ │ │ -
443 int subElement;
│ │ │ │ -
444 typename Traits::DomainType local;
│ │ │ │ -
445 this->getSubElement(in, subElement, local);
│ │ │ │ -
446
│ │ │ │ -
447 switch (subElement) {
│ │ │ │ -
448 case 0 :
│ │ │ │ -
449
│ │ │ │ -
450 out[0] = 1 - local[0] - local[1] - local[2];
│ │ │ │ -
451 out[1] = local[0];
│ │ │ │ -
452 out[2] = 0;
│ │ │ │ -
453 out[3] = local[1];
│ │ │ │ -
454 out[4] = 0;
│ │ │ │ -
455 out[5] = 0;
│ │ │ │ -
456 out[6] = local[2];
│ │ │ │ -
457 out[7] = 0;
│ │ │ │ -
458 out[8] = 0;
│ │ │ │ -
459 out[9] = 0;
│ │ │ │ -
460 break;
│ │ │ │ -
461
│ │ │ │ -
462 case 1 :
│ │ │ │ -
463
│ │ │ │ -
464 out[0] = 0;
│ │ │ │ -
465 out[1] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
466 out[2] = local[0];
│ │ │ │ -
467 out[3] = 0;
│ │ │ │ -
468 out[4] = local[1];
│ │ │ │ -
469 out[5] = 0;
│ │ │ │ -
470 out[6] = 0;
│ │ │ │ -
471 out[7] = local[2];
│ │ │ │ -
472 out[8] = 0;
│ │ │ │ -
473 out[9] = 0;
│ │ │ │ -
474 break;
│ │ │ │ -
475
│ │ │ │ -
476 case 2 :
│ │ │ │ -
477
│ │ │ │ -
478 out[0] = 0;
│ │ │ │ -
479 out[1] = 0;
│ │ │ │ -
480 out[2] = 0;
│ │ │ │ -
481 out[3] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
482 out[4] = local[0];
│ │ │ │ -
483 out[5] = local[1];
│ │ │ │ -
484 out[6] = 0;
│ │ │ │ -
485 out[7] = 0;
│ │ │ │ -
486 out[8] = local[2];
│ │ │ │ -
487 out[9] = 0;
│ │ │ │ -
488 break;
│ │ │ │ -
489
│ │ │ │ -
490 case 3 :
│ │ │ │ -
491
│ │ │ │ -
492 out[0] = 0;
│ │ │ │ -
493 out[1] = 0;
│ │ │ │ -
494 out[2] = 0;
│ │ │ │ -
495 out[3] = 0;
│ │ │ │ -
496 out[4] = 0;
│ │ │ │ -
497 out[5] = 0;
│ │ │ │ -
498 out[6] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
499 out[7] = local[0];
│ │ │ │ -
500 out[8] = local[1];
│ │ │ │ -
501 out[9] = local[2];
│ │ │ │ -
502 break;
│ │ │ │ -
503
│ │ │ │ -
504 case 4 :
│ │ │ │ -
505
│ │ │ │ -
506 out[0] = 0;
│ │ │ │ -
507 out[1] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
508 out[2] = 0;
│ │ │ │ -
509 out[3] = local[0];
│ │ │ │ -
510 out[4] = 0;
│ │ │ │ -
511 out[5] = 0;
│ │ │ │ -
512 out[6] = local[1];
│ │ │ │ -
513 out[7] = local[2];
│ │ │ │ -
514 out[8] = 0;
│ │ │ │ -
515 out[9] = 0;
│ │ │ │ -
516 break;
│ │ │ │ -
517
│ │ │ │ -
518 case 5 :
│ │ │ │ -
519
│ │ │ │ -
520 out[0] = 0;
│ │ │ │ -
521 out[1] = local[1];
│ │ │ │ -
522 out[2] = 0;
│ │ │ │ -
523 out[3] = local[0];
│ │ │ │ -
524 out[4] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
525 out[5] = 0;
│ │ │ │ -
526 out[6] = 0;
│ │ │ │ -
527 out[7] = local[2];
│ │ │ │ -
528 out[8] = 0;
│ │ │ │ -
529 out[9] = 0;
│ │ │ │ -
530 break;
│ │ │ │ -
531
│ │ │ │ -
532 case 6 :
│ │ │ │ -
533
│ │ │ │ -
534 out[0] = 0;
│ │ │ │ -
535 out[1] = 0;
│ │ │ │ -
536 out[2] = 0;
│ │ │ │ -
537 out[3] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
538 out[4] = 0;
│ │ │ │ -
539 out[5] = 0;
│ │ │ │ -
540 out[6] = local[0];
│ │ │ │ -
541 out[7] = local[1];
│ │ │ │ -
542 out[8] = local[2];
│ │ │ │ -
543 out[9] = 0;
│ │ │ │ -
544 break;
│ │ │ │ -
545
│ │ │ │ -
546 case 7 :
│ │ │ │ -
547
│ │ │ │ -
548 out[0] = 0;
│ │ │ │ -
549 out[1] = 0;
│ │ │ │ -
550 out[2] = 0;
│ │ │ │ -
551 out[3] = 1 - local[0] - local[1] -local[2];
│ │ │ │ -
552 out[4] = local[2];
│ │ │ │ -
553 out[5] = 0;
│ │ │ │ -
554 out[6] = 0;
│ │ │ │ -
555 out[7] = local[1];
│ │ │ │ -
556 out[8] = local[0];
│ │ │ │ -
557 out[9] = 0;
│ │ │ │ -
558 break;
│ │ │ │ -
559 }
│ │ │ │ -
560
│ │ │ │ -
561 }
│ │ │ │ -
│ │ │ │ -
562
│ │ │ │ -
564 inline void
│ │ │ │ -
│ │ │ │ -
565 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
566 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
567 {
│ │ │ │ -
568 out.resize(10);
│ │ │ │ -
569
│ │ │ │ -
570 int subElement;
│ │ │ │ -
571 typename Traits::DomainType local;
│ │ │ │ -
572 this->getSubElement(in, subElement, local);
│ │ │ │ -
573
│ │ │ │ -
574 switch (subElement) {
│ │ │ │ -
575 case 0 :
│ │ │ │ -
576
│ │ │ │ -
577 out[0][0][0] = -2; out[0][0][1] = -2; out[0][0][2] = -2;
│ │ │ │ -
578 out[1][0][0] = 2; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ -
579 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
580 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0;
│ │ │ │ -
581 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ -
582 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
583 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 2;
│ │ │ │ -
584 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0;
│ │ │ │ -
585 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
│ │ │ │ -
586 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
587 break;
│ │ │ │ -
588
│ │ │ │ -
589 case 1 :
│ │ │ │ -
590
│ │ │ │ -
591 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
592 out[1][0][0] = -2; out[1][0][1] = -2; out[1][0][2] = -2;
│ │ │ │ -
593 out[2][0][0] = 2; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
594 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0;
│ │ │ │ -
595 out[4][0][0] = 0; out[4][0][1] = 2; out[4][0][2] = 0;
│ │ │ │ -
596 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
597 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
│ │ │ │ -
598 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2;
│ │ │ │ -
599 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
│ │ │ │ -
600 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
601 break;
│ │ │ │ -
602
│ │ │ │ -
603 case 2 :
│ │ │ │ -
604
│ │ │ │ -
605 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
606 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ -
607 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
608 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2;
│ │ │ │ -
609 out[4][0][0] = 2; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ -
610 out[5][0][0] = 0; out[5][0][1] = 2; out[5][0][2] = 0;
│ │ │ │ -
611 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
│ │ │ │ -
612 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0;
│ │ │ │ -
613 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 2;
│ │ │ │ -
614 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
615 break;
│ │ │ │ -
616
│ │ │ │ -
617 case 3 :
│ │ │ │ -
618
│ │ │ │ -
619 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
620 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ -
621 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
622 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0;
│ │ │ │ -
623 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ -
624 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
625 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = -2;
│ │ │ │ -
626 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0;
│ │ │ │ -
627 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 0;
│ │ │ │ -
628 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 2;
│ │ │ │ -
629 break;
│ │ │ │ -
630
│ │ │ │ -
631 case 4 :
│ │ │ │ -
632
│ │ │ │ -
633 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
634 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2;
│ │ │ │ -
635 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
636 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0;
│ │ │ │ -
637 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ -
638 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
639 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0;
│ │ │ │ -
640 out[7][0][0] = 2; out[7][0][1] = 2; out[7][0][2] = 2;
│ │ │ │ -
641 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
│ │ │ │ -
642 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
643 break;
│ │ │ │ -
644
│ │ │ │ -
645 case 5 :
│ │ │ │ -
646
│ │ │ │ -
647 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
648 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2;
│ │ │ │ -
649 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
650 out[3][0][0] = -2; out[3][0][1] = 0; out[3][0][2] = 0;
│ │ │ │ -
651 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0;
│ │ │ │ -
652 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
653 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
│ │ │ │ -
654 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2;
│ │ │ │ -
655 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0;
│ │ │ │ -
656 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
657 break;
│ │ │ │ -
658
│ │ │ │ -
659 case 6 :
│ │ │ │ -
660
│ │ │ │ -
661 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
662 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ -
663 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
664 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = -2;
│ │ │ │ -
665 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ -
666 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
667 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0;
│ │ │ │ -
668 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0;
│ │ │ │ -
669 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2;
│ │ │ │ -
670 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
671 break;
│ │ │ │ -
672
│ │ │ │ -
673 case 7 :
│ │ │ │ -
674
│ │ │ │ -
675 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ -
676 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ -
677 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
678 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2;
│ │ │ │ -
679 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0;
│ │ │ │ -
680 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ -
681 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0;
│ │ │ │ -
682 out[7][0][0] = 0; out[7][0][1] = -2; out[7][0][2] = 0;
│ │ │ │ -
683 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2;
│ │ │ │ -
684 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0;
│ │ │ │ -
685 break;
│ │ │ │ -
686 }
│ │ │ │ -
687 }
│ │ │ │ -
│ │ │ │ -
688
│ │ │ │ -
│ │ │ │ -
690 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
691 const typename Traits::DomainType& in, // position
│ │ │ │ -
692 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
693 {
│ │ │ │ -
694 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
695 if (totalOrder == 0) {
│ │ │ │ -
696 evaluateFunction(in, out);
│ │ │ │ -
697 } else if (totalOrder == 1) {
│ │ │ │ -
698 int subElement;
│ │ │ │ -
699 typename Traits::DomainType local;
│ │ │ │ -
700 this->getSubElement(in, subElement, local);
│ │ │ │ -
701
│ │ │ │ -
702 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
703 out.resize(size());
│ │ │ │ -
704
│ │ │ │ -
705 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
706 out[i] = 0;
│ │ │ │ -
707
│ │ │ │ -
708 switch (direction) {
│ │ │ │ -
709 case 0: // direction == 0
│ │ │ │ -
710
│ │ │ │ -
711 switch (subElement) {
│ │ │ │ -
712 case 0 :
│ │ │ │ -
713 out[0] = -2;
│ │ │ │ -
714 out[1] = 2;
│ │ │ │ -
715 break;
│ │ │ │ -
716 case 1 :
│ │ │ │ -
717 out[1] = -2;
│ │ │ │ -
718 out[2] = 2;
│ │ │ │ -
719 break;
│ │ │ │ -
720 case 2 :
│ │ │ │ -
721 out[3] = -2;
│ │ │ │ -
722 out[4] = 2;
│ │ │ │ -
723 break;
│ │ │ │ -
724 case 3 :
│ │ │ │ -
725 out[6] = -2;
│ │ │ │ -
726 out[7] = 2;
│ │ │ │ -
727 break;
│ │ │ │ -
728 case 4 :
│ │ │ │ -
729 out[6] = -2;
│ │ │ │ -
730 out[7] = 2;
│ │ │ │ -
731 break;
│ │ │ │ -
732 case 5 :
│ │ │ │ -
733 out[3] = -2;
│ │ │ │ -
734 out[4] = 2;
│ │ │ │ -
735 break;
│ │ │ │ -
736 case 6 :
│ │ │ │ -
737 out[6] = -2;
│ │ │ │ -
738 out[7] = 2;
│ │ │ │ -
739 break;
│ │ │ │ -
740 case 7 :
│ │ │ │ -
741 out[3] = -2;
│ │ │ │ -
742 out[4] = 2;
│ │ │ │ -
743 break;
│ │ │ │ -
744 }
│ │ │ │ -
745 break;
│ │ │ │ -
746
│ │ │ │ -
747 case 1: // direction == 1
│ │ │ │ -
748
│ │ │ │ -
749 switch (subElement) {
│ │ │ │ -
750 case 0 :
│ │ │ │ -
751 out[0] = -2;
│ │ │ │ -
752 out[3] = 2;
│ │ │ │ -
753 break;
│ │ │ │ -
754 case 1 :
│ │ │ │ -
755 out[1] = -2;
│ │ │ │ -
756 out[4] = 2;
│ │ │ │ -
757 break;
│ │ │ │ -
758 case 2 :
│ │ │ │ -
759 out[3] = -2;
│ │ │ │ -
760 out[5] = 2;
│ │ │ │ -
761 break;
│ │ │ │ -
762 case 3 :
│ │ │ │ -
763 out[6] = -2;
│ │ │ │ -
764 out[8] = 2;
│ │ │ │ -
765 break;
│ │ │ │ -
766 case 4 :
│ │ │ │ -
767 out[1] = -2;
│ │ │ │ -
768 out[3] = 2;
│ │ │ │ -
769 out[6] = -2;
│ │ │ │ -
770 break;
│ │ │ │ -
771 case 5 :
│ │ │ │ -
772 out[1] = -2;
│ │ │ │ -
773 out[4] = 2;
│ │ │ │ -
774 break;
│ │ │ │ -
775 case 6 :
│ │ │ │ -
776 out[6] = -2;
│ │ │ │ -
777 out[8] = 2;
│ │ │ │ -
778 break;
│ │ │ │ -
779 case 7 :
│ │ │ │ -
780 out[3] = -2;
│ │ │ │ -
781 out[4] = 2;
│ │ │ │ -
782 out[7] = -2;
│ │ │ │ -
783 out[8] = 2;
│ │ │ │ -
784 break;
│ │ │ │ -
785 }
│ │ │ │ -
786 break;
│ │ │ │ -
787
│ │ │ │ -
788 case 2: // direction == 2
│ │ │ │ -
789
│ │ │ │ -
790 switch (subElement) {
│ │ │ │ -
791 case 0 :
│ │ │ │ -
792 out[0] = -2;
│ │ │ │ -
793 out[6] = 2;
│ │ │ │ -
794 break;
│ │ │ │ -
795 case 1 :
│ │ │ │ -
796 out[1] = -2;
│ │ │ │ -
797 out[7] = 2;
│ │ │ │ -
798 break;
│ │ │ │ -
799 case 2 :
│ │ │ │ -
800 out[3] = -2;
│ │ │ │ -
801 out[8] = 2;
│ │ │ │ -
802 break;
│ │ │ │ -
803 case 3 :
│ │ │ │ -
804 out[6] = -2;
│ │ │ │ -
805 out[9] = 2;
│ │ │ │ -
806 break;
│ │ │ │ -
807 case 4 :
│ │ │ │ -
808 out[1] = -2;
│ │ │ │ -
809 out[7] = 2;
│ │ │ │ -
810 break;
│ │ │ │ -
811 case 5 :
│ │ │ │ -
812 out[1] = -2;
│ │ │ │ -
813 out[7] = 2;
│ │ │ │ -
814 break;
│ │ │ │ -
815 case 6 :
│ │ │ │ -
816 out[3] = -2;
│ │ │ │ -
817 out[8] = 2;
│ │ │ │ -
818 break;
│ │ │ │ -
819 case 7 :
│ │ │ │ -
820 out[3] = -2;
│ │ │ │ -
821 out[8] = 2;
│ │ │ │ -
822 break;
│ │ │ │ -
823 }
│ │ │ │ -
824 break;
│ │ │ │ -
825
│ │ │ │ -
826 default:
│ │ │ │ -
827 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
828 }
│ │ │ │ -
829 } else {
│ │ │ │ -
830 out.resize(size());
│ │ │ │ -
831 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
832 out[i] = 0;
│ │ │ │ -
833 }
│ │ │ │ -
834 }
│ │ │ │ -
│ │ │ │ -
835
│ │ │ │ -
│ │ │ │ -
839 static constexpr unsigned int order ()
│ │ │ │ -
840 {
│ │ │ │ -
841 return 1;
│ │ │ │ -
842 }
│ │ │ │ -
│ │ │ │ -
843
│ │ │ │ -
844 };
│ │ │ │ -
│ │ │ │ -
845}
│ │ │ │ -
846#endif
│ │ │ │ -
Contains a base class for LocalBasis classes based on uniform refinement.
│ │ │ │ +
20 template<class D, class R>
│ │ │ │ + │ │ │ │ +
22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
24
│ │ │ │ +
25}
│ │ │ │ +
26
│ │ │ │ +
27#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Definition refinedsimplexlocalbasis.hh:20
│ │ │ │ -
Definition refinedp1localbasis.hh:23
│ │ │ │ -
RefinedP1LocalBasis()
Definition refinedp1localbasis.hh:25
│ │ │ │ -
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition refinedp1localbasis.hh:59
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition refinedp1localbasis.hh:98
│ │ │ │ -
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition refinedp1localbasis.hh:162
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition refinedp1localbasis.hh:68
│ │ │ │ -
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition refinedp1localbasis.hh:126
│ │ │ │ -
static constexpr unsigned int size()
number of shape functions
Definition refinedp1localbasis.hh:62
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition refinedp1localbasis.hh:262
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition refinedp1localbasis.hh:200
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition refinedp1localbasis.hh:209
│ │ │ │ -
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition refinedp1localbasis.hh:313
│ │ │ │ -
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition refinedp1localbasis.hh:387
│ │ │ │ -
static constexpr unsigned int size()
number of shape functions
Definition refinedp1localbasis.hh:203
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition refinedp1localbasis.hh:690
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition refinedp1localbasis.hh:438
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition refinedp1localbasis.hh:429
│ │ │ │ -
static constexpr unsigned int size()
number of shape functions
Definition refinedp1localbasis.hh:432
│ │ │ │ -
static constexpr unsigned int order()
Polynomial order of the shape functions Doesn't really apply: these shape functions are only piecewis...
Definition refinedp1localbasis.hh:839
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition refinedp1localbasis.hh:565
│ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,869 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_e_f_i_n_e_d │ │ │ │ │ - * _r_e_f_i_n_e_d_p_1 │ │ │ │ │ -refinedp1localbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pyramidp1.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_REFINED_P1_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_REFINED_P1_LOCALBASIS_HH │ │ │ │ │ -7 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ +7#define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11#warning This header is deprecated │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_c_o_m_m_o_n_/_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 class _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -22 : public _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -23 { │ │ │ │ │ -24 public: │ │ │ │ │ -_2_5 _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ -26 { │ │ │ │ │ -27 DUNE_THROW(Dune::NotImplemented,"RefinedP1LocalBasis not implemented for dim │ │ │ │ │ -> 3."); │ │ │ │ │ -28 } │ │ │ │ │ -29 }; │ │ │ │ │ -30 │ │ │ │ │ -52 template │ │ │ │ │ -_5_3 class _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -54 : public _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -55 { │ │ │ │ │ -56 public: │ │ │ │ │ -58 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_1_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_1_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_5_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -60 │ │ │ │ │ -_6_2 static constexpr unsigned int _s_i_z_e () │ │ │ │ │ -63 { │ │ │ │ │ -64 return 3; │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_8 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -69 std::vector& out) const │ │ │ │ │ -70 { │ │ │ │ │ -71 out.resize(3); │ │ │ │ │ -72 │ │ │ │ │ -73 int subElement; │ │ │ │ │ -74 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -75 this->getSubElement(in, subElement, local); │ │ │ │ │ -76 │ │ │ │ │ -77 switch (subElement) { │ │ │ │ │ -78 case 0 : │ │ │ │ │ -79 │ │ │ │ │ -80 out[0] = 1 - local[0]; │ │ │ │ │ -81 out[1] = local[0]; │ │ │ │ │ -82 out[2] = 0; │ │ │ │ │ -83 break; │ │ │ │ │ -84 │ │ │ │ │ -85 case 1 : │ │ │ │ │ -86 │ │ │ │ │ -87 out[0] = 0; │ │ │ │ │ -88 out[1] = 1 - local[0]; │ │ │ │ │ -89 out[2] = local[0]; │ │ │ │ │ -90 break; │ │ │ │ │ -91 │ │ │ │ │ -92 } │ │ │ │ │ -93 │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -97 inline void │ │ │ │ │ -_9_8 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -99 std::vector& out) const // return value │ │ │ │ │ -100 { │ │ │ │ │ -101 out.resize(3); │ │ │ │ │ -102 │ │ │ │ │ -103 int subElement; │ │ │ │ │ -104 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -105 this->getSubElement(in, subElement, local); │ │ │ │ │ -106 │ │ │ │ │ -107 switch (subElement) { │ │ │ │ │ -108 case 0 : │ │ │ │ │ -109 │ │ │ │ │ -110 out[0][0][0] = -2; │ │ │ │ │ -111 out[1][0][0] = 2; │ │ │ │ │ -112 out[2][0][0] = 0; │ │ │ │ │ -113 break; │ │ │ │ │ -114 │ │ │ │ │ -115 case 1 : │ │ │ │ │ -116 │ │ │ │ │ -117 out[0][0][0] = 0; │ │ │ │ │ -118 out[1][0][0] = -2; │ │ │ │ │ -119 out[2][0][0] = 2; │ │ │ │ │ -120 break; │ │ │ │ │ -121 │ │ │ │ │ -122 } │ │ │ │ │ -123 } │ │ │ │ │ -124 │ │ │ │ │ -_1_2_6 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -127 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -128 std::vector& out) const // return value │ │ │ │ │ -129 { │ │ │ │ │ -130 auto totalOrder = order[0]; │ │ │ │ │ -131 if (totalOrder == 0) { │ │ │ │ │ -132 evaluateFunction(in, out); │ │ │ │ │ -133 } else if (totalOrder == 1) │ │ │ │ │ -134 { │ │ │ │ │ -135 out.resize(3); │ │ │ │ │ -136 │ │ │ │ │ -137 int subElement; │ │ │ │ │ -138 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -139 this->getSubElement(in, subElement, local); │ │ │ │ │ -140 │ │ │ │ │ -141 switch (subElement) { │ │ │ │ │ -142 case 0: │ │ │ │ │ -143 out[0] = -2; │ │ │ │ │ -144 out[1] = 2; │ │ │ │ │ -145 out[2] = 0; │ │ │ │ │ -146 break; │ │ │ │ │ -147 case 1: │ │ │ │ │ -148 out[0] = 0; │ │ │ │ │ -149 out[1] = -2; │ │ │ │ │ -150 out[2] = 2; │ │ │ │ │ -151 break; │ │ │ │ │ -152 } │ │ │ │ │ -153 } else { │ │ │ │ │ -154 out.resize(3); │ │ │ │ │ -155 out[0] = out[1] = out[2] = 0; │ │ │ │ │ -156 } │ │ │ │ │ -157 } │ │ │ │ │ -158 │ │ │ │ │ -_1_6_2 static constexpr unsigned int _o_r_d_e_r () │ │ │ │ │ -163 { │ │ │ │ │ -164 return 1; │ │ │ │ │ -165 } │ │ │ │ │ -166 │ │ │ │ │ -167 }; │ │ │ │ │ -168 │ │ │ │ │ -193 template │ │ │ │ │ -_1_9_4 class _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -195 : public _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -196 { │ │ │ │ │ -197 public: │ │ │ │ │ -199 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_2_0_0 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -201 │ │ │ │ │ -_2_0_3 static constexpr unsigned int _s_i_z_e () │ │ │ │ │ -204 { │ │ │ │ │ -205 return 6; │ │ │ │ │ -206 } │ │ │ │ │ -207 │ │ │ │ │ -_2_0_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -210 std::vector& out) const │ │ │ │ │ -211 { │ │ │ │ │ -212 out.resize(6); │ │ │ │ │ -213 │ │ │ │ │ -214 int subElement; │ │ │ │ │ -215 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -216 this->getSubElement(in, subElement, local); │ │ │ │ │ -217 │ │ │ │ │ -218 switch (subElement) { │ │ │ │ │ -219 case 0 : │ │ │ │ │ -220 │ │ │ │ │ -221 out[0] = 1 - local[0] - local[1]; │ │ │ │ │ -222 out[1] = local[0]; │ │ │ │ │ -223 out[2] = 0; │ │ │ │ │ -224 out[3] = local[1]; │ │ │ │ │ -225 out[4] = 0; │ │ │ │ │ -226 out[5] = 0; │ │ │ │ │ -227 break; │ │ │ │ │ -228 │ │ │ │ │ -229 case 1 : │ │ │ │ │ -230 │ │ │ │ │ -231 out[0] = 0; │ │ │ │ │ -232 out[1] = 1 - local[0] - local[1]; │ │ │ │ │ -233 out[2] = local[0]; │ │ │ │ │ -234 out[3] = 0; │ │ │ │ │ -235 out[4] = local[1]; │ │ │ │ │ -236 out[5] = 0; │ │ │ │ │ -237 break; │ │ │ │ │ -238 │ │ │ │ │ -239 case 2 : │ │ │ │ │ -240 │ │ │ │ │ -241 out[0] = 0; │ │ │ │ │ -242 out[1] = 0; │ │ │ │ │ -243 out[2] = 0; │ │ │ │ │ -244 out[3] = 1 - local[0] - local[1]; │ │ │ │ │ -245 out[4] = local[0]; │ │ │ │ │ -246 out[5] = local[1]; │ │ │ │ │ -247 break; │ │ │ │ │ -248 case 3 : │ │ │ │ │ -249 │ │ │ │ │ -250 out[0] = 0; │ │ │ │ │ -251 out[1] = local[1]; │ │ │ │ │ -252 out[2] = 0; │ │ │ │ │ -253 out[3] = local[0]; │ │ │ │ │ -254 out[4] = 1 - local[0] - local[1]; │ │ │ │ │ -255 out[5] = 0; │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -258 } │ │ │ │ │ -259 │ │ │ │ │ -261 inline void │ │ │ │ │ -_2_6_2 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -263 std::vector& out) const // return value │ │ │ │ │ -264 { │ │ │ │ │ -265 out.resize(6); │ │ │ │ │ -266 │ │ │ │ │ -267 int subElement; │ │ │ │ │ -268 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -269 this->getSubElement(in, subElement, local); │ │ │ │ │ -270 │ │ │ │ │ -271 switch (subElement) { │ │ │ │ │ -272 case 0 : │ │ │ │ │ -273 │ │ │ │ │ -274 out[0][0][0] = -2; out[0][0][1] = -2; │ │ │ │ │ -275 out[1][0][0] = 2; out[1][0][1] = 0; │ │ │ │ │ -276 out[2][0][0] = 0; out[2][0][1] = 0; │ │ │ │ │ -277 out[3][0][0] = 0; out[3][0][1] = 2; │ │ │ │ │ -278 out[4][0][0] = 0; out[4][0][1] = 0; │ │ │ │ │ -279 out[5][0][0] = 0; out[5][0][1] = 0; │ │ │ │ │ -280 break; │ │ │ │ │ -281 │ │ │ │ │ -282 case 1 : │ │ │ │ │ -283 │ │ │ │ │ -284 out[0][0][0] = 0; out[0][0][1] = 0; │ │ │ │ │ -285 out[1][0][0] = -2; out[1][0][1] = -2; │ │ │ │ │ -286 out[2][0][0] = 2; out[2][0][1] = 0; │ │ │ │ │ -287 out[3][0][0] = 0; out[3][0][1] = 0; │ │ │ │ │ -288 out[4][0][0] = 0; out[4][0][1] = 2; │ │ │ │ │ -289 out[5][0][0] = 0; out[5][0][1] = 0; │ │ │ │ │ -290 break; │ │ │ │ │ -291 │ │ │ │ │ -292 case 2 : │ │ │ │ │ -293 │ │ │ │ │ -294 out[0][0][0] = 0; out[0][0][1] = 0; │ │ │ │ │ -295 out[1][0][0] = 0; out[1][0][1] = 0; │ │ │ │ │ -296 out[2][0][0] = 0; out[2][0][1] = 0; │ │ │ │ │ -297 out[3][0][0] = -2; out[3][0][1] = -2; │ │ │ │ │ -298 out[4][0][0] = 2; out[4][0][1] = 0; │ │ │ │ │ -299 out[5][0][0] = 0; out[5][0][1] = 2; │ │ │ │ │ -300 break; │ │ │ │ │ -301 case 3 : │ │ │ │ │ -302 │ │ │ │ │ -303 out[0][0][0] = 0; out[0][0][1] = 0; │ │ │ │ │ -304 out[1][0][0] = 0; out[1][0][1] = -2; │ │ │ │ │ -305 out[2][0][0] = 0; out[2][0][1] = 0; │ │ │ │ │ -306 out[3][0][0] = -2; out[3][0][1] = 0; │ │ │ │ │ -307 out[4][0][0] = 2; out[4][0][1] = 2; │ │ │ │ │ -308 out[5][0][0] = 0; out[5][0][1] = 0; │ │ │ │ │ -309 } │ │ │ │ │ -310 } │ │ │ │ │ -311 │ │ │ │ │ -_3_1_3 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -314 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -315 std::vector& out) const // return value │ │ │ │ │ -316 { │ │ │ │ │ -317 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -318 if (totalOrder == 0) { │ │ │ │ │ -319 evaluateFunction(in, out); │ │ │ │ │ -320 } else if (totalOrder == 1) { │ │ │ │ │ -321 int subElement; │ │ │ │ │ -322 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -323 this->getSubElement(in, subElement, local); │ │ │ │ │ -324 │ │ │ │ │ -325 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -326 out.resize(size()); │ │ │ │ │ -327 │ │ │ │ │ -328 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -329 out[i] = 0; │ │ │ │ │ -330 │ │ │ │ │ -331 switch (direction) { │ │ │ │ │ -332 case 0: // direction == 0 │ │ │ │ │ -333 │ │ │ │ │ -334 switch (subElement) { │ │ │ │ │ -335 case 0 : │ │ │ │ │ -336 out[0] = -2; │ │ │ │ │ -337 out[1] = 2; │ │ │ │ │ -338 break; │ │ │ │ │ -339 case 1 : │ │ │ │ │ -340 out[1] = -2; │ │ │ │ │ -341 out[2] = 2; │ │ │ │ │ -342 break; │ │ │ │ │ -343 case 2 : │ │ │ │ │ -344 out[3] = -2; │ │ │ │ │ -345 out[4] = 2; │ │ │ │ │ -346 break; │ │ │ │ │ -347 case 3 : │ │ │ │ │ -348 out[3] = -2; │ │ │ │ │ -349 out[4] = 2; │ │ │ │ │ -350 } │ │ │ │ │ -351 break; │ │ │ │ │ -352 │ │ │ │ │ -353 case 1: // direction == 1 │ │ │ │ │ -354 │ │ │ │ │ -355 switch (subElement) { │ │ │ │ │ -356 case 0 : │ │ │ │ │ -357 out[0] = -2; │ │ │ │ │ -358 out[3] = 2; │ │ │ │ │ -359 break; │ │ │ │ │ -360 case 1 : │ │ │ │ │ -361 out[1] = -2; │ │ │ │ │ -362 out[4] = 2; │ │ │ │ │ -363 break; │ │ │ │ │ -364 case 2 : │ │ │ │ │ -365 out[3] = -2; │ │ │ │ │ -366 out[5] = 2; │ │ │ │ │ -367 break; │ │ │ │ │ -368 case 3 : │ │ │ │ │ -369 out[1] = -2; │ │ │ │ │ -370 out[4] = 2; │ │ │ │ │ -371 } │ │ │ │ │ -372 break; │ │ │ │ │ -373 │ │ │ │ │ -374 default: │ │ │ │ │ -375 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -376 } │ │ │ │ │ -377 } else { │ │ │ │ │ -378 out.resize(size()); │ │ │ │ │ -379 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -380 out[i] = 0; │ │ │ │ │ -381 } │ │ │ │ │ -382 } │ │ │ │ │ -383 │ │ │ │ │ -_3_8_7 static constexpr unsigned int _o_r_d_e_r () │ │ │ │ │ -388 { │ │ │ │ │ -389 return 1; │ │ │ │ │ -390 } │ │ │ │ │ -391 │ │ │ │ │ -392 }; │ │ │ │ │ -393 │ │ │ │ │ -422 template │ │ │ │ │ -_4_2_3 class _R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -424 : public _R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -425 { │ │ │ │ │ -426 public: │ │ │ │ │ -428 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_4_2_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -430 │ │ │ │ │ -_4_3_2 static constexpr unsigned int _s_i_z_e () │ │ │ │ │ -433 { │ │ │ │ │ -434 return 10; │ │ │ │ │ -435 } │ │ │ │ │ -436 │ │ │ │ │ -_4_3_8 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -439 std::vector& out) const │ │ │ │ │ -440 { │ │ │ │ │ -441 out.resize(10); │ │ │ │ │ -442 │ │ │ │ │ -443 int subElement; │ │ │ │ │ -444 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -445 this->getSubElement(in, subElement, local); │ │ │ │ │ -446 │ │ │ │ │ -447 switch (subElement) { │ │ │ │ │ -448 case 0 : │ │ │ │ │ -449 │ │ │ │ │ -450 out[0] = 1 - local[0] - local[1] - local[2]; │ │ │ │ │ -451 out[1] = local[0]; │ │ │ │ │ -452 out[2] = 0; │ │ │ │ │ -453 out[3] = local[1]; │ │ │ │ │ -454 out[4] = 0; │ │ │ │ │ -455 out[5] = 0; │ │ │ │ │ -456 out[6] = local[2]; │ │ │ │ │ -457 out[7] = 0; │ │ │ │ │ -458 out[8] = 0; │ │ │ │ │ -459 out[9] = 0; │ │ │ │ │ -460 break; │ │ │ │ │ -461 │ │ │ │ │ -462 case 1 : │ │ │ │ │ -463 │ │ │ │ │ -464 out[0] = 0; │ │ │ │ │ -465 out[1] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -466 out[2] = local[0]; │ │ │ │ │ -467 out[3] = 0; │ │ │ │ │ -468 out[4] = local[1]; │ │ │ │ │ -469 out[5] = 0; │ │ │ │ │ -470 out[6] = 0; │ │ │ │ │ -471 out[7] = local[2]; │ │ │ │ │ -472 out[8] = 0; │ │ │ │ │ -473 out[9] = 0; │ │ │ │ │ -474 break; │ │ │ │ │ -475 │ │ │ │ │ -476 case 2 : │ │ │ │ │ -477 │ │ │ │ │ -478 out[0] = 0; │ │ │ │ │ -479 out[1] = 0; │ │ │ │ │ -480 out[2] = 0; │ │ │ │ │ -481 out[3] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -482 out[4] = local[0]; │ │ │ │ │ -483 out[5] = local[1]; │ │ │ │ │ -484 out[6] = 0; │ │ │ │ │ -485 out[7] = 0; │ │ │ │ │ -486 out[8] = local[2]; │ │ │ │ │ -487 out[9] = 0; │ │ │ │ │ -488 break; │ │ │ │ │ -489 │ │ │ │ │ -490 case 3 : │ │ │ │ │ -491 │ │ │ │ │ -492 out[0] = 0; │ │ │ │ │ -493 out[1] = 0; │ │ │ │ │ -494 out[2] = 0; │ │ │ │ │ -495 out[3] = 0; │ │ │ │ │ -496 out[4] = 0; │ │ │ │ │ -497 out[5] = 0; │ │ │ │ │ -498 out[6] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -499 out[7] = local[0]; │ │ │ │ │ -500 out[8] = local[1]; │ │ │ │ │ -501 out[9] = local[2]; │ │ │ │ │ -502 break; │ │ │ │ │ -503 │ │ │ │ │ -504 case 4 : │ │ │ │ │ -505 │ │ │ │ │ -506 out[0] = 0; │ │ │ │ │ -507 out[1] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -508 out[2] = 0; │ │ │ │ │ -509 out[3] = local[0]; │ │ │ │ │ -510 out[4] = 0; │ │ │ │ │ -511 out[5] = 0; │ │ │ │ │ -512 out[6] = local[1]; │ │ │ │ │ -513 out[7] = local[2]; │ │ │ │ │ -514 out[8] = 0; │ │ │ │ │ -515 out[9] = 0; │ │ │ │ │ -516 break; │ │ │ │ │ -517 │ │ │ │ │ -518 case 5 : │ │ │ │ │ -519 │ │ │ │ │ -520 out[0] = 0; │ │ │ │ │ -521 out[1] = local[1]; │ │ │ │ │ -522 out[2] = 0; │ │ │ │ │ -523 out[3] = local[0]; │ │ │ │ │ -524 out[4] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -525 out[5] = 0; │ │ │ │ │ -526 out[6] = 0; │ │ │ │ │ -527 out[7] = local[2]; │ │ │ │ │ -528 out[8] = 0; │ │ │ │ │ -529 out[9] = 0; │ │ │ │ │ -530 break; │ │ │ │ │ -531 │ │ │ │ │ -532 case 6 : │ │ │ │ │ -533 │ │ │ │ │ -534 out[0] = 0; │ │ │ │ │ -535 out[1] = 0; │ │ │ │ │ -536 out[2] = 0; │ │ │ │ │ -537 out[3] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -538 out[4] = 0; │ │ │ │ │ -539 out[5] = 0; │ │ │ │ │ -540 out[6] = local[0]; │ │ │ │ │ -541 out[7] = local[1]; │ │ │ │ │ -542 out[8] = local[2]; │ │ │ │ │ -543 out[9] = 0; │ │ │ │ │ -544 break; │ │ │ │ │ -545 │ │ │ │ │ -546 case 7 : │ │ │ │ │ -547 │ │ │ │ │ -548 out[0] = 0; │ │ │ │ │ -549 out[1] = 0; │ │ │ │ │ -550 out[2] = 0; │ │ │ │ │ -551 out[3] = 1 - local[0] - local[1] -local[2]; │ │ │ │ │ -552 out[4] = local[2]; │ │ │ │ │ -553 out[5] = 0; │ │ │ │ │ -554 out[6] = 0; │ │ │ │ │ -555 out[7] = local[1]; │ │ │ │ │ -556 out[8] = local[0]; │ │ │ │ │ -557 out[9] = 0; │ │ │ │ │ -558 break; │ │ │ │ │ -559 } │ │ │ │ │ -560 │ │ │ │ │ -561 } │ │ │ │ │ -562 │ │ │ │ │ -564 inline void │ │ │ │ │ -_5_6_5 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -566 std::vector& out) const // return value │ │ │ │ │ -567 { │ │ │ │ │ -568 out.resize(10); │ │ │ │ │ -569 │ │ │ │ │ -570 int subElement; │ │ │ │ │ -571 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -572 this->getSubElement(in, subElement, local); │ │ │ │ │ -573 │ │ │ │ │ -574 switch (subElement) { │ │ │ │ │ -575 case 0 : │ │ │ │ │ -576 │ │ │ │ │ -577 out[0][0][0] = -2; out[0][0][1] = -2; out[0][0][2] = -2; │ │ │ │ │ -578 out[1][0][0] = 2; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ -579 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -580 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0; │ │ │ │ │ -581 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ -582 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -583 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 2; │ │ │ │ │ -584 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0; │ │ │ │ │ -585 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0; │ │ │ │ │ -586 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -587 break; │ │ │ │ │ -588 │ │ │ │ │ -589 case 1 : │ │ │ │ │ -590 │ │ │ │ │ -591 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -592 out[1][0][0] = -2; out[1][0][1] = -2; out[1][0][2] = -2; │ │ │ │ │ -593 out[2][0][0] = 2; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -594 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0; │ │ │ │ │ -595 out[4][0][0] = 0; out[4][0][1] = 2; out[4][0][2] = 0; │ │ │ │ │ -596 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -597 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0; │ │ │ │ │ -598 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2; │ │ │ │ │ -599 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0; │ │ │ │ │ -600 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -601 break; │ │ │ │ │ -602 │ │ │ │ │ -603 case 2 : │ │ │ │ │ -604 │ │ │ │ │ -605 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -606 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ -607 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -608 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2; │ │ │ │ │ -609 out[4][0][0] = 2; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ -610 out[5][0][0] = 0; out[5][0][1] = 2; out[5][0][2] = 0; │ │ │ │ │ -611 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0; │ │ │ │ │ -612 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 0; │ │ │ │ │ -613 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 2; │ │ │ │ │ -614 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -615 break; │ │ │ │ │ -616 │ │ │ │ │ -617 case 3 : │ │ │ │ │ -618 │ │ │ │ │ -619 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -620 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ -621 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -622 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0; │ │ │ │ │ -623 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ -624 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -625 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = -2; │ │ │ │ │ -626 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0; │ │ │ │ │ -627 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 0; │ │ │ │ │ -628 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 2; │ │ │ │ │ -629 break; │ │ │ │ │ -630 │ │ │ │ │ -631 case 4 : │ │ │ │ │ -632 │ │ │ │ │ -633 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -634 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2; │ │ │ │ │ -635 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -636 out[3][0][0] = 0; out[3][0][1] = 2; out[3][0][2] = 0; │ │ │ │ │ -637 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ -638 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -639 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0; │ │ │ │ │ -640 out[7][0][0] = 2; out[7][0][1] = 2; out[7][0][2] = 2; │ │ │ │ │ -641 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0; │ │ │ │ │ -642 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -643 break; │ │ │ │ │ -644 │ │ │ │ │ -645 case 5 : │ │ │ │ │ -646 │ │ │ │ │ -647 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -648 out[1][0][0] = 0; out[1][0][1] = -2; out[1][0][2] = -2; │ │ │ │ │ -649 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -650 out[3][0][0] = -2; out[3][0][1] = 0; out[3][0][2] = 0; │ │ │ │ │ -651 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0; │ │ │ │ │ -652 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -653 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0; │ │ │ │ │ -654 out[7][0][0] = 0; out[7][0][1] = 0; out[7][0][2] = 2; │ │ │ │ │ -655 out[8][0][0] = 0; out[8][0][1] = 0; out[8][0][2] = 0; │ │ │ │ │ -656 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -657 break; │ │ │ │ │ -658 │ │ │ │ │ -659 case 6 : │ │ │ │ │ -660 │ │ │ │ │ -661 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -662 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ -663 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -664 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = -2; │ │ │ │ │ -665 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ -666 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -667 out[6][0][0] = -2; out[6][0][1] = -2; out[6][0][2] = 0; │ │ │ │ │ -668 out[7][0][0] = 2; out[7][0][1] = 0; out[7][0][2] = 0; │ │ │ │ │ -669 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2; │ │ │ │ │ -670 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -671 break; │ │ │ │ │ -672 │ │ │ │ │ -673 case 7 : │ │ │ │ │ -674 │ │ │ │ │ -675 out[0][0][0] = 0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ -676 out[1][0][0] = 0; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ -677 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -678 out[3][0][0] = -2; out[3][0][1] = -2; out[3][0][2] = -2; │ │ │ │ │ -679 out[4][0][0] = 2; out[4][0][1] = 2; out[4][0][2] = 0; │ │ │ │ │ -680 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ -681 out[6][0][0] = 0; out[6][0][1] = 0; out[6][0][2] = 0; │ │ │ │ │ -682 out[7][0][0] = 0; out[7][0][1] = -2; out[7][0][2] = 0; │ │ │ │ │ -683 out[8][0][0] = 0; out[8][0][1] = 2; out[8][0][2] = 2; │ │ │ │ │ -684 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 0; │ │ │ │ │ -685 break; │ │ │ │ │ -686 } │ │ │ │ │ -687 } │ │ │ │ │ -688 │ │ │ │ │ -_6_9_0 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -691 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -692 std::vector& out) const // return value │ │ │ │ │ -693 { │ │ │ │ │ -694 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -695 if (totalOrder == 0) { │ │ │ │ │ -696 evaluateFunction(in, out); │ │ │ │ │ -697 } else if (totalOrder == 1) { │ │ │ │ │ -698 int subElement; │ │ │ │ │ -699 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e local; │ │ │ │ │ -700 this->getSubElement(in, subElement, local); │ │ │ │ │ -701 │ │ │ │ │ -702 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -703 out.resize(size()); │ │ │ │ │ -704 │ │ │ │ │ -705 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -706 out[i] = 0; │ │ │ │ │ -707 │ │ │ │ │ -708 switch (direction) { │ │ │ │ │ -709 case 0: // direction == 0 │ │ │ │ │ -710 │ │ │ │ │ -711 switch (subElement) { │ │ │ │ │ -712 case 0 : │ │ │ │ │ -713 out[0] = -2; │ │ │ │ │ -714 out[1] = 2; │ │ │ │ │ -715 break; │ │ │ │ │ -716 case 1 : │ │ │ │ │ -717 out[1] = -2; │ │ │ │ │ -718 out[2] = 2; │ │ │ │ │ -719 break; │ │ │ │ │ -720 case 2 : │ │ │ │ │ -721 out[3] = -2; │ │ │ │ │ -722 out[4] = 2; │ │ │ │ │ -723 break; │ │ │ │ │ -724 case 3 : │ │ │ │ │ -725 out[6] = -2; │ │ │ │ │ -726 out[7] = 2; │ │ │ │ │ -727 break; │ │ │ │ │ -728 case 4 : │ │ │ │ │ -729 out[6] = -2; │ │ │ │ │ -730 out[7] = 2; │ │ │ │ │ -731 break; │ │ │ │ │ -732 case 5 : │ │ │ │ │ -733 out[3] = -2; │ │ │ │ │ -734 out[4] = 2; │ │ │ │ │ -735 break; │ │ │ │ │ -736 case 6 : │ │ │ │ │ -737 out[6] = -2; │ │ │ │ │ -738 out[7] = 2; │ │ │ │ │ -739 break; │ │ │ │ │ -740 case 7 : │ │ │ │ │ -741 out[3] = -2; │ │ │ │ │ -742 out[4] = 2; │ │ │ │ │ -743 break; │ │ │ │ │ -744 } │ │ │ │ │ -745 break; │ │ │ │ │ -746 │ │ │ │ │ -747 case 1: // direction == 1 │ │ │ │ │ -748 │ │ │ │ │ -749 switch (subElement) { │ │ │ │ │ -750 case 0 : │ │ │ │ │ -751 out[0] = -2; │ │ │ │ │ -752 out[3] = 2; │ │ │ │ │ -753 break; │ │ │ │ │ -754 case 1 : │ │ │ │ │ -755 out[1] = -2; │ │ │ │ │ -756 out[4] = 2; │ │ │ │ │ -757 break; │ │ │ │ │ -758 case 2 : │ │ │ │ │ -759 out[3] = -2; │ │ │ │ │ -760 out[5] = 2; │ │ │ │ │ -761 break; │ │ │ │ │ -762 case 3 : │ │ │ │ │ -763 out[6] = -2; │ │ │ │ │ -764 out[8] = 2; │ │ │ │ │ -765 break; │ │ │ │ │ -766 case 4 : │ │ │ │ │ -767 out[1] = -2; │ │ │ │ │ -768 out[3] = 2; │ │ │ │ │ -769 out[6] = -2; │ │ │ │ │ -770 break; │ │ │ │ │ -771 case 5 : │ │ │ │ │ -772 out[1] = -2; │ │ │ │ │ -773 out[4] = 2; │ │ │ │ │ -774 break; │ │ │ │ │ -775 case 6 : │ │ │ │ │ -776 out[6] = -2; │ │ │ │ │ -777 out[8] = 2; │ │ │ │ │ -778 break; │ │ │ │ │ -779 case 7 : │ │ │ │ │ -780 out[3] = -2; │ │ │ │ │ -781 out[4] = 2; │ │ │ │ │ -782 out[7] = -2; │ │ │ │ │ -783 out[8] = 2; │ │ │ │ │ -784 break; │ │ │ │ │ -785 } │ │ │ │ │ -786 break; │ │ │ │ │ -787 │ │ │ │ │ -788 case 2: // direction == 2 │ │ │ │ │ -789 │ │ │ │ │ -790 switch (subElement) { │ │ │ │ │ -791 case 0 : │ │ │ │ │ -792 out[0] = -2; │ │ │ │ │ -793 out[6] = 2; │ │ │ │ │ -794 break; │ │ │ │ │ -795 case 1 : │ │ │ │ │ -796 out[1] = -2; │ │ │ │ │ -797 out[7] = 2; │ │ │ │ │ -798 break; │ │ │ │ │ -799 case 2 : │ │ │ │ │ -800 out[3] = -2; │ │ │ │ │ -801 out[8] = 2; │ │ │ │ │ -802 break; │ │ │ │ │ -803 case 3 : │ │ │ │ │ -804 out[6] = -2; │ │ │ │ │ -805 out[9] = 2; │ │ │ │ │ -806 break; │ │ │ │ │ -807 case 4 : │ │ │ │ │ -808 out[1] = -2; │ │ │ │ │ -809 out[7] = 2; │ │ │ │ │ -810 break; │ │ │ │ │ -811 case 5 : │ │ │ │ │ -812 out[1] = -2; │ │ │ │ │ -813 out[7] = 2; │ │ │ │ │ -814 break; │ │ │ │ │ -815 case 6 : │ │ │ │ │ -816 out[3] = -2; │ │ │ │ │ -817 out[8] = 2; │ │ │ │ │ -818 break; │ │ │ │ │ -819 case 7 : │ │ │ │ │ -820 out[3] = -2; │ │ │ │ │ -821 out[8] = 2; │ │ │ │ │ -822 break; │ │ │ │ │ -823 } │ │ │ │ │ -824 break; │ │ │ │ │ -825 │ │ │ │ │ -826 default: │ │ │ │ │ -827 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -828 } │ │ │ │ │ -829 } else { │ │ │ │ │ -830 out.resize(size()); │ │ │ │ │ -831 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -832 out[i] = 0; │ │ │ │ │ -833 } │ │ │ │ │ -834 } │ │ │ │ │ -835 │ │ │ │ │ -_8_3_9 static constexpr unsigned int _o_r_d_e_r () │ │ │ │ │ -840 { │ │ │ │ │ -841 return 1; │ │ │ │ │ -842 } │ │ │ │ │ -843 │ │ │ │ │ -844 }; │ │ │ │ │ -845} │ │ │ │ │ -846#endif │ │ │ │ │ -_r_e_f_i_n_e_d_s_i_m_p_l_e_x_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -Contains a base class for LocalBasis classes based on uniform refinement. │ │ │ │ │ +20 template │ │ │ │ │ +_2_1 using _P_y_r_a_m_i_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ +23 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ +24 │ │ │ │ │ +25} │ │ │ │ │ +26 │ │ │ │ │ +27#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn refinedsimplexlocalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RefinedP1LocalBasis() │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 1 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_o_r_d_e_r │ │ │ │ │ -static constexpr unsigned int order() │ │ │ │ │ -Polynomial order of the shape functions Doesn't really apply: these shape │ │ │ │ │ -functions are only piecewis... │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 1 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:262 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:200 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:209 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:313 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_o_r_d_e_r │ │ │ │ │ -static constexpr unsigned int order() │ │ │ │ │ -Polynomial order of the shape functions Doesn't really apply: these shape │ │ │ │ │ -functions are only piecewis... │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:387 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:690 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:438 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:429 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:432 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_o_r_d_e_r │ │ │ │ │ -static constexpr unsigned int order() │ │ │ │ │ -Polynomial order of the shape functions Doesn't really apply: these shape │ │ │ │ │ -functions are only piecewis... │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:839 │ │ │ │ │ -_D_u_n_e_:_:_R_e_f_i_n_e_d_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn refinedp1localbasis.hh:565 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1.hh File Reference │ │ │ │ +dune-localfunctions: lagrangecoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1.hh File Reference
│ │ │ │ +
lagrangecoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ +
#include <vector>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include "dualq1/dualq1localbasis.hh"
│ │ │ │ -#include "dualq1/dualq1localcoefficients.hh"
│ │ │ │ -#include "dualq1/dualq1localinterpolation.hh"
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual >
 The local dual Q1 finite element on cubes. More...
struct  Dune::LagrangeCoefficientsFactory< LP, dim, F >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualq1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +lagrangecoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _f_a_c_e_D_u_a_l_ _> │ │ │ │ │ -  The local dual Q1 finite element on cubes. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _L_P_,_ _d_i_m_,_ _F_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00065_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1.hh Source File │ │ │ │ +dune-localfunctions: lagrangecoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,264 +70,81 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1.hh
│ │ │ │ +
lagrangecoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/geometry/type.hh>
│ │ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
15#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
40 template<class D, class R, int dim, bool faceDual=false>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
42 {
│ │ │ │ -
43 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
48
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
52 {
│ │ │ │ -
53 if (faceDual)
│ │ │ │ -
54 setupFaceDualCoefficients();
│ │ │ │ -
55 else
│ │ │ │ -
56 setupDualCoefficients();
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
61 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
62 {
│ │ │ │ -
63 return basis;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 {
│ │ │ │ -
70 return coefficients;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
76 {
│ │ │ │ -
77 return interpolation;
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
81 unsigned int size () const
│ │ │ │ -
82 {
│ │ │ │ -
83 return basis.size();
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
│ │ │ │ -
88 static constexpr GeometryType type ()
│ │ │ │ -
89 {
│ │ │ │ -
90 return GeometryTypes::cube(dim);
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
93 private:
│ │ │ │ -
95 void setupFaceDualCoefficients();
│ │ │ │ -
96
│ │ │ │ -
98 void setupDualCoefficients();
│ │ │ │ -
99
│ │ │ │ - │ │ │ │ -
101 DualQ1LocalCoefficients<dim> coefficients;
│ │ │ │ - │ │ │ │ -
103 };
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 template<class D, class R, int dim, bool faceDual>
│ │ │ │ -
106 void DualQ1LocalFiniteElement<D,R,dim,faceDual>::setupDualCoefficients()
│ │ │ │ -
107 {
│ │ │ │ -
108
│ │ │ │ -
109 const int size = 1 <<dim;
│ │ │ │ -
110 std::array<Dune::FieldVector<R, size>, size> coeffs;
│ │ │ │ -
111
│ │ │ │ -
112 // dual basis functions are linear combinations of Lagrange elements
│ │ │ │ -
113 // compute these coefficients here because the basis and the local interpolation needs them
│ │ │ │ -
114 const auto& quad = Dune::QuadratureRules<D,dim>::rule(type(), 2*dim);
│ │ │ │ -
115
│ │ │ │ -
116 // assemble mass matrix on the reference element
│ │ │ │ -
117 Dune::FieldMatrix<R, size, size> massMat;
│ │ │ │ -
118 massMat = 0;
│ │ │ │ -
119
│ │ │ │ -
120 // and the integrals of the lagrange shape functions
│ │ │ │ -
121 std::vector<Dune::FieldVector<R,1> > integral(size);
│ │ │ │ -
122 for (int i=0; i<size; i++)
│ │ │ │ -
123 integral[i] = 0;
│ │ │ │ -
124
│ │ │ │ -
125 Dune::Impl::LagrangeCubeLocalBasis<D,R,dim,1> q1Basis;
│ │ │ │ -
126 for(size_t pt=0; pt<quad.size(); pt++) {
│ │ │ │ -
127
│ │ │ │ -
128 const Dune::FieldVector<D ,dim>& pos = quad[pt].position();
│ │ │ │ -
129 std::vector<Dune::FieldVector<R,1> > q1Values(size);
│ │ │ │ -
130 q1Basis.evaluateFunction(pos,q1Values);
│ │ │ │ -
131
│ │ │ │ -
132 D weight = quad[pt].weight();
│ │ │ │ -
133
│ │ │ │ -
134 for (int k=0; k<size; k++) {
│ │ │ │ -
135 integral[k] += q1Values[k]*weight;
│ │ │ │ -
136
│ │ │ │ -
137 for (int l=0; l<=k; l++)
│ │ │ │ -
138 massMat[k][l] += weight*(q1Values[k]*q1Values[l]);
│ │ │ │ -
139 }
│ │ │ │ -
140 }
│ │ │ │ -
141
│ │ │ │ -
142 // make matrix symmetric
│ │ │ │ -
143 for (int i=0; i<size-1; i++)
│ │ │ │ -
144 for (int j=i+1; j<size; j++)
│ │ │ │ -
145 massMat[i][j] = massMat[j][i];
│ │ │ │ -
146
│ │ │ │ -
147 //solve for the coefficients
│ │ │ │ -
148
│ │ │ │ -
149 for (int i=0; i<size; i++) {
│ │ │ │ -
150
│ │ │ │ -
151 Dune::FieldVector<R, size> rhs(0);
│ │ │ │ -
152 rhs[i] = integral[i];
│ │ │ │ -
153
│ │ │ │ -
154 coeffs[i] = 0;
│ │ │ │ -
155 massMat.solve(coeffs[i] ,rhs);
│ │ │ │ -
156
│ │ │ │ -
157 }
│ │ │ │ -
158
│ │ │ │ -
159 basis.setCoefficients(coeffs);
│ │ │ │ -
160 interpolation.setCoefficients(coeffs);
│ │ │ │ -
161 }
│ │ │ │ -
162
│ │ │ │ -
163 template<class D, class R, int dim, bool faceDual>
│ │ │ │ -
164 void DualQ1LocalFiniteElement<D,R,dim,faceDual>::setupFaceDualCoefficients()
│ │ │ │ -
165 {
│ │ │ │ -
166
│ │ │ │ -
167 const int size = 1 <<dim;
│ │ │ │ -
168 std::array<Dune::FieldVector<R, size>, size> coeffs;
│ │ │ │ -
169
│ │ │ │ -
170 // dual basis functions are linear combinations of Lagrange elements
│ │ │ │ -
171 Dune::Impl::LagrangeCubeLocalBasis<D,R,dim,1> q1Basis;
│ │ │ │ -
172
│ │ │ │ -
173 const auto& refElement = Dune::ReferenceElements<D,dim>::general(type());
│ │ │ │ -
174
│ │ │ │ -
175 // loop over faces
│ │ │ │ -
176 for (int i=0; i<refElement.size(1);i++) {
│ │ │ │ -
177
│ │ │ │ -
178 const auto& quad = Dune::QuadratureRules<D,dim-1>::rule(refElement.type(i,1),2*dim);
│ │ │ │ -
179
│ │ │ │ -
180 // for each face assemble the mass matrix over the face of all
│ │ │ │ -
181 // non-vanishing basis functions,
│ │ │ │ -
182 // for cubes refElement.size(i,1,dim)=size/2
│ │ │ │ -
183 Dune::FieldMatrix<R, size/2, size/2> massMat;
│ │ │ │ -
184 massMat = 0;
│ │ │ │ -
185
│ │ │ │ -
186 // get geometry
│ │ │ │ -
187 const auto& geometry = refElement.template geometry<1>(i);
│ │ │ │ -
188
│ │ │ │ -
189 // and the integrals of the lagrange shape functions
│ │ │ │ -
190 std::vector<Dune::FieldVector<R,1> > integral(size/2);
│ │ │ │ -
191 for (int k=0; k<size/2; k++)
│ │ │ │ -
192 integral[k] = 0;
│ │ │ │ -
193
│ │ │ │ -
194 for(size_t pt=0; pt<quad.size(); pt++) {
│ │ │ │ -
195
│ │ │ │ -
196 const auto& pos = quad[pt].position();
│ │ │ │ -
197 const auto& elementPos = geometry.global(pos);
│ │ │ │ -
198
│ │ │ │ -
199 std::vector<Dune::FieldVector<R,1> > q1Values(size);
│ │ │ │ -
200 q1Basis.evaluateFunction(elementPos,q1Values);
│ │ │ │ -
201
│ │ │ │ -
202 D weight = quad[pt].weight();
│ │ │ │ -
203
│ │ │ │ -
204 for (int k=0; k<refElement.size(i,1,dim); k++) {
│ │ │ │ -
205 int row = refElement.subEntity(i,1,k,dim);
│ │ │ │ -
206 integral[k] += q1Values[row]*weight;
│ │ │ │ -
207
│ │ │ │ -
208 for (int l=0; l<refElement.size(i,1,dim); l++) {
│ │ │ │ -
209 int col = refElement.subEntity(i,1,l,dim);
│ │ │ │ -
210 massMat[k][l] += weight*(q1Values[row]*q1Values[col]);
│ │ │ │ -
211 }
│ │ │ │ -
212 }
│ │ │ │ -
213 }
│ │ │ │ -
214
│ │ │ │ -
215 // solve for the coefficients
│ │ │ │ -
216 // note that we possibly overwrite coefficients for neighbouring faces
│ │ │ │ -
217 // this is okay since the coefficients are symmetric
│ │ │ │ -
218 for (int l=0; l<refElement.size(i,1,dim); l++) {
│ │ │ │ -
219
│ │ │ │ -
220 int row = refElement.subEntity(i,1,l,dim);
│ │ │ │ -
221 Dune::FieldVector<R, size/2> rhs(0);
│ │ │ │ -
222 rhs[l] = integral[l];
│ │ │ │ -
223
│ │ │ │ -
224 Dune::FieldVector<R, size/2> x(0);
│ │ │ │ -
225 massMat.solve(x ,rhs);
│ │ │ │ -
226
│ │ │ │ -
227 for (int k=0; k<refElement.size(i,1,dim); k++) {
│ │ │ │ -
228 int col = refElement.subEntity(i,1,k,dim);
│ │ │ │ -
229 coeffs[row][col]=x[k];
│ │ │ │ -
230 }
│ │ │ │ -
231 }
│ │ │ │ -
232 }
│ │ │ │ -
233
│ │ │ │ -
234 basis.setCoefficients(coeffs);
│ │ │ │ -
235 interpolation.setCoefficients(coeffs);
│ │ │ │ -
236 }
│ │ │ │ -
237}
│ │ │ │ -
238#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 template< template <class,unsigned int> class LP,
│ │ │ │ +
21 unsigned int dim, class F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24 static const unsigned int dimension = dim;
│ │ │ │ +
25 const typedef LP<F,dim> Object;
│ │ │ │ +
26 typedef std::size_t Key;
│ │ │ │ +
27
│ │ │ │ +
28 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
29 static Object *create ( const Key &order )
│ │ │ │ +
30 {
│ │ │ │ +
31 if (order == 0 || !Object::template supports<geometryId>(order))
│ │ │ │ +
32 return 0;
│ │ │ │ +
33 typedef typename std::remove_const<Object>::type LagrangeCoefficients;
│ │ │ │ +
34 LagrangeCoefficients *object = new LagrangeCoefficients(order);
│ │ │ │ +
35 if ( !object->template build<geometryId>() )
│ │ │ │ +
36 {
│ │ │ │ +
37 delete object;
│ │ │ │ +
38 object = nullptr;
│ │ │ │ +
39 }
│ │ │ │ +
40 return object;
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42 static void release( Object *object ) { delete object; }
│ │ │ │ +
43 };
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45}
│ │ │ │ +
46
│ │ │ │ +
47#endif // DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
The local dual Q1 finite element on cubes.
Definition dualq1.hh:42
│ │ │ │ -
LocalFiniteElementTraits< DualQ1LocalBasis< D, R, dim >, DualQ1LocalCoefficients< dim >, DualQ1LocalInterpolation< dim, DualQ1LocalBasis< D, R, dim > > > Traits
Definition dualq1.hh:47
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition dualq1.hh:81
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition dualq1.hh:75
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition dualq1.hh:61
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition dualq1.hh:68
│ │ │ │ -
DualQ1LocalFiniteElement()
Definition dualq1.hh:51
│ │ │ │ -
static constexpr GeometryType type()
Definition dualq1.hh:88
│ │ │ │ -
Dual Lagrange shape functions of order 1 on the reference cube.
Definition dualq1localbasis.hh:29
│ │ │ │ -
Layout map for dual Q1 elements.
Definition dualq1localcoefficients.hh:25
│ │ │ │ -
Definition dualq1localinterpolation.hh:21
│ │ │ │ +
Definition lagrangecoefficients.hh:23
│ │ │ │ +
static const unsigned int dimension
Definition lagrangecoefficients.hh:24
│ │ │ │ +
static void release(Object *object)
Definition lagrangecoefficients.hh:42
│ │ │ │ +
const typedef LP< F, dim > Object
Definition lagrangecoefficients.hh:25
│ │ │ │ +
static Object * create(const Key &order)
Definition lagrangecoefficients.hh:29
│ │ │ │ +
std::size_t Key
Definition lagrangecoefficients.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,278 +1,80 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ -dualq1.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +lagrangecoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_DUAL_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ 10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ 16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -19#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -20#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -21#include "_d_u_a_l_q_1_/_d_u_a_l_q_1_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e │ │ │ │ │ -24{ │ │ │ │ │ -40 template │ │ │ │ │ -_4_1 class _D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -42 { │ │ │ │ │ -43 public: │ │ │ │ │ -46 typedef │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>,_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_>, │ │ │ │ │ -_4_7 _D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> > > _T_r_a_i_t_s; │ │ │ │ │ -48 │ │ │ │ │ -_5_1 _D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -52 { │ │ │ │ │ -53 if (faceDual) │ │ │ │ │ -54 setupFaceDualCoefficients(); │ │ │ │ │ -55 else │ │ │ │ │ -56 setupDualCoefficients(); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -62 { │ │ │ │ │ -63 return basis; │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -69 { │ │ │ │ │ -70 return coefficients; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -_7_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -76 { │ │ │ │ │ -77 return interpolation; │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -_8_1 unsigned int _s_i_z_e () const │ │ │ │ │ -82 { │ │ │ │ │ -83 return basis.size(); │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -_8_8 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -89 { │ │ │ │ │ -90 return GeometryTypes::cube(dim); │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -93 private: │ │ │ │ │ -95 void setupFaceDualCoefficients(); │ │ │ │ │ -96 │ │ │ │ │ -98 void setupDualCoefficients(); │ │ │ │ │ -99 │ │ │ │ │ -100 _D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis; │ │ │ │ │ -101 _D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_> coefficients; │ │ │ │ │ -102 _D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> > interpolation; │ │ │ │ │ -103 }; │ │ │ │ │ -104 │ │ │ │ │ -105 template │ │ │ │ │ -106 void DualQ1LocalFiniteElement::setupDualCoefficients() │ │ │ │ │ -107 { │ │ │ │ │ -108 │ │ │ │ │ -109 const int size = 1 <, size> coeffs; │ │ │ │ │ -111 │ │ │ │ │ -112 // dual basis functions are linear combinations of Lagrange elements │ │ │ │ │ -113 // compute these coefficients here because the basis and the local │ │ │ │ │ -interpolation needs them │ │ │ │ │ -114 const auto& quad = Dune::QuadratureRules::rule(type(), 2*dim); │ │ │ │ │ -115 │ │ │ │ │ -116 // assemble mass matrix on the reference element │ │ │ │ │ -117 Dune::FieldMatrix massMat; │ │ │ │ │ -118 massMat = 0; │ │ │ │ │ -119 │ │ │ │ │ -120 // and the integrals of the lagrange shape functions │ │ │ │ │ -121 std::vector > integral(size); │ │ │ │ │ -122 for (int i=0; i q1Basis; │ │ │ │ │ -126 for(size_t pt=0; pt& pos = quad[pt].position(); │ │ │ │ │ -129 std::vector > q1Values(size); │ │ │ │ │ -130 q1Basis.evaluateFunction(pos,q1Values); │ │ │ │ │ -131 │ │ │ │ │ -132 D weight = quad[pt].weight(); │ │ │ │ │ -133 │ │ │ │ │ -134 for (int k=0; k rhs(0); │ │ │ │ │ -152 rhs[i] = integral[i]; │ │ │ │ │ -153 │ │ │ │ │ -154 coeffs[i] = 0; │ │ │ │ │ -155 massMat.solve(coeffs[i] ,rhs); │ │ │ │ │ -156 │ │ │ │ │ -157 } │ │ │ │ │ -158 │ │ │ │ │ -159 basis.setCoefficients(coeffs); │ │ │ │ │ -160 interpolation.setCoefficients(coeffs); │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -163 template │ │ │ │ │ -164 void DualQ1LocalFiniteElement::setupFaceDualCoefficients │ │ │ │ │ -() │ │ │ │ │ -165 { │ │ │ │ │ -166 │ │ │ │ │ -167 const int size = 1 <, size> coeffs; │ │ │ │ │ -169 │ │ │ │ │ -170 // dual basis functions are linear combinations of Lagrange elements │ │ │ │ │ -171 Dune::Impl::LagrangeCubeLocalBasis q1Basis; │ │ │ │ │ -172 │ │ │ │ │ -173 const auto& refElement = Dune::ReferenceElements::general(type()); │ │ │ │ │ -174 │ │ │ │ │ -175 // loop over faces │ │ │ │ │ -176 for (int i=0; i::rule(refElement.type │ │ │ │ │ -(i,1),2*dim); │ │ │ │ │ -179 │ │ │ │ │ -180 // for each face assemble the mass matrix over the face of all │ │ │ │ │ -181 // non-vanishing basis functions, │ │ │ │ │ -182 // for cubes refElement.size(i,1,dim)=size/2 │ │ │ │ │ -183 Dune::FieldMatrix massMat; │ │ │ │ │ -184 massMat = 0; │ │ │ │ │ -185 │ │ │ │ │ -186 // get geometry │ │ │ │ │ -187 const auto& geometry = refElement.template geometry<1>(i); │ │ │ │ │ -188 │ │ │ │ │ -189 // and the integrals of the lagrange shape functions │ │ │ │ │ -190 std::vector > integral(size/2); │ │ │ │ │ -191 for (int k=0; k > q1Values(size); │ │ │ │ │ -200 q1Basis.evaluateFunction(elementPos,q1Values); │ │ │ │ │ -201 │ │ │ │ │ -202 D weight = quad[pt].weight(); │ │ │ │ │ -203 │ │ │ │ │ -204 for (int k=0; k rhs(0); │ │ │ │ │ -222 rhs[l] = integral[l]; │ │ │ │ │ -223 │ │ │ │ │ -224 Dune::FieldVector x(0); │ │ │ │ │ -225 massMat.solve(x ,rhs); │ │ │ │ │ -226 │ │ │ │ │ -227 for (int k=0; k class LP, │ │ │ │ │ +21 unsigned int dim, class F> │ │ │ │ │ +_2_2 struct _L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +23 { │ │ │ │ │ +_2_4 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_2_5 const typedef LP _O_b_j_e_c_t; │ │ │ │ │ +_2_6 typedef std::size_t _K_e_y; │ │ │ │ │ +27 │ │ │ │ │ +28 template< GeometryType::Id geometryId > │ │ │ │ │ +_2_9 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ +30 { │ │ │ │ │ +31 if (order == 0 || !Object::template supports(order)) │ │ │ │ │ +32 return 0; │ │ │ │ │ +33 typedef typename std::remove_const::type LagrangeCoefficients; │ │ │ │ │ +34 LagrangeCoefficients *object = new LagrangeCoefficients(order); │ │ │ │ │ +35 if ( !object->template build() ) │ │ │ │ │ +36 { │ │ │ │ │ +37 delete object; │ │ │ │ │ +38 object = nullptr; │ │ │ │ │ +39 } │ │ │ │ │ +40 return object; │ │ │ │ │ +41 } │ │ │ │ │ +_4_2 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +43 }; │ │ │ │ │ +44 │ │ │ │ │ +45} │ │ │ │ │ +46 │ │ │ │ │ +47#endif // DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local dual Q1 finite element on cubes. │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< DualQ1LocalBasis< D, R, dim >, │ │ │ │ │ -DualQ1LocalCoefficients< dim >, DualQ1LocalInterpolation< dim, │ │ │ │ │ -DualQ1LocalBasis< D, R, dim > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -DualQ1LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for dual Q1 elements. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localcoefficients.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn dualq1localinterpolation.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const typedef LP< F, dim > Object │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +std::size_t Key │ │ │ │ │ +DDeeffiinniittiioonn lagrangecoefficients.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualpq1factory.hh File Reference │ │ │ │ +dune-localfunctions: qk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
dualpq1factory.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
qk.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <map>
│ │ │ │ -#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualwrappers.hh>
│ │ │ │ -#include <dune/localfunctions/dualmortarbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::DualPQ1LocalFiniteElementCache< D, R, dim, faceDual >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , int d, int k>
using Dune::QkLocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, d, k >
 General Lagrange finite element for cubes with arbitrary dimension and polynomial order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualpq1factory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +qk.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_<_ _D_,_ _R_,_ _d_i_m_,_ _f_a_c_e_D_u_a_l_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, k │ │ │ │ │ + > │ │ │ │ │ +  General Lagrange finite element for cubes with arbitrary dimension and │ │ │ │ │ + polynomial order. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00068_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualpq1factory.hh Source File │ │ │ │ +dune-localfunctions: qk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualpq1factory.hh
│ │ │ │ +
qk.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <map>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#warning This header is deprecated
│ │ │ │
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune {
│ │ │ │ -
16
│ │ │ │ -
17template<class D, class R, int dim, bool faceDual=false>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19{
│ │ │ │ -
20protected:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
25 typedef std::map<Dune::GeometryType,FE*> FEMap;
│ │ │ │ -
26
│ │ │ │ -
27public:
│ │ │ │ - │ │ │ │ -
30
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
32 {
│ │ │ │ -
33 typename FEMap::iterator it = cache_.begin();
│ │ │ │ -
34 typename FEMap::iterator end = cache_.end();
│ │ │ │ -
35 for(; it!=end; ++it)
│ │ │ │ -
36 delete it->second;
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
40 static FE* create(const Dune::GeometryType& gt)
│ │ │ │ -
41 {
│ │ │ │ -
42 if (gt.isSimplex())
│ │ │ │ - │ │ │ │ -
44 if (gt.isCube())
│ │ │ │ - │ │ │ │ -
46 return 0;
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
│ │ │ │ -
50 const FiniteElementType& get(const Dune::GeometryType& gt) const
│ │ │ │ -
51 {
│ │ │ │ -
52 typename FEMap::const_iterator it = cache_.find(gt);
│ │ │ │ -
53 if (it==cache_.end())
│ │ │ │ -
54 {
│ │ │ │ -
55 FiniteElementType* fe = create(gt);
│ │ │ │ -
56
│ │ │ │ -
57 if (fe==0)
│ │ │ │ -
58 DUNE_THROW(Dune::NotImplemented,"No Dual P/Q1 like local finite element available for geometry type " << gt);
│ │ │ │ -
59
│ │ │ │ -
60 cache_[gt] = fe;
│ │ │ │ -
61 return *fe;
│ │ │ │ -
62 }
│ │ │ │ -
63 return *(it->second);
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
66protected:
│ │ │ │ -
67 mutable FEMap cache_;
│ │ │ │ -
68};
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
70} // namespace Dune
│ │ │ │ -
71
│ │ │ │ -
72#endif // DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
25 template<class D, class R, int d, int k>
│ │ │ │ + │ │ │ │ +
27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
29
│ │ │ │ +
30}
│ │ │ │ +
31
│ │ │ │ +
32#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
virtual base class for local finite elements with functions
Definition virtualinterface.hh:286
│ │ │ │ -
class for wrapping a finite element using the virtual interface
Definition virtualwrappers.hh:240
│ │ │ │ -
The local dual p1 finite element on simplices.
Definition dualp1.hh:35
│ │ │ │ -
Definition dualpq1factory.hh:19
│ │ │ │ -
Dune::DualP1LocalFiniteElement< D, R, dim, faceDual > DualP1
Definition dualpq1factory.hh:21
│ │ │ │ -
~DualPQ1LocalFiniteElementCache()
Definition dualpq1factory.hh:31
│ │ │ │ -
FEMap cache_
Definition dualpq1factory.hh:67
│ │ │ │ -
DualP1::Traits::LocalBasisType::Traits T
Definition dualpq1factory.hh:23
│ │ │ │ -
static FE * create(const Dune::GeometryType &gt)
create finite element for given GeometryType
Definition dualpq1factory.hh:40
│ │ │ │ -
FE FiniteElementType
Type of the finite elements stored in this cache.
Definition dualpq1factory.hh:29
│ │ │ │ -
const FiniteElementType & get(const Dune::GeometryType &gt) const
Get local finite element for given GeometryType.
Definition dualpq1factory.hh:50
│ │ │ │ -
Dune::LocalFiniteElementVirtualInterface< T > FE
Definition dualpq1factory.hh:24
│ │ │ │ -
std::map< Dune::GeometryType, FE * > FEMap
Definition dualpq1factory.hh:25
│ │ │ │ -
Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual > DualQ1
Definition dualpq1factory.hh:22
│ │ │ │ -
The local dual Q1 finite element on cubes.
Definition dualq1.hh:42
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,137 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ -dualpq1factory.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +qk.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ +7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11#warning This header is deprecated │ │ │ │ │ 12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e { │ │ │ │ │ -16 │ │ │ │ │ -17template │ │ │ │ │ -_1_8class _D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -19{ │ │ │ │ │ -20protected: │ │ │ │ │ -_2_1 typedef _D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_> _D_u_a_l_P_1; │ │ │ │ │ -_2_2 typedef _D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_> _D_u_a_l_Q_1; │ │ │ │ │ -_2_3 typedef typename _D_u_a_l_P_1_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_:_T_r_a_i_t_s _T; │ │ │ │ │ -_2_4 typedef _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_> _F_E; │ │ │ │ │ -_2_5 typedef std::map _F_E_M_a_p; │ │ │ │ │ -26 │ │ │ │ │ -27public: │ │ │ │ │ -_2_9 typedef _F_E _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ -30 │ │ │ │ │ -_3_1 _~_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e() │ │ │ │ │ -32 { │ │ │ │ │ -33 typename FEMap::iterator it = _c_a_c_h_e__.begin(); │ │ │ │ │ -34 typename FEMap::iterator end = _c_a_c_h_e__.end(); │ │ │ │ │ -35 for(; it!=end; ++it) │ │ │ │ │ -36 delete it->second; │ │ │ │ │ -37 } │ │ │ │ │ -38 │ │ │ │ │ -_4_0 static _F_E* _c_r_e_a_t_e(const Dune::GeometryType& gt) │ │ │ │ │ -41 { │ │ │ │ │ -42 if (gt.isSimplex()) │ │ │ │ │ -43 return new _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_D_u_a_l_P_1_>(_D_u_a_l_P_1()); │ │ │ │ │ -44 if (gt.isCube()) │ │ │ │ │ -45 return new _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_D_u_a_l_Q_1_>(_D_u_a_l_Q_1()); │ │ │ │ │ -46 return 0; │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -_5_0 const _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e& _g_e_t(const Dune::GeometryType& gt) const │ │ │ │ │ -51 { │ │ │ │ │ -52 typename FEMap::const_iterator it = _c_a_c_h_e__.find(gt); │ │ │ │ │ -53 if (it==_c_a_c_h_e__.end()) │ │ │ │ │ -54 { │ │ │ │ │ -55 _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e* fe = _c_r_e_a_t_e(gt); │ │ │ │ │ -56 │ │ │ │ │ -57 if (fe==0) │ │ │ │ │ -58 DUNE_THROW(Dune::NotImplemented,"No Dual P/Q1 like local finite element │ │ │ │ │ -available for geometry type " << gt); │ │ │ │ │ -59 │ │ │ │ │ -60 _c_a_c_h_e__[gt] = fe; │ │ │ │ │ -61 return *fe; │ │ │ │ │ -62 } │ │ │ │ │ -63 return *(it->second); │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -66protected: │ │ │ │ │ -_6_7 mutable _F_E_M_a_p _c_a_c_h_e__; │ │ │ │ │ -68}; │ │ │ │ │ -69 │ │ │ │ │ -70} // namespace Dune │ │ │ │ │ -71 │ │ │ │ │ -72#endif // DUNE_LOCALFUNCTIONS_DUAL_P1_Q1_FACTORY_HH │ │ │ │ │ -_d_u_a_l_m_o_r_t_a_r_b_a_s_i_s_._h_h │ │ │ │ │ -_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ │ -_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 using _Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ +28 = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_,_k_>; │ │ │ │ │ +29 │ │ │ │ │ +30} │ │ │ │ │ +31 │ │ │ │ │ +32#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -DDeeffiinniittiioonn virtualinterface.hh:286 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p │ │ │ │ │ -class for wrapping a finite element using the virtual interface │ │ │ │ │ -DDeeffiinniittiioonn virtualwrappers.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local dual p1 finite element on simplices. │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_D_u_a_l_P_1 │ │ │ │ │ -Dune::DualP1LocalFiniteElement< D, R, dim, faceDual > DualP1 │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_~_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -~DualPQ1LocalFiniteElementCache() │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_c_a_c_h_e__ │ │ │ │ │ -FEMap cache_ │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_T │ │ │ │ │ -DualP1::Traits::LocalBasisType::Traits T │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_c_r_e_a_t_e │ │ │ │ │ -static FE * create(const Dune::GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -FE FiniteElementType │ │ │ │ │ -Type of the finite elements stored in this cache. │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_g_e_t │ │ │ │ │ -const FiniteElementType & get(const Dune::GeometryType >) const │ │ │ │ │ -Get local finite element for given GeometryType. │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E │ │ │ │ │ -Dune::LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E_M_a_p │ │ │ │ │ -std::map< Dune::GeometryType, FE * > FEMap │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_D_u_a_l_Q_1 │ │ │ │ │ -Dune::DualQ1LocalFiniteElement< D, R, dim, faceDual > DualQ1 │ │ │ │ │ -DDeeffiinniittiioonn dualpq1factory.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local dual Q1 finite element on cubes. │ │ │ │ │ -DDeeffiinniittiioonn dualq1.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1.hh File Reference │ │ │ │ +dune-localfunctions: equidistantpoints.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,57 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
dualp1.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
equidistantpoints.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "dualp1/dualp1localbasis.hh"
│ │ │ │ -#include "dualp1/dualp1localcoefficients.hh"
│ │ │ │ -#include "dualp1/dualp1localinterpolation.hh"
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <algorithm>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/emptypoints.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualP1LocalFiniteElement< D, R, dim, faceDual >
 The local dual p1 finite element on simplices. More...
class  Dune::EquidistantPointSet< F, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

std::size_t Dune::numLagrangePoints (const GeometryType &gt, std::size_t order)
 
std::size_t Dune::numLagrangePoints (unsigned int topologyId, unsigned int dim, std::size_t order)
 
template<class ct , unsigned int cdim>
static unsigned int Dune::equidistantLagrangePoints (const GeometryType &gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
 
template<class ct , unsigned int cdim>
static unsigned int Dune::equidistantLagrangePoints (unsigned int topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,42 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualp1.hh File Reference │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +equidistantpoints.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_e_m_p_t_y_p_o_i_n_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _f_a_c_e_D_u_a_l_ _> │ │ │ │ │ -  The local dual p1 finite element on simplices. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ + std::size_t  _D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s (const GeometryType >, std:: │ │ │ │ │ + size_t order) │ │ │ │ │ +  │ │ │ │ │ + std::size_t  _D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s (unsigned int topologyId, unsigned │ │ │ │ │ + int dim, std::size_t order) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +static unsigned int  _D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s (const GeometryType >, │ │ │ │ │ + unsigned int codim, std::size_t order, unsigned int │ │ │ │ │ + *count, _L_a_g_r_a_n_g_e_P_o_i_n_t< ct, cdim > *points) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +static unsigned int  _D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s (unsigned int topologyId, │ │ │ │ │ + unsigned int dim, unsigned int codim, std::size_t order, │ │ │ │ │ + unsigned int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t< ct, cdim > *points) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00071_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1.hh Source File │ │ │ │ +dune-localfunctions: equidistantpoints.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,276 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1.hh
│ │ │ │ +
equidistantpoints.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ -
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ -
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH
│ │ │ │ +Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ +
3#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ +
4#define DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ +
5
│ │ │ │ +
6#include <cstddef>
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
33 template<class D, class R, int dim, bool faceDual=false>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {
│ │ │ │ -
36 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
41
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
45 {}
│ │ │ │ -
│ │ │ │ -
46
│ │ │ │ -
│ │ │ │ -
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
50 {
│ │ │ │ -
51 return basis;
│ │ │ │ -
52 }
│ │ │ │ +
8#include <algorithm>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
12#include <dune/geometry/type.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
20 // numLagrangePoints
│ │ │ │ +
21 // -----------------
│ │ │ │ +
22
│ │ │ │ +
│ │ │ │ +
23 inline std::size_t numLagrangePoints ( const GeometryType& gt, std::size_t order )
│ │ │ │ +
24 {
│ │ │ │ +
25 const int dim = gt.dim();
│ │ │ │ +
26 if( dim > 0 )
│ │ │ │ +
27 {
│ │ │ │ +
28 const GeometryType baseGeometryType = Impl::getBase( gt );
│ │ │ │ +
29 if( gt.isConical() )
│ │ │ │ +
30 {
│ │ │ │ +
31 std::size_t size = 0;
│ │ │ │ +
32 for( unsigned int o = 0; o <= order; ++o )
│ │ │ │ +
33 size += numLagrangePoints( baseGeometryType, o );
│ │ │ │ +
34 return size;
│ │ │ │ +
35 }
│ │ │ │ +
36 else
│ │ │ │ +
37 return numLagrangePoints( baseGeometryType, order ) * (order+1);
│ │ │ │ +
38 }
│ │ │ │ +
39 else
│ │ │ │ +
40 return 1;
│ │ │ │ +
41 }
│ │ │ │
│ │ │ │ +
42
│ │ │ │ +
43 [[deprecated("Use numLagrangePoints(const GeometryType& gt, std::size_t order ) instead.")]]
│ │ │ │ +
│ │ │ │ +
44 inline std::size_t numLagrangePoints ( unsigned int topologyId, unsigned int dim, std::size_t order )
│ │ │ │ +
45 {
│ │ │ │ +
46 return numLagrangePoints ( GeometryType(topologyId, dim), order);
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │ +
50
│ │ │ │ +
51 // equidistantLagrangePoints
│ │ │ │ +
52 // -------------------------
│ │ │ │
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 return coefficients;
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
64 {
│ │ │ │ -
65 return interpolation;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
69 unsigned int size () const
│ │ │ │ -
70 {
│ │ │ │ -
71 return basis.size();
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
76 static constexpr GeometryType type ()
│ │ │ │ -
77 {
│ │ │ │ -
78 return GeometryTypes::simplex(dim);
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
80
│ │ │ │ -
81 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
85 };
│ │ │ │ -
│ │ │ │ -
86
│ │ │ │ -
87
│ │ │ │ -
88
│ │ │ │ -
89}
│ │ │ │ -
90
│ │ │ │ -
91#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
54 template< class ct, unsigned int cdim >
│ │ │ │ +
│ │ │ │ +
55 inline static unsigned int equidistantLagrangePoints ( const GeometryType& gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points )
│ │ │ │ +
56 {
│ │ │ │ +
57 const unsigned int dim = gt.dim();
│ │ │ │ +
58 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) );
│ │ │ │ +
59
│ │ │ │ +
60 if( dim > 0 )
│ │ │ │ +
61 {
│ │ │ │ +
62 const GeometryType baseGeometryType = Impl::getBase( gt );
│ │ │ │ +
63 const unsigned int numBaseN = (codim < dim ? Geo::Impl::size( baseGeometryType.id(), baseGeometryType.dim(), codim ) : 0);
│ │ │ │ +
64 const unsigned int numBaseM = (codim > 0 ? Geo::Impl::size( baseGeometryType.id(), baseGeometryType.dim(), codim-1 ) : 0);
│ │ │ │ +
65
│ │ │ │ +
66 if( gt.isPrismatic() )
│ │ │ │ +
67 {
│ │ │ │ +
68 unsigned int size = 0;
│ │ │ │ +
69 if( codim < dim )
│ │ │ │ +
70 {
│ │ │ │ +
71 for( unsigned int i = 1; i < order; ++i )
│ │ │ │ +
72 {
│ │ │ │ +
73 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim, order, count, points );
│ │ │ │ +
74 for( unsigned int j = 0; j < n; ++j )
│ │ │ │ +
75 {
│ │ │ │ +
76 LocalKey &key = points->localKey_;
│ │ │ │ +
77 key = LocalKey( key.subEntity(), codim, key.index() );
│ │ │ │ +
78 points->point_[ dim-1 ] = ct( i ) / ct( order );
│ │ │ │ +
79 ++points;
│ │ │ │ +
80 }
│ │ │ │ +
81 size += n;
│ │ │ │ +
82 }
│ │ │ │ +
83 }
│ │ │ │ +
84
│ │ │ │ +
85 if( codim > 0 )
│ │ │ │ +
86 {
│ │ │ │ +
87 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim-1, order, count+numBaseN, points );
│ │ │ │ +
88 for( unsigned int j = 0; j < n; ++j )
│ │ │ │ +
89 {
│ │ │ │ +
90 LocalKey &key = points[ j ].localKey_;
│ │ │ │ +
91 key = LocalKey( key.subEntity() + numBaseN, codim, key.index() );
│ │ │ │ +
92
│ │ │ │ +
93 points[ j + n ].point_ = points[ j ].point_;
│ │ │ │ +
94 points[ j + n ].point_[ dim-1 ] = ct( 1 );
│ │ │ │ +
95 points[ j + n ].localKey_ = LocalKey( key.subEntity() + numBaseM, codim, key.index() );
│ │ │ │ +
96 ++count[ key.subEntity() + numBaseM ];
│ │ │ │ +
97 }
│ │ │ │ +
98 size += 2*n;
│ │ │ │ +
99 }
│ │ │ │ +
100
│ │ │ │ +
101 return size;
│ │ │ │ +
102 }
│ │ │ │ +
103 else
│ │ │ │ +
104 {
│ │ │ │ +
105 unsigned int size = (codim > 0 ? equidistantLagrangePoints( baseGeometryType, codim-1, order, count, points ) : 0);
│ │ │ │ +
106 LagrangePoint< ct, cdim > *const end = points + size;
│ │ │ │ +
107 for( ; points != end; ++points )
│ │ │ │ +
108 points->localKey_ = LocalKey( points->localKey_.subEntity(), codim, points->localKey_.index() );
│ │ │ │ +
109
│ │ │ │ +
110 if( codim < dim )
│ │ │ │ +
111 {
│ │ │ │ +
112 for( unsigned int i = order-1; i > 0; --i )
│ │ │ │ +
113 {
│ │ │ │ +
114 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim, i, count+numBaseM, points );
│ │ │ │ +
115 LagrangePoint< ct, cdim > *const end = points + n;
│ │ │ │ +
116 for( ; points != end; ++points )
│ │ │ │ +
117 {
│ │ │ │ +
118 points->localKey_ = LocalKey( points->localKey_.subEntity()+numBaseM, codim, points->localKey_.index() );
│ │ │ │ +
119 for( unsigned int j = 0; j < dim-1; ++j )
│ │ │ │ +
120 points->point_[ j ] *= ct( i ) / ct( order );
│ │ │ │ +
121 points->point_[ dim-1 ] = ct( order - i ) / ct( order );
│ │ │ │ +
122 }
│ │ │ │ +
123 size += n;
│ │ │ │ +
124 }
│ │ │ │ +
125 }
│ │ │ │ +
126 else
│ │ │ │ +
127 {
│ │ │ │ +
128 points->localKey_ = LocalKey( numBaseM, dim, count[ numBaseM ]++ );
│ │ │ │ +
129 points->point_ = 0;
│ │ │ │ +
130 points->point_[ dim-1 ] = ct( 1 );
│ │ │ │ +
131 ++size;
│ │ │ │ +
132 }
│ │ │ │ +
133
│ │ │ │ +
134 return size;
│ │ │ │ +
135 }
│ │ │ │ +
136 }
│ │ │ │ +
137 else
│ │ │ │ +
138 {
│ │ │ │ +
139 points->localKey_ = LocalKey( 0, 0, count[ 0 ]++ );
│ │ │ │ +
140 points->point_ = 0;
│ │ │ │ +
141 return 1;
│ │ │ │ +
142 }
│ │ │ │ +
143 }
│ │ │ │ +
│ │ │ │ +
144
│ │ │ │ +
145 template< class ct, unsigned int cdim >
│ │ │ │ +
146 [[deprecated("Use equidistantLagrangePoints ( GeometryType gt, ... ) instead.")]]
│ │ │ │ +
│ │ │ │ +
147 inline static unsigned int equidistantLagrangePoints ( unsigned int topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points )
│ │ │ │ +
148 {
│ │ │ │ +
149 return equidistantLagrangePoints ( GeometryType(topologyId, dim), codim, order, *count, *points );
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
152
│ │ │ │ +
153
│ │ │ │ +
154 // EquidistantPointSet
│ │ │ │ +
155 // -------------------
│ │ │ │ +
156
│ │ │ │ +
157 template< class F, unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
159 : public EmptyPointSet< F, dim >
│ │ │ │ +
160 {
│ │ │ │ + │ │ │ │ +
162
│ │ │ │ +
163 public:
│ │ │ │ +
164 static const unsigned int dimension = dim;
│ │ │ │ +
165
│ │ │ │ +
166 using Base::order;
│ │ │ │ +
167
│ │ │ │ +
168 EquidistantPointSet ( std::size_t order ) : Base( order ) {}
│ │ │ │ +
169
│ │ │ │ +
│ │ │ │ +
170 void build ( GeometryType gt )
│ │ │ │ +
171 {
│ │ │ │ +
172 assert( gt.dim() == dimension );
│ │ │ │ +
173 points_.resize( numLagrangePoints( gt, order() ) );
│ │ │ │ +
174
│ │ │ │ +
175 typename Base::LagrangePoint *p = points_.data();
│ │ │ │ +
176 std::vector< unsigned int > count;
│ │ │ │ +
177 for( unsigned int mydim = 0; mydim <= dimension; ++mydim )
│ │ │ │ +
178 {
│ │ │ │ +
179 count.resize( Geo::Impl::size( gt.id(), dimension, dimension-mydim ) );
│ │ │ │ +
180 std::fill( count.begin(), count.end(), 0u );
│ │ │ │ +
181 p += equidistantLagrangePoints( gt, dimension-mydim, order(), count.data(), p );
│ │ │ │ +
182 }
│ │ │ │ +
183 const auto &refElement = referenceElement<F,dimension>(gt);
│ │ │ │ +
184 F weight = refElement.volume()/F(double(points_.size()));
│ │ │ │ +
185 for (auto &p : points_)
│ │ │ │ +
186 p.weight_ = weight;
│ │ │ │ +
187 }
│ │ │ │ +
│ │ │ │ +
188
│ │ │ │ +
189 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
190 bool build ()
│ │ │ │ +
191 {
│ │ │ │ +
192 build( GeometryType( geometryId ) );
│ │ │ │ +
193 return true;
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
│ │ │ │ +
196 bool buildCube ()
│ │ │ │ +
197 {
│ │ │ │ +
198 return build< GeometryTypes::cube(dim) > ();
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
201 static bool supports ( GeometryType, std::size_t /*order*/ ) { return true; }
│ │ │ │ +
202 template< GeometryType::Id geometryId>
│ │ │ │ +
│ │ │ │ +
203 static bool supports ( std::size_t order ) {
│ │ │ │ +
204 return supports( GeometryType( geometryId ), order );
│ │ │ │ +
205 }
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207 private:
│ │ │ │ +
208 using Base::points_;
│ │ │ │ +
209 };
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
211} // namespace Dune
│ │ │ │ +
212
│ │ │ │ +
213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
The local dual p1 finite element on simplices.
Definition dualp1.hh:35
│ │ │ │ -
DualP1LocalFiniteElement()
Definition dualp1.hh:44
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition dualp1.hh:69
│ │ │ │ -
LocalFiniteElementTraits< DualP1LocalBasis< D, R, dim, faceDual >, DualP1LocalCoefficients< dim >, DualP1LocalInterpolation< dim, DualP1LocalBasis< D, R, dim, faceDual > > > Traits
Definition dualp1.hh:40
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition dualp1.hh:63
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition dualp1.hh:49
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition dualp1.hh:56
│ │ │ │ -
static constexpr GeometryType type()
Definition dualp1.hh:76
│ │ │ │ -
Dual Lagrange shape functions on the simplex.
Definition dualp1localbasis.hh:34
│ │ │ │ -
Local coefficients for dual simplex P1 elements.
Definition dualp1localcoefficients.hh:23
│ │ │ │ -
Definition dualp1localinterpolation.hh:15
│ │ │ │ +
std::size_t numLagrangePoints(const GeometryType &gt, std::size_t order)
Definition equidistantpoints.hh:23
│ │ │ │ +
static unsigned int equidistantLagrangePoints(const GeometryType &gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
Definition equidistantpoints.hh:55
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
unsigned int index() const
Return offset within subentity.
Definition localkey.hh:68
│ │ │ │ +
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ +
Definition emptypoints.hh:18
│ │ │ │ +
Field weight_
Definition emptypoints.hh:48
│ │ │ │ +
Vector point_
Definition emptypoints.hh:46
│ │ │ │ +
LocalKey localKey_
Definition emptypoints.hh:47
│ │ │ │ +
Definition emptypoints.hh:56
│ │ │ │ +
std::size_t order() const
Definition emptypoints.hh:95
│ │ │ │ +
std::vector< LagrangePoint > points_
Definition emptypoints.hh:107
│ │ │ │ +
Definition equidistantpoints.hh:160
│ │ │ │ +
std::size_t order() const
Definition emptypoints.hh:95
│ │ │ │ +
bool build()
Definition equidistantpoints.hh:190
│ │ │ │ +
static bool supports(std::size_t order)
Definition equidistantpoints.hh:203
│ │ │ │ +
static const unsigned int dimension
Definition equidistantpoints.hh:164
│ │ │ │ +
static bool supports(GeometryType, std::size_t)
Definition equidistantpoints.hh:201
│ │ │ │ +
void build(GeometryType gt)
Definition equidistantpoints.hh:170
│ │ │ │ +
bool buildCube()
Definition equidistantpoints.hh:196
│ │ │ │ +
EquidistantPointSet(std::size_t order)
Definition equidistantpoints.hh:168
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,130 +1,313 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ -dualp1.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +equidistantpoints.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ -2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ -4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_DUALMORTARBASIS_DUALP1_HH │ │ │ │ │ +2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ +3#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ +4#define DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ +5 │ │ │ │ │ +6#include │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -12#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -13#include "_d_u_a_l_p_1_/_d_u_a_l_p_1_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -33 template │ │ │ │ │ -_3_4 class _D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -35 { │ │ │ │ │ -36 public: │ │ │ │ │ -39 typedef │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_>,_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_>, │ │ │ │ │ -_4_0 _D_u_a_l_P_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_> > > _T_r_a_i_t_s; │ │ │ │ │ -41 │ │ │ │ │ -_4_4 _D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -45 {} │ │ │ │ │ -46 │ │ │ │ │ -_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -50 { │ │ │ │ │ -51 return basis; │ │ │ │ │ -52 } │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_e_m_p_t_y_p_o_i_n_t_s_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +20 // numLagrangePoints │ │ │ │ │ +21 // ----------------- │ │ │ │ │ +22 │ │ │ │ │ +_2_3 inline std::size_t _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( const GeometryType& gt, std::size_t │ │ │ │ │ +order ) │ │ │ │ │ +24 { │ │ │ │ │ +25 const int dim = gt.dim(); │ │ │ │ │ +26 if( dim > 0 ) │ │ │ │ │ +27 { │ │ │ │ │ +28 const GeometryType baseGeometryType = Impl::getBase( gt ); │ │ │ │ │ +29 if( gt.isConical() ) │ │ │ │ │ +30 { │ │ │ │ │ +31 std::size_t size = 0; │ │ │ │ │ +32 for( unsigned int o = 0; o <= order; ++o ) │ │ │ │ │ +33 size += _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, o ); │ │ │ │ │ +34 return size; │ │ │ │ │ +35 } │ │ │ │ │ +36 else │ │ │ │ │ +37 return _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, order ) * (order+1); │ │ │ │ │ +38 } │ │ │ │ │ +39 else │ │ │ │ │ +40 return 1; │ │ │ │ │ +41 } │ │ │ │ │ +42 │ │ │ │ │ +43 [[deprecated("Use numLagrangePoints(const GeometryType& gt, std::size_t │ │ │ │ │ +order ) instead.")]] │ │ │ │ │ +_4_4 inline std::size_t _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( unsigned int topologyId, unsigned int │ │ │ │ │ +dim, std::size_t order ) │ │ │ │ │ +45 { │ │ │ │ │ +46 return _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( GeometryType(topologyId, dim), order); │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +49 │ │ │ │ │ +50 │ │ │ │ │ +51 // equidistantLagrangePoints │ │ │ │ │ +52 // ------------------------- │ │ │ │ │ 53 │ │ │ │ │ -_5_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -57 { │ │ │ │ │ -58 return coefficients; │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -64 { │ │ │ │ │ -65 return interpolation; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ +54 template< class ct, unsigned int cdim > │ │ │ │ │ +_5_5 inline static unsigned int _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( const GeometryType& │ │ │ │ │ +gt, unsigned int codim, std::size_t order, unsigned int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t_< │ │ │ │ │ +_c_t_,_ _c_d_i_m_ _> *points ) │ │ │ │ │ +56 { │ │ │ │ │ +57 const unsigned int dim = gt.dim(); │ │ │ │ │ +58 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) ); │ │ │ │ │ +59 │ │ │ │ │ +60 if( dim > 0 ) │ │ │ │ │ +61 { │ │ │ │ │ +62 const GeometryType baseGeometryType = Impl::getBase( gt ); │ │ │ │ │ +63 const unsigned int numBaseN = (codim < dim ? Geo::Impl::size │ │ │ │ │ +( baseGeometryType.id(), baseGeometryType.dim(), codim ) : 0); │ │ │ │ │ +64 const unsigned int numBaseM = (codim > 0 ? Geo::Impl::size │ │ │ │ │ +( baseGeometryType.id(), baseGeometryType.dim(), codim-1 ) : 0); │ │ │ │ │ +65 │ │ │ │ │ +66 if( gt.isPrismatic() ) │ │ │ │ │ +67 { │ │ │ │ │ +68 unsigned int size = 0; │ │ │ │ │ +69 if( codim < dim ) │ │ │ │ │ 70 { │ │ │ │ │ -71 return basis.size(); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -77 { │ │ │ │ │ -78 return GeometryTypes::simplex(dim); │ │ │ │ │ -79 } │ │ │ │ │ -80 │ │ │ │ │ -81 private: │ │ │ │ │ -82 _D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_> basis; │ │ │ │ │ -83 _D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_> coefficients; │ │ │ │ │ -84 _D_u_a_l_P_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_f_a_c_e_D_u_a_l_> > │ │ │ │ │ -interpolation; │ │ │ │ │ -85 }; │ │ │ │ │ -86 │ │ │ │ │ -87 │ │ │ │ │ -88 │ │ │ │ │ -89} │ │ │ │ │ -90 │ │ │ │ │ -91#endif │ │ │ │ │ -_d_u_a_l_p_1_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_d_u_a_l_p_1_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_d_u_a_l_p_1_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +71 for( unsigned int i = 1; i < order; ++i ) │ │ │ │ │ +72 { │ │ │ │ │ +73 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim, │ │ │ │ │ +order, count, points ); │ │ │ │ │ +74 for( unsigned int j = 0; j < n; ++j ) │ │ │ │ │ +75 { │ │ │ │ │ +76 _L_o_c_a_l_K_e_y &key = points->_l_o_c_a_l_K_e_y__; │ │ │ │ │ +77 key = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y(), codim, key._i_n_d_e_x() ); │ │ │ │ │ +78 points->_p_o_i_n_t__[ dim-1 ] = ct( i ) / ct( order ); │ │ │ │ │ +79 ++points; │ │ │ │ │ +80 } │ │ │ │ │ +81 size += n; │ │ │ │ │ +82 } │ │ │ │ │ +83 } │ │ │ │ │ +84 │ │ │ │ │ +85 if( codim > 0 ) │ │ │ │ │ +86 { │ │ │ │ │ +87 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim-1, │ │ │ │ │ +order, count+numBaseN, points ); │ │ │ │ │ +88 for( unsigned int j = 0; j < n; ++j ) │ │ │ │ │ +89 { │ │ │ │ │ +90 _L_o_c_a_l_K_e_y &key = points[ j ]._l_o_c_a_l_K_e_y__; │ │ │ │ │ +91 key = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y() + numBaseN, codim, key._i_n_d_e_x() ); │ │ │ │ │ +92 │ │ │ │ │ +93 points[ j + n ]._p_o_i_n_t__ = points[ j ]._p_o_i_n_t__; │ │ │ │ │ +94 points[ j + n ]._p_o_i_n_t__[ dim-1 ] = ct( 1 ); │ │ │ │ │ +95 points[ j + n ]._l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y() + numBaseM, codim, │ │ │ │ │ +key._i_n_d_e_x() ); │ │ │ │ │ +96 ++count[ key._s_u_b_E_n_t_i_t_y() + numBaseM ]; │ │ │ │ │ +97 } │ │ │ │ │ +98 size += 2*n; │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +101 return size; │ │ │ │ │ +102 } │ │ │ │ │ +103 else │ │ │ │ │ +104 { │ │ │ │ │ +105 unsigned int size = (codim > 0 ? _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ +( baseGeometryType, codim-1, order, count, points ) : 0); │ │ │ │ │ +106 _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *const end = points + size; │ │ │ │ │ +107 for( ; points != end; ++points ) │ │ │ │ │ +108 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( points->_l_o_c_a_l_K_e_y__._s_u_b_E_n_t_i_t_y(), codim, points- │ │ │ │ │ +>_l_o_c_a_l_K_e_y__._i_n_d_e_x() ); │ │ │ │ │ +109 │ │ │ │ │ +110 if( codim < dim ) │ │ │ │ │ +111 { │ │ │ │ │ +112 for( unsigned int i = order-1; i > 0; --i ) │ │ │ │ │ +113 { │ │ │ │ │ +114 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim, │ │ │ │ │ +i, count+numBaseM, points ); │ │ │ │ │ +115 _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *const end = points + n; │ │ │ │ │ +116 for( ; points != end; ++points ) │ │ │ │ │ +117 { │ │ │ │ │ +118 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( points->_l_o_c_a_l_K_e_y__._s_u_b_E_n_t_i_t_y()+numBaseM, │ │ │ │ │ +codim, points->_l_o_c_a_l_K_e_y__._i_n_d_e_x() ); │ │ │ │ │ +119 for( unsigned int j = 0; j < dim-1; ++j ) │ │ │ │ │ +120 points->_p_o_i_n_t__[ j ] *= ct( i ) / ct( order ); │ │ │ │ │ +121 points->_p_o_i_n_t__[ dim-1 ] = ct( order - i ) / ct( order ); │ │ │ │ │ +122 } │ │ │ │ │ +123 size += n; │ │ │ │ │ +124 } │ │ │ │ │ +125 } │ │ │ │ │ +126 else │ │ │ │ │ +127 { │ │ │ │ │ +128 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( numBaseM, dim, count[ numBaseM ]++ ); │ │ │ │ │ +129 points->_p_o_i_n_t__ = 0; │ │ │ │ │ +130 points->_p_o_i_n_t__[ dim-1 ] = ct( 1 ); │ │ │ │ │ +131 ++size; │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +134 return size; │ │ │ │ │ +135 } │ │ │ │ │ +136 } │ │ │ │ │ +137 else │ │ │ │ │ +138 { │ │ │ │ │ +139 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( 0, 0, count[ 0 ]++ ); │ │ │ │ │ +140 points->_p_o_i_n_t__ = 0; │ │ │ │ │ +141 return 1; │ │ │ │ │ +142 } │ │ │ │ │ +143 } │ │ │ │ │ +144 │ │ │ │ │ +145 template< class ct, unsigned int cdim > │ │ │ │ │ +146 [[deprecated("Use equidistantLagrangePoints ( GeometryType gt, ... ) │ │ │ │ │ +instead.")]] │ │ │ │ │ +_1_4_7 inline static unsigned int _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( unsigned int │ │ │ │ │ +topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned │ │ │ │ │ +int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *points ) │ │ │ │ │ +148 { │ │ │ │ │ +149 return _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( GeometryType(topologyId, dim), codim, │ │ │ │ │ +order, *count, *points ); │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +152 │ │ │ │ │ +153 │ │ │ │ │ +154 // EquidistantPointSet │ │ │ │ │ +155 // ------------------- │ │ │ │ │ +156 │ │ │ │ │ +157 template< class F, unsigned int dim > │ │ │ │ │ +_1_5_8 class _E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ +159 : public _E_m_p_t_y_P_o_i_n_t_S_e_t< F, dim > │ │ │ │ │ +160 { │ │ │ │ │ +161 typedef _E_m_p_t_y_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> _B_a_s_e; │ │ │ │ │ +162 │ │ │ │ │ +163 public: │ │ │ │ │ +_1_6_4 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +165 │ │ │ │ │ +166 using _B_a_s_e_:_:_o_r_d_e_r; │ │ │ │ │ +167 │ │ │ │ │ +_1_6_8 _E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t ( std::size_t _o_r_d_e_r ) : _B_a_s_e( _o_r_d_e_r ) {} │ │ │ │ │ +169 │ │ │ │ │ +_1_7_0 void _b_u_i_l_d ( GeometryType gt ) │ │ │ │ │ +171 { │ │ │ │ │ +172 assert( gt.dim() == _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ +173 points_.resize( _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( gt, _o_r_d_e_r() ) ); │ │ │ │ │ +174 │ │ │ │ │ +175 typename _B_a_s_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t *p = points_.data(); │ │ │ │ │ +176 std::vector< unsigned int > count; │ │ │ │ │ +177 for( unsigned int mydim = 0; mydim <= _d_i_m_e_n_s_i_o_n; ++mydim ) │ │ │ │ │ +178 { │ │ │ │ │ +179 count.resize( Geo::Impl::size( gt.id(), _d_i_m_e_n_s_i_o_n, _d_i_m_e_n_s_i_o_n-mydim ) ); │ │ │ │ │ +180 std::fill( count.begin(), count.end(), 0u ); │ │ │ │ │ +181 p += _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( gt, _d_i_m_e_n_s_i_o_n-mydim, _o_r_d_e_r(), count.data(), │ │ │ │ │ +p ); │ │ │ │ │ +182 } │ │ │ │ │ +183 const auto &refElement = referenceElement(gt); │ │ │ │ │ +184 F weight = refElement.volume()/F(double(points_.size())); │ │ │ │ │ +185 for (auto &p : points_) │ │ │ │ │ +186 p._w_e_i_g_h_t__ = weight; │ │ │ │ │ +187 } │ │ │ │ │ +188 │ │ │ │ │ +189 template< GeometryType::Id geometryId > │ │ │ │ │ +_1_9_0 bool _b_u_i_l_d () │ │ │ │ │ +191 { │ │ │ │ │ +192 _b_u_i_l_d( GeometryType( geometryId ) ); │ │ │ │ │ +193 return true; │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +_1_9_6 bool _b_u_i_l_d_C_u_b_e () │ │ │ │ │ +197 { │ │ │ │ │ +198 return build< GeometryTypes::cube(dim) > (); │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +_2_0_1 static bool _s_u_p_p_o_r_t_s ( GeometryType, std::size_t /*order*/ ) { return true; │ │ │ │ │ +} │ │ │ │ │ +202 template< GeometryType::Id geometryId> │ │ │ │ │ +_2_0_3 static bool _s_u_p_p_o_r_t_s ( std::size_t _o_r_d_e_r ) { │ │ │ │ │ +204 return _s_u_p_p_o_r_t_s( GeometryType( geometryId ), _o_r_d_e_r ); │ │ │ │ │ +205 } │ │ │ │ │ +206 │ │ │ │ │ +207 private: │ │ │ │ │ +208 using _B_a_s_e_:_:_p_o_i_n_t_s__; │ │ │ │ │ +209 }; │ │ │ │ │ +210 │ │ │ │ │ +211} // namespace Dune │ │ │ │ │ +212 │ │ │ │ │ +213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ +_e_m_p_t_y_p_o_i_n_t_s_._h_h │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local dual p1 finite element on simplices. │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -DualP1LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< DualP1LocalBasis< D, R, dim, faceDual >, │ │ │ │ │ -DualP1LocalCoefficients< dim >, DualP1LocalInterpolation< dim, │ │ │ │ │ -DualP1LocalBasis< D, R, dim, faceDual > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn dualp1.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Dual Lagrange shape functions on the simplex. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Local coefficients for dual simplex P1 elements. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localcoefficients.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn dualp1localinterpolation.hh:15 │ │ │ │ │ +_D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ +std::size_t numLagrangePoints(const GeometryType >, std::size_t order) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ +static unsigned int equidistantLagrangePoints(const GeometryType >, unsigned │ │ │ │ │ +int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > │ │ │ │ │ +*points) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_i_n_d_e_x │ │ │ │ │ +unsigned int index() const │ │ │ │ │ +Return offset within subentity. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ +unsigned int subEntity() const │ │ │ │ │ +Return number of associated subentity. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_w_e_i_g_h_t__ │ │ │ │ │ +Field weight_ │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_p_o_i_n_t__ │ │ │ │ │ +Vector point_ │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_l_o_c_a_l_K_e_y__ │ │ │ │ │ +LocalKey localKey_ │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_p_o_i_n_t_s__ │ │ │ │ │ +std::vector< LagrangePoint > points_ │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +DDeeffiinniittiioonn emptypoints.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d │ │ │ │ │ +bool build() │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ +static bool supports(std::size_t order) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:164 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ +static bool supports(GeometryType, std::size_t) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:201 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d │ │ │ │ │ +void build(GeometryType gt) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d_C_u_b_e │ │ │ │ │ +bool buildCube() │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ +EquidistantPointSet(std::size_t order) │ │ │ │ │ +DDeeffiinniittiioonn equidistantpoints.hh:168 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: lagrangebasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,35 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1localcoefficients.hh File Reference
│ │ │ │ +
lagrangebasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ +#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/interpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualP1LocalCoefficients< dim >
 Local coefficients for dual simplex P1 elements. More...
struct  Dune::LagrangeBasisFactory< LP, dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualp1localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +lagrangebasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _d_i_m_ _> │ │ │ │ │ -  Local coefficients for dual simplex P1 elements. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _L_P_,_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00074_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: lagrangebasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,58 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localcoefficients.hh
│ │ │ │ +
lagrangebasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ +
6#define DUNE_LAGRANGEBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ + │ │ │ │
15
│ │ │ │ -
21 template <int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
29 li[i] = LocalKey(i,dim,0);
│ │ │ │ -
30 }
│ │ │ │ -
│ │ │ │ -
31
│ │ │ │ -
│ │ │ │ -
33 std::size_t size () const
│ │ │ │ -
34 {
│ │ │ │ -
35 return dim+1;
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
40 {
│ │ │ │ -
41 return li[i];
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
44 private:
│ │ │ │ -
45 std::vector<LocalKey> li;
│ │ │ │ -
46 };
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
48}
│ │ │ │ -
49
│ │ │ │ -
50#endif
│ │ │ │ - │ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
19 template< template <class,unsigned int> class LP,
│ │ │ │ +
20 unsigned int dim, class SF, class CF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 : public DefaultBasisFactory< MonomialBasisFactory<dim,CF>,
│ │ │ │ +
23 LagrangeInterpolationFactory<LP,dim,CF>,
│ │ │ │ +
24 dim,1,SF,CF >
│ │ │ │ +
25 {};
│ │ │ │ +
│ │ │ │ +
26
│ │ │ │ +
27}
│ │ │ │ +
28
│ │ │ │ +
29#endif // #ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Local coefficients for dual simplex P1 elements.
Definition dualp1localcoefficients.hh:23
│ │ │ │ -
DualP1LocalCoefficients()
Standard constructor.
Definition dualp1localcoefficients.hh:26
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition dualp1localcoefficients.hh:39
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition dualp1localcoefficients.hh:33
│ │ │ │ +
Definition lagrangebasis.hh:25
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,76 +1,50 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ -dualp1localcoefficients.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +lagrangebasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_DUAL_P1_LOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ +6#define DUNE_LAGRANGEBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ 15 │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 class _D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -23 { │ │ │ │ │ -24 public: │ │ │ │ │ -_2_6 _D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(_s_i_z_e()) │ │ │ │ │ -27 { │ │ │ │ │ -28 for (std::size_t i=0; i<_s_i_z_e(); i++) │ │ │ │ │ -29 li[i] = _L_o_c_a_l_K_e_y(i,dim,0); │ │ │ │ │ -30 } │ │ │ │ │ -31 │ │ │ │ │ -_3_3 std::size_t _s_i_z_e () const │ │ │ │ │ -34 { │ │ │ │ │ -35 return dim+1; │ │ │ │ │ -36 } │ │ │ │ │ -37 │ │ │ │ │ -_3_9 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ -40 { │ │ │ │ │ -41 return li[i]; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -44 private: │ │ │ │ │ -45 std::vector li; │ │ │ │ │ -46 }; │ │ │ │ │ -47 │ │ │ │ │ -48} │ │ │ │ │ -49 │ │ │ │ │ -50#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +18 │ │ │ │ │ +19 template< template class LP, │ │ │ │ │ +20 unsigned int dim, class SF, class CF > │ │ │ │ │ +_2_1 struct _L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +22 : public _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y< MonomialBasisFactory, │ │ │ │ │ +23 LagrangeInterpolationFactory, │ │ │ │ │ +24 dim,1,SF,CF > │ │ │ │ │ +25 {}; │ │ │ │ │ +26 │ │ │ │ │ +27} │ │ │ │ │ +28 │ │ │ │ │ +29#endif // #ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ +_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Local coefficients for dual simplex P1 elements. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localcoefficients.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -DualP1LocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localcoefficients.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn dualp1localcoefficients.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn dualp1localcoefficients.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn lagrangebasis.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ +_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: p2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
dualp1localbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
p2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::DualP1LocalBasis< D, R, dim, faceDualT >
 Dual Lagrange shape functions on the simplex. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , int d>
using Dune::P2LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, 2 >
 Second-order Lagrange finite element on the reference simplex with compile-time dimension.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualp1localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +p2.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_,_ _f_a_c_e_D_u_a_l_T_ _> │ │ │ │ │ -  Dual Lagrange shape functions on the simplex. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, │ │ │ │ │ + 2 > │ │ │ │ │ +  Second-order Lagrange finite element on the reference simplex with │ │ │ │ │ + compile-time dimension. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00077_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localbasis.hh Source File │ │ │ │ +dune-localfunctions: p2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,147 +70,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localbasis.hh
│ │ │ │ +
p2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_P1_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_DUAL_P1_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ + │ │ │ │
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
32 template<class D, class R, int dim, bool faceDualT=false>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 {
│ │ │ │ -
35 public:
│ │ │ │ -
37 static const bool faceDual = faceDualT;
│ │ │ │ -
39 typedef LocalBasisTraits<D,dim,Dune::FieldVector<D,dim>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
40 Dune::FieldMatrix<R,1,dim> > Traits;
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
43 unsigned int size () const
│ │ │ │ -
44 {
│ │ │ │ -
45 return dim+1;
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
49 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
50 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
51 {
│ │ │ │ -
52 // evaluate P1 basis functions
│ │ │ │ -
53 std::vector<typename Traits::RangeType> p1Values(size());
│ │ │ │ -
54
│ │ │ │ -
55 p1Values[0] = 1.0;
│ │ │ │ -
56
│ │ │ │ -
57 for (int i=0; i<dim; i++) {
│ │ │ │ -
58 p1Values[0] -= in[i];
│ │ │ │ -
59 p1Values[i+1] = in[i];
│ │ │ │ -
60 }
│ │ │ │ -
61
│ │ │ │ -
62 // compute dual basis function values as a linear combination of the Lagrange values
│ │ │ │ -
63 out.resize(size());
│ │ │ │ -
64
│ │ │ │ -
65 for (int i=0; i<=dim; i++) {
│ │ │ │ -
66 out[i] = (dim+!faceDual)*p1Values[i];
│ │ │ │ -
67 for (int j=0; j<i; j++)
│ │ │ │ -
68 out[i] -= p1Values[j];
│ │ │ │ -
69
│ │ │ │ -
70 for (int j=i+1; j<=dim; j++)
│ │ │ │ -
71 out[i] -= p1Values[j];
│ │ │ │ -
72 }
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
76 inline void
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
78 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
79 {
│ │ │ │ -
80 // evaluate P1 jacobians
│ │ │ │ -
81 std::vector<typename Traits::JacobianType> p1Jacs(size());
│ │ │ │ -
82
│ │ │ │ -
83 for (int i=0; i<dim; i++)
│ │ │ │ -
84 p1Jacs[0][0][i] = -1;
│ │ │ │ -
85
│ │ │ │ -
86 for (int i=0; i<dim; i++)
│ │ │ │ -
87 for (int j=0; j<dim; j++)
│ │ │ │ -
88 p1Jacs[i+1][0][j] = (i==j);
│ │ │ │ -
89
│ │ │ │ -
90 // compute dual basis jacobians as linear combination of the Lagrange jacobians
│ │ │ │ -
91 out.resize(size());
│ │ │ │ -
92
│ │ │ │ -
93 for (size_t i=0; i<=dim; i++) {
│ │ │ │ -
94 out[i][0] = 0;
│ │ │ │ -
95 out[i][0].axpy(dim+!faceDual,p1Jacs[i][0]);
│ │ │ │ -
96
│ │ │ │ -
97 for (size_t j=0; j<i; j++)
│ │ │ │ -
98 out[i][0] -= p1Jacs[j][0];
│ │ │ │ -
99
│ │ │ │ -
100 for (int j=i+1; j<=dim; j++)
│ │ │ │ -
101 out[i][0] -= p1Jacs[j][0];
│ │ │ │ -
102 }
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
│ │ │ │ -
106 void partial (const std::array<unsigned int, dim>& order,
│ │ │ │ -
107 const typename Traits::DomainType& in, // position
│ │ │ │ -
108 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
109 {
│ │ │ │ -
110 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
111 if (totalOrder == 0) {
│ │ │ │ -
112 evaluateFunction(in, out);
│ │ │ │ -
113 } else {
│ │ │ │ -
114 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
115 }
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ -
119 unsigned int order () const
│ │ │ │ -
120 {
│ │ │ │ -
121 return 1;
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
123 };
│ │ │ │ -
│ │ │ │ -
124}
│ │ │ │ -
125#endif
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
19 template<class D, class R, int d>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Dual Lagrange shape functions on the simplex.
Definition dualp1localbasis.hh:34
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition dualp1localbasis.hh:119
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition dualp1localbasis.hh:49
│ │ │ │ -
static const bool faceDual
Determines if the basis is only biorthogonal on adjacent faces.
Definition dualp1localbasis.hh:37
│ │ │ │ -
void partial(const std::array< unsigned int, dim > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition dualp1localbasis.hh:106
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition dualp1localbasis.hh:43
│ │ │ │ -
LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
export type traits for function signature
Definition dualp1localbasis.hh:40
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition dualp1localbasis.hh:77
│ │ │ │ - │ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,163 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ -dualp1localbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +p2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_P1_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_DUAL_P1_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -32 template │ │ │ │ │ -_3_3 class _D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -34 { │ │ │ │ │ -35 public: │ │ │ │ │ -_3_7 static const bool _f_a_c_e_D_u_a_l = faceDualT; │ │ │ │ │ -39 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_4_0 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -41 │ │ │ │ │ -_4_3 unsigned int _s_i_z_e () const │ │ │ │ │ -44 { │ │ │ │ │ -45 return dim+1; │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_4_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -50 std::vector& out) const │ │ │ │ │ -51 { │ │ │ │ │ -52 // evaluate P1 basis functions │ │ │ │ │ -53 std::vector p1Values(_s_i_z_e()); │ │ │ │ │ -54 │ │ │ │ │ -55 p1Values[0] = 1.0; │ │ │ │ │ -56 │ │ │ │ │ -57 for (int i=0; i& out) const │ │ │ │ │ -79 { │ │ │ │ │ -80 // evaluate P1 jacobians │ │ │ │ │ -81 std::vector p1Jacs(_s_i_z_e()); │ │ │ │ │ -82 │ │ │ │ │ -83 for (int i=0; i& _o_r_d_e_r, │ │ │ │ │ -107 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -108 std::vector& out) const // return value │ │ │ │ │ -109 { │ │ │ │ │ -110 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -111 if (totalOrder == 0) { │ │ │ │ │ -112 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -113 } else { │ │ │ │ │ -114 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -115 } │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -_1_1_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ -120 { │ │ │ │ │ -121 return 1; │ │ │ │ │ -122 } │ │ │ │ │ -123 }; │ │ │ │ │ -124} │ │ │ │ │ -125#endif │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 using _P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +22 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_,_2_>; │ │ │ │ │ +23 │ │ │ │ │ +24} │ │ │ │ │ +25 │ │ │ │ │ +26#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Dual Lagrange shape functions on the simplex. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_f_a_c_e_D_u_a_l │ │ │ │ │ -static const bool faceDual │ │ │ │ │ -Determines if the basis is only biorthogonal on adjacent faces. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, dim > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< │ │ │ │ │ -R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localbasis.hh:77 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: pq22d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualp1localinterpolation.hh File Reference
│ │ │ │ +
pq22d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementvariant.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualP1LocalInterpolation< dim, LB >
class  Dune::PQ22DLocalFiniteElement< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualp1localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +pq22d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_P_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_,_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00080_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualp1localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: pq22d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,89 +70,132 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualp1localinterpolation.hh
│ │ │ │ +
pq22d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_P1_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_DUAL_P1_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13 template<int dim, class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
15 {
│ │ │ │ -
16 public:
│ │ │ │ -
18 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
19 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
20 {
│ │ │ │ -
21 typename LB::Traits::DomainType x;
│ │ │ │ -
22 // If the dual functions are dual on the faces,
│ │ │ │ -
23 // then adjust the interpolation weights
│ │ │ │ -
24 const int faceDual(LB::faceDual);
│ │ │ │ -
25
│ │ │ │ -
26 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ -
27
│ │ │ │ -
28 // compute P1 interpolation coefficients
│ │ │ │ -
29 std::vector<C> p1Interpolation(dim+1);
│ │ │ │ -
30
│ │ │ │ -
31 // vertex 0
│ │ │ │ -
32 for (int i=0; i<dim; i++)
│ │ │ │ -
33 x[i] = 0;
│ │ │ │ -
34 p1Interpolation[0] = f(x);
│ │ │ │ -
35
│ │ │ │ -
36 // remaining vertices
│ │ │ │ -
37 for (int i=0; i<dim; i++) {
│ │ │ │ -
38 for (int j=0; j<dim; j++)
│ │ │ │ -
39 x[j] = (i==j);
│ │ │ │ +
8#include <dune/common/fmatrix.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
19 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
22 public:
│ │ │ │ +
23 using Traits = typename LFEVariant::Traits;
│ │ │ │ +
24
│ │ │ │ +
│ │ │ │ +
25 PQ22DLocalFiniteElement ( const GeometryType &gt )
│ │ │ │ +
26 {
│ │ │ │ +
27 if ( gt.isTriangle() )
│ │ │ │ + │ │ │ │ +
29 else if ( gt.isQuadrilateral() )
│ │ │ │ + │ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ +
33 PQ22DLocalFiniteElement ( const GeometryType &gt, const std::vector<unsigned int> vertexmap )
│ │ │ │ +
34 {
│ │ │ │ +
35 if ( gt.isTriangle() )
│ │ │ │ +
36 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>(vertexmap);
│ │ │ │ +
37 else if ( gt.isQuadrilateral() )
│ │ │ │ + │ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │
40
│ │ │ │ -
41 p1Interpolation[i+1] = f(x);
│ │ │ │ -
42
│ │ │ │ -
43 }
│ │ │ │ -
44
│ │ │ │ -
45 // compute dual coefficients from the Lagrange ones
│ │ │ │ -
46 out.resize(dim+1);
│ │ │ │ -
47 for (int i=0; i<dim+1; i++) {
│ │ │ │ -
48 out[i] = 2*p1Interpolation[i]/(dim+2-faceDual);
│ │ │ │ -
49
│ │ │ │ -
50 for (int j=0; j<i; j++)
│ │ │ │ -
51 out[i] += p1Interpolation[j]/(dim+2-faceDual);
│ │ │ │ -
52
│ │ │ │ -
53 for (int j=i+1; j<=dim; j++)
│ │ │ │ -
54 out[i] += p1Interpolation[j]/(dim+2-faceDual);
│ │ │ │ -
55 }
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58 };
│ │ │ │ -
│ │ │ │ -
59}
│ │ │ │ -
60
│ │ │ │ -
61#endif
│ │ │ │ +
│ │ │ │ +
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return lfeVariant_.localBasis();
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
46 const typename Traits::LocalCoefficientsType& localCoefficients () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return lfeVariant_.localCoefficients();
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 const typename Traits::LocalInterpolationType& localInterpolation () const
│ │ │ │ +
52 {
│ │ │ │ +
53 return lfeVariant_.localInterpolation();
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
57 unsigned int size () const
│ │ │ │ +
58 {
│ │ │ │ +
59 return lfeVariant_.size();
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
62 GeometryType type () const
│ │ │ │ +
63 {
│ │ │ │ +
64 return lfeVariant_.type();
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
67 private:
│ │ │ │ +
68
│ │ │ │ +
69 LFEVariant lfeVariant_;
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72}
│ │ │ │ +
73
│ │ │ │ +
74#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition dualp1localinterpolation.hh:15
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Local interpolation of a function.
Definition dualp1localinterpolation.hh:19
│ │ │ │ - │ │ │ │ + │ │ │ │ +
typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation > Traits
Export LocalFiniteElementTraits.
Definition localfiniteelementvariant.hh:269
│ │ │ │ +
unsigned int size() const
Number of shape functions.
Definition localfiniteelementvariant.hh:374
│ │ │ │ +
constexpr GeometryType type() const
Number of shape functions.
Definition localfiniteelementvariant.hh:382
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Provide access to LocalBasis implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:350
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Provide access to LocalCoefficients implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:358
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Provide access to LocalInterpolation implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:366
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Definition pq22d.hh:19
│ │ │ │ +
typename LFEVariant::Traits Traits
Definition pq22d.hh:23
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition pq22d.hh:46
│ │ │ │ +
PQ22DLocalFiniteElement(const GeometryType &gt, const std::vector< unsigned int > vertexmap)
Definition pq22d.hh:33
│ │ │ │ +
PQ22DLocalFiniteElement(const GeometryType &gt)
Definition pq22d.hh:25
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition pq22d.hh:57
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition pq22d.hh:51
│ │ │ │ +
GeometryType type() const
Definition pq22d.hh:62
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition pq22d.hh:41
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,82 +1,156 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_p_1 │ │ │ │ │ -dualp1localinterpolation.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pq22d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_P1_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_DUAL_P1_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 template │ │ │ │ │ -_1_4 class _D_u_a_l_P_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -15 { │ │ │ │ │ -16 public: │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -20 { │ │ │ │ │ -21 typename LB::Traits::DomainType x; │ │ │ │ │ -22 // If the dual functions are dual on the faces, │ │ │ │ │ -23 // then adjust the interpolation weights │ │ │ │ │ -24 const int faceDual(LB::faceDual); │ │ │ │ │ -25 │ │ │ │ │ -26 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -27 │ │ │ │ │ -28 // compute P1 interpolation coefficients │ │ │ │ │ -29 std::vector p1Interpolation(dim+1); │ │ │ │ │ -30 │ │ │ │ │ -31 // vertex 0 │ │ │ │ │ -32 for (int i=0; i │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 template │ │ │ │ │ +_1_8 class _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +19 { │ │ │ │ │ +20 using _L_F_E_V_a_r_i_a_n_t = │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>, │ │ │ │ │ +21 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_> >; │ │ │ │ │ +22 public: │ │ │ │ │ +_2_3 using _T_r_a_i_t_s = typename _L_F_E_V_a_r_i_a_n_t_:_:_T_r_a_i_t_s; │ │ │ │ │ +24 │ │ │ │ │ +_2_5 _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t ( const GeometryType > ) │ │ │ │ │ +26 { │ │ │ │ │ +27 if ( gt.isTriangle() ) │ │ │ │ │ +28 lfeVariant_ = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ +29 else if ( gt.isQuadrilateral() ) │ │ │ │ │ +30 lfeVariant_ = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ +31 } │ │ │ │ │ +32 │ │ │ │ │ +_3_3 _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t ( const GeometryType >, const std::vector vertexmap ) │ │ │ │ │ +34 { │ │ │ │ │ +35 if ( gt.isTriangle() ) │ │ │ │ │ +36 lfeVariant_ = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(vertexmap); │ │ │ │ │ +37 else if ( gt.isQuadrilateral() ) │ │ │ │ │ +38 lfeVariant_ = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ +39 } │ │ │ │ │ 40 │ │ │ │ │ -41 p1Interpolation[i+1] = f(x); │ │ │ │ │ -42 │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -45 // compute dual coefficients from the Lagrange ones │ │ │ │ │ -46 out.resize(dim+1); │ │ │ │ │ -47 for (int i=0; i &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -DDeeffiinniittiioonn dualp1localinterpolation.hh:19 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_ _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2 │ │ │ │ │ +_>_,_ _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_ _> │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_ _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2 │ │ │ │ │ +_>_,_ _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, │ │ │ │ │ +LocalInterpolation > Traits │ │ │ │ │ +Export LocalFiniteElementTraits. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:269 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:374 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_t_y_p_e │ │ │ │ │ +constexpr GeometryType type() const │ │ │ │ │ +Number of shape functions. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:382 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +Provide access to LocalBasis implementation of this LocalFiniteElement. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:350 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +Provide access to LocalCoefficients implementation of this LocalFiniteElement. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:358 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +Provide access to LocalInterpolation implementation of this LocalFiniteElement. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariant.hh:366 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +typename LFEVariant::Traits Traits │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +PQ22DLocalFiniteElement(const GeometryType >, const std::vector< unsigned int │ │ │ │ │ +> vertexmap) │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +PQ22DLocalFiniteElement(const GeometryType >) │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn pq22d.hh:41 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: p0localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localinterpolation.hh File Reference
│ │ │ │ +
p0localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualQ1LocalInterpolation< dim, LB >
class  Dune::P0LocalBasis< D, R, d >
 Constant shape function. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualq1localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +p0localbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_,_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_ _> │ │ │ │ │ +  Constant shape function. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00083_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: p0localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,110 +70,109 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localinterpolation.hh
│ │ │ │ +
p0localbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_Q1_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_DUAL_Q1_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_P0LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
19 template<int dim, class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 {
│ │ │ │ -
22 public:
│ │ │ │ -
23
│ │ │ │ -
│ │ │ │ -
24 void setCoefficients(const std::array<Dune::FieldVector<typename LB::Traits::RangeFieldType, (1<<dim)> ,(1<<dim)>& coefficients)
│ │ │ │ -
25 {
│ │ │ │ -
26 coefficients_ = coefficients;
│ │ │ │ -
27 }
│ │ │ │ -
│ │ │ │ -
28
│ │ │ │ -
29
│ │ │ │ -
31 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
32 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
33 {
│ │ │ │ -
34 typename LB::Traits::DomainType x;
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
28 template<class D, class R, int d>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 public:
│ │ │ │ +
33 typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
34 Dune::FieldMatrix<R,1,d> > Traits;
│ │ │ │
35
│ │ │ │ -
36 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ -
37
│ │ │ │ -
38 const int size = 1<<dim;
│ │ │ │ -
39
│ │ │ │ -
40 // compute Q1 interpolation coefficients
│ │ │ │ -
41 Dune::FieldVector<C,size> q1Coefficients;
│ │ │ │ -
42
│ │ │ │ -
43 for (int i=0; i< (1<<dim); i++) {
│ │ │ │ -
44
│ │ │ │ -
45 // Generate coordinate of the i-th corner of the reference cube
│ │ │ │ -
46 // We could use the ReferenceElement for this as well, but it is
│ │ │ │ -
47 // still not clear how dune-localfunctions should have access to them.
│ │ │ │ -
48 for (int j=0; j<dim; j++)
│ │ │ │ -
49 x[j] = (i & (1<<j)) ? 1.0 : 0.0;
│ │ │ │ -
50
│ │ │ │ -
51 q1Coefficients[i] = f(x);
│ │ │ │ -
52
│ │ │ │ -
53 }
│ │ │ │ -
54
│ │ │ │ -
55 out.resize(size);
│ │ │ │ -
56
│ │ │ │ -
57 // solve a linear system to compute the dual coefficients
│ │ │ │ -
58 Dune::FieldMatrix<C,size,size> mat;
│ │ │ │ +
│ │ │ │ +
37 unsigned int size () const
│ │ │ │ +
38 {
│ │ │ │ +
39 return 1;
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
43 inline void evaluateFunction (const typename Traits::DomainType&,
│ │ │ │ +
44 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
45 {
│ │ │ │ +
46 out.resize(1);
│ │ │ │ +
47 out[0] = 1;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
51 inline void
│ │ │ │ +
│ │ │ │ +
52 evaluateJacobian (const typename Traits::DomainType&, // position
│ │ │ │ +
53 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
54 {
│ │ │ │ +
55 out.resize(1);
│ │ │ │ +
56 for (int i=0; i<d; i++)
│ │ │ │ +
57 out[0][0][i] = 0;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │
59
│ │ │ │ -
60 for (int i=0; i<size; i++)
│ │ │ │ -
61 for (int j=0; j<size; j++)
│ │ │ │ -
62 mat[i][j] = coefficients_[j][i];
│ │ │ │ -
63
│ │ │ │ -
64 // now solve for the weights
│ │ │ │ -
65 Dune::FieldVector<C,size> sol(0);
│ │ │ │ -
66
│ │ │ │ -
67 mat.solve(sol,q1Coefficients);
│ │ │ │ -
68
│ │ │ │ -
69 // write result in out vector
│ │ │ │ -
70 for (int i=0; i<size; i++)
│ │ │ │ -
71 out[i] = sol[i];
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
74 private:
│ │ │ │ -
75 std::array<Dune::FieldVector<typename LB::Traits::RangeFieldType, (1<<dim)> ,(1<<dim)> coefficients_;
│ │ │ │ -
76 };
│ │ │ │ +
│ │ │ │ +
65 void partial(const std::array<unsigned int,d>& order,
│ │ │ │ +
66 const typename Traits::DomainType& in,
│ │ │ │ +
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
68 {
│ │ │ │ +
69 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
70 if (totalOrder == 0) {
│ │ │ │ +
71 evaluateFunction(in, out);
│ │ │ │ +
72 } else {
│ │ │ │ +
73 out.resize(1);
│ │ │ │ +
74 out[0] = 0;
│ │ │ │ +
75 }
│ │ │ │ +
76 }
│ │ │ │
│ │ │ │
77
│ │ │ │ -
78}
│ │ │ │ -
79
│ │ │ │ -
80#endif
│ │ │ │ +
│ │ │ │ +
79 unsigned int order () const
│ │ │ │ +
80 {
│ │ │ │ +
81 return 0;
│ │ │ │ +
82 }
│ │ │ │ +
│ │ │ │ +
83 };
│ │ │ │ +
│ │ │ │ +
84
│ │ │ │ +
85}
│ │ │ │ +
86
│ │ │ │ +
87#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition dualq1localinterpolation.hh:21
│ │ │ │ -
void setCoefficients(const std::array< Dune::FieldVector< typename LB::Traits::RangeFieldType,(1<< dim)>,(1<< dim)> &coefficients)
Definition dualq1localinterpolation.hh:24
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Local interpolation of a function.
Definition dualq1localinterpolation.hh:32
│ │ │ │ - │ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Constant shape function.
Definition p0localbasis.hh:30
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition p0localbasis.hh:79
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition p0localbasis.hh:52
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition p0localbasis.hh:43
│ │ │ │ +
void partial(const std::array< unsigned int, d > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
Definition p0localbasis.hh:65
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition p0localbasis.hh:37
│ │ │ │ +
LocalBasisTraits< D, d, Dune::FieldVector< D, d >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, d > > Traits
export type traits for function signature
Definition p0localbasis.hh:34
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,106 +1,120 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ -dualq1localinterpolation.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ +p0localbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_Q1_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_DUAL_Q1_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_P0LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_P0LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 class _D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -21 { │ │ │ │ │ -22 public: │ │ │ │ │ -23 │ │ │ │ │ -_2_4 void _s_e_t_C_o_e_f_f_i_c_i_e_n_t_s(const std::array ,(1<& coefficients) │ │ │ │ │ -25 { │ │ │ │ │ -26 coefficients_ = coefficients; │ │ │ │ │ -27 } │ │ │ │ │ -28 │ │ │ │ │ -29 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -33 { │ │ │ │ │ -34 typename LB::Traits::DomainType x; │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +28 template │ │ │ │ │ +_2_9 class _P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +30 { │ │ │ │ │ +31 public: │ │ │ │ │ +33 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ 35 │ │ │ │ │ -36 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -37 │ │ │ │ │ -38 const int size = 1< q1Coefficients; │ │ │ │ │ -42 │ │ │ │ │ -43 for (int i=0; i< (1< mat; │ │ │ │ │ +_3_7 unsigned int _s_i_z_e () const │ │ │ │ │ +38 { │ │ │ │ │ +39 return 1; │ │ │ │ │ +40 } │ │ │ │ │ +41 │ │ │ │ │ +_4_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e&, │ │ │ │ │ +44 std::vector& out) const │ │ │ │ │ +45 { │ │ │ │ │ +46 out.resize(1); │ │ │ │ │ +47 out[0] = 1; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +51 inline void │ │ │ │ │ +_5_2 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e&, // position │ │ │ │ │ +53 std::vector& out) const // return value │ │ │ │ │ +54 { │ │ │ │ │ +55 out.resize(1); │ │ │ │ │ +56 for (int i=0; i sol(0); │ │ │ │ │ -66 │ │ │ │ │ -67 mat.solve(sol,q1Coefficients); │ │ │ │ │ -68 │ │ │ │ │ -69 // write result in out vector │ │ │ │ │ -70 for (int i=0; i │ │ │ │ │ -,(1< coefficients_; │ │ │ │ │ -76 }; │ │ │ │ │ +_6_5 void _p_a_r_t_i_a_l(const std::array& _o_r_d_e_r, │ │ │ │ │ +66 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +67 std::vector& out) const │ │ │ │ │ +68 { │ │ │ │ │ +69 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +70 if (totalOrder == 0) { │ │ │ │ │ +71 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +72 } else { │ │ │ │ │ +73 out.resize(1); │ │ │ │ │ +74 out[0] = 0; │ │ │ │ │ +75 } │ │ │ │ │ +76 } │ │ │ │ │ 77 │ │ │ │ │ -78} │ │ │ │ │ -79 │ │ │ │ │ -80#endif │ │ │ │ │ +_7_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +80 { │ │ │ │ │ +81 return 0; │ │ │ │ │ +82 } │ │ │ │ │ +83 }; │ │ │ │ │ +84 │ │ │ │ │ +85} │ │ │ │ │ +86 │ │ │ │ │ +87#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn dualq1localinterpolation.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_e_t_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -void setCoefficients(const std::array< Dune::FieldVector< typename LB::Traits:: │ │ │ │ │ -RangeFieldType,(1<< dim)>,(1<< dim)> &coefficients) │ │ │ │ │ -DDeeffiinniittiioonn dualq1localinterpolation.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localinterpolation.hh:32 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Constant shape function. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, d > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, d, Dune::FieldVector< D, d >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, d > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn p0localbasis.hh:34 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: p0localcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localcoefficients.hh File Reference
│ │ │ │ +
p0localcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ #include <iostream>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualQ1LocalCoefficients< dim >
 Layout map for dual Q1 elements. More...
class  Dune::P0LocalCoefficients
 Layout map for P0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualq1localcoefficients.hh File Reference │ │ │ │ │ +p0localcoefficients.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _d_i_m_ _> │ │ │ │ │ -  Layout map for dual Q1 elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for P0 elements. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00086_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: p0localcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,79 +70,74 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localcoefficients.hh
│ │ │ │ +
p0localcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │
9#include <iostream>
│ │ │ │
10#include <vector>
│ │ │ │
11
│ │ │ │ - │ │ │ │ + │ │ │ │
13
│ │ │ │
14namespace Dune
│ │ │ │
15{
│ │ │ │
16
│ │ │ │ -
23 template <int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 for (std::size_t i=0; i<(1<<dim); i++)
│ │ │ │ -
31 li[i] = LocalKey(i,dim,0);
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 std::size_t size () const
│ │ │ │ -
36 {
│ │ │ │ -
37 return 1<<dim;
│ │ │ │ -
38 }
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │ -
│ │ │ │ -
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
42 {
│ │ │ │ -
43 return li[i];
│ │ │ │ -
44 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ +
27 P0LocalCoefficients () : index(0,0,0)
│ │ │ │ +
28 {}
│ │ │ │ +
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
31 std::size_t size () const
│ │ │ │ +
32 {
│ │ │ │ +
33 return 1;
│ │ │ │ +
34 }
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ +
37 const LocalKey& localKey ([[maybe_unused]] std::size_t i) const
│ │ │ │ +
38 {
│ │ │ │ +
39 return index;
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
42 private:
│ │ │ │ +
43 LocalKey index;
│ │ │ │ +
44 };
│ │ │ │
│ │ │ │
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector<LocalKey> li;
│ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50}
│ │ │ │ -
51
│ │ │ │ -
52#endif
│ │ │ │ - │ │ │ │ +
46}
│ │ │ │ +
47#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for dual Q1 elements.
Definition dualq1localcoefficients.hh:25
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition dualq1localcoefficients.hh:35
│ │ │ │ -
DualQ1LocalCoefficients()
Standard constructor.
Definition dualq1localcoefficients.hh:28
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition dualq1localcoefficients.hh:41
│ │ │ │ +
Layout map for P0 elements.
Definition p0localcoefficients.hh:24
│ │ │ │ +
P0LocalCoefficients()
Standard constructor.
Definition p0localcoefficients.hh:27
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition p0localcoefficients.hh:37
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition p0localcoefficients.hh:31
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,77 +1,72 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ -dualq1localcoefficients.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ +p0localcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_DUAL_Q1_LOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ 9#include │ │ │ │ │ 10#include │ │ │ │ │ 11 │ │ │ │ │ 12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ 13 │ │ │ │ │ 14namespace _D_u_n_e │ │ │ │ │ 15{ │ │ │ │ │ 16 │ │ │ │ │ -23 template │ │ │ │ │ -_2_4 class _D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -25 { │ │ │ │ │ -26 public: │ │ │ │ │ -_2_8 _D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(1< li; │ │ │ │ │ -48 }; │ │ │ │ │ -49 │ │ │ │ │ -50} │ │ │ │ │ -51 │ │ │ │ │ -52#endif │ │ │ │ │ +46} │ │ │ │ │ +47#endif │ │ │ │ │ _l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for dual Q1 elements. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localcoefficients.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn dualq1localcoefficients.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -DualQ1LocalCoefficients() │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for P0 elements. │ │ │ │ │ +DDeeffiinniittiioonn p0localcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +P0LocalCoefficients() │ │ │ │ │ Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localcoefficients.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +DDeeffiinniittiioonn p0localcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ const LocalKey & localKey(std::size_t i) const │ │ │ │ │ get i'th index │ │ │ │ │ -DDeeffiinniittiioonn dualq1localcoefficients.hh:41 │ │ │ │ │ +DDeeffiinniittiioonn p0localcoefficients.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn p0localcoefficients.hh:31 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localbasis.hh File Reference │ │ │ │ +dune-localfunctions: p0localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,33 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dualq1localbasis.hh File Reference
│ │ │ │ +
p0localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DualQ1LocalBasis< D, R, dim >
 Dual Lagrange shape functions of order 1 on the reference cube. More...
class  Dune::P0LocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dualq1localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +p0localinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  Dual Lagrange shape functions of order 1 on the reference cube. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00089_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dualq1localbasis.hh Source File │ │ │ │ +dune-localfunctions: p0localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,171 +70,76 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dualq1localbasis.hh
│ │ │ │ +
p0localinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DUAL_Q1_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_DUAL_Q1_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │ +
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
27 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 public:
│ │ │ │ -
31 typedef LocalBasisTraits<D,dim,Dune::FieldVector<D,dim>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
32 Dune::FieldMatrix<R,1,dim> > Traits;
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
34 void setCoefficients(const std::array<Dune::FieldVector<R, (1<<dim)> ,(1<<dim)>& coefficients)
│ │ │ │ -
35 {
│ │ │ │ -
36 coefficients_ = coefficients;
│ │ │ │ +
16 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
19 public:
│ │ │ │ +
│ │ │ │ +
20 P0LocalInterpolation (const GeometryType& gt) : gt_(gt)
│ │ │ │ +
21 {}
│ │ │ │ +
│ │ │ │ +
22
│ │ │ │ +
24 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
25 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
26 {
│ │ │ │ +
27 typedef typename LB::Traits::DomainType DomainType;
│ │ │ │ +
28 typedef typename LB::Traits::DomainFieldType DF;
│ │ │ │ +
29 const int dim=LB::Traits::dimDomain;
│ │ │ │ +
30
│ │ │ │ +
31 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
32
│ │ │ │ +
33 DomainType x = Dune::ReferenceElements<DF,dim>::general(gt_).position(0,0);
│ │ │ │ +
34
│ │ │ │ +
35 out.resize(1);
│ │ │ │ +
36 out[0] = f(x);
│ │ │ │
37 }
│ │ │ │
│ │ │ │
38
│ │ │ │ -
│ │ │ │ -
40 unsigned int size () const
│ │ │ │ -
41 {
│ │ │ │ -
42 return 1<<dim;
│ │ │ │ -
43 }
│ │ │ │ +
39 private:
│ │ │ │ +
40 GeometryType gt_;
│ │ │ │ +
41 };
│ │ │ │
│ │ │ │ +
42
│ │ │ │ +
43}
│ │ │ │
44
│ │ │ │ -
│ │ │ │ -
46 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
47 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
48 {
│ │ │ │ -
49 // compute q1 values
│ │ │ │ -
50 std::vector<typename Traits::RangeType> q1Values(size());
│ │ │ │ -
51
│ │ │ │ -
52 for (size_t i=0; i<size(); i++) {
│ │ │ │ -
53
│ │ │ │ -
54 q1Values[i] = 1;
│ │ │ │ -
55
│ │ │ │ -
56 for (int j=0; j<dim; j++)
│ │ │ │ -
57 // if j-th bit of i is set multiply with in[j], else with 1-in[j]
│ │ │ │ -
58 q1Values[i] *= (i & (1<<j)) ? in[j] : 1-in[j];
│ │ │ │ -
59
│ │ │ │ -
60 }
│ │ │ │ -
61
│ │ │ │ -
62 // compute the dual values by using that they are linear combinations of q1 functions
│ │ │ │ -
63 out.resize(size());
│ │ │ │ -
64 for (size_t i=0; i<size(); i++)
│ │ │ │ -
65 out[i] = 0;
│ │ │ │ -
66
│ │ │ │ -
67 for (size_t i=0; i<size(); i++)
│ │ │ │ -
68 for (size_t j=0; j<size(); j++)
│ │ │ │ -
69 out[i] += coefficients_[i][j]*q1Values[j];
│ │ │ │ -
70
│ │ │ │ -
71
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
75 inline void
│ │ │ │ -
│ │ │ │ -
76 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
77 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
78 {
│ │ │ │ -
79 // compute q1 jacobians
│ │ │ │ -
80 std::vector<typename Traits::JacobianType> q1Jacs(size());
│ │ │ │ -
81
│ │ │ │ -
82 // Loop over all shape functions
│ │ │ │ -
83 for (size_t i=0; i<size(); i++) {
│ │ │ │ -
84
│ │ │ │ -
85 // Loop over all coordinate directions
│ │ │ │ -
86 for (int j=0; j<dim; j++) {
│ │ │ │ -
87
│ │ │ │ -
88 // Initialize: the overall expression is a product
│ │ │ │ -
89 // if j-th bit of i is set to -1, else 1
│ │ │ │ -
90 q1Jacs[i][0][j] = (i & (1<<j)) ? 1 : -1;
│ │ │ │ -
91
│ │ │ │ -
92 for (int k=0; k<dim; k++) {
│ │ │ │ -
93
│ │ │ │ -
94 if (j!=k)
│ │ │ │ -
95 // if k-th bit of i is set multiply with in[j], else with 1-in[j]
│ │ │ │ -
96 q1Jacs[i][0][j] *= (i & (1<<k)) ? in[k] : 1-in[k];
│ │ │ │ -
97
│ │ │ │ -
98 }
│ │ │ │ -
99
│ │ │ │ -
100 }
│ │ │ │ -
101
│ │ │ │ -
102 }
│ │ │ │ -
103
│ │ │ │ -
104 // compute the dual jacobians by using that they are linear combinations of q1 functions
│ │ │ │ -
105 out.resize(size());
│ │ │ │ -
106 for (size_t i=0; i<size(); i++)
│ │ │ │ -
107 out[i] = 0;
│ │ │ │ -
108
│ │ │ │ -
109 for (size_t i=0; i<size(); i++)
│ │ │ │ -
110 for (size_t j=0; j<size(); j++)
│ │ │ │ -
111 out[i].axpy(coefficients_[i][j],q1Jacs[j]);
│ │ │ │ -
112
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
│ │ │ │ -
116 void partial (const std::array<unsigned int, dim>& order,
│ │ │ │ -
117 const typename Traits::DomainType& in, // position
│ │ │ │ -
118 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
119 {
│ │ │ │ -
120 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
121 if (totalOrder == 0) {
│ │ │ │ -
122 evaluateFunction(in, out);
│ │ │ │ -
123 } else {
│ │ │ │ -
124 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
125 }
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ -
129 unsigned int order () const
│ │ │ │ -
130 {
│ │ │ │ -
131 return 1;
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ -
134 private:
│ │ │ │ -
135 std::array<Dune::FieldVector<R, (1<<dim)> ,(1<<dim)> coefficients_;
│ │ │ │ -
136 };
│ │ │ │ -
│ │ │ │ -
137}
│ │ │ │ -
138#endif
│ │ │ │ +
45#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Dual Lagrange shape functions of order 1 on the reference cube.
Definition dualq1localbasis.hh:29
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition dualq1localbasis.hh:40
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition dualq1localbasis.hh:129
│ │ │ │ -
void setCoefficients(const std::array< Dune::FieldVector< R,(1<< dim)>,(1<< dim)> &coefficients)
Definition dualq1localbasis.hh:34
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition dualq1localbasis.hh:46
│ │ │ │ -
LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
Definition dualq1localbasis.hh:32
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition dualq1localbasis.hh:76
│ │ │ │ -
void partial(const std::array< unsigned int, dim > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition dualq1localbasis.hh:116
│ │ │ │ - │ │ │ │ +
Definition p0localinterpolation.hh:18
│ │ │ │ +
P0LocalInterpolation(const GeometryType &gt)
Definition p0localinterpolation.hh:20
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
determine coefficients interpolating a given function
Definition p0localinterpolation.hh:25
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,185 +1,70 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _d_u_a_l_m_o_r_t_a_r_b_a_s_i_s │ │ │ │ │ - * _d_u_a_l_q_1 │ │ │ │ │ -dualq1localbasis.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _p_0 │ │ │ │ │ +p0localinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DUAL_Q1_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_DUAL_Q1_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 class _D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -29 { │ │ │ │ │ -30 public: │ │ │ │ │ -31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -33 │ │ │ │ │ -_3_4 void _s_e_t_C_o_e_f_f_i_c_i_e_n_t_s(const std::array , │ │ │ │ │ -(1<& coefficients) │ │ │ │ │ -35 { │ │ │ │ │ -36 coefficients_ = coefficients; │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 public: │ │ │ │ │ +_2_0 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (const GeometryType& gt) : gt_(gt) │ │ │ │ │ +21 {} │ │ │ │ │ +22 │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +26 { │ │ │ │ │ +27 typedef typename LB::Traits::DomainType DomainType; │ │ │ │ │ +28 typedef typename LB::Traits::DomainFieldType DF; │ │ │ │ │ +29 const int dim=LB::Traits::dimDomain; │ │ │ │ │ +30 │ │ │ │ │ +31 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +32 │ │ │ │ │ +33 DomainType x = Dune::ReferenceElements::general(gt_).position(0,0); │ │ │ │ │ +34 │ │ │ │ │ +35 out.resize(1); │ │ │ │ │ +36 out[0] = f(x); │ │ │ │ │ 37 } │ │ │ │ │ 38 │ │ │ │ │ -_4_0 unsigned int _s_i_z_e () const │ │ │ │ │ -41 { │ │ │ │ │ -42 return 1<& out) const │ │ │ │ │ -48 { │ │ │ │ │ -49 // compute q1 values │ │ │ │ │ -50 std::vector q1Values(_s_i_z_e()); │ │ │ │ │ -51 │ │ │ │ │ -52 for (size_t i=0; i<_s_i_z_e(); i++) { │ │ │ │ │ -53 │ │ │ │ │ -54 q1Values[i] = 1; │ │ │ │ │ -55 │ │ │ │ │ -56 for (int j=0; j& out) const // return value │ │ │ │ │ -78 { │ │ │ │ │ -79 // compute q1 jacobians │ │ │ │ │ -80 std::vector q1Jacs(_s_i_z_e()); │ │ │ │ │ -81 │ │ │ │ │ -82 // Loop over all shape functions │ │ │ │ │ -83 for (size_t i=0; i<_s_i_z_e(); i++) { │ │ │ │ │ -84 │ │ │ │ │ -85 // Loop over all coordinate directions │ │ │ │ │ -86 for (int j=0; j& _o_r_d_e_r, │ │ │ │ │ -117 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -118 std::vector& out) const // return value │ │ │ │ │ -119 { │ │ │ │ │ -120 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -121 if (totalOrder == 0) { │ │ │ │ │ -122 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -123 } else { │ │ │ │ │ -124 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -125 } │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ -130 { │ │ │ │ │ -131 return 1; │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -134 private: │ │ │ │ │ -135 std::array ,(1< coefficients_; │ │ │ │ │ -136 }; │ │ │ │ │ -137} │ │ │ │ │ -138#endif │ │ │ │ │ +45#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Dual Lagrange shape functions of order 1 on the reference cube. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_s_e_t_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -void setCoefficients(const std::array< Dune::FieldVector< R,(1<< dim)>,(1<< │ │ │ │ │ -dim)> &coefficients) │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< │ │ │ │ │ -R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_D_u_a_l_Q_1_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, dim > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn dualq1localbasis.hh:116 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn p0localinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +P0LocalInterpolation(const GeometryType >) │ │ │ │ │ +DDeeffiinniittiioonn p0localinterpolation.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +determine coefficients interpolating a given function │ │ │ │ │ +DDeeffiinniittiioonn p0localinterpolation.hh:25 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek.hh File Reference │ │ │ │ +dune-localfunctions: prismp1.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,29 +65,40 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek.hh File Reference
│ │ │ │ +
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
prismp1.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Convenience header that includes all available Rannacher-Turek LocalFiniteElements. │ │ │ │ -More...

│ │ │ │ -
#include <dune/localfunctions/rannacherturek/rannacherturek.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ -

Detailed Description

│ │ │ │ -

Convenience header that includes all available Rannacher-Turek LocalFiniteElements.

│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Typedefs

template<class D , class R >
using Dune::PrismP1LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, 1 >
 First-order Lagrangian finite element on a prism.
 
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,16 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -rannacherturek.hh File Reference │ │ │ │ │ -Convenience header that includes all available Rannacher-Turek │ │ │ │ │ -LocalFiniteElements. _M_o_r_e_._._. │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +prismp1.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Convenience header that includes all available Rannacher-Turek │ │ │ │ │ -LocalFiniteElements. │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_r_i_s_m_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ + 1 > │ │ │ │ │ +  First-order Lagrangian finite element on a prism. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00092_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek.hh Source File │ │ │ │ +dune-localfunctions: prismp1.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,27 +70,46 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek.hh
│ │ │ │ +
prismp1.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ + │ │ │ │ +
9
│ │ │ │ +
10#warning This header is deprecated
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
14
│ │ │ │ +
19 template<class D, class R>
│ │ │ │ + │ │ │ │ +
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
23
│ │ │ │ +
24}
│ │ │ │ +
25
│ │ │ │ +
26#endif
│ │ │ │ + │ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,17 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -rannacherturek.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +prismp1.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h> │ │ │ │ │ -_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h │ │ │ │ │ +5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ +9 │ │ │ │ │ +10#warning This header is deprecated │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +14 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 using _P_r_i_s_m_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ +22 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ +23 │ │ │ │ │ +24} │ │ │ │ │ +25 │ │ │ │ │ +26#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormal.hh File Reference │ │ │ │ +dune-localfunctions: pk.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
orthonormal.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
pk.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/utility/localfiniteelement.hh>
│ │ │ │ -#include <dune/localfunctions/utility/dglocalcoefficients.hh>
│ │ │ │ -#include <dune/localfunctions/utility/l2interpolation.hh>
│ │ │ │ -#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::OrthonormalLocalFiniteElement< dimDomain, D, R, SF, CF >
 A class providing orthonormal basis functions. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , int d, int k>
using Dune::PkLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,21 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -orthonormal.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_g_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_2_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +pk.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _d_i_m_D_o_m_a_i_n_,_ _D_,_ _R_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ -  A class providing orthonormal basis functions. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_P_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, │ │ │ │ │ + k > │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00095_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: orthonormal.hh Source File │ │ │ │ +dune-localfunctions: pk.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,71 +70,45 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
orthonormal.hh
│ │ │ │ +
pk.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ -
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
3/* vim: set ai expandtab sw=4 ts=4: */
│ │ │ │ +
4// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ +
6#ifndef DUNE_PK_LOCALFINITEELEMENT_HH
│ │ │ │ +
7#define DUNE_PK_LOCALFINITEELEMENT_HH
│ │ │ │ +
8
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11#warning This header is deprecated
│ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │ -
32 template< unsigned int dimDomain, class D, class R,
│ │ │ │ -
33 class SF=R, class CF=SF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 : public GenericLocalFiniteElement< OrthonormalBasisFactory< dimDomain, SF, CF >,
│ │ │ │ -
36 DGLocalCoefficientsFactory< OrthonormalBasisFactory< dimDomain, SF, CF > >,
│ │ │ │ -
37 LocalL2InterpolationFactory< OrthonormalBasisFactory< dimDomain, SF, CF >,true > >
│ │ │ │ -
38 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
42 public:
│ │ │ │ -
43 using typename Base::Traits;
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ -
47 OrthonormalLocalFiniteElement ( const GeometryType &gt, unsigned int order )
│ │ │ │ -
48 : Base(gt, order)
│ │ │ │ -
49 {}
│ │ │ │ -
│ │ │ │ -
50 };
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
52}
│ │ │ │ -
53
│ │ │ │ -
54#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
18 template<class D, class R, int d, int k>
│ │ │ │ + │ │ │ │ +
20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ + │ │ │ │ +
22}
│ │ │ │ +
23
│ │ │ │ +
24#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
A class providing orthonormal basis functions.
Definition orthonormal.hh:38
│ │ │ │ -
OrthonormalLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition orthonormal.hh:47
│ │ │ │ -
A factory class for the dg local coefficients.
Definition dglocalcoefficients.hh:59
│ │ │ │ -
A factory class for the local l2 interpolations taking a basis factory.
Definition l2interpolation.hh:199
│ │ │ │ -
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis,...
Definition localfunctions/utility/localfiniteelement.hh:25
│ │ │ │ -
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition localfunctions/utility/localfiniteelement.hh:29
│ │ │ │ - │ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,76 +1,40 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -orthonormal.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pk.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +3/* vim: set ai expandtab sw=4 ts=4: */ │ │ │ │ │ +4// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ -4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_ORTHONORMALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_ORTHONORMALFINITEELEMENT_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_g_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_2_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ +6#ifndef DUNE_PK_LOCALFINITEELEMENT_HH │ │ │ │ │ +7#define DUNE_PK_LOCALFINITEELEMENT_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include<_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11#warning This header is deprecated │ │ │ │ │ 12 │ │ │ │ │ 13namespace _D_u_n_e │ │ │ │ │ 14{ │ │ │ │ │ -32 template< unsigned int dimDomain, class D, class R, │ │ │ │ │ -33 class SF=R, class CF=SF > │ │ │ │ │ -_3_4 class _O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -35 : public _G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< OrthonormalBasisFactory< dimDomain, SF, │ │ │ │ │ -CF >, │ │ │ │ │ -36 DGLocalCoefficientsFactory< OrthonormalBasisFactory< dimDomain, SF, CF > >, │ │ │ │ │ -37 LocalL2InterpolationFactory< OrthonormalBasisFactory< dimDomain, SF, CF │ │ │ │ │ ->,true > > │ │ │ │ │ -38 { │ │ │ │ │ -39 typedef _G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_D_o_m_a_i_n_,_ _S_F_, │ │ │ │ │ -_C_F_ _>, │ │ │ │ │ -40 _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_D_o_m_a_i_n_,_ _S_F_,_ _C_F_ _> >, │ │ │ │ │ -41 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_D_o_m_a_i_n_,_ _S_F_,_ _C_F │ │ │ │ │ -_>,true > > _B_a_s_e; │ │ │ │ │ -42 public: │ │ │ │ │ -43 using typename _B_a_s_e_:_:_T_r_a_i_t_s; │ │ │ │ │ -44 │ │ │ │ │ -_4_7 _O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t ( const GeometryType >, unsigned int order ) │ │ │ │ │ -48 : _B_a_s_e(gt, order) │ │ │ │ │ -49 {} │ │ │ │ │ -50 }; │ │ │ │ │ -51 │ │ │ │ │ -52} │ │ │ │ │ -53 │ │ │ │ │ -54#endif │ │ │ │ │ -_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_2_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_d_g_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +18 template │ │ │ │ │ +_1_9 using _P_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ +21 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_ _R_,_ _d_,_ _k_>; │ │ │ │ │ +22} │ │ │ │ │ +23 │ │ │ │ │ +24#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -A class providing orthonormal basis functions. │ │ │ │ │ -DDeeffiinniittiioonn orthonormal.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -OrthonormalLocalFiniteElement(const GeometryType >, unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn orthonormal.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -A factory class for the dg local coefficients. │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ -the LocalBasis,... │ │ │ │ │ -DDeeffiinniittiioonn localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ -typename InterpolF::Object > Traits │ │ │ │ │ -DDeeffiinniittiioonn localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: pqkfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,49 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannachertureklocalcoefficients.hh File Reference
│ │ │ │ +
pqkfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <algorithm>
│ │ │ │ -#include <array>
│ │ │ │ -#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <map>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ +#include <dune/localfunctions/common/virtualwrappers.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::RannacherTurekLocalCoefficients< d >
 layout for Rannacher-Turek elements More...
struct  Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, d, k >
 Factory that only creates dimension specific local finite elements. More...
 
struct  Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, 3, k >
 Factory that only creates dimension specific local finite elements. More...
 
struct  Dune::PQkLocalFiniteElementFactory< D, R, dim, k >
 Factory to create any kind of Pk/Qk like element wrapped for the virtual interface. More...
 
class  Dune::PQkLocalFiniteElementCache< D, R, dim, k >
 A cache that stores all available Pk/Qk like local finite elements for the given dimension and order. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,41 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -rannachertureklocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +pqkfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _d_ _> │ │ │ │ │ -  layout for Rannacher-Turek elements _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _d_,_ _k_ _> │ │ │ │ │ +  Factory that only creates dimension specific local finite elements. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _> │ │ │ │ │ +  Factory that only creates dimension specific local finite elements. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ +  Factory to create any kind of Pk/Qk like element wrapped for the │ │ │ │ │ + virtual interface. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ +  A cache that stores all available Pk/Qk like local finite elements for │ │ │ │ │ + the given dimension and order. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00098_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: pqkfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalcoefficients.hh
│ │ │ │ +
pqkfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <cassert>
│ │ │ │ -
11#include <cstddef>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ +
8#include <map>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/type.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
24 template< unsigned int d >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 {
│ │ │ │ -
29 for( std::size_t i = 0; i < 2*d; ++i )
│ │ │ │ -
30 localKeys_[ i ] = LocalKey( i, 1, 0 );
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
20
│ │ │ │ +
21namespace Dune
│ │ │ │ +
22{
│ │ │ │ +
23
│ │ │ │ +
28 template<class D, class R, int d, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ + │ │ │ │
32
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
34 {
│ │ │ │ -
35 (*this) = other;
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {
│ │ │ │ -
40 std::copy( other.localKeys_.begin(), other.localKeys_.end(), localKeys_.begin() );
│ │ │ │ -
41 return *this;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 std::size_t size () const
│ │ │ │ -
46 {
│ │ │ │ -
47 return 2*d;
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
51 const LocalKey &localKey ( std::size_t i ) const
│ │ │ │ -
52 {
│ │ │ │ -
53 assert( i < 2*d );
│ │ │ │ -
54 return localKeys_[ i ];
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 private:
│ │ │ │ -
58 std::array< LocalKey, 2*d > localKeys_;
│ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
61} // namespace Dune
│ │ │ │ -
62
│ │ │ │ -
63#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
34 static LocalFiniteElementVirtualInterface<T>* create(const GeometryType&)
│ │ │ │ +
35 {
│ │ │ │ +
36 return nullptr;
│ │ │ │ +
37 }
│ │ │ │ +
│ │ │ │ +
38 };
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
44 template<class D, class R, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
52
│ │ │ │ +
│ │ │ │ +
54 static LocalFiniteElementVirtualInterface<T>* create(const GeometryType& gt)
│ │ │ │ +
55 {
│ │ │ │ +
56 if ((gt.isPrism())and (k==1))
│ │ │ │ + │ │ │ │ +
58 if ((gt.isPrism())and (k==2))
│ │ │ │ + │ │ │ │ +
60 if ((gt.isPyramid())and (k==1))
│ │ │ │ + │ │ │ │ +
62 if ((gt.isPyramid())and (k==2))
│ │ │ │ + │ │ │ │ +
64 return nullptr;
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66 };
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
68
│ │ │ │ +
72 template<class D, class R, int dim, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
74 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
80
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
83 static FiniteElementType* create(const GeometryType& gt)
│ │ │ │ +
84 {
│ │ │ │ +
85 if (k==0)
│ │ │ │ + │ │ │ │ +
87
│ │ │ │ +
88 if (gt.isSimplex())
│ │ │ │ + │ │ │ │ +
90
│ │ │ │ +
91 if (gt.isCube())
│ │ │ │ + │ │ │ │ +
93
│ │ │ │ + │ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96 };
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
98
│ │ │ │ +
99
│ │ │ │ +
110 template<class D, class R, int dim, int k>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
112 {
│ │ │ │ +
113 protected:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
116 typedef typename std::map<GeometryType,FE*> FEMap;
│ │ │ │ +
117
│ │ │ │ +
118 public:
│ │ │ │ + │ │ │ │ +
121
│ │ │ │ + │ │ │ │ +
124
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
127 {
│ │ │ │ +
128 typename FEMap::iterator it = other.cache_.begin();
│ │ │ │ +
129 typename FEMap::iterator end = other.cache_.end();
│ │ │ │ +
130 for(; it!=end; ++it)
│ │ │ │ +
131 cache_[it->first] = (it->second)->clone();
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
135 {
│ │ │ │ +
136 typename FEMap::iterator it = cache_.begin();
│ │ │ │ +
137 typename FEMap::iterator end = cache_.end();
│ │ │ │ +
138 for(; it!=end; ++it)
│ │ │ │ +
139 delete it->second;
│ │ │ │ +
140 }
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
│ │ │ │ +
143 const FiniteElementType& get(const GeometryType& gt) const
│ │ │ │ +
144 {
│ │ │ │ +
145 typename FEMap::const_iterator it = cache_.find(gt);
│ │ │ │ +
146 if (it==cache_.end())
│ │ │ │ +
147 {
│ │ │ │ + │ │ │ │ +
149 if (fe==0)
│ │ │ │ +
150 DUNE_THROW(Dune::NotImplemented,"No Pk/Qk like local finite element available for geometry type " << gt << " and order " << k);
│ │ │ │ +
151
│ │ │ │ +
152 cache_[gt] = fe;
│ │ │ │ +
153 return *fe;
│ │ │ │ +
154 }
│ │ │ │ +
155 return *(it->second);
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157
│ │ │ │ +
158 protected:
│ │ │ │ +
159 mutable FEMap cache_;
│ │ │ │ +
160
│ │ │ │ +
161 };
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
163}
│ │ │ │ +
164
│ │ │ │ +
165#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
layout for Rannacher-Turek elements
Definition rannachertureklocalcoefficients.hh:26
│ │ │ │ -
RannacherTurekLocalCoefficients()
Definition rannachertureklocalcoefficients.hh:27
│ │ │ │ -
RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other)
Definition rannachertureklocalcoefficients.hh:33
│ │ │ │ -
RannacherTurekLocalCoefficients & operator=(const RannacherTurekLocalCoefficients &other)
Definition rannachertureklocalcoefficients.hh:38
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
map index i to local key
Definition rannachertureklocalcoefficients.hh:51
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition rannachertureklocalcoefficients.hh:45
│ │ │ │ +
virtual base class for local finite elements with functions
Definition virtualinterface.hh:286
│ │ │ │ +
class for wrapping a finite element using the virtual interface
Definition virtualwrappers.hh:240
│ │ │ │ +
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ +
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
The local p0 finite element on all types of reference elements.
Definition p0.hh:25
│ │ │ │ +
Factory that only creates dimension specific local finite elements.
Definition pqkfactory.hh:30
│ │ │ │ +
P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:31
│ │ │ │ +
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &)
create finite element for given GeometryType
Definition pqkfactory.hh:34
│ │ │ │ +
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &gt)
create finite element for given GeometryType
Definition pqkfactory.hh:54
│ │ │ │ +
P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:47
│ │ │ │ +
Factory to create any kind of Pk/Qk like element wrapped for the virtual interface.
Definition pqkfactory.hh:74
│ │ │ │ +
LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk
Definition pqkfactory.hh:79
│ │ │ │ +
LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk
Definition pqkfactory.hh:78
│ │ │ │ +
LocalFiniteElementVirtualInterface< T > FiniteElementType
Definition pqkfactory.hh:76
│ │ │ │ +
static FiniteElementType * create(const GeometryType &gt)
create finite element for given GeometryType
Definition pqkfactory.hh:83
│ │ │ │ +
P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:75
│ │ │ │ +
P0LocalFiniteElement< D, R, dim > P0
Definition pqkfactory.hh:77
│ │ │ │ +
A cache that stores all available Pk/Qk like local finite elements for the given dimension and order.
Definition pqkfactory.hh:112
│ │ │ │ +
P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:114
│ │ │ │ +
LocalFiniteElementVirtualInterface< T > FE
Definition pqkfactory.hh:115
│ │ │ │ +
PQkLocalFiniteElementCache()
Default constructor.
Definition pqkfactory.hh:123
│ │ │ │ +
FE FiniteElementType
Type of the finite elements stored in this cache.
Definition pqkfactory.hh:120
│ │ │ │ +
std::map< GeometryType, FE * > FEMap
Definition pqkfactory.hh:116
│ │ │ │ +
const FiniteElementType & get(const GeometryType &gt) const
Get local finite element for given GeometryType.
Definition pqkfactory.hh:143
│ │ │ │ +
FEMap cache_
Definition pqkfactory.hh:159
│ │ │ │ +
~PQkLocalFiniteElementCache()
Definition pqkfactory.hh:134
│ │ │ │ +
PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other)
Copy constructor.
Definition pqkfactory.hh:126
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,96 +1,263 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ -rannachertureklocalcoefficients.hh │ │ │ │ │ + * _l_a_g_r_a_n_g_e │ │ │ │ │ +pqkfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ 14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -24 template< unsigned int d > │ │ │ │ │ -_2_5 struct _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -26 { │ │ │ │ │ -_2_7 _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () │ │ │ │ │ -28 { │ │ │ │ │ -29 for( std::size_t i = 0; i < 2*d; ++i ) │ │ │ │ │ -30 localKeys_[ i ] = _L_o_c_a_l_K_e_y( i, 1, 0 ); │ │ │ │ │ -31 } │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ +20 │ │ │ │ │ +21namespace _D_u_n_e │ │ │ │ │ +22{ │ │ │ │ │ +23 │ │ │ │ │ +28 template │ │ │ │ │ +_2_9 struct _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +30 { │ │ │ │ │ +_3_1 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_:_T_r_a_i_t_s │ │ │ │ │ +_T; │ │ │ │ │ 32 │ │ │ │ │ -_3_3 _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s ( const _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -&other ) │ │ │ │ │ -34 { │ │ │ │ │ -35 (*this) = other; │ │ │ │ │ -36 } │ │ │ │ │ -37 │ │ │ │ │ -_3_8 _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s &_o_p_e_r_a_t_o_r_=_ ( const │ │ │ │ │ -_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s &other ) │ │ │ │ │ -39 { │ │ │ │ │ -40 std::copy( other.localKeys_.begin(), other.localKeys_.end(), │ │ │ │ │ -localKeys_.begin() ); │ │ │ │ │ -41 return *this; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_5 std::size_t _s_i_z_e () const │ │ │ │ │ +_3_4 static _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_>* _c_r_e_a_t_e(const GeometryType&) │ │ │ │ │ +35 { │ │ │ │ │ +36 return nullptr; │ │ │ │ │ +37 } │ │ │ │ │ +38 }; │ │ │ │ │ +39 │ │ │ │ │ +44 template │ │ │ │ │ +_4_5 struct _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ 46 { │ │ │ │ │ -47 return 2*d; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -_5_1 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( std::size_t i ) const │ │ │ │ │ -52 { │ │ │ │ │ -53 assert( i < 2*d ); │ │ │ │ │ -54 return localKeys_[ i ]; │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 private: │ │ │ │ │ -58 std::array< LocalKey, 2*d > localKeys_; │ │ │ │ │ -59 }; │ │ │ │ │ -60 │ │ │ │ │ -61} // namespace Dune │ │ │ │ │ -62 │ │ │ │ │ -63#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALCOEFFICIENTS_HH │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_4_7 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_:_T_r_a_i_t_s │ │ │ │ │ +_T; │ │ │ │ │ +_4_8 using _P_r_i_s_m_P_1 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ +_4_9 using _P_r_i_s_m_P_2 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ +_5_0 using _P_y_r_a_m_i_d_P_1 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ +_5_1 using _P_y_r_a_m_i_d_P_2 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ +52 │ │ │ │ │ +_5_4 static _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_>* _c_r_e_a_t_e(const GeometryType& gt) │ │ │ │ │ +55 { │ │ │ │ │ +56 if ((gt.isPrism())and (k==1)) │ │ │ │ │ +57 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_r_i_s_m_P_1_>(_P_r_i_s_m_P_1()); │ │ │ │ │ +58 if ((gt.isPrism())and (k==2)) │ │ │ │ │ +59 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_r_i_s_m_P_2_>(_P_r_i_s_m_P_2()); │ │ │ │ │ +60 if ((gt.isPyramid())and (k==1)) │ │ │ │ │ +61 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_y_r_a_m_i_d_P_1_>(_P_y_r_a_m_i_d_P_1()); │ │ │ │ │ +62 if ((gt.isPyramid())and (k==2)) │ │ │ │ │ +63 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_y_r_a_m_i_d_P_2_>(_P_y_r_a_m_i_d_P_2()); │ │ │ │ │ +64 return nullptr; │ │ │ │ │ +65 } │ │ │ │ │ +66 }; │ │ │ │ │ +67 │ │ │ │ │ +68 │ │ │ │ │ +72 template │ │ │ │ │ +_7_3 struct _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +74 { │ │ │ │ │ +_7_5 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_: │ │ │ │ │ +_T_r_a_i_t_s _T; │ │ │ │ │ +_7_6 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_> _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ +_7_7 using _P_0 = _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>; │ │ │ │ │ +_7_8 using _P_k = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_k_>; │ │ │ │ │ +_7_9 using _Q_k = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_k_>; │ │ │ │ │ +80 │ │ │ │ │ +81 │ │ │ │ │ +_8_3 static _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e* _c_r_e_a_t_e(const GeometryType& gt) │ │ │ │ │ +84 { │ │ │ │ │ +85 if (k==0) │ │ │ │ │ +86 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_0_>(_P_0(gt)); │ │ │ │ │ +87 │ │ │ │ │ +88 if (gt.isSimplex()) │ │ │ │ │ +89 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_k_>(_P_k()); │ │ │ │ │ +90 │ │ │ │ │ +91 if (gt.isCube()) │ │ │ │ │ +92 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_Q_k_>(_Q_k()); │ │ │ │ │ +93 │ │ │ │ │ +94 return _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_D_,_R_,_d_i_m_,_k_>_:_:_c_r_e_a_t_e(gt); │ │ │ │ │ +95 } │ │ │ │ │ +96 }; │ │ │ │ │ +97 │ │ │ │ │ +98 │ │ │ │ │ +99 │ │ │ │ │ +110 template │ │ │ │ │ +_1_1_1 class _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ +112 { │ │ │ │ │ +113 protected: │ │ │ │ │ +_1_1_4 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_: │ │ │ │ │ +_T_r_a_i_t_s _T; │ │ │ │ │ +_1_1_5 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_> _F_E; │ │ │ │ │ +_1_1_6 typedef typename std::map _F_E_M_a_p; │ │ │ │ │ +117 │ │ │ │ │ +118 public: │ │ │ │ │ +_1_2_0 typedef _F_E _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ +121 │ │ │ │ │ +_1_2_3 _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e() {} │ │ │ │ │ +124 │ │ │ │ │ +_1_2_6 _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e(const _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e& other) │ │ │ │ │ +127 { │ │ │ │ │ +128 typename FEMap::iterator it = other._c_a_c_h_e__.begin(); │ │ │ │ │ +129 typename FEMap::iterator end = other._c_a_c_h_e__.end(); │ │ │ │ │ +130 for(; it!=end; ++it) │ │ │ │ │ +131 _c_a_c_h_e__[it->first] = (it->second)->clone(); │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +_1_3_4 _~_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e() │ │ │ │ │ +135 { │ │ │ │ │ +136 typename FEMap::iterator it = _c_a_c_h_e__.begin(); │ │ │ │ │ +137 typename FEMap::iterator end = _c_a_c_h_e__.end(); │ │ │ │ │ +138 for(; it!=end; ++it) │ │ │ │ │ +139 delete it->second; │ │ │ │ │ +140 } │ │ │ │ │ +141 │ │ │ │ │ +_1_4_3 const _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e& _g_e_t(const GeometryType& gt) const │ │ │ │ │ +144 { │ │ │ │ │ +145 typename FEMap::const_iterator it = _c_a_c_h_e__.find(gt); │ │ │ │ │ +146 if (it==_c_a_c_h_e__.end()) │ │ │ │ │ +147 { │ │ │ │ │ +148 _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e* fe = _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_D_,_R_,_d_i_m_,_k_>_:_:_c_r_e_a_t_e │ │ │ │ │ +(gt); │ │ │ │ │ +149 if (fe==0) │ │ │ │ │ +150 DUNE_THROW(Dune::NotImplemented,"No Pk/Qk like local finite element │ │ │ │ │ +available for geometry type " << gt << " and order " << k); │ │ │ │ │ +151 │ │ │ │ │ +152 _c_a_c_h_e__[gt] = fe; │ │ │ │ │ +153 return *fe; │ │ │ │ │ +154 } │ │ │ │ │ +155 return *(it->second); │ │ │ │ │ +156 } │ │ │ │ │ +157 │ │ │ │ │ +158 protected: │ │ │ │ │ +_1_5_9 mutable _F_E_M_a_p _c_a_c_h_e__; │ │ │ │ │ +160 │ │ │ │ │ +161 }; │ │ │ │ │ +162 │ │ │ │ │ +163} │ │ │ │ │ +164 │ │ │ │ │ +165#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ +_p_0_._h_h │ │ │ │ │ +_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ +_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ │ +_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -layout for Rannacher-Turek elements │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RannacherTurekLocalCoefficients() │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RannacherTurekLocalCoefficients(const RannacherTurekLocalCoefficients &other) │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -RannacherTurekLocalCoefficients & operator=(const │ │ │ │ │ -RannacherTurekLocalCoefficients &other) │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -map index i to local key │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalcoefficients.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e │ │ │ │ │ +virtual base class for local finite elements with functions │ │ │ │ │ +DDeeffiinniittiioonn virtualinterface.hh:286 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p │ │ │ │ │ +class for wrapping a finite element using the virtual interface │ │ │ │ │ +DDeeffiinniittiioonn virtualwrappers.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ +order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ +_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ +polynomial order. │ │ │ │ │ +DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +The local p0 finite element on all types of reference elements. │ │ │ │ │ +DDeeffiinniittiioonn p0.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory that only creates dimension specific local finite elements. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_T │ │ │ │ │ +P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ +static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _>_:_:_T │ │ │ │ │ +P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory to create any kind of Pk/Qk like element wrapped for the virtual │ │ │ │ │ +interface. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_k │ │ │ │ │ +LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_P_k │ │ │ │ │ +LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +LocalFiniteElementVirtualInterface< T > FiniteElementType │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static FiniteElementType * create(const GeometryType >) │ │ │ │ │ +create finite element for given GeometryType │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_T │ │ │ │ │ +P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_P_0 │ │ │ │ │ +P0LocalFiniteElement< D, R, dim > P0 │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:77 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ +A cache that stores all available Pk/Qk like local finite elements for the │ │ │ │ │ +given dimension and order. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_T │ │ │ │ │ +P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E │ │ │ │ │ +LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ +PQkLocalFiniteElementCache() │ │ │ │ │ +Default constructor. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ +FE FiniteElementType │ │ │ │ │ +Type of the finite elements stored in this cache. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:120 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E_M_a_p │ │ │ │ │ +std::map< GeometryType, FE * > FEMap │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_g_e_t │ │ │ │ │ +const FiniteElementType & get(const GeometryType >) const │ │ │ │ │ +Get local finite element for given GeometryType. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_c_a_c_h_e__ │ │ │ │ │ +FEMap cache_ │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_~_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ +~PQkLocalFiniteElementCache() │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ +PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other) │ │ │ │ │ +Copy constructor. │ │ │ │ │ +DDeeffiinniittiioonn pqkfactory.hh:126 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: brezzidouglasmarini.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,25 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
rannachertureklocalinterpolation.hh File Reference
│ │ │ │ +
brezzidouglasmarini.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RannacherTurekLocalInterpolation< D, R, d >
 please doc me More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,13 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -rannachertureklocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +brezzidouglasmarini.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/ │ │ │ │ │ +_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _D_,_ _R_,_ _d_ _> │ │ │ │ │ -  please doc me _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00101_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: brezzidouglasmarini.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,89 +70,35 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalinterpolation.hh
│ │ │ │ +
brezzidouglasmarini.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
14
│ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20
│ │ │ │ -
28 template< class D, class R, unsigned int d >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ - │ │ │ │ -
32 R, 1, FieldVector< R, 1 >,
│ │ │ │ -
33 FieldMatrix< R, 1, d > > Traits;
│ │ │ │ -
34
│ │ │ │ -
35 public:
│ │ │ │ -
36 template< class F, class C >
│ │ │ │ -
│ │ │ │ -
37 void interpolate ( const F &ff, std::vector< C > &out ) const
│ │ │ │ -
38 {
│ │ │ │ -
39 typedef typename Traits::DomainType DomainType;
│ │ │ │ -
40
│ │ │ │ -
41 auto&& f = Impl::makeFunctionWithCallOperator<DomainType>(ff);
│ │ │ │ -
42
│ │ │ │ -
43 // get cubic reference element
│ │ │ │ -
44 auto referenceElement = ReferenceElements< D, d >::cube();
│ │ │ │ -
45
│ │ │ │ -
46 const int size = 2*d;
│ │ │ │ -
47 assert( size == referenceElement.size( 1 ) );
│ │ │ │ -
48
│ │ │ │ -
49 // resize vector
│ │ │ │ -
50 out.resize( size );
│ │ │ │ -
51
│ │ │ │ -
52 // evaluate local function in barycenter of codim 1 subentities
│ │ │ │ -
53 for( int i = 0; i < size; ++i )
│ │ │ │ -
54 {
│ │ │ │ -
55 const DomainType &x = referenceElement.position( i, 1 );
│ │ │ │ -
56 out[ i ] = f(x);
│ │ │ │ -
57 }
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
60 };
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
62} // namespace Dune
│ │ │ │ -
63
│ │ │ │ -
64#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH
│ │ │ │ -
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
please doc me
Definition rannachertureklocalinterpolation.hh:30
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition rannachertureklocalinterpolation.hh:37
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8// BDM implementations with compile-time order
│ │ │ │ + │ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,86 +1,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ -rannachertureklocalinterpolation.hh │ │ │ │ │ +brezzidouglasmarini.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 │ │ │ │ │ -28 template< class D, class R, unsigned int d > │ │ │ │ │ -_2_9 class _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -30 { │ │ │ │ │ -31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_ _D_,_ _d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _D_,_ _d_ _>, │ │ │ │ │ -32 R, 1, FieldVector< R, 1 >, │ │ │ │ │ -33 FieldMatrix< R, 1, d > > _T_r_a_i_t_s; │ │ │ │ │ -34 │ │ │ │ │ -35 public: │ │ │ │ │ -36 template< class F, class C > │ │ │ │ │ -_3_7 void _i_n_t_e_r_p_o_l_a_t_e ( const F &ff, std::vector< C > &out ) const │ │ │ │ │ -38 { │ │ │ │ │ -39 typedef typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e DomainType; │ │ │ │ │ -40 │ │ │ │ │ -41 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -42 │ │ │ │ │ -43 // get cubic reference element │ │ │ │ │ -44 auto referenceElement = ReferenceElements< D, d >::cube(); │ │ │ │ │ -45 │ │ │ │ │ -46 const int size = 2*d; │ │ │ │ │ -47 assert( size == referenceElement.size( 1 ) ); │ │ │ │ │ -48 │ │ │ │ │ -49 // resize vector │ │ │ │ │ -50 out.resize( size ); │ │ │ │ │ -51 │ │ │ │ │ -52 // evaluate local function in barycenter of codim 1 subentities │ │ │ │ │ -53 for( int i = 0; i < size; ++i ) │ │ │ │ │ -54 { │ │ │ │ │ -55 const DomainType &x = referenceElement.position( i, 1 ); │ │ │ │ │ -56 out[ i ] = f(x); │ │ │ │ │ -57 } │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 }; │ │ │ │ │ -61 │ │ │ │ │ -62} // namespace Dune │ │ │ │ │ -63 │ │ │ │ │ -64#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALINTERPOLATION_HH │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -please doc me │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalinterpolation.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalinterpolation.hh:37 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +8// BDM implementations with compile-time order │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h> │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/ │ │ │ │ │ +_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ +_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: refined.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,30 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
rannachertureklocalbasis.hh File Reference
│ │ │ │ +
refined.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include "rannacherturek2d/rannacherturek2dlocalbasis.hh"
│ │ │ │ -#include "rannacherturek3d/rannacherturek3dlocalbasis.hh"
│ │ │ │ + │ │ │ │ +

Convenience header that includes all available LocalFiniteElements based on uniform element refinement. │ │ │ │ +More...

│ │ │ │ +
#include <dune/localfunctions/refined/refinedp0.hh>
│ │ │ │ +#include <dune/localfunctions/refined/refinedp1.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

struct  Dune::RannacherTurekLocalBasis< D, R, 2 >
 
struct  Dune::RannacherTurekLocalBasis< D, R, 3 >
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Convenience header that includes all available LocalFiniteElements based on uniform element refinement.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,17 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -rannachertureklocalbasis.hh File Reference │ │ │ │ │ -#include "_r_a_n_n_a_c_h_e_r_t_u_r_e_k_2_d_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +refined.hh File Reference │ │ │ │ │ +Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ +uniform element refinement. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_0_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_1_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Convenience header that includes all available LocalFiniteElements based on │ │ │ │ │ +uniform element refinement. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00104_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannachertureklocalbasis.hh Source File │ │ │ │ +dune-localfunctions: refined.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,60 +70,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannachertureklocalbasis.hh
│ │ │ │ +
refined.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ -
7
│ │ │ │ - │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
13
│ │ │ │ -
23 template< class D, class R, unsigned int d >
│ │ │ │ - │ │ │ │ -
25
│ │ │ │ -
26 template< class D, class R >
│ │ │ │ -
│ │ │ │ -
27 struct RannacherTurekLocalBasis< D, R, 2 >
│ │ │ │ -
28 : public RannacherTurek2DLocalBasis< D, R >
│ │ │ │ -
29 {};
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ -
31 template< class D, class R >
│ │ │ │ -
│ │ │ │ -
32 struct RannacherTurekLocalBasis< D, R, 3 >
│ │ │ │ -
33 : public RannacherTurek3DLocalBasis< D, R >
│ │ │ │ -
34 {};
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
36} // namespace Dune
│ │ │ │ -
37
│ │ │ │ -
38#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Definition bdfmcube.hh:18
│ │ │ │ -
Definition rannacherturek2dlocalbasis.hh:21
│ │ │ │ -
Definition rannacherturek3dlocalbasis.hh:21
│ │ │ │ -
Rannacher-Turek shape functions.
Definition rannachertureklocalbasis.hh:24
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Piecewise P0 finite element.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,52 +1,20 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ -rannachertureklocalbasis.hh │ │ │ │ │ +refined.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include "_r_a_n_n_a_c_h_e_r_t_u_r_e_k_2_d_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -9#include "_r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -13 │ │ │ │ │ -23 template< class D, class R, unsigned int d > │ │ │ │ │ -_2_4 struct _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s; │ │ │ │ │ -25 │ │ │ │ │ -26 template< class D, class R > │ │ │ │ │ -_2_7 struct _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s< D, R, 2 > │ │ │ │ │ -28 : public _R_a_n_n_a_c_h_e_r_T_u_r_e_k_2_D_L_o_c_a_l_B_a_s_i_s< D, R > │ │ │ │ │ -29 {}; │ │ │ │ │ -30 │ │ │ │ │ -31 template< class D, class R > │ │ │ │ │ -_3_2 struct _R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s< D, R, 3 > │ │ │ │ │ -33 : public _R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s< D, R > │ │ │ │ │ -34 {}; │ │ │ │ │ -35 │ │ │ │ │ -36} // namespace Dune │ │ │ │ │ -37 │ │ │ │ │ -38#endif // #ifndef DUNE_RANNACHER_TUREK_LOCALBASIS_HH │ │ │ │ │ -_r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_r_a_n_n_a_c_h_e_r_t_u_r_e_k_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek2dlocalbasis.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Rannacher-Turek shape functions. │ │ │ │ │ -DDeeffiinniittiioonn rannachertureklocalbasis.hh:24 │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_0_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_e_f_i_n_e_d_/_r_e_f_i_n_e_d_p_1_._h_h> │ │ │ │ │ +_r_e_f_i_n_e_d_p_1_._h_h │ │ │ │ │ +_r_e_f_i_n_e_d_p_0_._h_h │ │ │ │ │ +Piecewise P0 finite element. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek3dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: common.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
rannacherturek3dlocalbasis.hh File Reference
│ │ │ │ +
common.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <dune/geometry/dimension.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RannacherTurek3DLocalBasis< D, R >
struct  Dune::EdgeS0_5Common< dim, DF >
 Common base class for edge elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d │ │ │ │ │ + * _w_h_i_t_n_e_y │ │ │ │ │ + * _e_d_g_e_s_0_._5 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -rannacherturek3dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +common.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_<_ _d_i_m_,_ _D_F_ _> │ │ │ │ │ +  Common base class for edge elements. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00107_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: rannacherturek3dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: common.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,167 +70,60 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
rannacherturek3dlocalbasis.hh
│ │ │ │ +
common.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <cstddef>
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
19 template< class D, class R >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 {
│ │ │ │ -
22 static const int coefficients[ 6 ][ 6 ];
│ │ │ │ -
23
│ │ │ │ -
24 public:
│ │ │ │ - │ │ │ │ -
26 R, 1, FieldVector< R, 1 >,
│ │ │ │ -
27 FieldMatrix< R, 1, 3 > > Traits;
│ │ │ │ +
11#include <dune/geometry/dimension.hh>
│ │ │ │ +
12#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune {
│ │ │ │ +
16
│ │ │ │ +
18 template<std::size_t dim, class DF = double>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 using RefElem =
│ │ │ │ +
22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim),
│ │ │ │ +
23 Dim<dim>{}));
│ │ │ │ +
24
│ │ │ │ +
26 RefElem refelem = referenceElement(DF{}, GeometryTypes::simplex(dim),
│ │ │ │ +
27 Dim<dim>{});
│ │ │ │
28
│ │ │ │ -
│ │ │ │ -
30 unsigned int size () const
│ │ │ │ -
31 {
│ │ │ │ -
32 return 6;
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ -
36 inline void evaluateFunction ( const typename Traits::DomainType &in,
│ │ │ │ -
37 std::vector< typename Traits::RangeType > &out ) const
│ │ │ │ -
38 {
│ │ │ │ -
39 typedef typename Traits::RangeFieldType RangeFieldType;
│ │ │ │ -
40 RangeFieldType y[ 6 ] = { 1, in[ 0 ], in[ 1 ], in[ 2 ],
│ │ │ │ -
41 in[ 0 ]*in[ 0 ] - in[ 1 ]*in[ 1 ],
│ │ │ │ -
42 in[ 1 ]*in[ 1 ] - in[ 2 ]*in[ 2 ] };
│ │ │ │ -
43 out.resize( size() );
│ │ │ │ -
44 for( unsigned int i = 0; i < size(); ++i )
│ │ │ │ -
45 {
│ │ │ │ -
46 out[ i ] = RangeFieldType( 0 );
│ │ │ │ -
47 for( unsigned int j = 0; j < 6; ++j )
│ │ │ │ -
48 out[ i ] += coefficients[ i ][ j ]*y[ j ];
│ │ │ │ -
49 out[ i ] /= RangeFieldType( 3 );
│ │ │ │ -
50 }
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ -
54 inline void evaluateJacobian ( const typename Traits::DomainType &in,
│ │ │ │ -
55 std::vector< typename Traits::JacobianType > &out ) const
│ │ │ │ -
56 {
│ │ │ │ -
57 typedef typename Traits::RangeFieldType RangeFieldType;
│ │ │ │ -
58 RangeFieldType y0[ 5 ] = { 1, 0, 0, 2*in[ 0 ], 0 };
│ │ │ │ -
59 RangeFieldType y1[ 5 ] = { 0, 1, 0, -2*in[ 1 ], 2*in[ 1 ] };
│ │ │ │ -
60 RangeFieldType y2[ 5 ] = { 0, 0, 1, 0, -2*in[ 2 ] };
│ │ │ │ -
61
│ │ │ │ -
62 out.resize( size() );
│ │ │ │ -
63 for( unsigned int i = 0; i < size(); ++i )
│ │ │ │ -
64 {
│ │ │ │ -
65 out[ i ] = RangeFieldType( 0 );
│ │ │ │ -
66 for( unsigned int j = 0; j < 5; ++j )
│ │ │ │ -
67 {
│ │ │ │ -
68 out[ i ][ 0 ][ 0 ] += coefficients[ i ][ j+1 ]*y0[ j ];
│ │ │ │ -
69 out[ i ][ 0 ][ 1 ] += coefficients[ i ][ j+1 ]*y1[ j ];
│ │ │ │ -
70 out[ i ][ 0 ][ 2 ] += coefficients[ i ][ j+1 ]*y2[ j ];
│ │ │ │ -
71 }
│ │ │ │ -
72 out[ i ] /= RangeFieldType( 3 );
│ │ │ │ -
73 }
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
│ │ │ │ -
77 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
78 const typename Traits::DomainType& in, // position
│ │ │ │ -
79 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
80 {
│ │ │ │ -
81 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
82 if (totalOrder == 0) {
│ │ │ │ -
83 evaluateFunction(in, out);
│ │ │ │ -
84 } else if (totalOrder == 1) {
│ │ │ │ -
85 out.resize(size());
│ │ │ │ -
86 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
87
│ │ │ │ -
88 using RangeFieldType = typename Traits::RangeFieldType;
│ │ │ │ -
89 RangeFieldType y[3][5] = { { 1.0, 0.0, 0.0, 2*in[0], 0.0 },
│ │ │ │ -
90 { 0.0, 1.0, 0.0, -2*in[1], 2*in[1] },
│ │ │ │ -
91 { 0.0, 0.0, 1.0, 0.0, -2*in[2] } };
│ │ │ │ -
92
│ │ │ │ -
93 for (std::size_t i = 0; i < size(); ++i) {
│ │ │ │ -
94 out[i] = RangeFieldType{0};
│ │ │ │ -
95 for (std::size_t j = 0; j < 5; ++j)
│ │ │ │ -
96 out[i] += coefficients[i][j+1] * y[direction][j];
│ │ │ │ -
97 out[i] /= RangeFieldType{3};
│ │ │ │ -
98 }
│ │ │ │ -
99 } else {
│ │ │ │ -
100 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
101 }
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
105 unsigned int order () const
│ │ │ │ -
106 {
│ │ │ │ -
107 return 2;
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109 };
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
111
│ │ │ │ -
112
│ │ │ │ -
113 // RannacherTurek3DLocalBasis::coefficients
│ │ │ │ -
114 // ----------------------------------------
│ │ │ │ -
115
│ │ │ │ -
116 template< class D, class R >
│ │ │ │ -
117 const int RannacherTurek3DLocalBasis< D, R >
│ │ │ │ -
118 ::coefficients[ 6 ][ 6 ] = {{ 2, -7, 2, 2, 4, 2 },
│ │ │ │ -
119 { -1, -1, 2, 2, 4, 2 },
│ │ │ │ -
120 { 2, 2, -7, 2, -2, 2 },
│ │ │ │ -
121 { -1, 2, -1, 2, -2, 2 },
│ │ │ │ -
122 { 2, 2, 2, -7, -2, -4 },
│ │ │ │ -
123 { -1, 2, 2, -1, -2, -4 }};
│ │ │ │ -
124
│ │ │ │ -
125} //namespace Dune
│ │ │ │ -
126
│ │ │ │ -
127#endif // #ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH
│ │ │ │ +
30
│ │ │ │ +
34 std::size_t s = refelem.size(dim-1);
│ │ │ │ +
35 };
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
37} // namespace Dune
│ │ │ │ +
38
│ │ │ │ +
39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
RF RangeFieldType
Export type for range field.
Definition common/localbasis.hh:45
│ │ │ │ -
Definition rannacherturek3dlocalbasis.hh:21
│ │ │ │ -
LocalBasisTraits< D, 3, FieldVector< D, 3 >, R, 1, FieldVector< R, 1 >, FieldMatrix< R, 1, 3 > > Traits
Definition rannacherturek3dlocalbasis.hh:27
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
evaluate all shape functions
Definition rannacherturek3dlocalbasis.hh:36
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition rannacherturek3dlocalbasis.hh:30
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
evaluate jacobian of all shape functions
Definition rannacherturek3dlocalbasis.hh:54
│ │ │ │ -
unsigned int order() const
polynomial order of the shape functions
Definition rannacherturek3dlocalbasis.hh:105
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition rannacherturek3dlocalbasis.hh:77
│ │ │ │ - │ │ │ │ +
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ +
RefElem refelem
The reference element for this edge element.
Definition common.hh:26
│ │ │ │ +
decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) RefElem
The type of the referenceElement.
Definition common.hh:23
│ │ │ │ +
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,179 +1,63 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k │ │ │ │ │ - * _r_a_n_n_a_c_h_e_r_t_u_r_e_k_3_d │ │ │ │ │ -rannacherturek3dlocalbasis.hh │ │ │ │ │ + * _w_h_i_t_n_e_y │ │ │ │ │ + * _e_d_g_e_s_0_._5 │ │ │ │ │ +common.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ +7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 │ │ │ │ │ -19 template< class D, class R > │ │ │ │ │ -_2_0 class _R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -21 { │ │ │ │ │ -22 static const int coefficients[ 6 ][ 6 ]; │ │ │ │ │ -23 │ │ │ │ │ -24 public: │ │ │ │ │ -25 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_ _D_,_ _3_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _D_,_ _3_ _>, │ │ │ │ │ -26 R, 1, FieldVector< R, 1 >, │ │ │ │ │ -_2_7 FieldMatrix< R, 1, 3 > > _T_r_a_i_t_s; │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e { │ │ │ │ │ +16 │ │ │ │ │ +18 template │ │ │ │ │ +_1_9 struct _E_d_g_e_S_0___5_C_o_m_m_o_n { │ │ │ │ │ +_2_1 using _R_e_f_E_l_e_m = │ │ │ │ │ +22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ +23 Dim{})); │ │ │ │ │ +24 │ │ │ │ │ +_2_6 _R_e_f_E_l_e_m _r_e_f_e_l_e_m = referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ +27 Dim{}); │ │ │ │ │ 28 │ │ │ │ │ -_3_0 unsigned int _s_i_z_e () const │ │ │ │ │ -31 { │ │ │ │ │ -32 return 6; │ │ │ │ │ -33 } │ │ │ │ │ -34 │ │ │ │ │ -_3_6 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n ( const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e &in, │ │ │ │ │ -37 std::vector< typename Traits::RangeType > &out ) const │ │ │ │ │ -38 { │ │ │ │ │ -39 typedef typename _T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d_T_y_p_e RangeFieldType; │ │ │ │ │ -40 RangeFieldType y[ 6 ] = { 1, in[ 0 ], in[ 1 ], in[ 2 ], │ │ │ │ │ -41 in[ 0 ]*in[ 0 ] - in[ 1 ]*in[ 1 ], │ │ │ │ │ -42 in[ 1 ]*in[ 1 ] - in[ 2 ]*in[ 2 ] }; │ │ │ │ │ -43 out.resize( _s_i_z_e() ); │ │ │ │ │ -44 for( unsigned int i = 0; i < _s_i_z_e(); ++i ) │ │ │ │ │ -45 { │ │ │ │ │ -46 out[ i ] = RangeFieldType( 0 ); │ │ │ │ │ -47 for( unsigned int j = 0; j < 6; ++j ) │ │ │ │ │ -48 out[ i ] += coefficients[ i ][ j ]*y[ j ]; │ │ │ │ │ -49 out[ i ] /= RangeFieldType( 3 ); │ │ │ │ │ -50 } │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_4 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n ( const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e &in, │ │ │ │ │ -55 std::vector< typename Traits::JacobianType > &out ) const │ │ │ │ │ -56 { │ │ │ │ │ -57 typedef typename _T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d_T_y_p_e RangeFieldType; │ │ │ │ │ -58 RangeFieldType y0[ 5 ] = { 1, 0, 0, 2*in[ 0 ], 0 }; │ │ │ │ │ -59 RangeFieldType y1[ 5 ] = { 0, 1, 0, -2*in[ 1 ], 2*in[ 1 ] }; │ │ │ │ │ -60 RangeFieldType y2[ 5 ] = { 0, 0, 1, 0, -2*in[ 2 ] }; │ │ │ │ │ -61 │ │ │ │ │ -62 out.resize( _s_i_z_e() ); │ │ │ │ │ -63 for( unsigned int i = 0; i < _s_i_z_e(); ++i ) │ │ │ │ │ -64 { │ │ │ │ │ -65 out[ i ] = RangeFieldType( 0 ); │ │ │ │ │ -66 for( unsigned int j = 0; j < 5; ++j ) │ │ │ │ │ -67 { │ │ │ │ │ -68 out[ i ][ 0 ][ 0 ] += coefficients[ i ][ j+1 ]*y0[ j ]; │ │ │ │ │ -69 out[ i ][ 0 ][ 1 ] += coefficients[ i ][ j+1 ]*y1[ j ]; │ │ │ │ │ -70 out[ i ][ 0 ][ 2 ] += coefficients[ i ][ j+1 ]*y2[ j ]; │ │ │ │ │ -71 } │ │ │ │ │ -72 out[ i ] /= RangeFieldType( 3 ); │ │ │ │ │ -73 } │ │ │ │ │ -74 } │ │ │ │ │ -75 │ │ │ │ │ -_7_7 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -78 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -79 std::vector& out) const // return value │ │ │ │ │ -80 { │ │ │ │ │ -81 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -82 if (totalOrder == 0) { │ │ │ │ │ -83 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -84 } else if (totalOrder == 1) { │ │ │ │ │ -85 out.resize(_s_i_z_e()); │ │ │ │ │ -86 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ -_o_r_d_e_r.end(), 1)); │ │ │ │ │ -87 │ │ │ │ │ -88 using RangeFieldType = typename _T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d_T_y_p_e; │ │ │ │ │ -89 RangeFieldType y[3][5] = { { 1.0, 0.0, 0.0, 2*in[0], 0.0 }, │ │ │ │ │ -90 { 0.0, 1.0, 0.0, -2*in[1], 2*in[1] }, │ │ │ │ │ -91 { 0.0, 0.0, 1.0, 0.0, -2*in[2] } }; │ │ │ │ │ -92 │ │ │ │ │ -93 for (std::size_t i = 0; i < _s_i_z_e(); ++i) { │ │ │ │ │ -94 out[i] = RangeFieldType{0}; │ │ │ │ │ -95 for (std::size_t j = 0; j < 5; ++j) │ │ │ │ │ -96 out[i] += coefficients[i][j+1] * y[direction][j]; │ │ │ │ │ -97 out[i] /= RangeFieldType{3}; │ │ │ │ │ -98 } │ │ │ │ │ -99 } else { │ │ │ │ │ -100 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -101 } │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -_1_0_5 unsigned int _o_r_d_e_r () const │ │ │ │ │ -106 { │ │ │ │ │ -107 return 2; │ │ │ │ │ -108 } │ │ │ │ │ -109 }; │ │ │ │ │ -110 │ │ │ │ │ -111 │ │ │ │ │ -112 │ │ │ │ │ -113 // RannacherTurek3DLocalBasis::coefficients │ │ │ │ │ -114 // ---------------------------------------- │ │ │ │ │ -115 │ │ │ │ │ -116 template< class D, class R > │ │ │ │ │ -117 const int RannacherTurek3DLocalBasis< D, R > │ │ │ │ │ -118 ::coefficients[ 6 ][ 6 ] = {{ 2, -7, 2, 2, 4, 2 }, │ │ │ │ │ -119 { -1, -1, 2, 2, 4, 2 }, │ │ │ │ │ -120 { 2, 2, -7, 2, -2, 2 }, │ │ │ │ │ -121 { -1, 2, -1, 2, -2, 2 }, │ │ │ │ │ -122 { 2, 2, 2, -7, -2, -4 }, │ │ │ │ │ -123 { -1, 2, 2, -1, -2, -4 }}; │ │ │ │ │ -124 │ │ │ │ │ -125} //namespace Dune │ │ │ │ │ -126 │ │ │ │ │ -127#endif // #ifndef DUNE_RANNACHER_TUREK_3D_LOCALBASIS_HH │ │ │ │ │ +30 │ │ │ │ │ +_3_4 std::size_t _s = _r_e_f_e_l_e_m.size(dim-1); │ │ │ │ │ +35 }; │ │ │ │ │ +36 │ │ │ │ │ +37} // namespace Dune │ │ │ │ │ +38 │ │ │ │ │ +39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_R_a_n_g_e_F_i_e_l_d_T_y_p_e │ │ │ │ │ -RF RangeFieldType │ │ │ │ │ -Export type for range field. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, FieldVector< D, 3 >, R, 1, FieldVector< R, 1 >, │ │ │ │ │ -FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -evaluate all shape functions │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -evaluate jacobian of all shape functions │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -polynomial order of the shape functions │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_R_a_n_n_a_c_h_e_r_T_u_r_e_k_3_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn rannacherturek3dlocalbasis.hh:77 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n │ │ │ │ │ +Common base class for edge elements. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:19 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_r_e_f_e_l_e_m │ │ │ │ │ +RefElem refelem │ │ │ │ │ +The reference element for this edge element. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_R_e_f_E_l_e_m │ │ │ │ │ +decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) │ │ │ │ │ +RefElem │ │ │ │ │ +The type of the referenceElement. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_s │ │ │ │ │ +std::size_t s │ │ │ │ │ +The number of base functions. │ │ │ │ │ +DDeeffiinniittiioonn common.hh:34 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: common.hh File Reference │ │ │ │ +dune-localfunctions: edges0.5.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
common.hh File Reference
│ │ │ │ +
edges0.5.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <dune/geometry/dimension.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/basis.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/coefficients.hh>
│ │ │ │ +#include <dune/localfunctions/whitney/edges0.5/interpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::EdgeS0_5Common< dim, DF >
 Common base class for edge elements. More...
class  Dune::EdgeS0_5FiniteElement< Geometry, RF >
 FiniteElement for lowest order edge elements on simplices. More...
 
struct  Dune::EdgeS0_5FiniteElement< Geometry, RF >::Traits
 
struct  Dune::EdgeS0_5FiniteElementFactory< Geometry, RF >
 Factory for EdgeS0_5FiniteElement objects. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _w_h_i_t_n_e_y │ │ │ │ │ - * _e_d_g_e_s_0_._5 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -common.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +edges0.5.hh File Reference │ │ │ │ │ #include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_<_ _d_i_m_,_ _D_F_ _> │ │ │ │ │ -  Common base class for edge elements. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ +  FiniteElement for lowest order edge elements on simplices. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ +  Factory for _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t objects. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00116_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: common.hh Source File │ │ │ │ +dune-localfunctions: edges0.5.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,60 +70,132 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
common.hh
│ │ │ │ +
edges0.5.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │
5
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ +
6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │ +
7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │
8
│ │ │ │ -
9#include <cstddef>
│ │ │ │ +
9#include <dune/geometry/type.hh>
│ │ │ │
10
│ │ │ │ -
11#include <dune/geometry/dimension.hh>
│ │ │ │ -
12#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
13#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune {
│ │ │ │
16
│ │ │ │ -
18 template<std::size_t dim, class DF = double>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 using RefElem =
│ │ │ │ -
22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim),
│ │ │ │ -
23 Dim<dim>{}));
│ │ │ │ -
24
│ │ │ │ -
26 RefElem refelem = referenceElement(DF{}, GeometryTypes::simplex(dim),
│ │ │ │ -
27 Dim<dim>{});
│ │ │ │ -
28
│ │ │ │ -
30
│ │ │ │ -
34 std::size_t s = refelem.size(dim-1);
│ │ │ │ -
35 };
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
37} // namespace Dune
│ │ │ │ -
38
│ │ │ │ -
39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH
│ │ │ │ +
18 //
│ │ │ │ +
19 // FiniteElement
│ │ │ │ +
20 //
│ │ │ │ +
21
│ │ │ │ +
23
│ │ │ │ +
41 template<class Geometry, class RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
43 public:
│ │ │ │ +
│ │ │ │ +
47 struct Traits {
│ │ │ │ + │ │ │ │ +
49 typedef EdgeS0_5Interpolation<Geometry,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52 };
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 typename Traits::Basis basis_;
│ │ │ │ +
56 typename Traits::Interpolation interpolation_;
│ │ │ │ +
57 static const typename Traits::Coefficients& coefficients_;
│ │ │ │ +
58
│ │ │ │ +
59 public:
│ │ │ │ +
61
│ │ │ │ +
64 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
65 EdgeS0_5FiniteElement(const Geometry& geo,
│ │ │ │ +
66 const VertexOrder& vertexOrder) :
│ │ │ │ +
67 basis_(geo, vertexOrder), interpolation_(geo, vertexOrder)
│ │ │ │ +
68 { }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
71 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ +
│ │ │ │ +
73 const typename Traits::Interpolation& interpolation() const
│ │ │ │ +
74 { return interpolation_; }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
76 const typename Traits::Coefficients& coefficients() const
│ │ │ │ +
77 { return coefficients_; }
│ │ │ │ +
│ │ │ │ +
79 static constexpr GeometryType type() { return GeometryTypes::simplex(Geometry::mydimension); }
│ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
82 template<class Geometry, class RF>
│ │ │ │ + │ │ │ │ +
84 EdgeS0_5FiniteElement<Geometry, RF>::coefficients_ =
│ │ │ │ +
85 typename Traits::Coefficients();
│ │ │ │ +
86
│ │ │ │ +
88 //
│ │ │ │ +
89 // Factory
│ │ │ │ +
90 //
│ │ │ │ +
91
│ │ │ │ +
93
│ │ │ │ +
102 template<class Geometry, class RF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
105
│ │ │ │ +
107
│ │ │ │ +
121 template<class VertexOrder>
│ │ │ │ +
│ │ │ │ +
122 const FiniteElement make(const Geometry& geometry,
│ │ │ │ +
123 const VertexOrder& vertexOrder)
│ │ │ │ +
124 { return FiniteElement(geometry, vertexOrder); }
│ │ │ │ +
│ │ │ │ +
125 };
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
127} // namespace Dune
│ │ │ │ +
128
│ │ │ │ +
129#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Common base class for edge elements.
Definition common.hh:19
│ │ │ │ -
RefElem refelem
The reference element for this edge element.
Definition common.hh:26
│ │ │ │ -
decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) RefElem
The type of the referenceElement.
Definition common.hh:23
│ │ │ │ -
std::size_t s
The number of base functions.
Definition common.hh:34
│ │ │ │ +
FiniteElement for lowest order edge elements on simplices.
Definition edges0.5.hh:42
│ │ │ │ +
EdgeS0_5FiniteElement(const Geometry &geo, const VertexOrder &vertexOrder)
Constructor.
Definition edges0.5.hh:65
│ │ │ │ +
static constexpr GeometryType type()
return geometry type of this element
Definition edges0.5.hh:79
│ │ │ │ +
const Traits::Basis & basis() const
return reference to the basis object
Definition edges0.5.hh:71
│ │ │ │ +
const Traits::Interpolation & interpolation() const
return reference to the interpolation object
Definition edges0.5.hh:73
│ │ │ │ +
const Traits::Coefficients & coefficients() const
return reference to the coefficients object
Definition edges0.5.hh:76
│ │ │ │ +
Definition edges0.5.hh:47
│ │ │ │ +
EdgeS0_5Coefficients< Geometry::mydimension > Coefficients
Definition edges0.5.hh:51
│ │ │ │ +
EdgeS0_5Interpolation< Geometry, typename Basis::Traits > Interpolation
Definition edges0.5.hh:50
│ │ │ │ +
EdgeS0_5Basis< Geometry, RF > Basis
Definition edges0.5.hh:48
│ │ │ │ +
Factory for EdgeS0_5FiniteElement objects.
Definition edges0.5.hh:103
│ │ │ │ +
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct the factory
Definition edges0.5.hh:122
│ │ │ │ +
EdgeS0_5FiniteElement< Geometry, RF > FiniteElement
Definition edges0.5.hh:104
│ │ │ │ +
Basis for order 0.5 (lowest order) edge elements on simplices.
Definition whitney/edges0.5/basis.hh:38
│ │ │ │ +
export type traits for function signature
Definition whitney/edges0.5/basis.hh:41
│ │ │ │ +
Coefficients for lowest order edge elements on simplices.
Definition whitney/edges0.5/coefficients.hh:30
│ │ │ │ +
Interpolation for lowest order edge elements on simplices.
Definition whitney/edges0.5/interpolation.hh:33
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,63 +1,151 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _w_h_i_t_n_e_y │ │ │ │ │ - * _e_d_g_e_s_0_._5 │ │ │ │ │ -common.hh │ │ │ │ │ +edges0.5.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ 5 │ │ │ │ │ -6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ -7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ +6#ifndef DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ +7#define DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ 8 │ │ │ │ │ -9#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_b_a_s_i_s_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_w_h_i_t_n_e_y_/_e_d_g_e_s_0_._5_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ 14 │ │ │ │ │ 15namespace _D_u_n_e { │ │ │ │ │ 16 │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 struct _E_d_g_e_S_0___5_C_o_m_m_o_n { │ │ │ │ │ -_2_1 using _R_e_f_E_l_e_m = │ │ │ │ │ -22 decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ -23 Dim{})); │ │ │ │ │ -24 │ │ │ │ │ -_2_6 _R_e_f_E_l_e_m _r_e_f_e_l_e_m = referenceElement(DF{}, GeometryTypes::simplex(dim), │ │ │ │ │ -27 Dim{}); │ │ │ │ │ -28 │ │ │ │ │ -30 │ │ │ │ │ -_3_4 std::size_t _s = _r_e_f_e_l_e_m.size(dim-1); │ │ │ │ │ -35 }; │ │ │ │ │ -36 │ │ │ │ │ -37} // namespace Dune │ │ │ │ │ -38 │ │ │ │ │ -39#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_COMMON_HH │ │ │ │ │ +18 // │ │ │ │ │ +19 // FiniteElement │ │ │ │ │ +20 // │ │ │ │ │ +21 │ │ │ │ │ +23 │ │ │ │ │ +41 template │ │ │ │ │ +_4_2 class _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ +43 public: │ │ │ │ │ +_4_7 struct _T_r_a_i_t_s { │ │ │ │ │ +_4_8 typedef _E_d_g_e_S_0___5_B_a_s_i_s_<_G_e_o_m_e_t_r_y_,_ _R_F_> _B_a_s_i_s; │ │ │ │ │ +49 typedef _E_d_g_e_S_0___5_I_n_t_e_r_p_o_l_a_t_i_o_n _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +_5_1 typedef _E_d_g_e_S_0___5_C_o_e_f_f_i_c_i_e_n_t_s_<_G_e_o_m_e_t_r_y_:_:_m_y_d_i_m_e_n_s_i_o_n_> _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ +52 }; │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ +56 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ +57 static const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& coefficients_; │ │ │ │ │ +58 │ │ │ │ │ +59 public: │ │ │ │ │ +61 │ │ │ │ │ +64 template │ │ │ │ │ +_6_5 _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t(const Geometry& geo, │ │ │ │ │ +66 const VertexOrder& vertexOrder) : │ │ │ │ │ +67 basis_(geo, vertexOrder), interpolation_(geo, vertexOrder) │ │ │ │ │ +68 { } │ │ │ │ │ +69 │ │ │ │ │ +_7_1 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ +_7_3 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ +74 { return interpolation_; } │ │ │ │ │ +_7_6 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ +77 { return coefficients_; } │ │ │ │ │ +_7_9 static constexpr GeometryType _t_y_p_e() { return GeometryTypes::simplex │ │ │ │ │ +(Geometry::mydimension); } │ │ │ │ │ +80 }; │ │ │ │ │ +81 │ │ │ │ │ +82 template │ │ │ │ │ +83 const typename _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_>_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& │ │ │ │ │ +84 EdgeS0_5FiniteElement::coefficients_ = │ │ │ │ │ +85 typename Traits::Coefficients(); │ │ │ │ │ +86 │ │ │ │ │ +88 // │ │ │ │ │ +89 // Factory │ │ │ │ │ +90 // │ │ │ │ │ +91 │ │ │ │ │ +93 │ │ │ │ │ +102 template │ │ │ │ │ +_1_0_3 struct _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ +_1_0_4 typedef _E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ +105 │ │ │ │ │ +107 │ │ │ │ │ +121 template │ │ │ │ │ +_1_2_2 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry, │ │ │ │ │ +123 const VertexOrder& vertexOrder) │ │ │ │ │ +124 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(geometry, vertexOrder); } │ │ │ │ │ +125 }; │ │ │ │ │ +126 │ │ │ │ │ +127} // namespace Dune │ │ │ │ │ +128 │ │ │ │ │ +129#endif // DUNE_LOCALFUNCTIONS_WHITNEY_EDGES0_5_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n │ │ │ │ │ -Common base class for edge elements. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_r_e_f_e_l_e_m │ │ │ │ │ -RefElem refelem │ │ │ │ │ -The reference element for this edge element. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_R_e_f_E_l_e_m │ │ │ │ │ -decltype(referenceElement(DF{}, GeometryTypes::simplex(dim), Dim< dim >{})) │ │ │ │ │ -RefElem │ │ │ │ │ -The type of the referenceElement. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_m_m_o_n_:_:_s │ │ │ │ │ -std::size_t s │ │ │ │ │ -The number of base functions. │ │ │ │ │ -DDeeffiinniittiioonn common.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +FiniteElement for lowest order edge elements on simplices. │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +EdgeS0_5FiniteElement(const Geometry &geo, const VertexOrder &vertexOrder) │ │ │ │ │ +Constructor. │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +return geometry type of this element │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ +const Traits::Basis & basis() const │ │ │ │ │ +return reference to the basis object │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::Interpolation & interpolation() const │ │ │ │ │ +return reference to the interpolation object │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::Coefficients & coefficients() const │ │ │ │ │ +return reference to the coefficients object │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +EdgeS0_5Coefficients< Geometry::mydimension > Coefficients │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +EdgeS0_5Interpolation< Geometry, typename Basis::Traits > Interpolation │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ +EdgeS0_5Basis< Geometry, RF > Basis │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ +Factory for EdgeS0_5FiniteElement objects. │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ +const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ +&vertexOrder) │ │ │ │ │ +construct the factory │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +EdgeS0_5FiniteElement< Geometry, RF > FiniteElement │ │ │ │ │ +DDeeffiinniittiioonn edges0.5.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_B_a_s_i_s │ │ │ │ │ +Basis for order 0.5 (lowest order) edge elements on simplices. │ │ │ │ │ +DDeeffiinniittiioonn whitney/edges0.5/basis.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn whitney/edges0.5/basis.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Coefficients for lowest order edge elements on simplices. │ │ │ │ │ +DDeeffiinniittiioonn whitney/edges0.5/coefficients.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_E_d_g_e_S_0___5_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Interpolation for lowest order edge elements on simplices. │ │ │ │ │ +DDeeffiinniittiioonn whitney/edges0.5/interpolation.hh:33 │ │ │ │ │ +_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_b_a_s_i_s_._h_h │ │ │ │ │ +_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2withelementbubble.hh File Reference │ │ │ │ +dune-localfunctions: polynomialbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalp2withelementbubble.hh File Reference
│ │ │ │ +
polynomialbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/utility/coeffmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ +#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ +#include <dune/localfunctions/utility/basisevaluator.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement< D, R, dim >
class  Dune::PolynomialBasis< Eval, CM, D, R >
 
struct  Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DVector >
 
struct  Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DomainVector >
 
class  Dune::PolynomialBasisWithMatrix< Eval, CM, D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,33 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_h_i_e_r_a_r_c_h_i_c_a_l_/_h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_/ │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h> │ │ │ │ │ +polynomialbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_c_o_e_f_f_m_a_t_r_i_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_V_e_c_t_o_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ + _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00119_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2withelementbubble.hh Source File │ │ │ │ +dune-localfunctions: polynomialbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,119 +70,481 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalp2withelementbubble.hh
│ │ │ │ +
polynomialbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_POLYNOMIALBASIS_HH
│ │ │ │ +
6#define DUNE_POLYNOMIALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
12
│ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
19 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
21 {
│ │ │ │ + │ │ │ │ +
14
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20namespace Dune
│ │ │ │ +
21{
│ │ │ │
22
│ │ │ │ -
23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement only implemented for dim==2.");
│ │ │ │ -
24
│ │ │ │ -
25 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
35 {}
│ │ │ │ -
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ -
39 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
40 {
│ │ │ │ -
41 return basis_;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 return coefficients_;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 return interpolation_;
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
59 unsigned int size () const
│ │ │ │ -
60 {
│ │ │ │ -
61 return basis_.size();
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
66 static constexpr GeometryType type ()
│ │ │ │ -
67 {
│ │ │ │ -
68 return GeometryTypes::triangle;
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
71 private:
│ │ │ │ - │ │ │ │ +
23 // PolynomialBasis
│ │ │ │ +
24 // ---------------
│ │ │ │ +
25
│ │ │ │ +
63 template< class Eval, class CM, class D=double, class R=double >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
65 {
│ │ │ │ + │ │ │ │ +
67 typedef Eval Evaluator;
│ │ │ │ +
68
│ │ │ │ +
69 public:
│ │ │ │ + │ │ │ │ +
71
│ │ │ │ +
72 typedef typename CoefficientMatrix::Field StorageField;
│ │ │ │
73
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ - │ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81#endif
│ │ │ │ -
Hierarchical p2 shape functions for the simplex.
│ │ │ │ - │ │ │ │ +
74 static const unsigned int dimension = Evaluator::dimension;
│ │ │ │ +
75 static const unsigned int dimRange = Evaluator::dimRange*CoefficientMatrix::blockSize;
│ │ │ │ + │ │ │ │ +
77 R,dimRange,FieldVector<R,dimRange>,
│ │ │ │ +
78 FieldMatrix<R,dimRange,dimension> > Traits;
│ │ │ │ +
79 typedef typename Evaluator::Basis Basis;
│ │ │ │ +
80 typedef typename Evaluator::DomainVector DomainVector;
│ │ │ │ +
81 template <class Fy>
│ │ │ │ +
82 using HessianFyType = FieldVector<FieldMatrix<Fy,dimension,dimension>,dimRange>;
│ │ │ │ + │ │ │ │ +
84
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
86 const CoefficientMatrix &coeffMatrix,
│ │ │ │ +
87 unsigned int size)
│ │ │ │ +
88 : basis_(basis),
│ │ │ │ +
89 coeffMatrix_(&coeffMatrix),
│ │ │ │ +
90 eval_(basis),
│ │ │ │ + │ │ │ │ +
92 size_(size)
│ │ │ │ +
93 {
│ │ │ │ +
94 // assert(coeffMatrix_);
│ │ │ │ +
95 // assert(size_ <= coeffMatrix.size()); // !!!
│ │ │ │ +
96 }
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
│ │ │ │ +
98 const Basis &basis () const
│ │ │ │ +
99 {
│ │ │ │ +
100 return basis_;
│ │ │ │ +
101 }
│ │ │ │ +
│ │ │ │ +
102
│ │ │ │ +
│ │ │ │ +
103 const CoefficientMatrix &matrix () const
│ │ │ │ +
104 {
│ │ │ │ +
105 return *coeffMatrix_;
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
108 unsigned int order () const
│ │ │ │ +
109 {
│ │ │ │ +
110 return order_;
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
│ │ │ │ +
113 unsigned int size () const
│ │ │ │ +
114 {
│ │ │ │ +
115 return size_;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
119 void evaluateFunction (const typename Traits::DomainType& x,
│ │ │ │ +
120 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
121 {
│ │ │ │ +
122 out.resize(size());
│ │ │ │ +
123 evaluate(x,out);
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ +
127 void evaluateJacobian (const typename Traits::DomainType& x, // position
│ │ │ │ +
128 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
129 {
│ │ │ │ +
130 out.resize(size());
│ │ │ │ +
131 jacobian(x,out);
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
│ │ │ │ +
135 void evaluateHessian (const typename Traits::DomainType& x, // position
│ │ │ │ +
136 std::vector<HessianType>& out) const // return value
│ │ │ │ +
137 {
│ │ │ │ +
138 out.resize(size());
│ │ │ │ +
139 hessian(x,out);
│ │ │ │ +
140 }
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
│ │ │ │ +
143 void partial (const std::array<unsigned int, dimension>& order,
│ │ │ │ +
144 const typename Traits::DomainType& in, // position
│ │ │ │ +
145 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
146 {
│ │ │ │ +
147 out.resize(size());
│ │ │ │ +
148 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
149 if (totalOrder == 0) {
│ │ │ │ +
150 evaluateFunction(in, out);
│ │ │ │ +
151 }
│ │ │ │ +
152 else if (totalOrder == 1) {
│ │ │ │ +
153 std::vector<typename Traits::JacobianType> jacs(out.size());
│ │ │ │ +
154 unsigned int k;
│ │ │ │ +
155 for (unsigned int i=0;i<order.size();++i)
│ │ │ │ +
156 if (order[i]==1) k=i;
│ │ │ │ +
157 evaluateJacobian(in, jacs);
│ │ │ │ +
158 for (unsigned int i=0;i<out.size();++i)
│ │ │ │ +
159 for (unsigned int r=0;r<Traits::RangeType::dimension;++r)
│ │ │ │ +
160 out[i][r] = jacs[i][r][k];
│ │ │ │ +
161 }
│ │ │ │ +
162 else if (totalOrder == 2) {
│ │ │ │ +
163 std::vector<HessianType> hesss(out.size());
│ │ │ │ +
164 int k=-1,l=-1;
│ │ │ │ +
165 for (unsigned int i=0;i<order.size();++i) {
│ │ │ │ +
166 if (order[i] >= 1 && k == -1)
│ │ │ │ +
167 k = i;
│ │ │ │ +
168 else if (order[i]==1) l=i;
│ │ │ │ +
169 }
│ │ │ │ +
170 if (l==-1) l=k;
│ │ │ │ +
171 evaluateHessian(in, hesss);
│ │ │ │ +
172 for (unsigned int i=0;i<out.size();++i)
│ │ │ │ +
173 for (unsigned int r=0;r<Traits::RangeType::dimension;++r)
│ │ │ │ +
174 out[i][r] = hesss[i][r][k][l];
│ │ │ │ +
175 }
│ │ │ │ +
176 else {
│ │ │ │ +
177 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
178 }
│ │ │ │ +
179 }
│ │ │ │ +
│ │ │ │ +
180
│ │ │ │ +
181 template< unsigned int deriv, class F >
│ │ │ │ +
│ │ │ │ +
182 void evaluate ( const DomainVector &x, F *values ) const
│ │ │ │ +
183 {
│ │ │ │ +
184 coeffMatrix_->mult( eval_.template evaluate<deriv>( x ), size(), values);
│ │ │ │ +
185 }
│ │ │ │ +
│ │ │ │ +
186 template< unsigned int deriv, class DVector, class F >
│ │ │ │ +
│ │ │ │ +
187 void evaluate ( const DVector &x, F *values ) const
│ │ │ │ +
188 {
│ │ │ │ +
189 assert( DVector::dimension == dimension);
│ │ │ │ +
190 DomainVector bx;
│ │ │ │ +
191 for( int d = 0; d < dimension; ++d )
│ │ │ │ +
192 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
193 evaluate<deriv>( bx, values );
│ │ │ │ +
194 }
│ │ │ │ +
│ │ │ │ +
195
│ │ │ │ +
196 template <bool dummy,class DVector>
│ │ │ │ +
│ │ │ │ +
197 struct Convert
│ │ │ │ +
198 {
│ │ │ │ +
│ │ │ │ +
199 static DomainVector apply( const DVector &x )
│ │ │ │ +
200 {
│ │ │ │ +
201 assert( DVector::dimension == dimension);
│ │ │ │ +
202 DomainVector bx;
│ │ │ │ +
203 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ +
204 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
205 return bx;
│ │ │ │ +
206 }
│ │ │ │ +
│ │ │ │ +
207 };
│ │ │ │ +
│ │ │ │ +
208 template <bool dummy>
│ │ │ │ +
│ │ │ │ +
209 struct Convert<dummy,DomainVector>
│ │ │ │ +
210 {
│ │ │ │ +
│ │ │ │ +
211 static const DomainVector &apply( const DomainVector &x )
│ │ │ │ +
212 {
│ │ │ │ +
213 return x;
│ │ │ │ +
214 }
│ │ │ │ +
│ │ │ │ +
215 };
│ │ │ │ +
│ │ │ │ +
216 template< unsigned int deriv, class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
217 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ +
218 {
│ │ │ │ +
219 assert(values.size()>=size());
│ │ │ │ + │ │ │ │ +
221 coeffMatrix_->mult( eval_.template evaluate<deriv>( bx ), values );
│ │ │ │ +
222 }
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
224 template <class Fy>
│ │ │ │ +
│ │ │ │ +
225 void evaluate ( const DomainVector &x, std::vector<FieldVector<Fy,dimRange> > &values ) const
│ │ │ │ +
226 {
│ │ │ │ +
227 evaluate<0>(x,values);
│ │ │ │ +
228 }
│ │ │ │ +
│ │ │ │ +
229 template< class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
230 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ +
231 {
│ │ │ │ +
232 assert( DVector::dimension == dimension);
│ │ │ │ +
233 DomainVector bx;
│ │ │ │ +
234 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ +
235 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
236 evaluate<0>( bx, values );
│ │ │ │ +
237 }
│ │ │ │ +
│ │ │ │ +
238
│ │ │ │ +
239 template< unsigned int deriv, class Vector >
│ │ │ │ +
│ │ │ │ +
240 void evaluateSingle ( const DomainVector &x, Vector &values ) const
│ │ │ │ +
241 {
│ │ │ │ +
242 assert(values.size()>=size());
│ │ │ │ +
243 coeffMatrix_->template mult<deriv>( eval_.template evaluate<deriv>( x ), values );
│ │ │ │ +
244 }
│ │ │ │ +
│ │ │ │ +
245 template< unsigned int deriv, class Fy >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
247 std::vector< FieldVector<FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size>,dimRange> > &values) const
│ │ │ │ +
248 {
│ │ │ │ +
249 evaluateSingle<deriv>(x,reinterpret_cast<std::vector< FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size*dimRange> >&>(values));
│ │ │ │ +
250 }
│ │ │ │ +
│ │ │ │ +
251 template< unsigned int deriv, class Fy >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
253 std::vector< FieldVector<LFETensor<Fy,dimension,deriv>,dimRange> > &values) const
│ │ │ │ +
254 {
│ │ │ │ +
255 evaluateSingle<deriv>(x,reinterpret_cast<std::vector< FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size*dimRange> >&>(values));
│ │ │ │ +
256 }
│ │ │ │ +
│ │ │ │ +
257
│ │ │ │ +
258 template <class Fy>
│ │ │ │ +
│ │ │ │ +
259 void jacobian ( const DomainVector &x,
│ │ │ │ +
260 std::vector<FieldMatrix<Fy,dimRange,dimension> > &values ) const
│ │ │ │ +
261 {
│ │ │ │ +
262 assert(values.size()>=size());
│ │ │ │ +
263 evaluateSingle<1>(x,reinterpret_cast<std::vector<FieldVector<Fy,dimRange*dimension> >&>(values));
│ │ │ │ +
264 }
│ │ │ │ +
│ │ │ │ +
265 template< class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
266 void jacobian ( const DVector &x, RVector &values ) const
│ │ │ │ +
267 {
│ │ │ │ +
268 assert( DVector::dimension == dimension);
│ │ │ │ +
269 DomainVector bx;
│ │ │ │ +
270 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ +
271 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
272 jacobian( bx, values );
│ │ │ │ +
273 }
│ │ │ │ +
│ │ │ │ +
274 template <class Fy>
│ │ │ │ +
│ │ │ │ +
275 void hessian ( const DomainVector &x,
│ │ │ │ +
276 std::vector<HessianFyType<Fy>> &values ) const
│ │ │ │ +
277 {
│ │ │ │ +
278 assert(values.size()>=size());
│ │ │ │ +
279 // only upper part of hessians matrix is computed - so we have
│ │ │ │ +
280 // y[0] = FV< FV<Fy,d*(d+1)/2>, dimRange>
│ │ │ │ +
281 const unsigned int hsize = LFETensor<Fy,dimension,2>::size;
│ │ │ │ +
282 std::vector< FieldVector< FieldVector<Fy,hsize>, dimRange> > y( size() );
│ │ │ │ +
283 evaluateSingle<2>(x, y);
│ │ │ │ +
284 unsigned int q = 0;
│ │ │ │ +
285 for (unsigned int i = 0; i < size(); ++i)
│ │ │ │ +
286 for (unsigned int r = 0; r < dimRange; ++r)
│ │ │ │ +
287 {
│ │ │ │ +
288 q = 0;
│ │ │ │ +
289 // tensor-based things follow unintuitive index sceme
│ │ │ │ +
290 // e.g. for dim = 3, the k-l index of y is 00,01,11,02,12,22, i.e. partial derivatives
│ │ │ │ +
291 // are ordered: xx,xy,yy,xz,yz,zz
│ │ │ │ +
292
│ │ │ │ +
293 // Fill values 'directionwise'
│ │ │ │ +
294 for (unsigned int k = 0; k < dimension; ++k)
│ │ │ │ +
295 for (unsigned int l = 0; l <= k; ++l)
│ │ │ │ +
296 {
│ │ │ │ +
297
│ │ │ │ +
298 values[i][r][k][l] = y[i][r][q];
│ │ │ │ +
299 values[i][r][l][k] = y[i][r][q];
│ │ │ │ +
300 assert(q < hsize);
│ │ │ │ +
301 ++q;
│ │ │ │ +
302 }
│ │ │ │ +
303 }
│ │ │ │ +
304 // evaluateSingle<2>(x,reinterpret_cast<std::vector<FieldVector<Fy,dimRange*dimension*dimension> >&>(values));
│ │ │ │ +
305 }
│ │ │ │ +
│ │ │ │ +
306 template< class DVector, class HVector >
│ │ │ │ +
│ │ │ │ +
307 void hessian ( const DVector &x, HVector &values ) const
│ │ │ │ +
308 {
│ │ │ │ +
309 assert( DVector::dimension == dimension);
│ │ │ │ +
310 DomainVector bx;
│ │ │ │ +
311 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ +
312 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
313 hessian( bx, values );
│ │ │ │ +
314 }
│ │ │ │ +
│ │ │ │ +
315
│ │ │ │ +
316 template <class Fy>
│ │ │ │ +
│ │ │ │ +
317 void integrate ( std::vector<Fy> &values ) const
│ │ │ │ +
318 {
│ │ │ │ +
319 assert(values.size()>=size());
│ │ │ │ +
320 coeffMatrix_->mult( eval_.template integrate(), values );
│ │ │ │ +
321 }
│ │ │ │ +
│ │ │ │ +
322
│ │ │ │ +
323 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
325 : basis_(other.basis_),
│ │ │ │ + │ │ │ │ +
327 eval_(basis_),
│ │ │ │ + │ │ │ │ +
329 size_(other.size_)
│ │ │ │ +
330 {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
332 const Basis &basis_;
│ │ │ │ + │ │ │ │ +
334 mutable Evaluator eval_;
│ │ │ │ +
335 unsigned int order_,size_;
│ │ │ │ +
336 };
│ │ │ │ +
│ │ │ │ +
337
│ │ │ │ +
344 template< class Eval, class CM = SparseCoeffMatrix<typename Eval::Field,Eval::dimRange>,
│ │ │ │ +
345 class D=double, class R=double>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
347 : public PolynomialBasis< Eval, CM, D, R >
│ │ │ │ +
348 {
│ │ │ │ +
349 public:
│ │ │ │ + │ │ │ │ +
351
│ │ │ │ +
352 private:
│ │ │ │ +
353 typedef Eval Evaluator;
│ │ │ │ +
354
│ │ │ │ + │ │ │ │ + │ │ │ │ +
357
│ │ │ │ +
358 public:
│ │ │ │ +
359 typedef typename Base::Basis Basis;
│ │ │ │ +
360
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
362 : Base(basis,coeffMatrix_,0)
│ │ │ │ +
363 {}
│ │ │ │ +
│ │ │ │ +
364
│ │ │ │ +
365 template <class Matrix>
│ │ │ │ +
│ │ │ │ +
366 void fill(const Matrix& matrix)
│ │ │ │ +
367 {
│ │ │ │ +
368 coeffMatrix_.fill(matrix);
│ │ │ │ +
369 this->size_ = coeffMatrix_.size();
│ │ │ │ +
370 }
│ │ │ │ +
│ │ │ │ +
371 template <class Matrix>
│ │ │ │ +
│ │ │ │ +
372 void fill(const Matrix& matrix,int size)
│ │ │ │ +
373 {
│ │ │ │ +
374 coeffMatrix_.fill(matrix);
│ │ │ │ +
375 assert(size<=coeffMatrix_.size());
│ │ │ │ +
376 this->size_ = size;
│ │ │ │ +
377 }
│ │ │ │ +
│ │ │ │ +
378
│ │ │ │ +
379 private:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
382 CoefficientMatrix coeffMatrix_;
│ │ │ │ +
383 };
│ │ │ │ +
│ │ │ │ +
384}
│ │ │ │ +
385#endif // DUNE_POLYNOMIALBASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Definition hierarchicalp2withelementbubble.hh:21
│ │ │ │ -
LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, HierarchicalSimplexP2WithElementBubbleLocalInterpolation< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits
Definition hierarchicalp2withelementbubble.hh:30
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalp2withelementbubble.hh:59
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalp2withelementbubble.hh:39
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalp2withelementbubble.hh:46
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalp2withelementbubble.hh:53
│ │ │ │ -
static constexpr GeometryType type()
Definition hierarchicalp2withelementbubble.hh:66
│ │ │ │ -
HierarchicalP2WithElementBubbleLocalFiniteElement()
Definition hierarchicalp2withelementbubble.hh:34
│ │ │ │ -
Definition hierarchicalsimplexp2withelementbubble.hh:26
│ │ │ │ -
The local finite element needed for the Zou-Kornhuber estimator for Signorini problems.
Definition hierarchicalsimplexp2withelementbubble.hh:414
│ │ │ │ -
Definition hierarchicalsimplexp2withelementbubble.hh:456
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │ +
void evaluate(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:230
│ │ │ │ +
void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > &values) const
Definition polynomialbasis.hh:225
│ │ │ │ +
PolynomialBasis(const PolynomialBasis &other)
Definition polynomialbasis.hh:324
│ │ │ │ +
void evaluate(const DVector &x, F *values) const
Definition polynomialbasis.hh:187
│ │ │ │ +
void evaluateHessian(const typename Traits::DomainType &x, std::vector< HessianType > &out) const
Evaluate Jacobian of all shape functions.
Definition polynomialbasis.hh:135
│ │ │ │ +
CoefficientMatrix::Field StorageField
Definition polynomialbasis.hh:72
│ │ │ │ +
static const unsigned int dimRange
Definition polynomialbasis.hh:75
│ │ │ │ +
void jacobian(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:266
│ │ │ │ +
Evaluator::DomainVector DomainVector
Definition polynomialbasis.hh:80
│ │ │ │ +
Evaluator::Basis Basis
Definition polynomialbasis.hh:79
│ │ │ │ +
void evaluateSingle(const DomainVector &x, Vector &values) const
Definition polynomialbasis.hh:240
│ │ │ │ +
void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< Fy, dimension, deriv >, dimRange > > &values) const
Definition polynomialbasis.hh:252
│ │ │ │ +
void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, dimension > > &values) const
Definition polynomialbasis.hh:259
│ │ │ │ +
const CoefficientMatrix & matrix() const
Definition polynomialbasis.hh:103
│ │ │ │ +
const Basis & basis_
Definition polynomialbasis.hh:332
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &x, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition polynomialbasis.hh:119
│ │ │ │ +
static const unsigned int dimension
Definition polynomialbasis.hh:74
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &x, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition polynomialbasis.hh:127
│ │ │ │ +
PolynomialBasis & operator=(const PolynomialBasis &)
│ │ │ │ +
const CoefficientMatrix * coeffMatrix_
Definition polynomialbasis.hh:333
│ │ │ │ +
void integrate(std::vector< Fy > &values) const
Definition polynomialbasis.hh:317
│ │ │ │ +
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │ +
void evaluate(const DomainVector &x, F *values) const
Definition polynomialbasis.hh:182
│ │ │ │ +
void hessian(const DVector &x, HVector &values) const
Definition polynomialbasis.hh:307
│ │ │ │ +
CM CoefficientMatrix
Definition polynomialbasis.hh:70
│ │ │ │ +
HessianFyType< R > HessianType
Definition polynomialbasis.hh:83
│ │ │ │ +
LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits
Definition polynomialbasis.hh:78
│ │ │ │ +
unsigned int order_
Definition polynomialbasis.hh:335
│ │ │ │ +
void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) const
Definition polynomialbasis.hh:275
│ │ │ │ +
void evaluate(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:217
│ │ │ │ +
PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, unsigned int size)
Definition polynomialbasis.hh:85
│ │ │ │ +
FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType
Definition polynomialbasis.hh:82
│ │ │ │ +
unsigned int order() const
Definition polynomialbasis.hh:108
│ │ │ │ +
void evaluateSingle(const DomainVector &x, std::vector< FieldVector< FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > &values) const
Definition polynomialbasis.hh:246
│ │ │ │ +
const Basis & basis() const
Definition polynomialbasis.hh:98
│ │ │ │ +
void partial(const std::array< unsigned int, dimension > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition polynomialbasis.hh:143
│ │ │ │ +
unsigned int size_
Definition polynomialbasis.hh:335
│ │ │ │ +
Evaluator eval_
Definition polynomialbasis.hh:334
│ │ │ │ +
Definition polynomialbasis.hh:198
│ │ │ │ +
static DomainVector apply(const DVector &x)
Definition polynomialbasis.hh:199
│ │ │ │ +
static const DomainVector & apply(const DomainVector &x)
Definition polynomialbasis.hh:211
│ │ │ │ +
Definition polynomialbasis.hh:348
│ │ │ │ +
PolynomialBasisWithMatrix(const Basis &basis)
Definition polynomialbasis.hh:361
│ │ │ │ +
CM CoefficientMatrix
Definition polynomialbasis.hh:350
│ │ │ │ +
void fill(const Matrix &matrix, int size)
Definition polynomialbasis.hh:372
│ │ │ │ +
Base::Basis Basis
Definition polynomialbasis.hh:359
│ │ │ │ +
void fill(const Matrix &matrix)
Definition polynomialbasis.hh:366
│ │ │ │ +
Definition tensor.hh:33
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,138 +1,538 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ -hierarchicalp2withelementbubble.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +polynomialbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ +6#define DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_h_i_e_r_a_r_c_h_i_c_a_l_/_h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_/ │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ 12 │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 class _H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 { │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_c_o_e_f_f_m_a_t_r_i_x_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h> │ │ │ │ │ +19 │ │ │ │ │ +20namespace _D_u_n_e │ │ │ │ │ +21{ │ │ │ │ │ 22 │ │ │ │ │ -23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ -only implemented for dim==2."); │ │ │ │ │ -24 │ │ │ │ │ -25 public: │ │ │ │ │ -28 typedef │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ -29 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_>, │ │ │ │ │ -_3_0 │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ -> > _T_r_a_i_t_s; │ │ │ │ │ -31 │ │ │ │ │ -_3_4 _H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -35 {} │ │ │ │ │ -36 │ │ │ │ │ -_3_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -40 { │ │ │ │ │ -41 return basis_; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -47 { │ │ │ │ │ -48 return coefficients_; │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -54 { │ │ │ │ │ -55 return interpolation_; │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -_5_9 unsigned int _s_i_z_e () const │ │ │ │ │ -60 { │ │ │ │ │ -61 return basis_.size(); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -67 { │ │ │ │ │ -68 return GeometryTypes::triangle; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 private: │ │ │ │ │ -72 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis_; │ │ │ │ │ +23 // PolynomialBasis │ │ │ │ │ +24 // --------------- │ │ │ │ │ +25 │ │ │ │ │ +63 template< class Eval, class CM, class D=double, class R=double > │ │ │ │ │ +_6_4 class _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +65 { │ │ │ │ │ +66 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_ _> _T_h_i_s; │ │ │ │ │ +67 typedef Eval Evaluator; │ │ │ │ │ +68 │ │ │ │ │ +69 public: │ │ │ │ │ +_7_0 typedef CM _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x; │ │ │ │ │ +71 │ │ │ │ │ +_7_2 typedef typename CoefficientMatrix::Field _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ 73 │ │ │ │ │ -74 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_> coefficients_; │ │ │ │ │ -75 │ │ │ │ │ -76 │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ -> interpolation_; │ │ │ │ │ -77 }; │ │ │ │ │ -78 │ │ │ │ │ -79} │ │ │ │ │ -80 │ │ │ │ │ -81#endif │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_7_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Evaluator::dimension; │ │ │ │ │ +_7_5 static const unsigned int _d_i_m_R_a_n_g_e = Evaluator::dimRange*CoefficientMatrix:: │ │ │ │ │ +blockSize; │ │ │ │ │ +76 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_e_n_s_i_o_n_,_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_e_n_s_i_o_n_>, │ │ │ │ │ +77 R,_d_i_m_R_a_n_g_e,FieldVector, │ │ │ │ │ +_7_8 FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +_7_9 typedef typename Evaluator::Basis _B_a_s_i_s; │ │ │ │ │ +_8_0 typedef typename Evaluator::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +81 template │ │ │ │ │ +_8_2 using _H_e_s_s_i_a_n_F_y_T_y_p_e = │ │ │ │ │ +FieldVector,_d_i_m_R_a_n_g_e>; │ │ │ │ │ +_8_3 using _H_e_s_s_i_a_n_T_y_p_e = _H_e_s_s_i_a_n_F_y_T_y_p_e_<_R_>; │ │ │ │ │ +84 │ │ │ │ │ +_8_5 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s (const _B_a_s_i_s &_b_a_s_i_s, │ │ │ │ │ +86 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x &coeffMatrix, │ │ │ │ │ +87 unsigned int _s_i_z_e) │ │ │ │ │ +88 : _b_a_s_i_s__(_b_a_s_i_s), │ │ │ │ │ +89 _c_o_e_f_f_M_a_t_r_i_x__(&coeffMatrix), │ │ │ │ │ +90 _e_v_a_l__(_b_a_s_i_s), │ │ │ │ │ +91 _o_r_d_e_r__(_b_a_s_i_s._o_r_d_e_r()), │ │ │ │ │ +92 _s_i_z_e__(_s_i_z_e) │ │ │ │ │ +93 { │ │ │ │ │ +94 // assert(coeffMatrix_); │ │ │ │ │ +95 // assert(size_ <= coeffMatrix.size()); // !!! │ │ │ │ │ +96 } │ │ │ │ │ +97 │ │ │ │ │ +_9_8 const _B_a_s_i_s &_b_a_s_i_s () const │ │ │ │ │ +99 { │ │ │ │ │ +100 return _b_a_s_i_s__; │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +_1_0_3 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x &_m_a_t_r_i_x () const │ │ │ │ │ +104 { │ │ │ │ │ +105 return *_c_o_e_f_f_M_a_t_r_i_x__; │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +_1_0_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ +109 { │ │ │ │ │ +110 return _o_r_d_e_r__; │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +_1_1_3 unsigned int _s_i_z_e () const │ │ │ │ │ +114 { │ │ │ │ │ +115 return _s_i_z_e__; │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +_1_1_9 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ +120 std::vector& out) const │ │ │ │ │ +121 { │ │ │ │ │ +122 out.resize(_s_i_z_e()); │ │ │ │ │ +123 _e_v_a_l_u_a_t_e(x,out); │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +_1_2_7 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, // position │ │ │ │ │ +128 std::vector& out) const // return value │ │ │ │ │ +129 { │ │ │ │ │ +130 out.resize(_s_i_z_e()); │ │ │ │ │ +131 _j_a_c_o_b_i_a_n(x,out); │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +_1_3_5 void _e_v_a_l_u_a_t_e_H_e_s_s_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, // position │ │ │ │ │ +136 std::vector& out) const // return value │ │ │ │ │ +137 { │ │ │ │ │ +138 out.resize(_s_i_z_e()); │ │ │ │ │ +139 _h_e_s_s_i_a_n(x,out); │ │ │ │ │ +140 } │ │ │ │ │ +141 │ │ │ │ │ +_1_4_3 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +144 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +145 std::vector& out) const // return value │ │ │ │ │ +146 { │ │ │ │ │ +147 out.resize(_s_i_z_e()); │ │ │ │ │ +148 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +149 if (totalOrder == 0) { │ │ │ │ │ +150 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +151 } │ │ │ │ │ +152 else if (totalOrder == 1) { │ │ │ │ │ +153 std::vector jacs(out.size()); │ │ │ │ │ +154 unsigned int k; │ │ │ │ │ +155 for (unsigned int i=0;i<_o_r_d_e_r.size();++i) │ │ │ │ │ +156 if (_o_r_d_e_r[i]==1) k=i; │ │ │ │ │ +157 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n(in, jacs); │ │ │ │ │ +158 for (unsigned int i=0;i hesss(out.size()); │ │ │ │ │ +164 int k=-1,l=-1; │ │ │ │ │ +165 for (unsigned int i=0;i<_o_r_d_e_r.size();++i) { │ │ │ │ │ +166 if (_o_r_d_e_r[i] >= 1 && k == -1) │ │ │ │ │ +167 k = i; │ │ │ │ │ +168 else if (_o_r_d_e_r[i]==1) l=i; │ │ │ │ │ +169 } │ │ │ │ │ +170 if (l==-1) l=k; │ │ │ │ │ +171 _e_v_a_l_u_a_t_e_H_e_s_s_i_a_n(in, hesss); │ │ │ │ │ +172 for (unsigned int i=0;i │ │ │ │ │ +_1_8_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, F *values ) const │ │ │ │ │ +183 { │ │ │ │ │ +184 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template evaluate( x ), _s_i_z_e(), values); │ │ │ │ │ +185 } │ │ │ │ │ +186 template< unsigned int deriv, class DVector, class F > │ │ │ │ │ +_1_8_7 void _e_v_a_l_u_a_t_e ( const DVector &x, F *values ) const │ │ │ │ │ +188 { │ │ │ │ │ +189 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +190 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +191 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +192 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +193 evaluate( bx, values ); │ │ │ │ │ +194 } │ │ │ │ │ +195 │ │ │ │ │ +196 template │ │ │ │ │ +_1_9_7 struct _C_o_n_v_e_r_t │ │ │ │ │ +198 { │ │ │ │ │ +_1_9_9 static _D_o_m_a_i_n_V_e_c_t_o_r _a_p_p_l_y( const DVector &x ) │ │ │ │ │ +200 { │ │ │ │ │ +201 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +202 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +203 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +204 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +205 return bx; │ │ │ │ │ +206 } │ │ │ │ │ +207 }; │ │ │ │ │ +208 template │ │ │ │ │ +_2_0_9 struct _C_o_n_v_e_r_t │ │ │ │ │ +210 { │ │ │ │ │ +_2_1_1 static const _D_o_m_a_i_n_V_e_c_t_o_r &_a_p_p_l_y( const _D_o_m_a_i_n_V_e_c_t_o_r &x ) │ │ │ │ │ +212 { │ │ │ │ │ +213 return x; │ │ │ │ │ +214 } │ │ │ │ │ +215 }; │ │ │ │ │ +216 template< unsigned int deriv, class DVector, class RVector > │ │ │ │ │ +_2_1_7 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ +218 { │ │ │ │ │ +219 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ +220 const _D_o_m_a_i_n_V_e_c_t_o_r &bx = _C_o_n_v_e_r_t_<_t_r_u_e_,_D_V_e_c_t_o_r_>_:_:_a_p_p_l_y(x); │ │ │ │ │ +221 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template evaluate( bx ), values ); │ │ │ │ │ +222 } │ │ │ │ │ +223 │ │ │ │ │ +224 template │ │ │ │ │ +_2_2_5 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, std::vector │ │ │ │ │ +> &values ) const │ │ │ │ │ +226 { │ │ │ │ │ +227 evaluate<0>(x,values); │ │ │ │ │ +228 } │ │ │ │ │ +229 template< class DVector, class RVector > │ │ │ │ │ +_2_3_0 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ +231 { │ │ │ │ │ +232 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +233 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +234 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +235 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +236 evaluate<0>( bx, values ); │ │ │ │ │ +237 } │ │ │ │ │ +238 │ │ │ │ │ +239 template< unsigned int deriv, class Vector > │ │ │ │ │ +_2_4_0 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, Vector &values ) const │ │ │ │ │ +241 { │ │ │ │ │ +242 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ +243 _c_o_e_f_f_M_a_t_r_i_x__->template mult( _e_v_a_l__.template evaluate( x ), │ │ │ │ │ +values ); │ │ │ │ │ +244 } │ │ │ │ │ +245 template< unsigned int deriv, class Fy > │ │ │ │ │ +_2_4_6 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +247 std::vector< FieldVector_:_: │ │ │ │ │ +_s_i_z_e>,_d_i_m_R_a_n_g_e> > &values) const │ │ │ │ │ +248 { │ │ │ │ │ +249 evaluateSingle(x,reinterpret_cast::size*_d_i_m_R_a_n_g_e> >&>(values)); │ │ │ │ │ +250 } │ │ │ │ │ +251 template< unsigned int deriv, class Fy > │ │ │ │ │ +_2_5_2 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +253 std::vector< FieldVector<_L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_e_n_s_i_o_n_,_d_e_r_i_v_>,_d_i_m_R_a_n_g_e> > &values) │ │ │ │ │ +const │ │ │ │ │ +254 { │ │ │ │ │ +255 evaluateSingle(x,reinterpret_cast::size*_d_i_m_R_a_n_g_e> >&>(values)); │ │ │ │ │ +256 } │ │ │ │ │ +257 │ │ │ │ │ +258 template │ │ │ │ │ +_2_5_9 void _j_a_c_o_b_i_a_n ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +260 std::vector > &values ) const │ │ │ │ │ +261 { │ │ │ │ │ +262 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ +263 evaluateSingle<1>(x,reinterpret_cast >&>(values)); │ │ │ │ │ +264 } │ │ │ │ │ +265 template< class DVector, class RVector > │ │ │ │ │ +_2_6_6 void _j_a_c_o_b_i_a_n ( const DVector &x, RVector &values ) const │ │ │ │ │ +267 { │ │ │ │ │ +268 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +269 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +270 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +271 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +272 _j_a_c_o_b_i_a_n( bx, values ); │ │ │ │ │ +273 } │ │ │ │ │ +274 template │ │ │ │ │ +_2_7_5 void _h_e_s_s_i_a_n ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +276 std::vector<_H_e_s_s_i_a_n_F_y_T_y_p_e_<_F_y_>> &values ) const │ │ │ │ │ +277 { │ │ │ │ │ +278 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ +279 // only upper part of hessians matrix is computed - so we have │ │ │ │ │ +280 // y[0] = FV< FV, dimRange> │ │ │ │ │ +281 const unsigned int hsize = _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_e_n_s_i_o_n_,_2_>_:_:_s_i_z_e; │ │ │ │ │ +282 std::vector< FieldVector< FieldVector, _d_i_m_R_a_n_g_e> > y( _s_i_z_e() ); │ │ │ │ │ +283 evaluateSingle<2>(x, y); │ │ │ │ │ +284 unsigned int q = 0; │ │ │ │ │ +285 for (unsigned int i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +286 for (unsigned int r = 0; r < _d_i_m_R_a_n_g_e; ++r) │ │ │ │ │ +287 { │ │ │ │ │ +288 q = 0; │ │ │ │ │ +289 // tensor-based things follow unintuitive index sceme │ │ │ │ │ +290 // e.g. for dim = 3, the k-l index of y is 00,01,11,02,12,22, i.e. partial │ │ │ │ │ +derivatives │ │ │ │ │ +291 // are ordered: xx,xy,yy,xz,yz,zz │ │ │ │ │ +292 │ │ │ │ │ +293 // Fill values 'directionwise' │ │ │ │ │ +294 for (unsigned int k = 0; k < _d_i_m_e_n_s_i_o_n; ++k) │ │ │ │ │ +295 for (unsigned int l = 0; l <= k; ++l) │ │ │ │ │ +296 { │ │ │ │ │ +297 │ │ │ │ │ +298 values[i][r][k][l] = y[i][r][q]; │ │ │ │ │ +299 values[i][r][l][k] = y[i][r][q]; │ │ │ │ │ +300 assert(q < hsize); │ │ │ │ │ +301 ++q; │ │ │ │ │ +302 } │ │ │ │ │ +303 } │ │ │ │ │ +304 // evaluateSingle<2>(x,reinterpret_cast >&>(values)); │ │ │ │ │ +305 } │ │ │ │ │ +306 template< class DVector, class HVector > │ │ │ │ │ +_3_0_7 void _h_e_s_s_i_a_n ( const DVector &x, HVector &values ) const │ │ │ │ │ +308 { │ │ │ │ │ +309 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +310 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +311 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +312 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +313 _h_e_s_s_i_a_n( bx, values ); │ │ │ │ │ +314 } │ │ │ │ │ +315 │ │ │ │ │ +316 template │ │ │ │ │ +_3_1_7 void _i_n_t_e_g_r_a_t_e ( std::vector &values ) const │ │ │ │ │ +318 { │ │ │ │ │ +319 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ +320 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template _i_n_t_e_g_r_a_t_e(), values ); │ │ │ │ │ +321 } │ │ │ │ │ +322 │ │ │ │ │ +323 protected: │ │ │ │ │ +_3_2_4 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s &other) │ │ │ │ │ +325 : _b_a_s_i_s__(other._b_a_s_i_s__), │ │ │ │ │ +326 _c_o_e_f_f_M_a_t_r_i_x__(other._c_o_e_f_f_M_a_t_r_i_x__), │ │ │ │ │ +327 _e_v_a_l__(_b_a_s_i_s__), │ │ │ │ │ +328 _o_r_d_e_r__(_b_a_s_i_s__._o_r_d_e_r()), │ │ │ │ │ +329 _s_i_z_e__(other._s_i_z_e__) │ │ │ │ │ +330 {} │ │ │ │ │ +_3_3_1 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s &_o_p_e_r_a_t_o_r_=(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s&); │ │ │ │ │ +_3_3_2 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ +_3_3_3 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x* _c_o_e_f_f_M_a_t_r_i_x__; │ │ │ │ │ +_3_3_4 mutable Evaluator _e_v_a_l__; │ │ │ │ │ +_3_3_5 unsigned int _o_r_d_e_r__,_s_i_z_e__; │ │ │ │ │ +336 }; │ │ │ │ │ +337 │ │ │ │ │ +344 template< class Eval, class CM = SparseCoeffMatrix, │ │ │ │ │ +345 class D=double, class R=double> │ │ │ │ │ +_3_4_6 class _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ +347 : public _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s< Eval, CM, D, R > │ │ │ │ │ +348 { │ │ │ │ │ +349 public: │ │ │ │ │ +_3_5_0 typedef CM _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x; │ │ │ │ │ +351 │ │ │ │ │ +352 private: │ │ │ │ │ +353 typedef Eval Evaluator; │ │ │ │ │ +354 │ │ │ │ │ +355 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_u_a_t_o_r_,_ _C_M_ _> _T_h_i_s; │ │ │ │ │ +356 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_E_v_a_l_u_a_t_o_r_,_ _C_M_,_ _D_,_ _R_> _B_a_s_e; │ │ │ │ │ +357 │ │ │ │ │ +358 public: │ │ │ │ │ +_3_5_9 typedef typename _B_a_s_e_:_:_B_a_s_i_s _B_a_s_i_s; │ │ │ │ │ +360 │ │ │ │ │ +_3_6_1 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x (const _B_a_s_i_s &_b_a_s_i_s) │ │ │ │ │ +362 : _B_a_s_e(_b_a_s_i_s,coeffMatrix_,0) │ │ │ │ │ +363 {} │ │ │ │ │ +364 │ │ │ │ │ +365 template │ │ │ │ │ +_3_6_6 void _f_i_l_l(const Matrix& _m_a_t_r_i_x) │ │ │ │ │ +367 { │ │ │ │ │ +368 coeffMatrix_.fill(_m_a_t_r_i_x); │ │ │ │ │ +369 this->_s_i_z_e__ = coeffMatrix_.size(); │ │ │ │ │ +370 } │ │ │ │ │ +371 template │ │ │ │ │ +_3_7_2 void _f_i_l_l(const Matrix& _m_a_t_r_i_x,int _s_i_z_e) │ │ │ │ │ +373 { │ │ │ │ │ +374 coeffMatrix_.fill(_m_a_t_r_i_x); │ │ │ │ │ +375 assert(_s_i_z_e<=coeffMatrix_.size()); │ │ │ │ │ +376 this->_s_i_z_e__ = _s_i_z_e; │ │ │ │ │ +377 } │ │ │ │ │ +378 │ │ │ │ │ +379 private: │ │ │ │ │ +380 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &); │ │ │ │ │ +381 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &operator=(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &); │ │ │ │ │ +382 _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x coeffMatrix_; │ │ │ │ │ +383 }; │ │ │ │ │ +384} │ │ │ │ │ +385#endif // DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ +_c_o_e_f_f_m_a_t_r_i_x_._h_h │ │ │ │ │ +_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h │ │ │ │ │ +_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:21 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, │ │ │ │ │ -R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalInterpolation< │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:230 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > │ │ │ │ │ +&values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:225 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:324 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, F *values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_H_e_s_s_i_a_n │ │ │ │ │ +void evaluateHessian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +HessianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ +CoefficientMatrix::Field StorageField │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ +void jacobian(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:266 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Evaluator::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_B_a_s_i_s │ │ │ │ │ +Evaluator::Basis Basis │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ +void evaluateSingle(const DomainVector &x, Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ +void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< │ │ │ │ │ +Fy, dimension, deriv >, dimRange > > &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ +void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, │ │ │ │ │ +dimension > > &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:259 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_m_a_t_r_i_x │ │ │ │ │ +const CoefficientMatrix & matrix() const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:103 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_b_a_s_i_s__ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:332 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:127 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +PolynomialBasis & operator=(const PolynomialBasis &) │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_c_o_e_f_f_M_a_t_r_i_x__ │ │ │ │ │ +const CoefficientMatrix * coeffMatrix_ │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:333 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +void integrate(std::vector< Fy > &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:317 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -HierarchicalP2WithElementBubbleLocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ -problems. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, F *values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:182 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_h_e_s_s_i_a_n │ │ │ │ │ +void hessian(const DVector &x, HVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:307 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x │ │ │ │ │ +CM CoefficientMatrix │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_H_e_s_s_i_a_n_T_y_p_e │ │ │ │ │ +HessianFyType< R > HessianType │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, │ │ │ │ │ +FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r__ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_h_e_s_s_i_a_n │ │ │ │ │ +void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) │ │ │ │ │ +const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:275 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, │ │ │ │ │ +unsigned int size) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_H_e_s_s_i_a_n_F_y_T_y_p_e │ │ │ │ │ +FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ +void evaluateSingle(const DomainVector &x, std::vector< FieldVector< │ │ │ │ │ +FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > │ │ │ │ │ +&values) const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_b_a_s_i_s │ │ │ │ │ +const Basis & basis() const │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, dimension > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e__ │ │ │ │ │ +unsigned int size_ │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:335 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l__ │ │ │ │ │ +Evaluator eval_ │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:334 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:198 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t_:_:_a_p_p_l_y │ │ │ │ │ +static DomainVector apply(const DVector &x) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_o_m_a_i_n_V_e_c_t_o_r_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static const DomainVector & apply(const DomainVector &x) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:211 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ +PolynomialBasisWithMatrix(const Basis &basis) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:361 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x │ │ │ │ │ +CM CoefficientMatrix │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:350 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ +void fill(const Matrix &matrix, int size) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:372 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_B_a_s_i_s │ │ │ │ │ +Base::Basis Basis │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ +void fill(const Matrix &matrix) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:366 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:33 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2.hh File Reference │ │ │ │ +dune-localfunctions: coeffmatrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalprismp2.hh File Reference
│ │ │ │ +
coeffmatrix.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ -#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh"
│ │ │ │ -#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh"
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalPrismP2LocalFiniteElement< D, R >
struct  Dune::Mult< Field, Field2 >
 
struct  Dune::Mult< Field, FieldVector< Field2, dimRange > >
 
class  Dune::SparseCoeffMatrix< F, bSize >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalprismp2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +coeffmatrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_ _F_,_ _b_S_i_z_e_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00122_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2.hh Source File │ │ │ │ +dune-localfunctions: coeffmatrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,122 +70,338 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2.hh
│ │ │ │ +
coeffmatrix.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
22 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25
│ │ │ │ -
26
│ │ │ │ -
27 public:
│ │ │ │ - │ │ │ │ -
31 Impl::LagrangePrismLocalCoefficients<2>,
│ │ │ │ - │ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {}
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
42 {
│ │ │ │ -
43 return basis;
│ │ │ │ -
44 }
│ │ │ │ +
5#ifndef DUNE_COEFFMATRIX_HH
│ │ │ │ +
6#define DUNE_COEFFMATRIX_HH
│ │ │ │ +
7#include <cassert>
│ │ │ │ +
8#include <iostream>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16 /*************************************************
│ │ │ │ +
17 * Default class for storing a coefficient matrix
│ │ │ │ +
18 * for the PolynomialBasis. Basically a simple
│ │ │ │ +
19 * CRS structure is used. The additional complexity
│ │ │ │ +
20 * is due to the storage and efficient evaluation
│ │ │ │ +
21 * of higher order derivatives. See the remarks
│ │ │ │ +
22 * in tensor.hh which also hold true for this file.
│ │ │ │ +
23 *************************************************/
│ │ │ │ +
24 template <class Field, class Field2>
│ │ │ │ +
│ │ │ │ +
25 struct Mult
│ │ │ │ +
26 {
│ │ │ │ +
27 typedef Field2 BasisEntry;
│ │ │ │ +
│ │ │ │ +
28 static void add(const Field &vec1, const BasisEntry &vec2,
│ │ │ │ +
29 BasisEntry &res)
│ │ │ │ +
30 {
│ │ │ │ +
31 res += vec1*vec2;
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33 };
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
35 template <class Field,class Field2, int dimRange>
│ │ │ │ +
│ │ │ │ +
36 struct Mult< Field,FieldVector<Field2,dimRange> >
│ │ │ │ +
37 {
│ │ │ │ +
38 typedef FieldVector<Field2,dimRange> BasisEntry;
│ │ │ │ +
│ │ │ │ +
39 static void add(const Field &vec1, const BasisEntry &vec2,
│ │ │ │ +
40 BasisEntry &res)
│ │ │ │ +
41 {
│ │ │ │ +
42 res.axpy(vec1,vec2);
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44 };
│ │ │ │
│ │ │ │
45
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
49 {
│ │ │ │ -
50 return coefficients;
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ -
57 return interpolation;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
61 unsigned int size () const
│ │ │ │ -
62 {
│ │ │ │ -
63 return basis.size();
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
68 static constexpr GeometryType type ()
│ │ │ │ -
69 {
│ │ │ │ -
70 return GeometryTypes::prism;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 private:
│ │ │ │ - │ │ │ │ -
75
│ │ │ │ -
77 Impl::LagrangePrismLocalCoefficients<2> coefficients;
│ │ │ │ -
78
│ │ │ │ - │ │ │ │ -
80 };
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
82}
│ │ │ │ -
83
│ │ │ │ -
84#endif
│ │ │ │ - │ │ │ │ -
Hierarchical prism p2 shape functions for the simplex.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
46 template< class F , unsigned int bSize >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
48 {
│ │ │ │ +
49 public:
│ │ │ │ +
50 typedef F Field;
│ │ │ │ +
51 static const unsigned int blockSize = bSize;
│ │ │ │ + │ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 : coeff_(0),
│ │ │ │ +
56 rows_(0),
│ │ │ │ +
57 skip_(0),
│ │ │ │ +
58 numRows_(0),
│ │ │ │ +
59 numCols_(0)
│ │ │ │ +
60 {}
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
63 {
│ │ │ │ +
64 delete [] coeff_;
│ │ │ │ +
65 delete [] rows_;
│ │ │ │ +
66 delete [] skip_;
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ +
68
│ │ │ │ +
│ │ │ │ +
69 unsigned int size () const
│ │ │ │ +
70 {
│ │ │ │ +
71 return numRows_/blockSize;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
73 unsigned int baseSize () const
│ │ │ │ +
74 {
│ │ │ │ +
75 return numCols_;
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
78 template< class BasisIterator, class FF>
│ │ │ │ +
│ │ │ │ +
79 void mult ( const BasisIterator &x,
│ │ │ │ +
80 unsigned int numLsg,
│ │ │ │ +
81 FF *y ) const
│ │ │ │ +
82 {
│ │ │ │ +
83 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ +
84 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ +
85 unsigned int row = 0;
│ │ │ │ +
86 Field *pos = rows_[ 0 ];
│ │ │ │ +
87 unsigned int *skipIt = skip_;
│ │ │ │ +
88 XDerivatives val;
│ │ │ │ +
89 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ +
90 {
│ │ │ │ +
91 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ +
92 {
│ │ │ │ +
93 val = 0;
│ │ │ │ +
94 BasisIterator itx = x;
│ │ │ │ +
95 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ +
96 {
│ │ │ │ +
97 itx += *skipIt;
│ │ │ │ +
98 val.axpy(*pos,*itx);
│ │ │ │ +
99 }
│ │ │ │ +
100 DerivativeAssign<XDerivatives,FF>::apply(r,val,*(y+i*XDerivatives::size*blockSize));
│ │ │ │ +
101 }
│ │ │ │ +
102 }
│ │ │ │ +
103 }
│ │ │ │ +
│ │ │ │ +
104 template< class BasisIterator, class Vector>
│ │ │ │ +
│ │ │ │ +
105 void mult ( const BasisIterator &x,
│ │ │ │ +
106 Vector &y ) const
│ │ │ │ +
107 {
│ │ │ │ +
108 typedef typename Vector::value_type YDerivatives;
│ │ │ │ +
109 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ +
110 size_t numLsg = y.size();
│ │ │ │ +
111 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ +
112 unsigned int row = 0;
│ │ │ │ +
113 Field *pos = rows_[ 0 ];
│ │ │ │ +
114 unsigned int *skipIt = skip_;
│ │ │ │ +
115 XDerivatives val;
│ │ │ │ +
116 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ +
117 {
│ │ │ │ +
118 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ +
119 {
│ │ │ │ +
120 val = 0;
│ │ │ │ +
121 BasisIterator itx = x;
│ │ │ │ +
122 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ +
123 {
│ │ │ │ +
124 itx += *skipIt;
│ │ │ │ +
125 val.axpy(*pos,*itx);
│ │ │ │ +
126 }
│ │ │ │ + │ │ │ │ +
128 }
│ │ │ │ +
129 }
│ │ │ │ +
130 }
│ │ │ │ +
│ │ │ │ +
131 template <unsigned int deriv, class BasisIterator, class Vector>
│ │ │ │ +
│ │ │ │ +
132 void mult ( const BasisIterator &x,
│ │ │ │ +
133 Vector &y ) const
│ │ │ │ +
134 {
│ │ │ │ +
135 typedef typename Vector::value_type YDerivatives;
│ │ │ │ +
136 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ +
137 typedef FieldVector<typename XDerivatives::Field,YDerivatives::dimension> XLFETensor;
│ │ │ │ +
138 size_t numLsg = y.size();
│ │ │ │ +
139 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ +
140 unsigned int row = 0;
│ │ │ │ +
141 Field *pos = rows_[ 0 ];
│ │ │ │ +
142 unsigned int *skipIt = skip_;
│ │ │ │ +
143 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ +
144 {
│ │ │ │ +
145 XLFETensor val(typename XDerivatives::Field(0));
│ │ │ │ +
146 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ +
147 {
│ │ │ │ +
148 BasisIterator itx = x;
│ │ │ │ +
149 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ +
150 {
│ │ │ │ +
151 itx += *skipIt;
│ │ │ │ + │ │ │ │ +
153 }
│ │ │ │ +
154 }
│ │ │ │ +
155 field_cast(val,y[i]);
│ │ │ │ +
156 }
│ │ │ │ +
157 }
│ │ │ │ +
│ │ │ │ +
158
│ │ │ │ +
159 template< class RowMatrix >
│ │ │ │ +
│ │ │ │ +
160 void fill ( const RowMatrix &mat, bool verbose=false )
│ │ │ │ +
161 {
│ │ │ │ +
162 numRows_ = mat.rows();
│ │ │ │ +
163 numCols_ = mat.cols();
│ │ │ │ +
164 unsigned int size = numRows_*numCols_;
│ │ │ │ +
165
│ │ │ │ +
166 delete [] coeff_;
│ │ │ │ +
167 delete [] rows_;
│ │ │ │ +
168 delete [] skip_;
│ │ │ │ +
169
│ │ │ │ +
170 Field* coeff = new Field[ size ];
│ │ │ │ +
171 // we always initialize the next skip entry to zero,
│ │ │ │ +
172 // including the one following the end, so allocate
│ │ │ │ +
173 // size+1 entries so we will stay within the bounds.
│ │ │ │ +
174 unsigned int *skip = new unsigned int[ size+1 ];
│ │ │ │ +
175 rows_ = new Field*[ numRows_+1 ];
│ │ │ │ +
176 std::vector<Field> row( numCols_ );
│ │ │ │ +
177
│ │ │ │ +
178 rows_[ 0 ] = coeff;
│ │ │ │ +
179 Field *cit = coeff;
│ │ │ │ +
180 unsigned int *sit = skip;
│ │ │ │ +
181 for( unsigned int r = 0; r < numRows_; ++r )
│ │ │ │ +
182 {
│ │ │ │ +
183 *sit = 0;
│ │ │ │ +
184 mat.row( r, row );
│ │ │ │ +
185 for( unsigned int c = 0; c < numCols_; ++c )
│ │ │ │ +
186 {
│ │ │ │ +
187 const Field &val = row[c];
│ │ │ │ +
188 if (val < Zero<Field>() || Zero<Field>() < val)
│ │ │ │ +
189 {
│ │ │ │ +
190 *cit = val;
│ │ │ │ +
191 ++sit;
│ │ │ │ +
192 ++cit;
│ │ │ │ +
193 *sit = 1;
│ │ │ │ +
194 } else
│ │ │ │ +
195 {
│ │ │ │ +
196 ++(*sit);
│ │ │ │ +
197 }
│ │ │ │ +
198 }
│ │ │ │ +
199 rows_[ r+1 ] = cit;
│ │ │ │ +
200 }
│ │ │ │ +
201 assert( size_t(rows_[numRows_]-rows_[0]) <= size_t(size) );
│ │ │ │ +
202 size = rows_[numRows_]-rows_[0];
│ │ │ │ +
203 coeff_ = new Field[ size ];
│ │ │ │ +
204 skip_ = new unsigned int[ size ];
│ │ │ │ +
205 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
206 {
│ │ │ │ +
207 coeff_[i] = coeff[i];
│ │ │ │ +
208 skip_[i] = skip[i];
│ │ │ │ +
209 }
│ │ │ │ +
210 for (unsigned int i=0; i<=numRows_; ++i)
│ │ │ │ +
211 rows_[ i ] = coeff_ + (rows_[ i ] - coeff);
│ │ │ │ +
212
│ │ │ │ +
213 delete [] coeff;
│ │ │ │ +
214 delete [] skip;
│ │ │ │ +
215
│ │ │ │ +
216 if (verbose)
│ │ │ │ +
217 std::cout << "Entries: " << (rows_[numRows_]-rows_[0])
│ │ │ │ +
218 << " full: " << numCols_*numRows_
│ │ │ │ +
219 << std::endl;
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221 // b += a*C[k]
│ │ │ │ +
222 template <class Vector>
│ │ │ │ +
│ │ │ │ +
223 void addRow( unsigned int k, const Field &a, Vector &b) const
│ │ │ │ +
224 {
│ │ │ │ +
225 assert(k<numRows_);
│ │ │ │ +
226 unsigned int j=0;
│ │ │ │ +
227 unsigned int *skipIt = skip_ + (rows_[ k ]-rows_[ 0 ]);
│ │ │ │ +
228 for( Field *pos = rows_[ k ];
│ │ │ │ +
229 pos != rows_[ k+1 ];
│ │ │ │ +
230 ++pos, ++skipIt )
│ │ │ │ +
231 {
│ │ │ │ +
232 j += *skipIt;
│ │ │ │ +
233 assert( j < b.size() );
│ │ │ │ +
234 b[j] += field_cast<typename Vector::value_type>( (*pos)*a ); // field_cast
│ │ │ │ +
235 }
│ │ │ │ +
236 }
│ │ │ │ +
│ │ │ │ +
237 private:
│ │ │ │ +
238 SparseCoeffMatrix ( const This &other )
│ │ │ │ +
239 : numRows_( other.numRows_ ),
│ │ │ │ +
240 numCols_( other.numCols_ )
│ │ │ │ +
241 {
│ │ │ │ +
242 const unsigned int size = other.rows_[numRows_]-other.rows_[0];
│ │ │ │ +
243 coeff_ = new Field[ size ];
│ │ │ │ +
244 rows_ = new Field*[ numRows_+1 ];
│ │ │ │ +
245 skip_ = new unsigned int[ size ];
│ │ │ │ +
246 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
247 {
│ │ │ │ +
248 coeff_[i] = other.coeff_[i];
│ │ │ │ +
249 skip_[i] = other.skip_[i];
│ │ │ │ +
250 }
│ │ │ │ +
251 for (unsigned int i=0; i<=numRows_; ++i)
│ │ │ │ +
252 rows_[ i ] = coeff_ + (other.rows_[ i ] - other.coeff_);
│ │ │ │ +
253 }
│ │ │ │ +
254
│ │ │ │ +
255 This &operator= (const This&);
│ │ │ │ +
256 Field *coeff_;
│ │ │ │ +
257 Field **rows_;
│ │ │ │ +
258 unsigned int *skip_;
│ │ │ │ +
259 unsigned int numRows_,numCols_;
│ │ │ │ +
260 };
│ │ │ │ +
│ │ │ │ +
261
│ │ │ │ +
262}
│ │ │ │ +
263
│ │ │ │ +
264#endif // DUNE_COEFFMATRIX_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Definition hierarchicalprismp2.hh:24
│ │ │ │ -
static constexpr GeometryType type()
Definition hierarchicalprismp2.hh:68
│ │ │ │ -
HierarchicalPrismP2LocalFiniteElement()
Definition hierarchicalprismp2.hh:36
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalprismp2.hh:55
│ │ │ │ -
LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl::LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< HierarchicalPrismP2LocalBasis< D, R > > > Traits
Definition hierarchicalprismp2.hh:32
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalprismp2.hh:41
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalprismp2.hh:61
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalprismp2.hh:48
│ │ │ │ -
Definition hierarchicalprismp2localbasis.hh:23
│ │ │ │ -
Definition hierarchicalprismp2localinterpolation.hh:18
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
Definition coeffmatrix.hh:26
│ │ │ │ +
static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res)
Definition coeffmatrix.hh:28
│ │ │ │ +
Field2 BasisEntry
Definition coeffmatrix.hh:27
│ │ │ │ +
FieldVector< Field2, dimRange > BasisEntry
Definition coeffmatrix.hh:38
│ │ │ │ +
static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res)
Definition coeffmatrix.hh:39
│ │ │ │ +
Definition coeffmatrix.hh:48
│ │ │ │ +
static const unsigned int blockSize
Definition coeffmatrix.hh:51
│ │ │ │ +
SparseCoeffMatrix()
Definition coeffmatrix.hh:54
│ │ │ │ +
F Field
Definition coeffmatrix.hh:50
│ │ │ │ +
unsigned int baseSize() const
Definition coeffmatrix.hh:73
│ │ │ │ +
SparseCoeffMatrix< Field, blockSize > This
Definition coeffmatrix.hh:52
│ │ │ │ +
unsigned int size() const
Definition coeffmatrix.hh:69
│ │ │ │ +
void fill(const RowMatrix &mat, bool verbose=false)
Definition coeffmatrix.hh:160
│ │ │ │ +
void addRow(unsigned int k, const Field &a, Vector &b) const
Definition coeffmatrix.hh:223
│ │ │ │ +
void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const
Definition coeffmatrix.hh:79
│ │ │ │ +
void mult(const BasisIterator &x, Vector &y) const
Definition coeffmatrix.hh:132
│ │ │ │ +
void mult(const BasisIterator &x, Vector &y) const
Definition coeffmatrix.hh:105
│ │ │ │ +
~SparseCoeffMatrix()
Definition coeffmatrix.hh:62
│ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:571
│ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:649
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,132 +1,347 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ -hierarchicalprismp2.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +coeffmatrix.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -14#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -15 │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -24 { │ │ │ │ │ -25 │ │ │ │ │ -26 │ │ │ │ │ -27 public: │ │ │ │ │ -30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ -31 Impl::LagrangePrismLocalCoefficients<2>, │ │ │ │ │ -_3_2 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > │ │ │ │ │ -_T_r_a_i_t_s; │ │ │ │ │ -33 │ │ │ │ │ -_3_6 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -37 {} │ │ │ │ │ -38 │ │ │ │ │ -_4_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -42 { │ │ │ │ │ -43 return basis; │ │ │ │ │ -44 } │ │ │ │ │ +5#ifndef DUNE_COEFFMATRIX_HH │ │ │ │ │ +6#define DUNE_COEFFMATRIX_HH │ │ │ │ │ +7#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 /************************************************* │ │ │ │ │ +17 * Default class for storing a coefficient matrix │ │ │ │ │ +18 * for the PolynomialBasis. Basically a simple │ │ │ │ │ +19 * CRS structure is used. The additional complexity │ │ │ │ │ +20 * is due to the storage and efficient evaluation │ │ │ │ │ +21 * of higher order derivatives. See the remarks │ │ │ │ │ +22 * in tensor.hh which also hold true for this file. │ │ │ │ │ +23 *************************************************/ │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 struct _M_u_l_t │ │ │ │ │ +26 { │ │ │ │ │ +_2_7 typedef Field2 _B_a_s_i_s_E_n_t_r_y; │ │ │ │ │ +_2_8 static void _a_d_d(const Field &vec1, const _B_a_s_i_s_E_n_t_r_y &vec2, │ │ │ │ │ +29 _B_a_s_i_s_E_n_t_r_y &res) │ │ │ │ │ +30 { │ │ │ │ │ +31 res += vec1*vec2; │ │ │ │ │ +32 } │ │ │ │ │ +33 }; │ │ │ │ │ +34 │ │ │ │ │ +35 template │ │ │ │ │ +_3_6 struct _M_u_l_t< Field,FieldVector > │ │ │ │ │ +37 { │ │ │ │ │ +_3_8 typedef FieldVector _B_a_s_i_s_E_n_t_r_y; │ │ │ │ │ +_3_9 static void _a_d_d(const Field &vec1, const _B_a_s_i_s_E_n_t_r_y &vec2, │ │ │ │ │ +40 _B_a_s_i_s_E_n_t_r_y &res) │ │ │ │ │ +41 { │ │ │ │ │ +42 res.axpy(vec1,vec2); │ │ │ │ │ +43 } │ │ │ │ │ +44 }; │ │ │ │ │ 45 │ │ │ │ │ -_4_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -49 { │ │ │ │ │ -50 return coefficients; │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -56 { │ │ │ │ │ -57 return interpolation; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -_6_1 unsigned int _s_i_z_e () const │ │ │ │ │ -62 { │ │ │ │ │ -63 return basis.size(); │ │ │ │ │ -64 } │ │ │ │ │ -65 │ │ │ │ │ -_6_8 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -69 { │ │ │ │ │ -70 return GeometryTypes::prism; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 private: │ │ │ │ │ -74 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ -75 │ │ │ │ │ -77 Impl::LagrangePrismLocalCoefficients<2> coefficients; │ │ │ │ │ -78 │ │ │ │ │ -79 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > │ │ │ │ │ -interpolation; │ │ │ │ │ -80 }; │ │ │ │ │ -81 │ │ │ │ │ -82} │ │ │ │ │ -83 │ │ │ │ │ -84#endif │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +46 template< class F , unsigned int bSize > │ │ │ │ │ +_4_7 class _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ +48 { │ │ │ │ │ +49 public: │ │ │ │ │ +_5_0 typedef F _F_i_e_l_d; │ │ │ │ │ +_5_1 static const unsigned int _b_l_o_c_k_S_i_z_e = bSize; │ │ │ │ │ +_5_2 typedef _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_F_i_e_l_d_,_b_l_o_c_k_S_i_z_e_> _T_h_i_s; │ │ │ │ │ +53 │ │ │ │ │ +_5_4 _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x() │ │ │ │ │ +55 : coeff_(0), │ │ │ │ │ +56 rows_(0), │ │ │ │ │ +57 skip_(0), │ │ │ │ │ +58 numRows_(0), │ │ │ │ │ +59 numCols_(0) │ │ │ │ │ +60 {} │ │ │ │ │ +61 │ │ │ │ │ +_6_2 _~_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x() │ │ │ │ │ +63 { │ │ │ │ │ +64 delete [] coeff_; │ │ │ │ │ +65 delete [] rows_; │ │ │ │ │ +66 delete [] skip_; │ │ │ │ │ +67 } │ │ │ │ │ +68 │ │ │ │ │ +_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ +70 { │ │ │ │ │ +71 return numRows_/_b_l_o_c_k_S_i_z_e; │ │ │ │ │ +72 } │ │ │ │ │ +_7_3 unsigned int _b_a_s_e_S_i_z_e () const │ │ │ │ │ +74 { │ │ │ │ │ +75 return numCols_; │ │ │ │ │ +76 } │ │ │ │ │ +77 │ │ │ │ │ +78 template< class BasisIterator, class FF> │ │ │ │ │ +_7_9 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ +80 unsigned int numLsg, │ │ │ │ │ +81 FF *y ) const │ │ │ │ │ +82 { │ │ │ │ │ +83 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ +84 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ +85 unsigned int row = 0; │ │ │ │ │ +86 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ +87 unsigned int *skipIt = skip_; │ │ │ │ │ +88 XDerivatives val; │ │ │ │ │ +89 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ +90 { │ │ │ │ │ +91 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ +92 { │ │ │ │ │ +93 val = 0; │ │ │ │ │ +94 BasisIterator itx = x; │ │ │ │ │ +95 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ +96 { │ │ │ │ │ +97 itx += *skipIt; │ │ │ │ │ +98 val.axpy(*pos,*itx); │ │ │ │ │ +99 } │ │ │ │ │ +100 _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_X_D_e_r_i_v_a_t_i_v_e_s_,_F_F_>_:_:_a_p_p_l_y(r,val,*(y+i*XDerivatives:: │ │ │ │ │ +size*_b_l_o_c_k_S_i_z_e)); │ │ │ │ │ +101 } │ │ │ │ │ +102 } │ │ │ │ │ +103 } │ │ │ │ │ +104 template< class BasisIterator, class Vector> │ │ │ │ │ +_1_0_5 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ +106 Vector &y ) const │ │ │ │ │ +107 { │ │ │ │ │ +108 typedef typename Vector::value_type YDerivatives; │ │ │ │ │ +109 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ +110 size_t numLsg = y.size(); │ │ │ │ │ +111 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ +112 unsigned int row = 0; │ │ │ │ │ +113 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ +114 unsigned int *skipIt = skip_; │ │ │ │ │ +115 XDerivatives val; │ │ │ │ │ +116 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ +117 { │ │ │ │ │ +118 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ +119 { │ │ │ │ │ +120 val = 0; │ │ │ │ │ +121 BasisIterator itx = x; │ │ │ │ │ +122 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ +123 { │ │ │ │ │ +124 itx += *skipIt; │ │ │ │ │ +125 val.axpy(*pos,*itx); │ │ │ │ │ +126 } │ │ │ │ │ +127 _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_X_D_e_r_i_v_a_t_i_v_e_s_,_Y_D_e_r_i_v_a_t_i_v_e_s_>_:_:_a_p_p_l_y(r,val,y[i]); │ │ │ │ │ +128 } │ │ │ │ │ +129 } │ │ │ │ │ +130 } │ │ │ │ │ +131 template │ │ │ │ │ +_1_3_2 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ +133 Vector &y ) const │ │ │ │ │ +134 { │ │ │ │ │ +135 typedef typename Vector::value_type YDerivatives; │ │ │ │ │ +136 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ +137 typedef FieldVector │ │ │ │ │ +XLFETensor; │ │ │ │ │ +138 size_t numLsg = y.size(); │ │ │ │ │ +139 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ +140 unsigned int row = 0; │ │ │ │ │ +141 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ +142 unsigned int *skipIt = skip_; │ │ │ │ │ +143 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ +144 { │ │ │ │ │ +145 XLFETensor val(typename XDerivatives::Field(0)); │ │ │ │ │ +146 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ +147 { │ │ │ │ │ +148 BasisIterator itx = x; │ │ │ │ │ +149 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ +150 { │ │ │ │ │ +151 itx += *skipIt; │ │ │ │ │ +152 _L_F_E_T_e_n_s_o_r_A_x_p_y_<_X_D_e_r_i_v_a_t_i_v_e_s_,_X_L_F_E_T_e_n_s_o_r_,_d_e_r_i_v_>_:_:_a_p_p_l_y(r,*pos,*itx,val); │ │ │ │ │ +153 } │ │ │ │ │ +154 } │ │ │ │ │ +155 _f_i_e_l_d___c_a_s_t(val,y[i]); │ │ │ │ │ +156 } │ │ │ │ │ +157 } │ │ │ │ │ +158 │ │ │ │ │ +159 template< class RowMatrix > │ │ │ │ │ +_1_6_0 void _f_i_l_l ( const RowMatrix &mat, bool verbose=false ) │ │ │ │ │ +161 { │ │ │ │ │ +162 numRows_ = mat.rows(); │ │ │ │ │ +163 numCols_ = mat.cols(); │ │ │ │ │ +164 unsigned int _s_i_z_e = numRows_*numCols_; │ │ │ │ │ +165 │ │ │ │ │ +166 delete [] coeff_; │ │ │ │ │ +167 delete [] rows_; │ │ │ │ │ +168 delete [] skip_; │ │ │ │ │ +169 │ │ │ │ │ +170 _F_i_e_l_d* coeff = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ +171 // we always initialize the next skip entry to zero, │ │ │ │ │ +172 // including the one following the end, so allocate │ │ │ │ │ +173 // size+1 entries so we will stay within the bounds. │ │ │ │ │ +174 unsigned int *skip = new unsigned int[ _s_i_z_e+1 ]; │ │ │ │ │ +175 rows_ = new _F_i_e_l_d*[ numRows_+1 ]; │ │ │ │ │ +176 std::vector row( numCols_ ); │ │ │ │ │ +177 │ │ │ │ │ +178 rows_[ 0 ] = coeff; │ │ │ │ │ +179 _F_i_e_l_d *cit = coeff; │ │ │ │ │ +180 unsigned int *sit = skip; │ │ │ │ │ +181 for( unsigned int r = 0; r < numRows_; ++r ) │ │ │ │ │ +182 { │ │ │ │ │ +183 *sit = 0; │ │ │ │ │ +184 mat.row( r, row ); │ │ │ │ │ +185 for( unsigned int c = 0; c < numCols_; ++c ) │ │ │ │ │ +186 { │ │ │ │ │ +187 const _F_i_e_l_d &val = row[c]; │ │ │ │ │ +188 if (val < _Z_e_r_o_<_F_i_e_l_d_>() || _Z_e_r_o_<_F_i_e_l_d_>() < val) │ │ │ │ │ +189 { │ │ │ │ │ +190 *cit = val; │ │ │ │ │ +191 ++sit; │ │ │ │ │ +192 ++cit; │ │ │ │ │ +193 *sit = 1; │ │ │ │ │ +194 } else │ │ │ │ │ +195 { │ │ │ │ │ +196 ++(*sit); │ │ │ │ │ +197 } │ │ │ │ │ +198 } │ │ │ │ │ +199 rows_[ r+1 ] = cit; │ │ │ │ │ +200 } │ │ │ │ │ +201 assert( size_t(rows_[numRows_]-rows_[0]) <= size_t(_s_i_z_e) ); │ │ │ │ │ +202 _s_i_z_e = rows_[numRows_]-rows_[0]; │ │ │ │ │ +203 coeff_ = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ +204 skip_ = new unsigned int[ _s_i_z_e ]; │ │ │ │ │ +205 for (unsigned int i=0; i<_s_i_z_e; ++i) │ │ │ │ │ +206 { │ │ │ │ │ +207 coeff_[i] = coeff[i]; │ │ │ │ │ +208 skip_[i] = skip[i]; │ │ │ │ │ +209 } │ │ │ │ │ +210 for (unsigned int i=0; i<=numRows_; ++i) │ │ │ │ │ +211 rows_[ i ] = coeff_ + (rows_[ i ] - coeff); │ │ │ │ │ +212 │ │ │ │ │ +213 delete [] coeff; │ │ │ │ │ +214 delete [] skip; │ │ │ │ │ +215 │ │ │ │ │ +216 if (verbose) │ │ │ │ │ +217 std::cout << "Entries: " << (rows_[numRows_]-rows_[0]) │ │ │ │ │ +218 << " full: " << numCols_*numRows_ │ │ │ │ │ +219 << std::endl; │ │ │ │ │ +220 } │ │ │ │ │ +221 // b += a*C[k] │ │ │ │ │ +222 template │ │ │ │ │ +_2_2_3 void _a_d_d_R_o_w( unsigned int k, const _F_i_e_l_d &a, Vector &b) const │ │ │ │ │ +224 { │ │ │ │ │ +225 assert(k( (*pos)*a ); // field_cast │ │ │ │ │ +235 } │ │ │ │ │ +236 } │ │ │ │ │ +237 private: │ │ │ │ │ +238 _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x ( const _T_h_i_s &other ) │ │ │ │ │ +239 : numRows_( other.numRows_ ), │ │ │ │ │ +240 numCols_( other.numCols_ ) │ │ │ │ │ +241 { │ │ │ │ │ +242 const unsigned int _s_i_z_e = other.rows_[numRows_]-other.rows_[0]; │ │ │ │ │ +243 coeff_ = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ +244 rows_ = new _F_i_e_l_d*[ numRows_+1 ]; │ │ │ │ │ +245 skip_ = new unsigned int[ _s_i_z_e ]; │ │ │ │ │ +246 for (unsigned int i=0; i<_s_i_z_e; ++i) │ │ │ │ │ +247 { │ │ │ │ │ +248 coeff_[i] = other.coeff_[i]; │ │ │ │ │ +249 skip_[i] = other.skip_[i]; │ │ │ │ │ +250 } │ │ │ │ │ +251 for (unsigned int i=0; i<=numRows_; ++i) │ │ │ │ │ +252 rows_[ i ] = coeff_ + (other.rows_[ i ] - other.coeff_); │ │ │ │ │ +253 } │ │ │ │ │ +254 │ │ │ │ │ +255 _T_h_i_s &operator= (const _T_h_i_s&); │ │ │ │ │ +256 _F_i_e_l_d *coeff_; │ │ │ │ │ +257 _F_i_e_l_d **rows_; │ │ │ │ │ +258 unsigned int *skip_; │ │ │ │ │ +259 unsigned int numRows_,numCols_; │ │ │ │ │ +260 }; │ │ │ │ │ +261 │ │ │ │ │ +262} │ │ │ │ │ +263 │ │ │ │ │ +264#endif // DUNE_COEFFMATRIX_HH │ │ │ │ │ +_t_e_n_s_o_r_._h_h │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -HierarchicalPrismP2LocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl:: │ │ │ │ │ -LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< │ │ │ │ │ -HierarchicalPrismP2LocalBasis< D, R > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_:_:_a_d_d │ │ │ │ │ +static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_:_:_B_a_s_i_s_E_n_t_r_y │ │ │ │ │ +Field2 BasisEntry │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _>_:_:_B_a_s_i_s_E_n_t_r_y │ │ │ │ │ +FieldVector< Field2, dimRange > BasisEntry │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _>_:_:_a_d_d │ │ │ │ │ +static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_b_l_o_c_k_S_i_z_e │ │ │ │ │ +static const unsigned int blockSize │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ +SparseCoeffMatrix() │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_b_a_s_e_S_i_z_e │ │ │ │ │ +unsigned int baseSize() const │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_T_h_i_s │ │ │ │ │ +SparseCoeffMatrix< Field, blockSize > This │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ +void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:160 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_a_d_d_R_o_w │ │ │ │ │ +void addRow(unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:223 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ +void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ +void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ +void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_~_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ +~SparseCoeffMatrix() │ │ │ │ │ +DDeeffiinniittiioonn coeffmatrix.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:571 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:649 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: defaultbasisfactory.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,32 +65,37 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2localinterpolation.hh File Reference
│ │ │ │ +
defaultbasisfactory.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/utility/basismatrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalSimplexP2LocalInterpolation< LB >
struct  Dune::Identity
 
struct  Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >
 
struct  Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >::EvaluationBasisFactory< dd, FF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +defaultbasisfactory.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_m_a_t_r_i_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_I_d_e_n_t_i_t_y │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_<_ _P_r_e_B_F_a_c_t_o_r_y_,_ _I_n_t_e_r_p_o_l_F_a_c_t_o_r_y_,_ _d_i_m_,_ _d_i_m_R_, │ │ │ │ │ + _S_F_,_ _C_F_,_ _P_r_e_B_a_s_i_s_K_e_y_E_x_t_r_a_c_t_o_r_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_<_ _P_r_e_B_F_a_c_t_o_r_y_,_ _I_n_t_e_r_p_o_l_F_a_c_t_o_r_y_,_ _d_i_m_,_ _d_i_m_R_, │ │ │ │ │ + _S_F_,_ _C_F_,_ _P_r_e_B_a_s_i_s_K_e_y_E_x_t_r_a_c_t_o_r_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00125_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: defaultbasisfactory.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,134 +70,151 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2localinterpolation.hh
│ │ │ │ +
defaultbasisfactory.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ +
6#define DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ - │ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
16 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
19 public:
│ │ │ │ -
20
│ │ │ │ -
21 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
22 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
23 {
│ │ │ │ -
24 typename LB::Traits::DomainType x;
│ │ │ │ -
25 typename LB::Traits::RangeType y;
│ │ │ │ -
26
│ │ │ │ -
27 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ -
28
│ │ │ │ -
29 static_assert(LB::Traits::dimDomain <= 3,
│ │ │ │ -
30 "LocalInterpolation for HierarchicalSimplexP2 finite elements"
│ │ │ │ -
31 " is only implemented for dimDomain <=3!");
│ │ │ │ -
32
│ │ │ │ -
33 switch ( int(LB::Traits::dimDomain)) {
│ │ │ │ -
34
│ │ │ │ -
35 case 1 :
│ │ │ │ -
36
│ │ │ │ -
37 out.resize(3);
│ │ │ │ -
38
│ │ │ │ -
39 // First: the two vertex dofs
│ │ │ │ -
40 x[0] = 0.0; out[0] = f(x);
│ │ │ │ -
41 x[0] = 1.0; out[2] = f(x);
│ │ │ │ -
42
│ │ │ │ -
43 // Then: the edge dof
│ │ │ │ -
44 x[0] = 0.5; y = f(x);
│ │ │ │ -
45 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ -
46
│ │ │ │ -
47 break;
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
50 case 2 :
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
│ │ │ │ +
15 struct Identity
│ │ │ │ +
16 {
│ │ │ │ +
17 template <class T>
│ │ │ │ +
│ │ │ │ +
18 static T apply( const T &t )
│ │ │ │ +
19 {
│ │ │ │ +
20 return t;
│ │ │ │ +
21 }
│ │ │ │ +
│ │ │ │ +
22 };
│ │ │ │ +
│ │ │ │ +
23 /************************************************
│ │ │ │ +
24 * Class for providing a factory for basis
│ │ │ │ +
25 * functions over the set of reference elements.
│ │ │ │ +
26 * Is based on the TopologyFactory but additionally
│ │ │ │ +
27 * provides rebindes of the field type.
│ │ │ │ +
28 * The user provides factories for the pre basis and the
│ │ │ │ +
29 * interpolations. The default construction process of
│ │ │ │ +
30 * the basis is performed in this class.
│ │ │ │ +
31 ************************************************/
│ │ │ │ +
32 template< class PreBFactory,
│ │ │ │ +
33 class InterpolFactory,
│ │ │ │ +
34 unsigned int dim, unsigned int dimR,
│ │ │ │ +
35 class SF, class CF,
│ │ │ │ +
36 class PreBasisKeyExtractor = Identity >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {
│ │ │ │ +
39 static const unsigned int dimension = dim;
│ │ │ │ +
40 static const unsigned int dimRange = dimR;
│ │ │ │ +
41 typedef SF StorageField;
│ │ │ │ +
42 typedef CF ComputeField;
│ │ │ │ +
43 typedef PreBFactory PreBasisFactory;
│ │ │ │ +
44 typedef typename PreBasisFactory::Object PreBasis;
│ │ │ │ +
45 typedef InterpolFactory InterpolationFactory;
│ │ │ │ +
46 typedef typename InterpolationFactory::Object Interpolation;
│ │ │ │ +
47 typedef typename PreBasisFactory::template EvaluationBasisFactory<dim,SF>::Type MonomialBasisFactory;
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
51
│ │ │ │ -
52 out.resize(6);
│ │ │ │ -
53
│ │ │ │ -
54 // First: the three vertex dofs
│ │ │ │ -
55 x[0] = 0.0; x[1] = 0.0; out[0] = f(x);
│ │ │ │ -
56 x[0] = 1.0; x[1] = 0.0; out[2] = f(x);
│ │ │ │ -
57 x[0] = 0.0; x[1] = 1.0; out[5] = f(x);
│ │ │ │ -
58
│ │ │ │ -
59 // Then: the three edge dofs
│ │ │ │ -
60 x[0] = 0.5; x[1] = 0.0; y = f(x);
│ │ │ │ -
61 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ -
62
│ │ │ │ -
63 x[0] = 0.0; x[1] = 0.5; y = f(x);
│ │ │ │ -
64 out[3] = y - 0.5*(out[0] + out[5]);
│ │ │ │ -
65
│ │ │ │ -
66 x[0] = 0.5; x[1] = 0.5; y = f(x);
│ │ │ │ -
67 out[4] = y - 0.5*(out[2] + out[5]);
│ │ │ │ +
52 typedef const Basis Object;
│ │ │ │ +
53 typedef typename InterpolationFactory::Key Key;
│ │ │ │ +
54 template <unsigned int dd, class FF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 typedef typename PreBasisFactory::template EvaluationBasisFactory<dd,FF>::Type
│ │ │ │ + │ │ │ │ +
59 };
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
61 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
62 static Object *create ( const Key &key )
│ │ │ │ +
63 {
│ │ │ │ +
64 const typename PreBasisFactory::Key preBasisKey = PreBasisKeyExtractor::apply(key);
│ │ │ │ +
65 const PreBasis *preBasis = PreBasisFactory::template create<geometryId>( preBasisKey );
│ │ │ │ +
66 const Interpolation *interpol = InterpolationFactory::template create<geometryId>( key );
│ │ │ │ +
67 BasisMatrix< PreBasis, Interpolation, ComputeField > matrix( *preBasis, *interpol );
│ │ │ │
68
│ │ │ │ -
69 break;
│ │ │ │ +
69 const MonomialBasis *monomialBasis = MonomialBasisFactory::template create< geometryId >( preBasis->order() );
│ │ │ │
70
│ │ │ │ -
71 case 3 :
│ │ │ │ +
71 Basis *basis = new Basis( *monomialBasis );
│ │ │ │
72
│ │ │ │ -
73 out.resize(10);
│ │ │ │ +
73 basis->fill( matrix );
│ │ │ │
74
│ │ │ │ -
75 // First: the four vertex dofs
│ │ │ │ -
76 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x);
│ │ │ │ -
77 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[2] = f(x);
│ │ │ │ -
78 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[5] = f(x);
│ │ │ │ -
79 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[9] = f(x);
│ │ │ │ -
80
│ │ │ │ -
81 // Then: the six edge dofs
│ │ │ │ -
82 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x);
│ │ │ │ -
83 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ -
84
│ │ │ │ -
85 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ -
86 out[3] = y - 0.5*(out[0] + out[5]);
│ │ │ │ -
87
│ │ │ │ -
88 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ -
89 out[4] = y - 0.5*(out[2] + out[5]);
│ │ │ │ -
90
│ │ │ │ -
91 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
92 out[6] = y - 0.5*(out[0] + out[9]);
│ │ │ │ -
93
│ │ │ │ -
94 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
95 out[7] = y - 0.5*(out[2] + out[9]);
│ │ │ │ -
96
│ │ │ │ -
97 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ -
98 out[8] = y - 0.5*(out[5] + out[9]);
│ │ │ │ -
99
│ │ │ │ -
100 break;
│ │ │ │ -
101
│ │ │ │ -
102 }
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 };
│ │ │ │ -
│ │ │ │ -
106}
│ │ │ │ -
107
│ │ │ │ -
108#endif
│ │ │ │ +
75 InterpolationFactory::release(interpol);
│ │ │ │ +
76 PreBasisFactory::release(preBasis);
│ │ │ │ +
77
│ │ │ │ +
78 return basis;
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
81 static void release( Object *object)
│ │ │ │ +
82 {
│ │ │ │ +
83 const MonomialBasis *monomialBasis = &(object->basis());
│ │ │ │ +
84 delete object;
│ │ │ │ +
85 MonomialBasisFactory::release( monomialBasis );
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87 };
│ │ │ │ +
│ │ │ │ +
88}
│ │ │ │ +
89
│ │ │ │ +
90#endif // #ifndef DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalsimplexp2localinterpolation.hh:22
│ │ │ │ - │ │ │ │ +
Definition basisevaluator.hh:131
│ │ │ │ +
Definition basismatrix.hh:27
│ │ │ │ +
Definition defaultbasisfactory.hh:16
│ │ │ │ +
static T apply(const T &t)
Definition defaultbasisfactory.hh:18
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │ +
InterpolationFactory::Object Interpolation
Definition defaultbasisfactory.hh:46
│ │ │ │ +
static const unsigned int dimRange
Definition defaultbasisfactory.hh:40
│ │ │ │ +
static void release(Object *object)
release the object returned by the create methods
Definition defaultbasisfactory.hh:81
│ │ │ │ +
CF ComputeField
Definition defaultbasisfactory.hh:42
│ │ │ │ +
PreBFactory PreBasisFactory
Definition defaultbasisfactory.hh:43
│ │ │ │ +
InterpolationFactory::Key Key
Definition defaultbasisfactory.hh:53
│ │ │ │ +
static const unsigned int dimension
Definition defaultbasisfactory.hh:39
│ │ │ │ +
static Object * create(const Key &key)
Definition defaultbasisfactory.hh:62
│ │ │ │ +
SF StorageField
Definition defaultbasisfactory.hh:41
│ │ │ │ +
MonomialBasisFactory::Object MonomialBasis
Definition defaultbasisfactory.hh:48
│ │ │ │ +
PreBasisFactory::Object PreBasis
Definition defaultbasisfactory.hh:44
│ │ │ │ +
const Basis Object
Definition defaultbasisfactory.hh:52
│ │ │ │ +
StandardEvaluator< MonomialBasis > Evaluator
Definition defaultbasisfactory.hh:49
│ │ │ │ +
InterpolFactory InterpolationFactory
Definition defaultbasisfactory.hh:45
│ │ │ │ +
PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type MonomialBasisFactory
Definition defaultbasisfactory.hh:47
│ │ │ │ +
PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis
Definition defaultbasisfactory.hh:50
│ │ │ │ +
Definition defaultbasisfactory.hh:56
│ │ │ │ +
PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type
Definition defaultbasisfactory.hh:58
│ │ │ │ +
Definition monomialbasis.hh:612
│ │ │ │ +
static void release(Object *object)
Definition monomialbasis.hh:769
│ │ │ │ +
Definition polynomialbasis.hh:348
│ │ │ │ +
void fill(const Matrix &matrix)
Definition polynomialbasis.hh:366
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,126 +1,188 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ -hierarchicalsimplexp2localinterpolation.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +defaultbasisfactory.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ +6#define DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -18 { │ │ │ │ │ -19 public: │ │ │ │ │ -20 │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -23 { │ │ │ │ │ -24 typename LB::Traits::DomainType x; │ │ │ │ │ -25 typename LB::Traits::RangeType y; │ │ │ │ │ -26 │ │ │ │ │ -27 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -28 │ │ │ │ │ -29 static_assert(LB::Traits::dimDomain <= 3, │ │ │ │ │ -30 "LocalInterpolation for HierarchicalSimplexP2 finite elements" │ │ │ │ │ -31 " is only implemented for dimDomain <=3!"); │ │ │ │ │ -32 │ │ │ │ │ -33 switch ( int(LB::Traits::dimDomain)) { │ │ │ │ │ -34 │ │ │ │ │ -35 case 1 : │ │ │ │ │ -36 │ │ │ │ │ -37 out.resize(3); │ │ │ │ │ -38 │ │ │ │ │ -39 // First: the two vertex dofs │ │ │ │ │ -40 x[0] = 0.0; out[0] = f(x); │ │ │ │ │ -41 x[0] = 1.0; out[2] = f(x); │ │ │ │ │ -42 │ │ │ │ │ -43 // Then: the edge dof │ │ │ │ │ -44 x[0] = 0.5; y = f(x); │ │ │ │ │ -45 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ -46 │ │ │ │ │ -47 break; │ │ │ │ │ -48 │ │ │ │ │ -49 │ │ │ │ │ -50 case 2 : │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_m_a_t_r_i_x_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +_1_5 struct _I_d_e_n_t_i_t_y │ │ │ │ │ +16 { │ │ │ │ │ +17 template │ │ │ │ │ +_1_8 static T _a_p_p_l_y( const T &t ) │ │ │ │ │ +19 { │ │ │ │ │ +20 return t; │ │ │ │ │ +21 } │ │ │ │ │ +22 }; │ │ │ │ │ +23 /************************************************ │ │ │ │ │ +24 * Class for providing a factory for basis │ │ │ │ │ +25 * functions over the set of reference elements. │ │ │ │ │ +26 * Is based on the TopologyFactory but additionally │ │ │ │ │ +27 * provides rebindes of the field type. │ │ │ │ │ +28 * The user provides factories for the pre basis and the │ │ │ │ │ +29 * interpolations. The default construction process of │ │ │ │ │ +30 * the basis is performed in this class. │ │ │ │ │ +31 ************************************************/ │ │ │ │ │ +32 template< class PreBFactory, │ │ │ │ │ +33 class InterpolFactory, │ │ │ │ │ +34 unsigned int dim, unsigned int dimR, │ │ │ │ │ +35 class SF, class CF, │ │ │ │ │ +36 class PreBasisKeyExtractor = Identity > │ │ │ │ │ +_3_7 struct _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +38 { │ │ │ │ │ +_3_9 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_4_0 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ +_4_1 typedef SF _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ +_4_2 typedef CF _C_o_m_p_u_t_e_F_i_e_l_d; │ │ │ │ │ +_4_3 typedef PreBFactory _P_r_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ +_4_4 typedef typename PreBasisFactory::Object _P_r_e_B_a_s_i_s; │ │ │ │ │ +_4_5 typedef InterpolFactory _I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +_4_6 typedef typename InterpolationFactory::Object _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +_4_7 typedef typename PreBasisFactory::template _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_d_i_m_,_S_F_>_:_: │ │ │ │ │ +_T_y_p_e _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ +_4_8 typedef typename _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _M_o_n_o_m_i_a_l_B_a_s_i_s; │ │ │ │ │ +_4_9 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _M_o_n_o_m_i_a_l_B_a_s_i_s_ _> _E_v_a_l_u_a_t_o_r; │ │ │ │ │ +_5_0 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_u_a_t_o_r_,_ _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_ _S_F_, │ │ │ │ │ +_d_i_m_R_a_n_g_e_ _> > _B_a_s_i_s; │ │ │ │ │ 51 │ │ │ │ │ -52 out.resize(6); │ │ │ │ │ -53 │ │ │ │ │ -54 // First: the three vertex dofs │ │ │ │ │ -55 x[0] = 0.0; x[1] = 0.0; out[0] = f(x); │ │ │ │ │ -56 x[0] = 1.0; x[1] = 0.0; out[2] = f(x); │ │ │ │ │ -57 x[0] = 0.0; x[1] = 1.0; out[5] = f(x); │ │ │ │ │ -58 │ │ │ │ │ -59 // Then: the three edge dofs │ │ │ │ │ -60 x[0] = 0.5; x[1] = 0.0; y = f(x); │ │ │ │ │ -61 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ -62 │ │ │ │ │ -63 x[0] = 0.0; x[1] = 0.5; y = f(x); │ │ │ │ │ -64 out[3] = y - 0.5*(out[0] + out[5]); │ │ │ │ │ -65 │ │ │ │ │ -66 x[0] = 0.5; x[1] = 0.5; y = f(x); │ │ │ │ │ -67 out[4] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ +_5_2 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ +_5_3 typedef typename InterpolationFactory::Key _K_e_y; │ │ │ │ │ +54 template │ │ │ │ │ +_5_5 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +56 { │ │ │ │ │ +57 typedef typename PreBasisFactory::template _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_d_d_,_F_F_>_:_: │ │ │ │ │ +_T_y_p_e │ │ │ │ │ +_5_8 _T_y_p_e; │ │ │ │ │ +59 }; │ │ │ │ │ +60 │ │ │ │ │ +61 template< GeometryType::Id geometryId > │ │ │ │ │ +_6_2 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ +63 { │ │ │ │ │ +64 const typename PreBasisFactory::Key preBasisKey = PreBasisKeyExtractor:: │ │ │ │ │ +apply(key); │ │ │ │ │ +65 const _P_r_e_B_a_s_i_s *preBasis = PreBasisFactory::template create │ │ │ │ │ +( preBasisKey ); │ │ │ │ │ +66 const _I_n_t_e_r_p_o_l_a_t_i_o_n *interpol = InterpolationFactory::template │ │ │ │ │ +create( key ); │ │ │ │ │ +67 _B_a_s_i_s_M_a_t_r_i_x_<_ _P_r_e_B_a_s_i_s_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _C_o_m_p_u_t_e_F_i_e_l_d_ _> matrix( *preBasis, │ │ │ │ │ +*interpol ); │ │ │ │ │ 68 │ │ │ │ │ -69 break; │ │ │ │ │ +69 const _M_o_n_o_m_i_a_l_B_a_s_i_s *monomialBasis = MonomialBasisFactory::template create< │ │ │ │ │ +geometryId >( preBasis->order() ); │ │ │ │ │ 70 │ │ │ │ │ -71 case 3 : │ │ │ │ │ +71 _B_a_s_i_s *basis = new _B_a_s_i_s( *monomialBasis ); │ │ │ │ │ 72 │ │ │ │ │ -73 out.resize(10); │ │ │ │ │ +73 basis->_f_i_l_l( matrix ); │ │ │ │ │ 74 │ │ │ │ │ -75 // First: the four vertex dofs │ │ │ │ │ -76 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x); │ │ │ │ │ -77 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[2] = f(x); │ │ │ │ │ -78 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[5] = f(x); │ │ │ │ │ -79 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[9] = f(x); │ │ │ │ │ -80 │ │ │ │ │ -81 // Then: the six edge dofs │ │ │ │ │ -82 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x); │ │ │ │ │ -83 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ -84 │ │ │ │ │ -85 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ -86 out[3] = y - 0.5*(out[0] + out[5]); │ │ │ │ │ -87 │ │ │ │ │ -88 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ -89 out[4] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ -90 │ │ │ │ │ -91 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -92 out[6] = y - 0.5*(out[0] + out[9]); │ │ │ │ │ -93 │ │ │ │ │ -94 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -95 out[7] = y - 0.5*(out[2] + out[9]); │ │ │ │ │ -96 │ │ │ │ │ -97 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x); │ │ │ │ │ -98 out[8] = y - 0.5*(out[5] + out[9]); │ │ │ │ │ -99 │ │ │ │ │ -100 break; │ │ │ │ │ -101 │ │ │ │ │ -102 } │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -105 }; │ │ │ │ │ -106} │ │ │ │ │ -107 │ │ │ │ │ -108#endif │ │ │ │ │ +75 InterpolationFactory::release(interpol); │ │ │ │ │ +76 PreBasisFactory::release(preBasis); │ │ │ │ │ +77 │ │ │ │ │ +78 return basis; │ │ │ │ │ +79 } │ │ │ │ │ +_8_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object) │ │ │ │ │ +82 { │ │ │ │ │ +83 const _M_o_n_o_m_i_a_l_B_a_s_i_s *monomialBasis = &(object->basis()); │ │ │ │ │ +84 delete object; │ │ │ │ │ +85 _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( monomialBasis ); │ │ │ │ │ +86 } │ │ │ │ │ +87 }; │ │ │ │ │ +88} │ │ │ │ │ +89 │ │ │ │ │ +90#endif // #ifndef DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ +_b_a_s_i_s_m_a_t_r_i_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:22 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_I_d_e_n_t_i_t_y_:_:_a_p_p_l_y │ │ │ │ │ +static T apply(const T &t) │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +InterpolationFactory::Object Interpolation │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +release the object returned by the create methods │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ +CF ComputeField │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +PreBFactory PreBasisFactory │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +InterpolationFactory::Key Key │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ +SF StorageField │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +MonomialBasisFactory::Object MonomialBasis │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ +PreBasisFactory::Object PreBasis │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const Basis Object │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_o_r │ │ │ │ │ +StandardEvaluator< MonomialBasis > Evaluator │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +InterpolFactory InterpolationFactory │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type │ │ │ │ │ +MonomialBasisFactory │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ +PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ +PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:769 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ +void fill(const Matrix &matrix) │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:366 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ +dune-localfunctions: basismatrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2localbasis.hh File Reference
│ │ │ │ +
basismatrix.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Hierarchical p2 shape functions for the simplex. │ │ │ │ -More...

│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │ +#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalSimplexP2LocalBasis< D, R, dim >
struct  Dune::BasisMatrixBase< PreBasis, Interpolation, Field >
 
struct  Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
struct  Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 2 >
 Hierarchical P2 basis in 2d. More...
struct  Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field >
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 3 >
 Hierarchical P2 basis in 3d. More...
struct  Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +1,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +basismatrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_ _P_r_e_B_a_s_i_s_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ -  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_, │ │ │ │ │ + _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ -  Hierarchical P2 basis in 2d. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_, │ │ │ │ │ + _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ -  Hierarchical P2 basis in 3d. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_, │ │ │ │ │ + _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_, │ │ │ │ │ + _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00128_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2localbasis.hh Source File │ │ │ │ +dune-localfunctions: basismatrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,367 +70,286 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2localbasis.hh
│ │ │ │ +
basismatrix.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_BASISMATRIX_HH
│ │ │ │ +
6#define DUNE_BASISMATRIX_HH
│ │ │ │
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/common/fvector.hh>
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not implemented for dim > 3.");
│ │ │ │ -
28 }
│ │ │ │ -
│ │ │ │ -
29 };
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ -
45 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
47 {
│ │ │ │ -
48 public:
│ │ │ │ -
50 typedef LocalBasisTraits<D,1,Dune::FieldVector<D,1>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
51 Dune::FieldMatrix<R,1,1> > Traits;
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ -
54 unsigned int size () const
│ │ │ │ -
55 {
│ │ │ │ -
56 return 3;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
61 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
62 {
│ │ │ │ -
63 out.resize(3);
│ │ │ │ -
64
│ │ │ │ -
65 out[0] = 1-in[0];
│ │ │ │ -
66 out[1] = 1-4*(in[0]-0.5)*(in[0]-0.5);
│ │ │ │ -
67 out[2] = in[0];
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
71 inline void
│ │ │ │ -
│ │ │ │ -
72 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
73 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
74 {
│ │ │ │ -
75 out.resize(3);
│ │ │ │ -
76
│ │ │ │ -
77 out[0][0][0] = -1;
│ │ │ │ -
78 out[1][0][0] = 4-8*in[0];
│ │ │ │ -
79 out[2][0][0] = 1;
│ │ │ │ -
80 }
│ │ │ │ -
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
83 void partial (const std::array<unsigned int, 1>& order,
│ │ │ │ -
84 const typename Traits::DomainType& in, // position
│ │ │ │ -
85 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
86 {
│ │ │ │ -
87 auto totalOrder = order[0];
│ │ │ │ -
88 if (totalOrder == 0) {
│ │ │ │ -
89 evaluateFunction(in, out);
│ │ │ │ -
90 } else if (totalOrder == 1) {
│ │ │ │ -
91 out.resize(size());
│ │ │ │ -
92 out[0] = -1;
│ │ │ │ -
93 out[1] = 4-8*in[0];
│ │ │ │ -
94 out[2] = 1;
│ │ │ │ -
95 } else if (totalOrder == 2) {
│ │ │ │ -
96 out.resize(size());
│ │ │ │ -
97 out[0] = 0;
│ │ │ │ -
98 out[1] = -8;
│ │ │ │ -
99 out[2] = 0;
│ │ │ │ -
100 } else {
│ │ │ │ -
101 out.resize(size());
│ │ │ │ -
102 out[0] = out[1] = out[2] = 0;
│ │ │ │ -
103 }
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
108 unsigned int order () const
│ │ │ │ -
109 {
│ │ │ │ -
110 return 2;
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
113 };
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
134 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
136 {
│ │ │ │ -
137 public:
│ │ │ │ -
139 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
140 Dune::FieldMatrix<R,1,2> > Traits;
│ │ │ │ -
141
│ │ │ │ -
│ │ │ │ -
143 unsigned int size () const
│ │ │ │ -
144 {
│ │ │ │ -
145 return 6;
│ │ │ │ -
146 }
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
149 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
150 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
151 {
│ │ │ │ -
152 out.resize(6);
│ │ │ │ -
153
│ │ │ │ -
154 out[0] = 1 - in[0] - in[1];
│ │ │ │ -
155 out[1] = 4*in[0]*(1-in[0]-in[1]);
│ │ │ │ -
156 out[2] = in[0];
│ │ │ │ -
157 out[3] = 4*in[1]*(1-in[0]-in[1]);
│ │ │ │ -
158 out[4] = 4*in[0]*in[1];
│ │ │ │ -
159 out[5] = in[1];
│ │ │ │ -
160
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
164 inline void
│ │ │ │ -
│ │ │ │ -
165 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
166 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
167 {
│ │ │ │ -
168 out.resize(6);
│ │ │ │ -
169
│ │ │ │ -
170 out[0][0][0] = -1; out[0][0][1] = -1;
│ │ │ │ -
171 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0];
│ │ │ │ -
172 out[2][0][0] = 1; out[2][0][1] = 0;
│ │ │ │ -
173 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1];
│ │ │ │ -
174 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0];
│ │ │ │ -
175 out[5][0][0] = 0; out[5][0][1] = 1;
│ │ │ │ -
176 }
│ │ │ │ -
│ │ │ │ -
177
│ │ │ │ -
│ │ │ │ -
179 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
180 const typename Traits::DomainType& in, // position
│ │ │ │ -
181 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
182 {
│ │ │ │ -
183 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
184 if (totalOrder == 0) {
│ │ │ │ -
185 evaluateFunction(in, out);
│ │ │ │ -
186 } else if (totalOrder == 1) {
│ │ │ │ -
187 out.resize(size());
│ │ │ │ -
188 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
189
│ │ │ │ -
190 switch (direction) {
│ │ │ │ -
191 case 0:
│ │ │ │ -
192 out[0] = -1;
│ │ │ │ -
193 out[1] = 4-8*in[0]-4*in[1];
│ │ │ │ -
194 out[2] = 1;
│ │ │ │ -
195 out[3] = -4*in[1];
│ │ │ │ -
196 out[4] = 4*in[1];
│ │ │ │ -
197 out[5] = 0;
│ │ │ │ -
198 break;
│ │ │ │ -
199 case 1:
│ │ │ │ -
200 out[0] = -1;
│ │ │ │ -
201 out[1] = -4*in[0];
│ │ │ │ -
202 out[2] = 0;
│ │ │ │ -
203 out[3] = 4-4*in[0]-8*in[1];
│ │ │ │ -
204 out[4] = 4*in[0];
│ │ │ │ -
205 out[5] = 1;
│ │ │ │ -
206 break;
│ │ │ │ -
207 default:
│ │ │ │ -
208 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
209 }
│ │ │ │ -
210 } else {
│ │ │ │ -
211 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
212 }
│ │ │ │ -
213 }
│ │ │ │ -
│ │ │ │ -
214
│ │ │ │ -
│ │ │ │ -
217 unsigned int order () const
│ │ │ │ -
218 {
│ │ │ │ -
219 return 2;
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221
│ │ │ │ -
222 };
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
247 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
249 {
│ │ │ │ -
250 public:
│ │ │ │ -
252 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
253 Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ -
254
│ │ │ │ -
│ │ │ │ -
256 unsigned int size () const
│ │ │ │ -
257 {
│ │ │ │ -
258 return 10;
│ │ │ │ -
259 }
│ │ │ │ -
│ │ │ │ -
260
│ │ │ │ -
│ │ │ │ -
262 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
263 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
264 {
│ │ │ │ -
265 out.resize(10);
│ │ │ │ -
266
│ │ │ │ -
267 out[0] = 1 - in[0] - in[1] - in[2];
│ │ │ │ -
268 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
269 out[2] = in[0];
│ │ │ │ -
270 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
271 out[4] = 4 * in[0] * in[1];
│ │ │ │ -
272 out[5] = in[1];
│ │ │ │ -
273 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
274 out[7] = 4 * in[0] * in[2];
│ │ │ │ -
275 out[8] = 4 * in[1] * in[2];
│ │ │ │ -
276 out[9] = in[2];
│ │ │ │ -
277 }
│ │ │ │ -
│ │ │ │ -
278
│ │ │ │ -
│ │ │ │ -
280 void evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
281 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
282 {
│ │ │ │ -
283 out.resize(10);
│ │ │ │ -
284
│ │ │ │ -
285 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1;
│ │ │ │ -
286 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1][0][2] = -4*in[0];
│ │ │ │ -
287 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
288 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3][0][2] = -4*in[1];
│ │ │ │ -
289 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0;
│ │ │ │ -
290 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0;
│ │ │ │ -
291 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ -
292 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0];
│ │ │ │ -
293 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1];
│ │ │ │ -
294 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1;
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ -
296
│ │ │ │ -
│ │ │ │ -
298 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
299 const typename Traits::DomainType& in, // position
│ │ │ │ -
300 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
301 {
│ │ │ │ -
302 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
303 if (totalOrder == 0) {
│ │ │ │ -
304 evaluateFunction(in, out);
│ │ │ │ -
305 } else if (totalOrder == 1) {
│ │ │ │ -
306 out.resize(size());
│ │ │ │ -
307 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
308
│ │ │ │ -
309 switch (direction) {
│ │ │ │ -
310 case 0:
│ │ │ │ -
311 out[0] = -1;
│ │ │ │ -
312 out[1] = 4-8*in[0]-4*in[1]-4*in[2];
│ │ │ │ -
313 out[2] = 1;
│ │ │ │ -
314 out[3] = -4*in[1];
│ │ │ │ -
315 out[4] = 4*in[1];
│ │ │ │ -
316 out[5] = 0;
│ │ │ │ -
317 out[6] = -4*in[2];
│ │ │ │ -
318 out[7] = 4*in[2];
│ │ │ │ -
319 out[8] = 0;
│ │ │ │ -
320 out[9] = 0;
│ │ │ │ -
321 break;
│ │ │ │ -
322 case 1:
│ │ │ │ -
323 out[0] = -1;
│ │ │ │ -
324 out[1] = -4*in[0];
│ │ │ │ -
325 out[2] = 0;
│ │ │ │ -
326 out[3] = 4-4*in[0]-8*in[1]-4*in[2];
│ │ │ │ -
327 out[4] = 4*in[0];
│ │ │ │ -
328 out[5] = 1;
│ │ │ │ -
329 out[6] = -4*in[2];
│ │ │ │ -
330 out[7] = 0;
│ │ │ │ -
331 out[8] = 4*in[2];
│ │ │ │ -
332 out[9] = 0;
│ │ │ │ -
333 break;
│ │ │ │ -
334 case 2:
│ │ │ │ -
335 out[0] = -1;
│ │ │ │ -
336 out[1] = -4*in[0];
│ │ │ │ -
337 out[2] = 0;
│ │ │ │ -
338 out[3] = -4*in[1];
│ │ │ │ -
339 out[4] = 0;
│ │ │ │ -
340 out[5] = 0;
│ │ │ │ -
341 out[6] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ -
342 out[7] = 4*in[0];
│ │ │ │ -
343 out[8] = 4*in[1];
│ │ │ │ -
344 out[9] = 1;
│ │ │ │ -
345 break;
│ │ │ │ -
346 default:
│ │ │ │ -
347 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
348 }
│ │ │ │ -
349 } else {
│ │ │ │ -
350 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
351 }
│ │ │ │ -
352 }
│ │ │ │ -
│ │ │ │ -
353
│ │ │ │ -
│ │ │ │ -
356 unsigned int order () const
│ │ │ │ -
357 {
│ │ │ │ -
358 return 2;
│ │ │ │ -
359 }
│ │ │ │ -
│ │ │ │ -
360
│ │ │ │ -
361 };
│ │ │ │ -
│ │ │ │ -
362}
│ │ │ │ -
363#endif
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 /****************************************
│ │ │ │ +
18 * A dense matrix representation of a ''polynomial''
│ │ │ │ +
19 * basis. Its represent a basis as a linear
│ │ │ │ +
20 * combination of a second basis, i.e., a
│ │ │ │ +
21 * monomial basis. It is simular to the PolynomialBasis
│ │ │ │ +
22 * but it not derived from the LocalBasis class.
│ │ │ │ +
23 * It is used to define a ''pre basis''.
│ │ │ │ +
24 ****************************************/
│ │ │ │ +
25 template< class PreBasis, class Interpolation,
│ │ │ │ +
26 class Field >
│ │ │ │ + │ │ │ │ +
28
│ │ │ │ +
29 template< class PreBasis, class Interpolation,
│ │ │ │ +
30 class Field >
│ │ │ │ +
│ │ │ │ +
31 struct BasisMatrixBase : public LFEMatrix<Field>
│ │ │ │ +
32 {
│ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
35 BasisMatrixBase( const PreBasis& preBasis,
│ │ │ │ +
36 const Interpolation& localInterpolation )
│ │ │ │ +
37 : cols_(preBasis.size())
│ │ │ │ +
38 {
│ │ │ │ +
39 localInterpolation.interpolate( preBasis, *this );
│ │ │ │ +
40
│ │ │ │ +
41 if ( !Matrix::invert() )
│ │ │ │ +
42 {
│ │ │ │ +
43 DUNE_THROW(MathError, "While computing basis a singular matrix was constructed!");
│ │ │ │ +
44 }
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
46 unsigned int cols () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return cols_;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
50 unsigned int rows () const
│ │ │ │ +
51 {
│ │ │ │ +
52 return Matrix::rows();
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54 private:
│ │ │ │ +
55 unsigned int cols_;
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
58 template< GeometryType::Id geometryId, class F,
│ │ │ │ +
59 class Interpolation,
│ │ │ │ +
60 class Field >
│ │ │ │ +
│ │ │ │ +
61 struct BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
│ │ │ │ +
62 : public BasisMatrixBase< const MonomialBasis< geometryId, F >, Interpolation, Field >
│ │ │ │ +
63 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
66 typedef typename Base::Matrix Matrix;
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ +
69 const Interpolation& localInterpolation )
│ │ │ │ +
70 : Base(preBasis, localInterpolation)
│ │ │ │ +
71 {}
│ │ │ │ +
│ │ │ │ +
72 template <class Vector>
│ │ │ │ +
│ │ │ │ +
73 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
74 {
│ │ │ │ +
75 const unsigned int N = Matrix::rows();
│ │ │ │ +
76 assert( Matrix::cols() == N && vec.size() == N );
│ │ │ │ +
77 // note: that the transposed matrix is computed,
│ │ │ │ +
78 // and is square
│ │ │ │ +
79 for (unsigned int i=0; i<N; ++i)
│ │ │ │ +
80 field_cast(Matrix::operator()(i,row),vec[i]);
│ │ │ │ +
81 }
│ │ │ │ +
│ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83 template< int dim, class F,
│ │ │ │ +
84 class Interpolation,
│ │ │ │ +
85 class Field >
│ │ │ │ +
│ │ │ │ +
86 struct BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
│ │ │ │ +
87 : public BasisMatrixBase< const VirtualMonomialBasis< dim, F >, Interpolation, Field >
│ │ │ │ +
88 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
91 typedef typename Base::Matrix Matrix;
│ │ │ │ +
92
│ │ │ │ +
│ │ │ │ +
93 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ +
94 const Interpolation& localInterpolation )
│ │ │ │ +
95 : Base(preBasis, localInterpolation)
│ │ │ │ +
96 {}
│ │ │ │ +
│ │ │ │ +
97 template <class Vector>
│ │ │ │ +
│ │ │ │ +
98 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
99 {
│ │ │ │ +
100 const unsigned int N = Matrix::rows();
│ │ │ │ +
101 assert( Matrix::cols() == N && vec.size() == N );
│ │ │ │ +
102 // note: that the transposed matrix is computed,
│ │ │ │ +
103 // and is square
│ │ │ │ +
104 for (unsigned int i=0; i<N; ++i)
│ │ │ │ +
105 field_cast(Matrix::operator()(i,row),vec[i]);
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107 };
│ │ │ │ +
│ │ │ │ +
108 template< class Eval, class CM, class D, class R,
│ │ │ │ +
109 class Interpolation,
│ │ │ │ +
110 class Field >
│ │ │ │ +
│ │ │ │ +
111 struct BasisMatrix< const PolynomialBasis<Eval,CM,D,R>, Interpolation, Field >
│ │ │ │ +
112 : public BasisMatrixBase< const PolynomialBasis<Eval,CM,D,R>, Interpolation, Field >
│ │ │ │ +
113 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
116 typedef typename Base::Matrix Matrix;
│ │ │ │ +
117
│ │ │ │ +
│ │ │ │ +
118 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ +
119 const Interpolation& localInterpolation )
│ │ │ │ +
120 : Base(preBasis, localInterpolation),
│ │ │ │ +
121 preBasis_(preBasis)
│ │ │ │ +
122 {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
123 unsigned int cols() const
│ │ │ │ +
124 {
│ │ │ │ +
125 return preBasis_.matrix().baseSize() ;
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127 template <class Vector>
│ │ │ │ +
│ │ │ │ +
128 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
129 {
│ │ │ │ +
130 assert( Matrix::rows() == Matrix::cols() );
│ │ │ │ +
131 assert( vec.size() == preBasis_.matrix().baseSize() );
│ │ │ │ +
132 assert( Matrix::cols() == preBasis_.size() );
│ │ │ │ +
133 for (unsigned int j=0; j<Matrix::cols(); ++j)
│ │ │ │ +
134 vec[j] = 0;
│ │ │ │ +
135 for (unsigned int i=0; i<Matrix::rows(); ++i)
│ │ │ │ +
136 preBasis_.matrix().
│ │ │ │ +
137 addRow(i,Base::Matrix::operator()(i,row),vec);
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139 private:
│ │ │ │ +
140 const PreBasis& preBasis_;
│ │ │ │ +
141 };
│ │ │ │ +
│ │ │ │ +
142 template< class Eval, class CM,
│ │ │ │ +
143 class Interpolation,
│ │ │ │ +
144 class Field >
│ │ │ │ +
│ │ │ │ +
145 struct BasisMatrix< const PolynomialBasisWithMatrix<Eval,CM>, Interpolation, Field >
│ │ │ │ +
146 : public BasisMatrixBase< const PolynomialBasisWithMatrix<Eval,CM>, Interpolation, Field >
│ │ │ │ +
147 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
150 typedef typename Base::Matrix Matrix;
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
152 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ +
153 const Interpolation& localInterpolation )
│ │ │ │ +
154 : Base(preBasis, localInterpolation),
│ │ │ │ +
155 preBasis_(preBasis)
│ │ │ │ +
156 {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
157 unsigned int cols() const
│ │ │ │ +
158 {
│ │ │ │ +
159 return preBasis_.matrix().baseSize() ;
│ │ │ │ +
160 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
161 unsigned int rows () const
│ │ │ │ +
162 {
│ │ │ │ +
163 assert( Matrix::rows() == preBasis_.matrix().size() );
│ │ │ │ +
164 return preBasis_.matrix().size()*CM::blockSize ;
│ │ │ │ +
165 }
│ │ │ │ +
│ │ │ │ +
166 template <class Vector>
│ │ │ │ +
│ │ │ │ +
167 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
168 {
│ │ │ │ +
169 unsigned int r = row / CM::blockSize;
│ │ │ │ +
170 assert( r < Matrix::rows() );
│ │ │ │ +
171 assert( Matrix::rows() == Matrix::cols() );
│ │ │ │ +
172 assert( vec.size() == preBasis_.matrix().baseSize() );
│ │ │ │ +
173 assert( Matrix::cols() == preBasis_.size() );
│ │ │ │ +
174 for (unsigned int j=0; j<vec.size(); ++j)
│ │ │ │ +
175 vec[j] = 0;
│ │ │ │ +
176 for (unsigned int i=0; i<Matrix::rows(); ++i)
│ │ │ │ +
177 preBasis_.matrix().
│ │ │ │ +
178 addRow(i*CM::blockSize+row%CM::blockSize,Base::Matrix::operator()(i,r),vec);
│ │ │ │ +
179 }
│ │ │ │ +
│ │ │ │ +
180 private:
│ │ │ │ +
181 const PreBasis& preBasis_;
│ │ │ │ +
182 };
│ │ │ │ +
│ │ │ │ +
183}
│ │ │ │ +
184
│ │ │ │ +
185#endif // DUNE_BASISMATRIX_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Definition hierarchicalsimplexp2localbasis.hh:23
│ │ │ │ -
HierarchicalSimplexP2LocalBasis()
Definition hierarchicalsimplexp2localbasis.hh:25
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (2, in this case)
Definition hierarchicalsimplexp2localbasis.hh:108
│ │ │ │ -
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:51
│ │ │ │ -
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:83
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:54
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:72
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:60
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:140
│ │ │ │ -
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:179
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:143
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (2 in this case)
Definition hierarchicalsimplexp2localbasis.hh:217
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:165
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:149
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:253
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:262
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:280
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:256
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:298
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (2 in this case)
Definition hierarchicalsimplexp2localbasis.hh:356
│ │ │ │ - │ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
Definition basismatrix.hh:27
│ │ │ │ +
Definition basismatrix.hh:32
│ │ │ │ +
unsigned int cols() const
Definition basismatrix.hh:46
│ │ │ │ +
unsigned int rows() const
Definition basismatrix.hh:50
│ │ │ │ +
BasisMatrixBase(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:35
│ │ │ │ +
LFEMatrix< Field > Matrix
Definition basismatrix.hh:33
│ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:73
│ │ │ │ +
const MonomialBasis< geometryId, F > PreBasis
Definition basismatrix.hh:64
│ │ │ │ + │ │ │ │ +
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:68
│ │ │ │ +
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:65
│ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:98
│ │ │ │ +
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:90
│ │ │ │ + │ │ │ │ +
const VirtualMonomialBasis< dim, F > PreBasis
Definition basismatrix.hh:89
│ │ │ │ +
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:93
│ │ │ │ + │ │ │ │ +
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:115
│ │ │ │ +
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:118
│ │ │ │ + │ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:128
│ │ │ │ +
const PolynomialBasis< Eval, CM, D, R > PreBasis
Definition basismatrix.hh:114
│ │ │ │ +
const PolynomialBasisWithMatrix< Eval, CM > PreBasis
Definition basismatrix.hh:148
│ │ │ │ +
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:149
│ │ │ │ + │ │ │ │ + │ │ │ │ +
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:152
│ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:167
│ │ │ │ + │ │ │ │ +
Definition lfematrix.hh:18
│ │ │ │ +
unsigned int rows() const
Definition lfematrix.hh:58
│ │ │ │ +
bool invert()
Definition lfematrix.hh:89
│ │ │ │ +
Field Field
Definition lfematrix.hh:24
│ │ │ │ +
Definition monomialbasis.hh:440
│ │ │ │ +
Definition monomialbasis.hh:612
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │ +
Definition polynomialbasis.hh:348
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,403 +1,344 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ -hierarchicalsimplexp2localbasis.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +basismatrix.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_BASISMATRIX_HH │ │ │ │ │ +6#define DUNE_BASISMATRIX_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -23 { │ │ │ │ │ -24 public: │ │ │ │ │ -_2_5 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ -26 { │ │ │ │ │ -27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ -implemented for dim > 3."); │ │ │ │ │ -28 } │ │ │ │ │ -29 }; │ │ │ │ │ -30 │ │ │ │ │ -45 template │ │ │ │ │ -_4_6 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 /**************************************** │ │ │ │ │ +18 * A dense matrix representation of a ''polynomial'' │ │ │ │ │ +19 * basis. Its represent a basis as a linear │ │ │ │ │ +20 * combination of a second basis, i.e., a │ │ │ │ │ +21 * monomial basis. It is simular to the PolynomialBasis │ │ │ │ │ +22 * but it not derived from the LocalBasis class. │ │ │ │ │ +23 * It is used to define a ''pre basis''. │ │ │ │ │ +24 ****************************************/ │ │ │ │ │ +25 template< class PreBasis, class Interpolation, │ │ │ │ │ +26 class Field > │ │ │ │ │ +_2_7 struct _B_a_s_i_s_M_a_t_r_i_x; │ │ │ │ │ +28 │ │ │ │ │ +29 template< class PreBasis, class Interpolation, │ │ │ │ │ +30 class Field > │ │ │ │ │ +_3_1 struct _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e : public _L_F_E_M_a_t_r_i_x │ │ │ │ │ +32 { │ │ │ │ │ +_3_3 typedef _L_F_E_M_a_t_r_i_x_<_F_i_e_l_d_> _M_a_t_r_i_x; │ │ │ │ │ +34 │ │ │ │ │ +_3_5 _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e( const PreBasis& preBasis, │ │ │ │ │ +36 const Interpolation& localInterpolation ) │ │ │ │ │ +37 : cols_(preBasis.size()) │ │ │ │ │ +38 { │ │ │ │ │ +39 localInterpolation.interpolate( preBasis, *this ); │ │ │ │ │ +40 │ │ │ │ │ +41 if ( !_M_a_t_r_i_x_:_:_i_n_v_e_r_t() ) │ │ │ │ │ +42 { │ │ │ │ │ +43 DUNE_THROW(MathError, "While computing basis a singular matrix was │ │ │ │ │ +constructed!"); │ │ │ │ │ +44 } │ │ │ │ │ +45 } │ │ │ │ │ +_4_6 unsigned int _c_o_l_s () const │ │ │ │ │ 47 { │ │ │ │ │ -48 public: │ │ │ │ │ -50 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_1_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_1_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_5_1 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -52 │ │ │ │ │ -_5_4 unsigned int _s_i_z_e () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return 3; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -61 std::vector& out) const │ │ │ │ │ -62 { │ │ │ │ │ -63 out.resize(3); │ │ │ │ │ -64 │ │ │ │ │ -65 out[0] = 1-in[0]; │ │ │ │ │ -66 out[1] = 1-4*(in[0]-0.5)*(in[0]-0.5); │ │ │ │ │ -67 out[2] = in[0]; │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -71 inline void │ │ │ │ │ -_7_2 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -73 std::vector& out) const // return value │ │ │ │ │ +48 return cols_; │ │ │ │ │ +49 } │ │ │ │ │ +_5_0 unsigned int _r_o_w_s () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return _M_a_t_r_i_x_:_:_r_o_w_s(); │ │ │ │ │ +53 } │ │ │ │ │ +54 private: │ │ │ │ │ +55 unsigned int cols_; │ │ │ │ │ +56 }; │ │ │ │ │ +57 │ │ │ │ │ +58 template< GeometryType::Id geometryId, class F, │ │ │ │ │ +59 class Interpolation, │ │ │ │ │ +60 class Field > │ │ │ │ │ +_6_1 struct _B_a_s_i_s_M_a_t_r_i_x< const _M_o_n_o_m_i_a_l_B_a_s_i_s< geometryId, F >, Interpolation, │ │ │ │ │ +_F_i_e_l_d > │ │ │ │ │ +62 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const MonomialBasis< geometryId, F >, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ +63 { │ │ │ │ │ +_6_4 typedef const _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _P_r_e_B_a_s_i_s; │ │ │ │ │ +_6_5 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ +_6_6 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ +67 │ │ │ │ │ +_6_8 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ +69 const Interpolation& localInterpolation ) │ │ │ │ │ +70 : _B_a_s_e(preBasis, localInterpolation) │ │ │ │ │ +71 {} │ │ │ │ │ +72 template │ │ │ │ │ +_7_3 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ 74 { │ │ │ │ │ -75 out.resize(3); │ │ │ │ │ -76 │ │ │ │ │ -77 out[0][0][0] = -1; │ │ │ │ │ -78 out[1][0][0] = 4-8*in[0]; │ │ │ │ │ -79 out[2][0][0] = 1; │ │ │ │ │ -80 } │ │ │ │ │ -81 │ │ │ │ │ -_8_3 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -84 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -85 std::vector& out) const // return value │ │ │ │ │ -86 { │ │ │ │ │ -87 auto totalOrder = order[0]; │ │ │ │ │ -88 if (totalOrder == 0) { │ │ │ │ │ -89 evaluateFunction(in, out); │ │ │ │ │ -90 } else if (totalOrder == 1) { │ │ │ │ │ -91 out.resize(size()); │ │ │ │ │ -92 out[0] = -1; │ │ │ │ │ -93 out[1] = 4-8*in[0]; │ │ │ │ │ -94 out[2] = 1; │ │ │ │ │ -95 } else if (totalOrder == 2) { │ │ │ │ │ -96 out.resize(size()); │ │ │ │ │ -97 out[0] = 0; │ │ │ │ │ -98 out[1] = -8; │ │ │ │ │ -99 out[2] = 0; │ │ │ │ │ -100 } else { │ │ │ │ │ -101 out.resize(size()); │ │ │ │ │ -102 out[0] = out[1] = out[2] = 0; │ │ │ │ │ -103 } │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ -109 { │ │ │ │ │ -110 return 2; │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -113 }; │ │ │ │ │ -114 │ │ │ │ │ -134 template │ │ │ │ │ -_1_3_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -136 { │ │ │ │ │ -137 public: │ │ │ │ │ -139 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_1_4_0 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -141 │ │ │ │ │ -_1_4_3 unsigned int _s_i_z_e () const │ │ │ │ │ -144 { │ │ │ │ │ -145 return 6; │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -150 std::vector& out) const │ │ │ │ │ -151 { │ │ │ │ │ -152 out.resize(6); │ │ │ │ │ -153 │ │ │ │ │ -154 out[0] = 1 - in[0] - in[1]; │ │ │ │ │ -155 out[1] = 4*in[0]*(1-in[0]-in[1]); │ │ │ │ │ -156 out[2] = in[0]; │ │ │ │ │ -157 out[3] = 4*in[1]*(1-in[0]-in[1]); │ │ │ │ │ -158 out[4] = 4*in[0]*in[1]; │ │ │ │ │ -159 out[5] = in[1]; │ │ │ │ │ -160 │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -164 inline void │ │ │ │ │ -_1_6_5 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -166 std::vector& out) const // return value │ │ │ │ │ -167 { │ │ │ │ │ -168 out.resize(6); │ │ │ │ │ -169 │ │ │ │ │ -170 out[0][0][0] = -1; out[0][0][1] = -1; │ │ │ │ │ -171 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0]; │ │ │ │ │ -172 out[2][0][0] = 1; out[2][0][1] = 0; │ │ │ │ │ -173 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]; │ │ │ │ │ -174 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; │ │ │ │ │ -175 out[5][0][0] = 0; out[5][0][1] = 1; │ │ │ │ │ -176 } │ │ │ │ │ -177 │ │ │ │ │ -_1_7_9 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -180 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -181 std::vector& out) const // return value │ │ │ │ │ -182 { │ │ │ │ │ -183 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -184 if (totalOrder == 0) { │ │ │ │ │ -185 evaluateFunction(in, out); │ │ │ │ │ -186 } else if (totalOrder == 1) { │ │ │ │ │ -187 out.resize(size()); │ │ │ │ │ -188 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -189 │ │ │ │ │ -190 switch (direction) { │ │ │ │ │ -191 case 0: │ │ │ │ │ -192 out[0] = -1; │ │ │ │ │ -193 out[1] = 4-8*in[0]-4*in[1]; │ │ │ │ │ -194 out[2] = 1; │ │ │ │ │ -195 out[3] = -4*in[1]; │ │ │ │ │ -196 out[4] = 4*in[1]; │ │ │ │ │ -197 out[5] = 0; │ │ │ │ │ -198 break; │ │ │ │ │ -199 case 1: │ │ │ │ │ -200 out[0] = -1; │ │ │ │ │ -201 out[1] = -4*in[0]; │ │ │ │ │ -202 out[2] = 0; │ │ │ │ │ -203 out[3] = 4-4*in[0]-8*in[1]; │ │ │ │ │ -204 out[4] = 4*in[0]; │ │ │ │ │ -205 out[5] = 1; │ │ │ │ │ -206 break; │ │ │ │ │ -207 default: │ │ │ │ │ -208 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -209 } │ │ │ │ │ -210 } else { │ │ │ │ │ -211 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -212 } │ │ │ │ │ -213 } │ │ │ │ │ -214 │ │ │ │ │ -_2_1_7 unsigned int _o_r_d_e_r () const │ │ │ │ │ -218 { │ │ │ │ │ -219 return 2; │ │ │ │ │ -220 } │ │ │ │ │ -221 │ │ │ │ │ -222 }; │ │ │ │ │ -223 │ │ │ │ │ -247 template │ │ │ │ │ -_2_4_8 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -249 { │ │ │ │ │ -250 public: │ │ │ │ │ -252 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_2_5_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -254 │ │ │ │ │ -_2_5_6 unsigned int _s_i_z_e () const │ │ │ │ │ -257 { │ │ │ │ │ -258 return 10; │ │ │ │ │ -259 } │ │ │ │ │ -260 │ │ │ │ │ -_2_6_2 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -263 std::vector& out) const │ │ │ │ │ -264 { │ │ │ │ │ -265 out.resize(10); │ │ │ │ │ -266 │ │ │ │ │ -267 out[0] = 1 - in[0] - in[1] - in[2]; │ │ │ │ │ -268 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -269 out[2] = in[0]; │ │ │ │ │ -270 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -271 out[4] = 4 * in[0] * in[1]; │ │ │ │ │ -272 out[5] = in[1]; │ │ │ │ │ -273 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -274 out[7] = 4 * in[0] * in[2]; │ │ │ │ │ -275 out[8] = 4 * in[1] * in[2]; │ │ │ │ │ -276 out[9] = in[2]; │ │ │ │ │ -277 } │ │ │ │ │ -278 │ │ │ │ │ -_2_8_0 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -281 std::vector& out) const // return value │ │ │ │ │ -282 { │ │ │ │ │ -283 out.resize(10); │ │ │ │ │ -284 │ │ │ │ │ -285 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1; │ │ │ │ │ -286 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1] │ │ │ │ │ -[0][2] = -4*in[0]; │ │ │ │ │ -287 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -288 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3] │ │ │ │ │ -[0][2] = -4*in[1]; │ │ │ │ │ -289 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0; │ │ │ │ │ -290 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0; │ │ │ │ │ -291 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]- │ │ │ │ │ -4*in[1]-8*in[2]; │ │ │ │ │ -292 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0]; │ │ │ │ │ -293 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1]; │ │ │ │ │ -294 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1; │ │ │ │ │ -295 } │ │ │ │ │ -296 │ │ │ │ │ -_2_9_8 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -299 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -300 std::vector& out) const // return value │ │ │ │ │ -301 { │ │ │ │ │ -302 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -303 if (totalOrder == 0) { │ │ │ │ │ -304 evaluateFunction(in, out); │ │ │ │ │ -305 } else if (totalOrder == 1) { │ │ │ │ │ -306 out.resize(size()); │ │ │ │ │ -307 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -308 │ │ │ │ │ -309 switch (direction) { │ │ │ │ │ -310 case 0: │ │ │ │ │ -311 out[0] = -1; │ │ │ │ │ -312 out[1] = 4-8*in[0]-4*in[1]-4*in[2]; │ │ │ │ │ -313 out[2] = 1; │ │ │ │ │ -314 out[3] = -4*in[1]; │ │ │ │ │ -315 out[4] = 4*in[1]; │ │ │ │ │ -316 out[5] = 0; │ │ │ │ │ -317 out[6] = -4*in[2]; │ │ │ │ │ -318 out[7] = 4*in[2]; │ │ │ │ │ -319 out[8] = 0; │ │ │ │ │ -320 out[9] = 0; │ │ │ │ │ -321 break; │ │ │ │ │ -322 case 1: │ │ │ │ │ -323 out[0] = -1; │ │ │ │ │ -324 out[1] = -4*in[0]; │ │ │ │ │ -325 out[2] = 0; │ │ │ │ │ -326 out[3] = 4-4*in[0]-8*in[1]-4*in[2]; │ │ │ │ │ -327 out[4] = 4*in[0]; │ │ │ │ │ -328 out[5] = 1; │ │ │ │ │ -329 out[6] = -4*in[2]; │ │ │ │ │ -330 out[7] = 0; │ │ │ │ │ -331 out[8] = 4*in[2]; │ │ │ │ │ -332 out[9] = 0; │ │ │ │ │ -333 break; │ │ │ │ │ -334 case 2: │ │ │ │ │ -335 out[0] = -1; │ │ │ │ │ -336 out[1] = -4*in[0]; │ │ │ │ │ -337 out[2] = 0; │ │ │ │ │ -338 out[3] = -4*in[1]; │ │ │ │ │ -339 out[4] = 0; │ │ │ │ │ -340 out[5] = 0; │ │ │ │ │ -341 out[6] = 4-4*in[0]-4*in[1]-8*in[2]; │ │ │ │ │ -342 out[7] = 4*in[0]; │ │ │ │ │ -343 out[8] = 4*in[1]; │ │ │ │ │ -344 out[9] = 1; │ │ │ │ │ -345 break; │ │ │ │ │ -346 default: │ │ │ │ │ -347 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -348 } │ │ │ │ │ -349 } else { │ │ │ │ │ -350 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -351 } │ │ │ │ │ -352 } │ │ │ │ │ -353 │ │ │ │ │ -_3_5_6 unsigned int _o_r_d_e_r () const │ │ │ │ │ -357 { │ │ │ │ │ -358 return 2; │ │ │ │ │ -359 } │ │ │ │ │ -360 │ │ │ │ │ -361 }; │ │ │ │ │ -362} │ │ │ │ │ -363#endif │ │ │ │ │ +75 const unsigned int N = Matrix::rows(); │ │ │ │ │ +76 assert( Matrix::cols() == N && vec.size() == N ); │ │ │ │ │ +77 // note: that the transposed matrix is computed, │ │ │ │ │ +78 // and is square │ │ │ │ │ +79 for (unsigned int i=0; i │ │ │ │ │ +_8_6 struct _B_a_s_i_s_M_a_t_r_i_x< const _D_u_n_e::_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< dim, F >, │ │ │ │ │ +Interpolation, _F_i_e_l_d > │ │ │ │ │ +87 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const VirtualMonomialBasis< dim, F >, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ +88 { │ │ │ │ │ +_8_9 typedef const _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _P_r_e_B_a_s_i_s; │ │ │ │ │ +_9_0 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ +_9_1 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ +92 │ │ │ │ │ +_9_3 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ +94 const Interpolation& localInterpolation ) │ │ │ │ │ +95 : _B_a_s_e(preBasis, localInterpolation) │ │ │ │ │ +96 {} │ │ │ │ │ +97 template │ │ │ │ │ +_9_8 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ +99 { │ │ │ │ │ +100 const unsigned int N = Matrix::rows(); │ │ │ │ │ +101 assert( Matrix::cols() == N && vec.size() == N ); │ │ │ │ │ +102 // note: that the transposed matrix is computed, │ │ │ │ │ +103 // and is square │ │ │ │ │ +104 for (unsigned int i=0; i │ │ │ │ │ +_1_1_1 struct _B_a_s_i_s_M_a_t_r_i_x< const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s, Interpolation, │ │ │ │ │ +_F_i_e_l_d > │ │ │ │ │ +112 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const PolynomialBasis, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ +113 { │ │ │ │ │ +_1_1_4 typedef const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_E_v_a_l_,_C_M_,_D_,_R_> _P_r_e_B_a_s_i_s; │ │ │ │ │ +_1_1_5 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ +_1_1_6 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ +117 │ │ │ │ │ +_1_1_8 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ +119 const Interpolation& localInterpolation ) │ │ │ │ │ +120 : _B_a_s_e(preBasis, localInterpolation), │ │ │ │ │ +121 preBasis_(preBasis) │ │ │ │ │ +122 {} │ │ │ │ │ +_1_2_3 unsigned int _c_o_l_s() const │ │ │ │ │ +124 { │ │ │ │ │ +125 return preBasis_.matrix().baseSize() ; │ │ │ │ │ +126 } │ │ │ │ │ +127 template │ │ │ │ │ +_1_2_8 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ +129 { │ │ │ │ │ +130 assert( Matrix::rows() == Matrix::cols() ); │ │ │ │ │ +131 assert( vec.size() == preBasis_.matrix().baseSize() ); │ │ │ │ │ +132 assert( Matrix::cols() == preBasis_.size() ); │ │ │ │ │ +133 for (unsigned int j=0; j │ │ │ │ │ +_1_4_5 struct _B_a_s_i_s_M_a_t_r_i_x< const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x, │ │ │ │ │ +Interpolation, _F_i_e_l_d > │ │ │ │ │ +146 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const PolynomialBasisWithMatrix, │ │ │ │ │ +Interpolation, Field > │ │ │ │ │ +147 { │ │ │ │ │ +_1_4_8 typedef const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_E_v_a_l_,_C_M_> _P_r_e_B_a_s_i_s; │ │ │ │ │ +_1_4_9 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ +_1_5_0 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ +151 │ │ │ │ │ +_1_5_2 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ +153 const Interpolation& localInterpolation ) │ │ │ │ │ +154 : _B_a_s_e(preBasis, localInterpolation), │ │ │ │ │ +155 preBasis_(preBasis) │ │ │ │ │ +156 {} │ │ │ │ │ +_1_5_7 unsigned int _c_o_l_s() const │ │ │ │ │ +158 { │ │ │ │ │ +159 return preBasis_.matrix().baseSize() ; │ │ │ │ │ +160 } │ │ │ │ │ +_1_6_1 unsigned int _r_o_w_s () const │ │ │ │ │ +162 { │ │ │ │ │ +163 assert( Matrix::rows() == preBasis_.matrix().size() ); │ │ │ │ │ +164 return preBasis_.matrix().size()*CM::blockSize ; │ │ │ │ │ +165 } │ │ │ │ │ +166 template │ │ │ │ │ +_1_6_7 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ +168 { │ │ │ │ │ +169 unsigned int r = row / CM::blockSize; │ │ │ │ │ +170 assert( r < Matrix::rows() ); │ │ │ │ │ +171 assert( Matrix::rows() == Matrix::cols() ); │ │ │ │ │ +172 assert( vec.size() == preBasis_.matrix().baseSize() ); │ │ │ │ │ +173 assert( Matrix::cols() == preBasis_.size() ); │ │ │ │ │ +174 for (unsigned int j=0; j_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2, in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 1 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 1 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2 in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:217 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:165 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:262 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:256 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:298 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2 in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:356 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_c_o_l_s │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_r_o_w_s │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e │ │ │ │ │ +BasisMatrixBase(const PreBasis &preBasis, const Interpolation │ │ │ │ │ +&localInterpolation) │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_M_a_t_r_i_x │ │ │ │ │ +LFEMatrix< Field > Matrix │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ +_>_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ +_>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ +const MonomialBasis< geometryId, F > PreBasis │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:64 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ +_>_:_:_M_a_t_r_i_x │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ +_>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ +_>_:_:_B_a_s_e │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ +const VirtualMonomialBasis< dim, F > PreBasis │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:93 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_c_o_l_s │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ +const PolynomialBasis< Eval, CM, D, R > PreBasis │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:114 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ +const PolynomialBasisWithMatrix< Eval, CM > PreBasis │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ +BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_r_o_w_s │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:161 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ +Base::Matrix Matrix │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ +BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:167 │ │ │ │ │ +_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ +_F_i_e_l_d_ _>_:_:_c_o_l_s │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +DDeeffiinniittiioonn basismatrix.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_r_o_w_s │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_i_n_v_e_r_t │ │ │ │ │ +bool invert() │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_F_i_e_l_d │ │ │ │ │ +Field Field │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ +dune-localfunctions: monomialbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,63 +65,67 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalsimplexp2withelementbubble.hh File Reference
│ │ │ │ +
monomialbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Hierarchical p2 shape functions for the simplex. │ │ │ │ -More...

│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ +
#include <vector>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/geometry/topologyfactory.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ +#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim >
class  Dune::MonomialBasisSize< geometryId >
 
struct  Dune::MonomialBasisHelper< mydim, dim, F >
 
class  Dune::MonomialBasisImpl< geometryId, F >
 
class  Dune::MonomialBasis< geometryId, F >
 
class  Dune::StandardMonomialBasis< dim, F >
 
class  Dune::StandardBiMonomialBasis< dim, F >
 
class  Dune::VirtualMonomialBasis< dim, F >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
class  Dune::VirtualMonomialBasisImpl< geometryId, F >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 2 >
 Hierarchical P2 basis in 1d. More...
struct  Dune::MonomialBasisFactory< dim, F >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 3 >
 Hierarchical P2 basis in 1d. More...
struct  Dune::MonomialBasisFactory< dim, F >::EvaluationBasisFactory< dd, FF >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >
 The local finite element needed for the Zou-Kornhuber estimator for Signorini problems. More...
struct  Dune::MonomialBasisProvider< dim, SF >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation< LB >
struct  Dune::MonomialBasisProvider< dim, SF >::EvaluationBasisFactory< dd, FF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,44 +1,49 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ +monomialbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_ _g_e_o_m_e_t_r_y_I_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ -  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_<_ _m_y_d_i_m_,_ _d_i_m_,_ _F_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ -  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ -  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _d_i_m_ _> │ │ │ │ │ -  The local finite element needed for the Zou-Kornhuber estimator for │ │ │ │ │ - Signorini problems. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_ _d_i_m_,_ _S_F_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_ _d_i_m_,_ _S_F_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00131_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh Source File │ │ │ │ +dune-localfunctions: monomialbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,496 +70,1025 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalsimplexp2withelementbubble.hh
│ │ │ │ +
monomialbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_MONOMIALBASIS_HH
│ │ │ │ +
6#define DUNE_MONOMIALBASIS_HH
│ │ │ │
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ -
13#include <vector>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/common/fvector.hh>
│ │ │ │ -
16#include <dune/common/fmatrix.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ -
24 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not implemented for dim > 3.");
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32 };
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
48 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ -
51 public:
│ │ │ │ -
53 typedef LocalBasisTraits<D,1,Dune::FieldVector<D,1>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
54 Dune::FieldMatrix<R,1,1> > Traits;
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
57 unsigned int size () const
│ │ │ │ -
58 {
│ │ │ │ -
59 return 3;
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
63 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
64 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
65 {
│ │ │ │ -
66 out.resize(3);
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/geometry/type.hh>
│ │ │ │ +
14#include <dune/geometry/topologyfactory.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20namespace Dune
│ │ │ │ +
21{
│ │ │ │ +
22 /************************************************
│ │ │ │ +
23 * Classes for evaluating ''Monomials'' on any order
│ │ │ │ +
24 * for all reference element type.
│ │ │ │ +
25 * For a simplex topology these are the normal
│ │ │ │ +
26 * monomials for cube topologies the bimonomials.
│ │ │ │ +
27 * The construction follows the construction of the
│ │ │ │ +
28 * generic geometries using tensor products for
│ │ │ │ +
29 * prism generation and duffy transform for pyramid
│ │ │ │ +
30 * construction.
│ │ │ │ +
31 * A derivative argument can be applied, in which case
│ │ │ │ +
32 * all derivatives up to the desired order are
│ │ │ │ +
33 * evaluated. Note that for higher order derivatives
│ │ │ │ +
34 * only the ''lower'' part of the symmetric tensor
│ │ │ │ +
35 * is evaluated, e.g., passing derivative equal to 2
│ │ │ │ +
36 * to the class will provide the vector
│ │ │ │ +
37 * (d/dxdx p, d/dxydx p, d/dydy p,
│ │ │ │ +
38 * d/dx p, d/dy p, p)
│ │ │ │ +
39 * Important:
│ │ │ │ +
40 * So far the computation of the derivatives has not
│ │ │ │ +
41 * been fully implemented for general pyramid
│ │ │ │ +
42 * construction, i.e., in the case where a pyramid is
│ │ │ │ +
43 * build over a non simplex base geometry.
│ │ │ │ +
44 *
│ │ │ │ +
45 * Central classes:
│ │ │ │ +
46 * 1) template< GeometryType::Id geometryId, class F >
│ │ │ │ +
47 * class MonomialBasisImpl;
│ │ │ │ +
48 * Implementation of the monomial evaluation for
│ │ │ │ +
49 * a given topology and field type.
│ │ │ │ +
50 * The method evaluate fills a F* vector
│ │ │ │ +
51 * 2) template< GeometryType::Id geometryId, class F >
│ │ │ │ +
52 * class MonomialBasis
│ │ │ │ +
53 * The base class for the static monomial evaluation
│ │ │ │ +
54 * providing addiional evaluate methods including
│ │ │ │ +
55 * one taking std::vector<F>.
│ │ │ │ +
56 * 3) template< int dim, class F >
│ │ │ │ +
57 * class VirtualMonomialBasis
│ │ │ │ +
58 * Virtualization of the MonomialBasis.
│ │ │ │ +
59 * 4) template< int dim, class F >
│ │ │ │ +
60 * struct MonomialBasisFactory;
│ │ │ │ +
61 * A factory class for the VirtualMonomialBasis
│ │ │ │ +
62 * 5) template< int dim, class F >
│ │ │ │ +
63 * struct MonomialBasisProvider
│ │ │ │ +
64 * A singleton container for the virtual monomial
│ │ │ │ +
65 * basis
│ │ │ │ +
66 ************************************************/
│ │ │ │
67
│ │ │ │ -
68 out[0] = 1-in[0];
│ │ │ │ -
69 out[1] = in[0];
│ │ │ │ -
70 out[2] = 1-4*(in[0]-0.5)*(in[0]-0.5);
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
74 inline void
│ │ │ │ -
│ │ │ │ -
75 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
76 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
77 {
│ │ │ │ -
78 out.resize(3);
│ │ │ │ -
79
│ │ │ │ -
80 out[0][0][0] = -1;
│ │ │ │ -
81 out[1][0][0] = 1;
│ │ │ │ -
82 out[2][0][0] = 4-8*in[0];
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
86 void partial (const std::array<unsigned int, 1>& order,
│ │ │ │ -
87 const typename Traits::DomainType& in, // position
│ │ │ │ -
88 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
68 // Internal Forward Declarations
│ │ │ │ +
69 // -----------------------------
│ │ │ │ +
70
│ │ │ │ +
71 template< GeometryType::Id geometryId >
│ │ │ │ +
72 class MonomialBasisSize;
│ │ │ │ +
73
│ │ │ │ +
74 template< GeometryType::Id geometryId, class F >
│ │ │ │ +
75 class MonomialBasis;
│ │ │ │ +
76
│ │ │ │ +
77
│ │ │ │ +
78
│ │ │ │ +
79 // MonomialBasisSize
│ │ │ │ +
80 // -----------------
│ │ │ │ +
81
│ │ │ │ +
82 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
84 {
│ │ │ │ + │ │ │ │ +
86
│ │ │ │ +
87 public:
│ │ │ │ +
│ │ │ │ +
88 static This &instance ()
│ │ │ │
89 {
│ │ │ │ -
90 auto totalOrder = order[0];
│ │ │ │ -
91 if (totalOrder == 0) {
│ │ │ │ -
92 evaluateFunction(in, out);
│ │ │ │ -
93 } else if (totalOrder == 1) {
│ │ │ │ -
94 out.resize(size());
│ │ │ │ -
95 out[0] = -1;
│ │ │ │ -
96 out[1] = 1;
│ │ │ │ -
97 out[2] = 4-8*in[0];
│ │ │ │ -
98 } else if (totalOrder == 2) {
│ │ │ │ -
99 out.resize(size());
│ │ │ │ -
100 out[0] = 0;
│ │ │ │ -
101 out[1] = 0;
│ │ │ │ -
102 out[2] =-8;
│ │ │ │ -
103 } else {
│ │ │ │ -
104 out.resize(size());
│ │ │ │ -
105 out[0] = out[1] = out[2] = 0;
│ │ │ │ -
106 }
│ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
│ │ │ │ -
111 unsigned int order () const
│ │ │ │ -
112 {
│ │ │ │ -
113 return 2;
│ │ │ │ +
90 static This _instance;
│ │ │ │ +
91 return _instance;
│ │ │ │ +
92 }
│ │ │ │ +
│ │ │ │ +
93
│ │ │ │ +
94 unsigned int maxOrder_;
│ │ │ │ +
95
│ │ │ │ +
96 // sizes_[ k ]: number of basis functions of exactly order k
│ │ │ │ +
97 mutable unsigned int *sizes_;
│ │ │ │ +
98
│ │ │ │ +
99 // numBaseFunctions_[ k ] = sizes_[ 0 ] + ... + sizes_[ k ]
│ │ │ │ +
100 mutable unsigned int *numBaseFunctions_;
│ │ │ │ +
101
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
103 : maxOrder_( 0 ),
│ │ │ │ +
104 sizes_( 0 ),
│ │ │ │ + │ │ │ │ +
106 {
│ │ │ │ +
107 computeSizes( 2 );
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 {
│ │ │ │ +
112 delete[] sizes_;
│ │ │ │ +
113 delete[] numBaseFunctions_;
│ │ │ │
114 }
│ │ │ │
│ │ │ │
115
│ │ │ │ -
116 };
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
138 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
140 {
│ │ │ │ -
141 public:
│ │ │ │ -
143 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
144 Dune::FieldMatrix<R,1,2> > Traits;
│ │ │ │ -
145
│ │ │ │ -
│ │ │ │ -
147 unsigned int size () const
│ │ │ │ -
148 {
│ │ │ │ -
149 return 7;
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
153 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
154 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
155 {
│ │ │ │ -
156 out.resize(7);
│ │ │ │ -
157
│ │ │ │ -
158 out[0] = 1 - in[0] - in[1];
│ │ │ │ -
159 out[1] = 4*in[0]*(1-in[0]-in[1]);
│ │ │ │ -
160 out[2] = in[0];
│ │ │ │ -
161 out[3] = 4*in[1]*(1-in[0]-in[1]);
│ │ │ │ -
162 out[4] = 4*in[0]*in[1];
│ │ │ │ -
163 out[5] = in[1];
│ │ │ │ -
164 out[6] = 27*in[0]*in[1]*(1-in[0]-in[1]);
│ │ │ │ -
165
│ │ │ │ +
│ │ │ │ +
116 unsigned int operator() ( const unsigned int order ) const
│ │ │ │ +
117 {
│ │ │ │ +
118 return numBaseFunctions_[ order ];
│ │ │ │ +
119 }
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
│ │ │ │ +
121 unsigned int maxOrder() const
│ │ │ │ +
122 {
│ │ │ │ +
123 return maxOrder_;
│ │ │ │ +
124 }
│ │ │ │ +
│ │ │ │ +
125
│ │ │ │ +
│ │ │ │ +
126 void computeSizes ( unsigned int order )
│ │ │ │ +
127 {
│ │ │ │ +
128 if (order <= maxOrder_)
│ │ │ │ +
129 return;
│ │ │ │ +
130
│ │ │ │ +
131 maxOrder_ = order;
│ │ │ │ +
132
│ │ │ │ +
133 delete[] sizes_;
│ │ │ │ +
134 delete[] numBaseFunctions_;
│ │ │ │ +
135 sizes_ = new unsigned int[ order+1 ];
│ │ │ │ +
136 numBaseFunctions_ = new unsigned int[ order+1 ];
│ │ │ │ +
137
│ │ │ │ +
138 constexpr GeometryType geometry = geometryId;
│ │ │ │ +
139 constexpr auto dim = geometry.dim();
│ │ │ │ +
140
│ │ │ │ +
141 sizes_[ 0 ] = 1;
│ │ │ │ +
142 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
143 sizes_[ k ] = 0;
│ │ │ │ +
144
│ │ │ │ +
145 std::fill(numBaseFunctions_, numBaseFunctions_+order+1, 1);
│ │ │ │ +
146
│ │ │ │ +
147 for( int codim=dim-1; codim>=0; codim--)
│ │ │ │ +
148 {
│ │ │ │ +
149 if (Impl::isPrism(geometry.id(),dim,codim))
│ │ │ │ +
150 {
│ │ │ │ +
151 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
152 {
│ │ │ │ +
153 sizes_[ k ] = numBaseFunctions_[ k ] + k*sizes_[ k ];
│ │ │ │ +
154 numBaseFunctions_[ k ] = numBaseFunctions_[ k-1 ] + sizes_[ k ];
│ │ │ │ +
155 }
│ │ │ │ +
156 }
│ │ │ │ +
157 else
│ │ │ │ +
158 {
│ │ │ │ +
159 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
160 {
│ │ │ │ +
161 sizes_[ k ] = numBaseFunctions_[ k ];
│ │ │ │ +
162 numBaseFunctions_[ k ] = numBaseFunctions_[ k-1 ] + sizes_[ k ];
│ │ │ │ +
163 }
│ │ │ │ +
164 }
│ │ │ │ +
165 }
│ │ │ │
166 }
│ │ │ │
│ │ │ │ -
167
│ │ │ │ -
169 inline void
│ │ │ │ -
│ │ │ │ -
170 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
171 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
172 {
│ │ │ │ -
173 out.resize(7);
│ │ │ │ -
174
│ │ │ │ -
175 out[0][0][0] = -1; out[0][0][1] = -1;
│ │ │ │ -
176 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0];
│ │ │ │ -
177 out[2][0][0] = 1; out[2][0][1] = 0;
│ │ │ │ -
178 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1];
│ │ │ │ -
179 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0];
│ │ │ │ -
180 out[5][0][0] = 0; out[5][0][1] = 1;
│ │ │ │ -
181
│ │ │ │ -
182 // Cubic bubble
│ │ │ │ -
183 out[6][0][0] = 27 * in[1] * (1 - 2*in[0] - in[1]);
│ │ │ │ -
184 out[6][0][1] = 27 * in[0] * (1 - 2*in[1] - in[0]);
│ │ │ │ -
185
│ │ │ │ -
186 }
│ │ │ │ +
167 };
│ │ │ │
│ │ │ │ +
168
│ │ │ │ +
169
│ │ │ │ +
170
│ │ │ │ +
171 // MonomialBasisHelper
│ │ │ │ +
172 // -------------------
│ │ │ │ +
173
│ │ │ │ +
174
│ │ │ │ +
175 template< int mydim, int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
177 {
│ │ │ │ +
178 typedef MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize;
│ │ │ │ +
179 typedef MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size;
│ │ │ │ +
180
│ │ │ │ +
│ │ │ │ +
181 static void copy ( const unsigned int deriv, F *&wit, F *&rit,
│ │ │ │ +
182 const unsigned int numBaseFunctions, const F &z )
│ │ │ │ +
183 {
│ │ │ │ +
184 // n(d,k) = size<k>[d];
│ │ │ │ +
185 MySize &mySize = MySize::instance();
│ │ │ │ +
186 Size &size = Size::instance();
│ │ │ │
187
│ │ │ │ -
│ │ │ │ -
189 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
190 const typename Traits::DomainType& in, // position
│ │ │ │ -
191 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
192 {
│ │ │ │ -
193 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
194 if (totalOrder == 0) {
│ │ │ │ -
195 evaluateFunction(in, out);
│ │ │ │ -
196 } else if (totalOrder == 1) {
│ │ │ │ -
197 out.resize(size());
│ │ │ │ -
198 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
199
│ │ │ │ -
200 switch (direction) {
│ │ │ │ -
201 case 0:
│ │ │ │ -
202 out[0] = -1;
│ │ │ │ -
203 out[1] = 4-8*in[0]-4*in[1];
│ │ │ │ -
204 out[2] = 1;
│ │ │ │ -
205 out[3] = -4*in[1];
│ │ │ │ -
206 out[4] = 4*in[1];
│ │ │ │ -
207 out[5] = 0;
│ │ │ │ -
208 out[6] = 27 * in[1] * (1 - 2*in[0] - in[1]);
│ │ │ │ -
209 break;
│ │ │ │ -
210 case 1:
│ │ │ │ -
211 out[0] = -1;
│ │ │ │ -
212 out[1] = -4*in[0];
│ │ │ │ -
213 out[2] = 0;
│ │ │ │ -
214 out[3] = 4-4*in[0]-8*in[1];
│ │ │ │ -
215 out[4] = 4*in[0];
│ │ │ │ -
216 out[5] = 1;
│ │ │ │ -
217 out[6] = 27 * in[0] * (1 - 2*in[1] - in[0]);
│ │ │ │ -
218 break;
│ │ │ │ -
219 default:
│ │ │ │ -
220 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
221 }
│ │ │ │ -
222 } else {
│ │ │ │ -
223 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
224 }
│ │ │ │ -
225 }
│ │ │ │ +
188 const F *const rend = rit + size( deriv )*numBaseFunctions;
│ │ │ │ +
189 for( ; rit != rend; )
│ │ │ │ +
190 {
│ │ │ │ +
191 F *prit = rit;
│ │ │ │ +
192
│ │ │ │ +
193 *wit = z * *rit;
│ │ │ │ +
194 ++rit, ++wit;
│ │ │ │ +
195
│ │ │ │ +
196 for( unsigned d = 1; d <= deriv; ++d )
│ │ │ │ +
197 {
│ │ │ │ +
198 #ifndef NDEBUG
│ │ │ │ +
199 const F *const derivEnd = rit + mySize.sizes_[ d ];
│ │ │ │ +
200 #endif
│ │ │ │ +
201
│ │ │ │ +
202 {
│ │ │ │ +
203 const F *const drend = rit + mySize.sizes_[ d ] - mySize.sizes_[ d-1 ];
│ │ │ │ +
204 for( ; rit != drend ; ++rit, ++wit )
│ │ │ │ +
205 *wit = z * *rit;
│ │ │ │ +
206 }
│ │ │ │ +
207
│ │ │ │ +
208 for (unsigned int j=1; j<d; ++j)
│ │ │ │ +
209 {
│ │ │ │ +
210 const F *const drend = rit + mySize.sizes_[ d-j ] - mySize.sizes_[ d-j-1 ];
│ │ │ │ +
211 for( ; rit != drend ; ++prit, ++rit, ++wit )
│ │ │ │ +
212 *wit = F(j) * *prit + z * *rit;
│ │ │ │ +
213 }
│ │ │ │ +
214 *wit = F(d) * *prit + z * *rit;
│ │ │ │ +
215 ++prit, ++rit, ++wit;
│ │ │ │ +
216 assert(derivEnd == rit);
│ │ │ │ +
217 rit += size.sizes_[d] - mySize.sizes_[d];
│ │ │ │ +
218 prit += size.sizes_[d-1] - mySize.sizes_[d-1];
│ │ │ │ +
219 const F *const emptyWitEnd = wit + size.sizes_[d] - mySize.sizes_[d];
│ │ │ │ +
220 for ( ; wit != emptyWitEnd; ++wit )
│ │ │ │ +
221 *wit = Zero<F>();
│ │ │ │ +
222 }
│ │ │ │ +
223 }
│ │ │ │ +
224 }
│ │ │ │ +
│ │ │ │ +
225 };
│ │ │ │
│ │ │ │
226
│ │ │ │ -
│ │ │ │ -
229 unsigned int order () const
│ │ │ │ -
230 {
│ │ │ │ -
231 return 3;
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ -
233
│ │ │ │ -
234 };
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
260 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
262 {
│ │ │ │ -
263 public:
│ │ │ │ -
265 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
266 Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ -
267
│ │ │ │ -
│ │ │ │ -
269 unsigned int size () const
│ │ │ │ -
270 {
│ │ │ │ -
271 return 11;
│ │ │ │ -
272 }
│ │ │ │ -
│ │ │ │ -
273
│ │ │ │ -
│ │ │ │ -
275 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
276 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
277 {
│ │ │ │ -
278 out.resize(10);
│ │ │ │ -
279
│ │ │ │ -
280 out[0] = 1 - in[0] - in[1] - in[2];
│ │ │ │ -
281 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
282 out[2] = in[0];
│ │ │ │ -
283 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
284 out[4] = 4 * in[0] * in[1];
│ │ │ │ -
285 out[5] = in[1];
│ │ │ │ -
286 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ -
287 out[7] = 4 * in[0] * in[2];
│ │ │ │ -
288 out[8] = 4 * in[1] * in[2];
│ │ │ │ -
289 out[9] = in[2];
│ │ │ │ -
290
│ │ │ │ -
291 // quartic element bubble
│ │ │ │ -
292 out[10] = 81*in[0]*in[1]*in[2]*(1-in[0]-in[1]-in[2]);
│ │ │ │ -
293 }
│ │ │ │ -
│ │ │ │ -
294
│ │ │ │ -
│ │ │ │ -
296 void evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
297 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
298 {
│ │ │ │ -
299 out.resize(10);
│ │ │ │ +
227
│ │ │ │ +
228
│ │ │ │ +
229 // MonomialBasisImpl
│ │ │ │ +
230 // -----------------
│ │ │ │ +
231
│ │ │ │ +
232 template< GeometryType::Id geometryId, class F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
234 {
│ │ │ │ +
235 public:
│ │ │ │ +
236 typedef F Field;
│ │ │ │ +
237
│ │ │ │ +
238 static constexpr GeometryType geometry = geometryId;
│ │ │ │ +
239
│ │ │ │ +
240 static const unsigned int dimDomain = geometry.dim();
│ │ │ │ +
241
│ │ │ │ +
242 typedef FieldVector< Field, dimDomain > DomainVector;
│ │ │ │ +
243
│ │ │ │ +
244 private:
│ │ │ │ +
245 friend class MonomialBasis< geometryId, Field >;
│ │ │ │ +
246
│ │ │ │ + │ │ │ │ +
248 {}
│ │ │ │ +
249
│ │ │ │ +
250 template< int dimD >
│ │ │ │ +
251 void evaluate ( const unsigned int deriv, const unsigned int order,
│ │ │ │ +
252 const FieldVector< Field, dimD > &x,
│ │ │ │ +
253 const unsigned int block, const unsigned int *const offsets,
│ │ │ │ +
254 Field *const values ) const
│ │ │ │ +
255 {
│ │ │ │ +
256 //start with vertex
│ │ │ │ +
257 *values = Unity< F >();
│ │ │ │ +
258 F *const end = values + block;
│ │ │ │ +
259 for( Field *it = values+1 ; it != end; ++it )
│ │ │ │ +
260 *it = Zero< F >();
│ │ │ │ +
261
│ │ │ │ +
262 constexpr GeometryType gt = GeometryTypes::vertex;
│ │ │ │ +
263
│ │ │ │ +
264 if constexpr ( geometry == gt)
│ │ │ │ +
265 return;
│ │ │ │ +
266 else
│ │ │ │ +
267 evaluate<gt,dimD>(deriv, order, x, block, offsets, values );
│ │ │ │ +
268 }
│ │ │ │ +
269
│ │ │ │ +
270 template<GeometryType::Id baseGeometryId, int dimD >
│ │ │ │ +
271 void evaluate ( const unsigned int deriv, const unsigned int order,
│ │ │ │ +
272 const FieldVector< Field, dimD > &x,
│ │ │ │ +
273 const unsigned int block, const unsigned int *const offsets,
│ │ │ │ +
274 Field *const values ) const
│ │ │ │ +
275 {
│ │ │ │ +
276
│ │ │ │ +
277 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ +
278
│ │ │ │ +
279 auto constexpr isPrismatic = geometry.isPrismatic(baseGeometry.dim());
│ │ │ │ +
280
│ │ │ │ +
281 // compute
│ │ │ │ +
282 typedef MonomialBasisHelper< baseGeometry.dim() + 1, dimD, Field > Helper;
│ │ │ │ +
283 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ +
284
│ │ │ │ +
285 const BaseSize &size = BaseSize::instance();
│ │ │ │ +
286 const_cast<BaseSize&>(size).computeSizes(order);
│ │ │ │ +
287
│ │ │ │ +
288 const Field &z = x[ baseGeometry.dim() ];
│ │ │ │ +
289
│ │ │ │ +
290 Field *row0 = values;
│ │ │ │ +
291 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
292 {
│ │ │ │ +
293 Field *row1 = values + block*offsets[ k-1 ];
│ │ │ │ +
294 Field *wit = row1 + block*size.sizes_[ k ];
│ │ │ │ +
295 if constexpr ( isPrismatic )
│ │ │ │ +
296 Helper::copy( deriv, wit, row1, k*size.sizes_[ k ], z );
│ │ │ │ +
297 Helper::copy( deriv, wit, row0, size( k-1 ), z );
│ │ │ │ +
298 row0 = row1;
│ │ │ │ +
299 }
│ │ │ │
300
│ │ │ │ -
301 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1;
│ │ │ │ -
302 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1][0][2] = -4*in[0];
│ │ │ │ -
303 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ -
304 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3][0][2] = -4*in[1];
│ │ │ │ -
305 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0;
│ │ │ │ -
306 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0;
│ │ │ │ -
307 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ -
308 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0];
│ │ │ │ -
309 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1];
│ │ │ │ -
310 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1;
│ │ │ │ -
311
│ │ │ │ -
312 out[10][0][0] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]);
│ │ │ │ -
313 out[10][0][1] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]);
│ │ │ │ -
314 out[10][0][2] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]);
│ │ │ │ -
315 }
│ │ │ │ -
│ │ │ │ -
316
│ │ │ │ -
│ │ │ │ -
318 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
319 const typename Traits::DomainType& in, // position
│ │ │ │ -
320 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
321 {
│ │ │ │ -
322 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
323 if (totalOrder == 0) {
│ │ │ │ -
324 evaluateFunction(in, out);
│ │ │ │ -
325 } else if (totalOrder == 1) {
│ │ │ │ -
326 out.resize(size());
│ │ │ │ -
327 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
328
│ │ │ │ -
329 switch (direction) {
│ │ │ │ -
330 case 0:
│ │ │ │ -
331 out[0] = -1;
│ │ │ │ -
332 out[1] = 4-8*in[0]-4*in[1]-4*in[2];
│ │ │ │ -
333 out[2] = 1;
│ │ │ │ -
334 out[3] = -4*in[1];
│ │ │ │ -
335 out[4] = 4*in[1];
│ │ │ │ -
336 out[5] = 0;
│ │ │ │ -
337 out[6] = -4*in[2];
│ │ │ │ -
338 out[7] = 4*in[2];
│ │ │ │ -
339 out[8] = 0;
│ │ │ │ -
340 out[9] = 0;
│ │ │ │ -
341 out[10] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]);
│ │ │ │ -
342 break;
│ │ │ │ -
343 case 1:
│ │ │ │ -
344 out[0] = -1;
│ │ │ │ -
345 out[1] = -4*in[0];
│ │ │ │ -
346 out[2] = 0;
│ │ │ │ -
347 out[3] = 4-4*in[0]-8*in[1]-4*in[2];
│ │ │ │ -
348 out[4] = 4*in[0];
│ │ │ │ -
349 out[5] = 1;
│ │ │ │ -
350 out[6] = -4*in[2];
│ │ │ │ -
351 out[7] = 0;
│ │ │ │ -
352 out[8] = 4*in[2];
│ │ │ │ -
353 out[9] = 0;
│ │ │ │ -
354 out[10] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]);
│ │ │ │ -
355 break;
│ │ │ │ -
356 case 2:
│ │ │ │ -
357 out[0] = -1;
│ │ │ │ -
358 out[1] = -4*in[0];
│ │ │ │ -
359 out[2] = 0;
│ │ │ │ -
360 out[3] = -4*in[1];
│ │ │ │ -
361 out[4] = 0;
│ │ │ │ -
362 out[5] = 0;
│ │ │ │ -
363 out[6] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ -
364 out[7] = 4*in[0];
│ │ │ │ -
365 out[8] = 4*in[1];
│ │ │ │ -
366 out[9] = 1;
│ │ │ │ -
367 out[10] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]);
│ │ │ │ -
368 break;
│ │ │ │ -
369 default:
│ │ │ │ -
370 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
371 }
│ │ │ │ -
372 } else {
│ │ │ │ -
373 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
374 }
│ │ │ │ -
375 }
│ │ │ │ -
│ │ │ │ +
301 // stop if desired dimension is reached
│ │ │ │ +
302 if constexpr( baseGeometry.dim() == dimDomain-1)
│ │ │ │ +
303 return;
│ │ │ │ +
304 else
│ │ │ │ +
305 {
│ │ │ │ +
306 constexpr GeometryType nextGeometry = isPrismatic ? GeometryTypes::prismaticExtension(baseGeometry)
│ │ │ │ +
307 : GeometryTypes::conicalExtension(baseGeometry);
│ │ │ │ +
308
│ │ │ │ +
309 evaluate<nextGeometry.toId(),dimD>(deriv, order, x, block, offsets, values );
│ │ │ │ +
310 }
│ │ │ │ +
311 }
│ │ │ │ +
312
│ │ │ │ +
313 void integrate ( const unsigned int order,
│ │ │ │ +
314 const unsigned int *const offsets,
│ │ │ │ +
315 Field *const values ) const
│ │ │ │ +
316 {
│ │ │ │ +
317 //start with vertex
│ │ │ │ +
318 values[ 0 ] = Unity< Field >();
│ │ │ │ +
319 static constexpr GeometryType gt = GeometryTypes::vertex;
│ │ │ │ +
320
│ │ │ │ +
321 if constexpr ( geometry == gt)
│ │ │ │ +
322 return;
│ │ │ │ +
323 else
│ │ │ │ +
324 integrate<gt>(order, offsets, values);
│ │ │ │ +
325 }
│ │ │ │ +
326
│ │ │ │ +
327 template<GeometryType::Id baseGeometryId>
│ │ │ │ +
328 void integrate ( const unsigned int order,
│ │ │ │ +
329 const unsigned int *const offsets,
│ │ │ │ +
330 Field *const values) const
│ │ │ │ +
331 {
│ │ │ │ +
332 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ +
333
│ │ │ │ +
334 auto constexpr isPrismatic = geometry.isPrismatic(baseGeometry.dim());
│ │ │ │ +
335
│ │ │ │ +
336 // decide which kind of integration should be performed
│ │ │ │ +
337 if constexpr ( isPrismatic )
│ │ │ │ +
338 integratePrismatic<baseGeometry>(order, offsets, values);
│ │ │ │ +
339 else
│ │ │ │ +
340 integrateConical<baseGeometry>(order, offsets, values);
│ │ │ │ +
341
│ │ │ │ +
342 // stop if the desired dimension is reached
│ │ │ │ +
343 if constexpr( baseGeometry.dim() == dimDomain-1)
│ │ │ │ +
344 return;
│ │ │ │ +
345 else
│ │ │ │ +
346 {
│ │ │ │ +
347 static constexpr GeometryType nextGeometry = (isPrismatic ? GeometryTypes::prismaticExtension(baseGeometry)
│ │ │ │ +
348 : GeometryTypes::conicalExtension(baseGeometry));
│ │ │ │ +
349
│ │ │ │ +
350 integrate<nextGeometry.toId()>(order, offsets, values);
│ │ │ │ +
351 }
│ │ │ │ +
352
│ │ │ │ +
353 }
│ │ │ │ +
354
│ │ │ │ +
355 template<GeometryType::Id baseGeometryId>
│ │ │ │ +
356 void integratePrismatic ( const unsigned int order,
│ │ │ │ +
357 const unsigned int *const offsets,
│ │ │ │ +
358 Field *const values ) const
│ │ │ │ +
359 {
│ │ │ │ +
360 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ +
361 static const BaseSize &size = BaseSize::instance();
│ │ │ │ +
362 const unsigned int *const baseSizes = size.sizes_;
│ │ │ │ +
363
│ │ │ │ +
364 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ +
365 static constexpr GeometryType nextGeometry = GeometryTypes::prismaticExtension(baseGeometry);
│ │ │ │ +
366
│ │ │ │ +
367 typedef MonomialBasisSize<nextGeometry.toId()> Size;
│ │ │ │ +
368 static const Size &mySize = Size::instance();
│ │ │ │ +
369
│ │ │ │ +
370 Field *row0 = values;
│ │ │ │ +
371 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
372 {
│ │ │ │ +
373 Field *const row1begin = values + offsets[ k-1 ];
│ │ │ │ +
374 Field *const row1End = row1begin + mySize.sizes_[ k ];
│ │ │ │ +
375 assert( (unsigned int)(row1End - values) <= offsets[ k ] );
│ │ │ │
376
│ │ │ │ -
│ │ │ │ -
379 unsigned int order () const
│ │ │ │ -
380 {
│ │ │ │ -
381 return 4;
│ │ │ │ -
382 }
│ │ │ │ -
│ │ │ │ -
383
│ │ │ │ -
384 };
│ │ │ │ -
│ │ │ │ -
385
│ │ │ │ -
386
│ │ │ │ -
412 template <int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
414 {
│ │ │ │ -
415 // The binomial coefficient: dim+1 over 1
│ │ │ │ -
416 static const int numVertices = dim+1;
│ │ │ │ -
417
│ │ │ │ -
418 // The binomial coefficient: dim+1 over 2
│ │ │ │ -
419 static const int numEdges = (dim+1)*dim / 2;
│ │ │ │ -
420
│ │ │ │ -
421 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
424 : li(numVertices+numEdges + 1)
│ │ │ │ -
425 {
│ │ │ │ -
426 if (dim!=2)
│ │ │ │ -
427 DUNE_THROW(NotImplemented, "only for 2d");
│ │ │ │ -
428
│ │ │ │ -
429 li[0] = Dune::LocalKey(0,2,0); // Vertex (0,0)
│ │ │ │ -
430 li[1] = Dune::LocalKey(0,1,0); // Edge (0.5, 0)
│ │ │ │ -
431 li[2] = Dune::LocalKey(1,2,0); // Vertex (1,0)
│ │ │ │ -
432 li[3] = Dune::LocalKey(1,1,0); // Edge (0, 0.5)
│ │ │ │ -
433 li[4] = Dune::LocalKey(2,1,0); // Edge (0.5, 0.5)
│ │ │ │ -
434 li[5] = Dune::LocalKey(2,2,0); // Vertex (0,1)
│ │ │ │ -
435 li[6] = Dune::LocalKey(0,0,0); // Element (1/3, 1/3)
│ │ │ │ -
436 }
│ │ │ │ -
│ │ │ │ -
437
│ │ │ │ -
│ │ │ │ -
439 size_t size () const
│ │ │ │ -
440 {
│ │ │ │ -
441 return numVertices+numEdges + 1;
│ │ │ │ -
442 }
│ │ │ │ -
│ │ │ │ -
443
│ │ │ │ -
│ │ │ │ -
445 const Dune::LocalKey& localKey (size_t i) const
│ │ │ │ -
446 {
│ │ │ │ -
447 return li[i];
│ │ │ │ -
448 }
│ │ │ │ -
│ │ │ │ -
449
│ │ │ │ -
450 private:
│ │ │ │ -
451 std::vector<Dune::LocalKey> li;
│ │ │ │ -
452 };
│ │ │ │ -
│ │ │ │ -
453
│ │ │ │ -
454 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
456 {
│ │ │ │ -
457 public:
│ │ │ │ -
458
│ │ │ │ -
460 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
461 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
462 {
│ │ │ │ -
463 typename LB::Traits::DomainType x;
│ │ │ │ -
464 typename LB::Traits::RangeType y;
│ │ │ │ -
465
│ │ │ │ -
466 out.resize(7);
│ │ │ │ -
467
│ │ │ │ -
468 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ -
469
│ │ │ │ -
470 // vertices
│ │ │ │ -
471 x[0] = 0.0; x[1] = 0.0; out[0] = f(x);
│ │ │ │ -
472 x[0] = 1.0; x[1] = 0.0; out[2] = f(x);
│ │ │ │ -
473 x[0] = 0.0; x[1] = 1.0; out[5] = f(x);
│ │ │ │ -
474
│ │ │ │ -
475 // edge bubbles
│ │ │ │ -
476 x[0] = 0.5; x[1] = 0.0; y = f(x);
│ │ │ │ -
477 out[1] = y - out[0]*(1-x[0]) - out[2]*x[0];
│ │ │ │ -
478
│ │ │ │ -
479 x[0] = 0.0; x[1] = 0.5; y = f(x);
│ │ │ │ -
480 out[3] = y - out[0]*(1-x[1]) - out[5]*x[1];
│ │ │ │ +
377 Field *row1 = row1begin;
│ │ │ │ +
378 Field *it = row1begin + baseSizes[ k ];
│ │ │ │ +
379 for( unsigned int j = 1; j <= k; ++j )
│ │ │ │ +
380 {
│ │ │ │ +
381 Field *const end = it + baseSizes[ k ];
│ │ │ │ +
382 assert( (unsigned int)(end - values) <= offsets[ k ] );
│ │ │ │ +
383 for( ; it != end; ++row1, ++it )
│ │ │ │ +
384 *it = (Field( j ) / Field( j+1 )) * (*row1);
│ │ │ │ +
385 }
│ │ │ │ +
386 for( ; it != row1End; ++row0, ++it )
│ │ │ │ +
387 *it = (Field( k ) / Field( k+1 )) * (*row0);
│ │ │ │ +
388 row0 = row1;
│ │ │ │ +
389 }
│ │ │ │ +
390 }
│ │ │ │ +
391
│ │ │ │ +
392
│ │ │ │ +
393 template<GeometryType::Id baseGeometryId>
│ │ │ │ +
394 void integrateConical ( const unsigned int order,
│ │ │ │ +
395 const unsigned int *const offsets,
│ │ │ │ +
396 Field *const values) const
│ │ │ │ +
397 {
│ │ │ │ +
398 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ +
399 static const BaseSize &size = BaseSize::instance();
│ │ │ │ +
400 const unsigned int *const baseSizes = size.sizes_;
│ │ │ │ +
401
│ │ │ │ +
402 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ +
403
│ │ │ │ +
404 {
│ │ │ │ +
405 Field *const col0End = values + baseSizes[ 0 ];
│ │ │ │ +
406 for( Field *it = values; it != col0End; ++it )
│ │ │ │ +
407 *it *= Field( 1 ) / Field( int(baseGeometry.dim()+1) );
│ │ │ │ +
408 }
│ │ │ │ +
409
│ │ │ │ +
410 Field *row0 = values;
│ │ │ │ +
411 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ +
412 {
│ │ │ │ +
413 const Field factor = (Field( 1 ) / Field( k + baseGeometry.dim()+1));
│ │ │ │ +
414
│ │ │ │ +
415 Field *const row1 = values+offsets[ k-1 ];
│ │ │ │ +
416 Field *const col0End = row1 + baseSizes[ k ];
│ │ │ │ +
417 Field *it = row1;
│ │ │ │ +
418 for( ; it != col0End; ++it )
│ │ │ │ +
419 *it *= factor;
│ │ │ │ +
420 for( unsigned int i = 1; i <= k; ++i )
│ │ │ │ +
421 {
│ │ │ │ +
422 Field *const end = it + baseSizes[ k-i ];
│ │ │ │ +
423 assert( (unsigned int)(end - values) <= offsets[ k ] );
│ │ │ │ +
424 for( ; it != end; ++row0, ++it )
│ │ │ │ +
425 *it = (*row0) * (Field( i ) * factor);
│ │ │ │ +
426 }
│ │ │ │ +
427 row0 = row1;
│ │ │ │ +
428 }
│ │ │ │ +
429 }
│ │ │ │ +
430
│ │ │ │ +
431 };
│ │ │ │ +
│ │ │ │ +
432
│ │ │ │ +
433
│ │ │ │ +
434 // MonomialBasis
│ │ │ │ +
435 // -------------
│ │ │ │ +
436
│ │ │ │ +
437 template< GeometryType::Id geometryId, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
439 : public MonomialBasisImpl< geometryId, F >
│ │ │ │ +
440 {
│ │ │ │ +
441 static constexpr GeometryType geometry = geometryId;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
444
│ │ │ │ +
445 public:
│ │ │ │ +
446 static const unsigned int dimension = Base::dimDomain;
│ │ │ │ +
447 static const unsigned int dimRange = 1;
│ │ │ │ +
448
│ │ │ │ +
449 typedef typename Base::Field Field;
│ │ │ │ +
450
│ │ │ │ + │ │ │ │ +
452
│ │ │ │ +
453 typedef Dune::FieldVector<Field,dimRange> RangeVector;
│ │ │ │ +
454
│ │ │ │ + │ │ │ │ +
456
│ │ │ │ +
│ │ │ │ +
457 MonomialBasis (unsigned int order)
│ │ │ │ +
458 : Base(),
│ │ │ │ +
459 order_(order),
│ │ │ │ +
460 size_(Size::instance())
│ │ │ │ +
461 {
│ │ │ │ +
462 assert(order<=1024); // avoid wrapping of unsigned int (0-1) order=1024 is quite hight...)
│ │ │ │ +
463 }
│ │ │ │ +
│ │ │ │ +
464
│ │ │ │ +
│ │ │ │ +
465 const unsigned int *sizes ( unsigned int order ) const
│ │ │ │ +
466 {
│ │ │ │ +
467 size_.computeSizes( order );
│ │ │ │ +
468 return size_.numBaseFunctions_;
│ │ │ │ +
469 }
│ │ │ │ +
│ │ │ │ +
470
│ │ │ │ +
│ │ │ │ +
471 const unsigned int *sizes () const
│ │ │ │ +
472 {
│ │ │ │ +
473 return sizes( order_ );
│ │ │ │ +
474 }
│ │ │ │ +
│ │ │ │ +
475
│ │ │ │ +
│ │ │ │ +
476 unsigned int size () const
│ │ │ │ +
477 {
│ │ │ │ +
478 size_.computeSizes( order_ );
│ │ │ │ +
479 return size_( order_ );
│ │ │ │ +
480 }
│ │ │ │ +
│ │ │ │
481
│ │ │ │ -
482 x[0] = 0.5; x[1] = 0.5; y = f(x);
│ │ │ │ -
483 out[4] = y - out[2]*x[0] - out[5]*x[1];
│ │ │ │ -
484
│ │ │ │ -
485 // element bubble
│ │ │ │ -
486 x[0] = 1.0/3; x[1] = 1.0/3; y = f(x);
│ │ │ │ +
│ │ │ │ +
482 unsigned int derivSize ( const unsigned int deriv ) const
│ │ │ │ +
483 {
│ │ │ │ +
484 MonomialBasisSize< GeometryTypes::simplex(dimension).toId() >::instance().computeSizes( deriv );
│ │ │ │ +
485 return MonomialBasisSize< GeometryTypes::simplex(dimension).toId() >::instance() ( deriv );
│ │ │ │ +
486 }
│ │ │ │ +
│ │ │ │
487
│ │ │ │ - │ │ │ │ -
490 std::vector<typename LB::Traits::RangeType> sfValues;
│ │ │ │ -
491 shapeFunctions.evaluateFunction(x, sfValues);
│ │ │ │ +
│ │ │ │ +
488 unsigned int order () const
│ │ │ │ +
489 {
│ │ │ │ +
490 return order_ ;
│ │ │ │ +
491 }
│ │ │ │ +
│ │ │ │
492
│ │ │ │ -
493 out[6] = y;
│ │ │ │ -
494 for (int i=0; i<6; i++)
│ │ │ │ -
495 out[6] -= out[i]*sfValues[i];
│ │ │ │ -
496
│ │ │ │ -
497 }
│ │ │ │ -
│ │ │ │ -
498
│ │ │ │ -
499 };
│ │ │ │ -
│ │ │ │ -
500
│ │ │ │ -
501
│ │ │ │ -
502}
│ │ │ │ -
503#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
493 unsigned int topologyId ( ) const
│ │ │ │ +
494 {
│ │ │ │ +
495 return geometry.id();
│ │ │ │ +
496 }
│ │ │ │ +
│ │ │ │ +
497
│ │ │ │ +
│ │ │ │ +
498 void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ +
499 Field *const values ) const
│ │ │ │ +
500 {
│ │ │ │ +
501 Base::evaluate( deriv, order_, x, derivSize( deriv ), sizes( order_ ), values );
│ │ │ │ +
502 }
│ │ │ │ +
│ │ │ │ +
503
│ │ │ │ +
504 template <unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
505 void evaluate ( const DomainVector &x,
│ │ │ │ +
506 Field *const values ) const
│ │ │ │ +
507 {
│ │ │ │ +
508 evaluate( deriv, x, values );
│ │ │ │ +
509 }
│ │ │ │ +
│ │ │ │ +
510
│ │ │ │ +
511 template<unsigned int deriv, class Vector >
│ │ │ │ +
│ │ │ │ +
512 void evaluate ( const DomainVector &x,
│ │ │ │ +
513 Vector &values ) const
│ │ │ │ +
514 {
│ │ │ │ +
515 evaluate<deriv>(x,&(values[0]));
│ │ │ │ +
516 }
│ │ │ │ +
│ │ │ │ +
517 template<unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout >
│ │ │ │ +
│ │ │ │ +
518 void evaluate ( const DomainVector &x,
│ │ │ │ + │ │ │ │ +
520 {
│ │ │ │ +
521 evaluate<deriv>(x,&(values->block()));
│ │ │ │ +
522 }
│ │ │ │ +
│ │ │ │ +
523 template< unsigned int deriv >
│ │ │ │ +
│ │ │ │ +
524 void evaluate ( const DomainVector &x,
│ │ │ │ + │ │ │ │ +
526 {
│ │ │ │ +
527 evaluate(0,x,&(values[0][0]));
│ │ │ │ +
528 }
│ │ │ │ +
│ │ │ │ +
529
│ │ │ │ +
530 template<class Vector >
│ │ │ │ +
│ │ │ │ +
531 void evaluate ( const DomainVector &x,
│ │ │ │ +
532 Vector &values ) const
│ │ │ │ +
533 {
│ │ │ │ +
534 evaluate<0>(x,&(values[0]));
│ │ │ │ +
535 }
│ │ │ │ +
│ │ │ │ +
536
│ │ │ │ +
537 template< class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
538 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ +
539 {
│ │ │ │ +
540 assert( DVector::dimension == dimension);
│ │ │ │ +
541 DomainVector bx;
│ │ │ │ +
542 for( int d = 0; d < dimension; ++d )
│ │ │ │ +
543 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
544 evaluate<0>( bx, values );
│ │ │ │ +
545 }
│ │ │ │ +
│ │ │ │ +
546
│ │ │ │ +
│ │ │ │ +
547 void integrate ( Field *const values ) const
│ │ │ │ +
548 {
│ │ │ │ +
549 Base::integrate( order_, sizes( order_ ), values );
│ │ │ │ +
550 }
│ │ │ │ +
│ │ │ │ +
551 template <class Vector>
│ │ │ │ +
│ │ │ │ +
552 void integrate ( Vector &values ) const
│ │ │ │ +
553 {
│ │ │ │ +
554 integrate( &(values[ 0 ]) );
│ │ │ │ +
555 }
│ │ │ │ +
│ │ │ │ +
556 private:
│ │ │ │ +
557 MonomialBasis(const This&);
│ │ │ │ +
558 This& operator=(const This&);
│ │ │ │ +
559 unsigned int order_;
│ │ │ │ +
560 Size &size_;
│ │ │ │ +
561 };
│ │ │ │ +
│ │ │ │ +
562
│ │ │ │ +
563
│ │ │ │ +
564
│ │ │ │ +
565 // StdMonomialBasis
│ │ │ │ +
566 // ----------------
│ │ │ │ +
567
│ │ │ │ +
568 template< int dim,class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
570 : public MonomialBasis< GeometryTypes::simplex(dim).toId() , F >
│ │ │ │ +
571 {
│ │ │ │ + │ │ │ │ +
573 typedef MonomialBasis< GeometryTypes::simplex(dim).toId(), F > Base;
│ │ │ │ +
574
│ │ │ │ +
575 public:
│ │ │ │ +
576 static constexpr GeometryType geometry = GeometryTypes::simplex(dim);
│ │ │ │ +
577 static const int dimension = dim;
│ │ │ │ +
578
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
580 : Base( order )
│ │ │ │ +
581 {}
│ │ │ │ +
│ │ │ │ +
582 };
│ │ │ │ +
│ │ │ │ +
583
│ │ │ │ +
584
│ │ │ │ +
585
│ │ │ │ +
586 // StandardBiMonomialBasis
│ │ │ │ +
587 // -----------------------
│ │ │ │ +
588
│ │ │ │ +
589 template< int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
591 : public MonomialBasis< GeometryTypes::cube(dim).toId() , F >
│ │ │ │ +
592 {
│ │ │ │ + │ │ │ │ +
594 typedef MonomialBasis< GeometryTypes::cube(dim).toId() , F > Base;
│ │ │ │ +
595
│ │ │ │ +
596 public:
│ │ │ │ +
597 static constexpr GeometryType geometry = GeometryTypes::cube(dim);
│ │ │ │ +
598 static const int dimension = dim;
│ │ │ │ +
599
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
601 : Base( order )
│ │ │ │ +
602 {}
│ │ │ │ +
│ │ │ │ +
603 };
│ │ │ │ +
│ │ │ │ +
604
│ │ │ │ +
605 // -----------------------------------------------------------
│ │ │ │ +
606 // -----------------------------------------------------------
│ │ │ │ +
607 // VirtualMonomialBasis
│ │ │ │ +
608 // -------------------
│ │ │ │ +
609
│ │ │ │ +
610 template< int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
612 {
│ │ │ │ + │ │ │ │ +
614
│ │ │ │ +
615 public:
│ │ │ │ +
616 typedef F Field;
│ │ │ │ +
617 typedef F StorageField;
│ │ │ │ +
618 static const int dimension = dim;
│ │ │ │ +
619 static const unsigned int dimRange = 1;
│ │ │ │ +
620
│ │ │ │ +
621 typedef FieldVector<Field,dimension> DomainVector;
│ │ │ │ +
622 typedef FieldVector<Field,dimRange> RangeVector;
│ │ │ │ +
623
│ │ │ │ +
│ │ │ │ +
624 explicit VirtualMonomialBasis(const GeometryType& gt,
│ │ │ │ +
625 unsigned int order)
│ │ │ │ +
626 : order_(order), geometry_(gt) {}
│ │ │ │ +
│ │ │ │ +
627
│ │ │ │ + │ │ │ │ +
629
│ │ │ │ +
630 virtual const unsigned int *sizes ( ) const = 0;
│ │ │ │ +
631
│ │ │ │ +
│ │ │ │ +
632 unsigned int size ( ) const
│ │ │ │ +
633 {
│ │ │ │ +
634 return sizes( )[ order_ ];
│ │ │ │ +
635 }
│ │ │ │ +
│ │ │ │ +
636
│ │ │ │ +
│ │ │ │ +
637 unsigned int order () const
│ │ │ │ +
638 {
│ │ │ │ +
639 return order_;
│ │ │ │ +
640 }
│ │ │ │ +
│ │ │ │ +
641
│ │ │ │ +
│ │ │ │ +
642 GeometryType type() const
│ │ │ │ +
643 {
│ │ │ │ +
644 return geometry_;
│ │ │ │ +
645 }
│ │ │ │ +
│ │ │ │ +
646
│ │ │ │ +
647 virtual void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ +
648 Field *const values ) const = 0;
│ │ │ │ +
649 template < unsigned int deriv >
│ │ │ │ +
│ │ │ │ +
650 void evaluate ( const DomainVector &x,
│ │ │ │ +
651 Field *const values ) const
│ │ │ │ +
652 {
│ │ │ │ +
653 evaluate( deriv, x, values );
│ │ │ │ +
654 }
│ │ │ │ +
│ │ │ │ +
655 template < unsigned int deriv, int size >
│ │ │ │ +
│ │ │ │ +
656 void evaluate ( const DomainVector &x,
│ │ │ │ +
657 Dune::FieldVector<Field,size> *const values ) const
│ │ │ │ +
658 {
│ │ │ │ +
659 evaluate( deriv, x, &(values[0][0]) );
│ │ │ │ +
660 }
│ │ │ │ +
│ │ │ │ +
661 template<unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout >
│ │ │ │ +
│ │ │ │ +
662 void evaluate ( const DomainVector &x,
│ │ │ │ + │ │ │ │ +
664 {
│ │ │ │ +
665 evaluate<deriv>(x,&(values->block()));
│ │ │ │ +
666 }
│ │ │ │ +
│ │ │ │ +
667 template <unsigned int deriv, class Vector>
│ │ │ │ +
│ │ │ │ +
668 void evaluate ( const DomainVector &x,
│ │ │ │ +
669 Vector &values ) const
│ │ │ │ +
670 {
│ │ │ │ +
671 evaluate<deriv>( x, &(values[ 0 ]) );
│ │ │ │ +
672 }
│ │ │ │ +
│ │ │ │ +
673 template< class Vector >
│ │ │ │ +
│ │ │ │ +
674 void evaluate ( const DomainVector &x,
│ │ │ │ +
675 Vector &values ) const
│ │ │ │ +
676 {
│ │ │ │ +
677 evaluate<0>(x,values);
│ │ │ │ +
678 }
│ │ │ │ +
│ │ │ │ +
679 template< class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
680 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ +
681 {
│ │ │ │ +
682 assert( DVector::dimension == dimension);
│ │ │ │ +
683 DomainVector bx;
│ │ │ │ +
684 for( int d = 0; d < dimension; ++d )
│ │ │ │ +
685 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
686 evaluate<0>( bx, values );
│ │ │ │ +
687 }
│ │ │ │ +
│ │ │ │ +
688 template< unsigned int deriv, class DVector, class RVector >
│ │ │ │ +
│ │ │ │ +
689 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ +
690 {
│ │ │ │ +
691 assert( DVector::dimension == dimension);
│ │ │ │ +
692 DomainVector bx;
│ │ │ │ +
693 for( int d = 0; d < dimension; ++d )
│ │ │ │ +
694 field_cast( x[ d ], bx[ d ] );
│ │ │ │ +
695 evaluate<deriv>( bx, values );
│ │ │ │ +
696 }
│ │ │ │ +
│ │ │ │ +
697
│ │ │ │ +
698 virtual void integrate ( Field *const values ) const = 0;
│ │ │ │ +
699 template <class Vector>
│ │ │ │ +
│ │ │ │ +
700 void integrate ( Vector &values ) const
│ │ │ │ +
701 {
│ │ │ │ +
702 integrate( &(values[ 0 ]) );
│ │ │ │ +
703 }
│ │ │ │ +
│ │ │ │ +
704 protected:
│ │ │ │ +
705 unsigned int order_;
│ │ │ │ +
706 GeometryType geometry_;
│ │ │ │ +
707 };
│ │ │ │ +
│ │ │ │ +
708
│ │ │ │ +
709 template< GeometryType::Id geometryId, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
711 : public VirtualMonomialBasis< static_cast<GeometryType>(geometryId).dim(), F >
│ │ │ │ +
712 {
│ │ │ │ +
713 static constexpr GeometryType geometry = geometryId;
│ │ │ │ +
714 typedef VirtualMonomialBasis< geometry.dim(), F > Base;
│ │ │ │ + │ │ │ │ +
716
│ │ │ │ +
717 public:
│ │ │ │ +
718 typedef typename Base::Field Field;
│ │ │ │ + │ │ │ │ +
720
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
722 : Base(geometry,order), basis_(order)
│ │ │ │ +
723 {}
│ │ │ │ +
│ │ │ │ +
724
│ │ │ │ +
│ │ │ │ +
725 const unsigned int *sizes ( ) const
│ │ │ │ +
726 {
│ │ │ │ +
727 return basis_.sizes(order_);
│ │ │ │ +
728 }
│ │ │ │ +
│ │ │ │ +
729
│ │ │ │ +
│ │ │ │ +
730 void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ +
731 Field *const values ) const
│ │ │ │ +
732 {
│ │ │ │ +
733 basis_.evaluate(deriv,x,values);
│ │ │ │ +
734 }
│ │ │ │ +
│ │ │ │ +
735
│ │ │ │ +
│ │ │ │ +
736 void integrate ( Field *const values ) const
│ │ │ │ +
737 {
│ │ │ │ +
738 basis_.integrate(values);
│ │ │ │ +
739 }
│ │ │ │ +
│ │ │ │ +
740
│ │ │ │ +
741 private:
│ │ │ │ + │ │ │ │ +
743 using Base::order_;
│ │ │ │ +
744 };
│ │ │ │ +
│ │ │ │ +
745
│ │ │ │ +
746 // MonomialBasisFactory
│ │ │ │ +
747 // --------------------
│ │ │ │ +
748
│ │ │ │ +
749 template< int dim, class F >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
751 {
│ │ │ │ +
752 static const unsigned int dimension = dim;
│ │ │ │ +
753 typedef F StorageField;
│ │ │ │ +
754
│ │ │ │ +
755 typedef unsigned int Key;
│ │ │ │ + │ │ │ │ +
757
│ │ │ │ +
758 template < int dd, class FF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
760 {
│ │ │ │ + │ │ │ │ +
762 };
│ │ │ │ +
│ │ │ │ +
763
│ │ │ │ +
764 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
765 static Object* create ( const Key &order )
│ │ │ │ +
766 {
│ │ │ │ + │ │ │ │ +
768 }
│ │ │ │ +
│ │ │ │ +
769 static void release( Object *object ) { delete object; }
│ │ │ │ +
770 };
│ │ │ │ +
│ │ │ │ +
771
│ │ │ │ +
772
│ │ │ │ +
773
│ │ │ │ +
774 // MonomialBasisProvider
│ │ │ │ +
775 // ---------------------
│ │ │ │ +
776
│ │ │ │ +
777 template< int dim, class SF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > >
│ │ │ │ +
780 {
│ │ │ │ +
781 static const unsigned int dimension = dim;
│ │ │ │ +
782 typedef SF StorageField;
│ │ │ │ +
783 template < int dd, class FF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
785 {
│ │ │ │ + │ │ │ │ +
787 };
│ │ │ │ +
│ │ │ │ +
788 };
│ │ │ │ +
│ │ │ │ +
789
│ │ │ │ +
790}
│ │ │ │ +
791
│ │ │ │ +
792#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Definition hierarchicalsimplexp2withelementbubble.hh:26
│ │ │ │ -
HierarchicalSimplexP2WithElementBubbleLocalBasis()
Definition hierarchicalsimplexp2withelementbubble.hh:28
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:75
│ │ │ │ -
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:54
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:63
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (2, in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:111
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:57
│ │ │ │ -
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:86
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:147
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (3 in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:229
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:153
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:170
│ │ │ │ -
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:189
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:144
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:269
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:275
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions (4 in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:379
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:296
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:318
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:266
│ │ │ │ -
The local finite element needed for the Zou-Kornhuber estimator for Signorini problems.
Definition hierarchicalsimplexp2withelementbubble.hh:414
│ │ │ │ -
size_t size() const
number of coefficients
Definition hierarchicalsimplexp2withelementbubble.hh:439
│ │ │ │ -
const Dune::LocalKey & localKey(size_t i) const
get i'th index
Definition hierarchicalsimplexp2withelementbubble.hh:445
│ │ │ │ -
HierarchicalSimplexP2WithElementBubbleLocalCoefficients()
Standard constructor.
Definition hierarchicalsimplexp2withelementbubble.hh:423
│ │ │ │ -
Definition hierarchicalsimplexp2withelementbubble.hh:456
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Local interpolation of a function.
Definition hierarchicalsimplexp2withelementbubble.hh:461
│ │ │ │ - │ │ │ │ - │ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
Definition monomialbasis.hh:84
│ │ │ │ +
unsigned int * numBaseFunctions_
Definition monomialbasis.hh:100
│ │ │ │ +
void computeSizes(unsigned int order)
Definition monomialbasis.hh:126
│ │ │ │ +
unsigned int * sizes_
Definition monomialbasis.hh:97
│ │ │ │ +
MonomialBasisSize()
Definition monomialbasis.hh:102
│ │ │ │ +
~MonomialBasisSize()
Definition monomialbasis.hh:110
│ │ │ │ +
unsigned int operator()(const unsigned int order) const
Definition monomialbasis.hh:116
│ │ │ │ +
unsigned int maxOrder_
Definition monomialbasis.hh:94
│ │ │ │ +
unsigned int maxOrder() const
Definition monomialbasis.hh:121
│ │ │ │ +
static This & instance()
Definition monomialbasis.hh:88
│ │ │ │ +
Definition monomialbasis.hh:440
│ │ │ │ +
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ +
static const unsigned int dimension
Definition monomialbasis.hh:446
│ │ │ │ +
Dune::FieldVector< Field, dimRange > RangeVector
Definition monomialbasis.hh:453
│ │ │ │ +
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ +
const unsigned int * sizes() const
Definition monomialbasis.hh:471
│ │ │ │ +
unsigned int topologyId() const
Definition monomialbasis.hh:493
│ │ │ │ +
void integrate(Vector &values) const
Definition monomialbasis.hh:552
│ │ │ │ +
Base::Field Field
Definition monomialbasis.hh:449
│ │ │ │ +
void integrate(Field *const values) const
Definition monomialbasis.hh:547
│ │ │ │ +
static const unsigned int dimRange
Definition monomialbasis.hh:447
│ │ │ │ +
Base::DomainVector DomainVector
Definition monomialbasis.hh:451
│ │ │ │ +
void evaluate(const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:505
│ │ │ │ +
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:531
│ │ │ │ +
void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const
Definition monomialbasis.hh:524
│ │ │ │ +
void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, layout > *values) const
Definition monomialbasis.hh:518
│ │ │ │ +
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:538
│ │ │ │ +
MonomialBasisSize< geometryId > Size
Definition monomialbasis.hh:455
│ │ │ │ +
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:512
│ │ │ │ +
MonomialBasis(unsigned int order)
Definition monomialbasis.hh:457
│ │ │ │ +
unsigned int derivSize(const unsigned int deriv) const
Definition monomialbasis.hh:482
│ │ │ │ +
const unsigned int * sizes(unsigned int order) const
Definition monomialbasis.hh:465
│ │ │ │ +
unsigned int order() const
Definition monomialbasis.hh:488
│ │ │ │ +
Definition monomialbasis.hh:177
│ │ │ │ +
MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size
Definition monomialbasis.hh:179
│ │ │ │ +
static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int numBaseFunctions, const F &z)
Definition monomialbasis.hh:181
│ │ │ │ +
MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize
Definition monomialbasis.hh:178
│ │ │ │ +
Definition monomialbasis.hh:234
│ │ │ │ +
FieldVector< Field, dimDomain > DomainVector
Definition monomialbasis.hh:242
│ │ │ │ +
static constexpr GeometryType geometry
Definition monomialbasis.hh:238
│ │ │ │ +
F Field
Definition monomialbasis.hh:236
│ │ │ │ +
static const unsigned int dimDomain
Definition monomialbasis.hh:240
│ │ │ │ +
Definition monomialbasis.hh:571
│ │ │ │ +
static constexpr GeometryType geometry
Definition monomialbasis.hh:576
│ │ │ │ +
StandardMonomialBasis(unsigned int order)
Definition monomialbasis.hh:579
│ │ │ │ +
static const int dimension
Definition monomialbasis.hh:577
│ │ │ │ +
Definition monomialbasis.hh:592
│ │ │ │ +
static const int dimension
Definition monomialbasis.hh:598
│ │ │ │ +
static constexpr GeometryType geometry
Definition monomialbasis.hh:597
│ │ │ │ +
StandardBiMonomialBasis(unsigned int order)
Definition monomialbasis.hh:600
│ │ │ │ +
Definition monomialbasis.hh:612
│ │ │ │ +
GeometryType geometry_
Definition monomialbasis.hh:706
│ │ │ │ +
FieldVector< Field, dimension > DomainVector
Definition monomialbasis.hh:621
│ │ │ │ +
unsigned int order_
Definition monomialbasis.hh:705
│ │ │ │ +
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:674
│ │ │ │ +
void evaluate(const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:650
│ │ │ │ +
F Field
Definition monomialbasis.hh:616
│ │ │ │ +
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:668
│ │ │ │ +
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:680
│ │ │ │ +
unsigned int order() const
Definition monomialbasis.hh:637
│ │ │ │ +
static const unsigned int dimRange
Definition monomialbasis.hh:619
│ │ │ │ +
F StorageField
Definition monomialbasis.hh:617
│ │ │ │ +
static const int dimension
Definition monomialbasis.hh:618
│ │ │ │ +
unsigned int size() const
Definition monomialbasis.hh:632
│ │ │ │ +
FieldVector< Field, dimRange > RangeVector
Definition monomialbasis.hh:622
│ │ │ │ +
virtual ~VirtualMonomialBasis()
Definition monomialbasis.hh:628
│ │ │ │ +
virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const =0
│ │ │ │ +
virtual void integrate(Field *const values) const =0
│ │ │ │ +
void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const values) const
Definition monomialbasis.hh:656
│ │ │ │ +
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:689
│ │ │ │ +
GeometryType type() const
Definition monomialbasis.hh:642
│ │ │ │ +
void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, layout > *values) const
Definition monomialbasis.hh:662
│ │ │ │ +
VirtualMonomialBasis(const GeometryType &gt, unsigned int order)
Definition monomialbasis.hh:624
│ │ │ │ +
virtual const unsigned int * sizes() const =0
│ │ │ │ +
void integrate(Vector &values) const
Definition monomialbasis.hh:700
│ │ │ │ +
Definition monomialbasis.hh:712
│ │ │ │ +
void integrate(Field *const values) const
Definition monomialbasis.hh:736
│ │ │ │ +
const unsigned int * sizes() const
Definition monomialbasis.hh:725
│ │ │ │ +
Base::DomainVector DomainVector
Definition monomialbasis.hh:719
│ │ │ │ +
Base::Field Field
Definition monomialbasis.hh:718
│ │ │ │ +
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:730
│ │ │ │ +
VirtualMonomialBasisImpl(unsigned int order)
Definition monomialbasis.hh:721
│ │ │ │ +
Definition monomialbasis.hh:751
│ │ │ │ +
static void release(Object *object)
Definition monomialbasis.hh:769
│ │ │ │ +
const VirtualMonomialBasis< dimension, F > Object
Definition monomialbasis.hh:756
│ │ │ │ +
static Object * create(const Key &order)
Definition monomialbasis.hh:765
│ │ │ │ +
F StorageField
Definition monomialbasis.hh:753
│ │ │ │ +
static const unsigned int dimension
Definition monomialbasis.hh:752
│ │ │ │ +
unsigned int Key
Definition monomialbasis.hh:755
│ │ │ │ + │ │ │ │ +
MonomialBasisFactory< dd, FF > Type
Definition monomialbasis.hh:761
│ │ │ │ +
Definition monomialbasis.hh:780
│ │ │ │ +
static const unsigned int dimension
Definition monomialbasis.hh:781
│ │ │ │ +
SF StorageField
Definition monomialbasis.hh:782
│ │ │ │ + │ │ │ │ +
MonomialBasisProvider< dd, FF > Type
Definition monomialbasis.hh:786
│ │ │ │ +
Definition tensor.hh:172
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,547 +1,1112 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e │ │ │ │ │ -hierarchicalsimplexp2withelementbubble.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +monomialbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_MONOMIALBASIS_HH │ │ │ │ │ +6#define DUNE_MONOMIALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -26 { │ │ │ │ │ -27 public: │ │ │ │ │ -_2_8 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ -29 { │ │ │ │ │ -30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ -implemented for dim > 3."); │ │ │ │ │ -31 } │ │ │ │ │ -32 }; │ │ │ │ │ -33 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -50 { │ │ │ │ │ -51 public: │ │ │ │ │ -53 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_1_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_1_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_5_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -55 │ │ │ │ │ -_5_7 unsigned int _s_i_z_e () const │ │ │ │ │ -58 { │ │ │ │ │ -59 return 3; │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -64 std::vector& out) const │ │ │ │ │ -65 { │ │ │ │ │ -66 out.resize(3); │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +19 │ │ │ │ │ +20namespace _D_u_n_e │ │ │ │ │ +21{ │ │ │ │ │ +22 /************************************************ │ │ │ │ │ +23 * Classes for evaluating ''Monomials'' on any order │ │ │ │ │ +24 * for all reference element type. │ │ │ │ │ +25 * For a simplex topology these are the normal │ │ │ │ │ +26 * monomials for cube topologies the bimonomials. │ │ │ │ │ +27 * The construction follows the construction of the │ │ │ │ │ +28 * generic geometries using tensor products for │ │ │ │ │ +29 * prism generation and duffy transform for pyramid │ │ │ │ │ +30 * construction. │ │ │ │ │ +31 * A derivative argument can be applied, in which case │ │ │ │ │ +32 * all derivatives up to the desired order are │ │ │ │ │ +33 * evaluated. Note that for higher order derivatives │ │ │ │ │ +34 * only the ''lower'' part of the symmetric tensor │ │ │ │ │ +35 * is evaluated, e.g., passing derivative equal to 2 │ │ │ │ │ +36 * to the class will provide the vector │ │ │ │ │ +37 * (d/dxdx p, d/dxydx p, d/dydy p, │ │ │ │ │ +38 * d/dx p, d/dy p, p) │ │ │ │ │ +39 * Important: │ │ │ │ │ +40 * So far the computation of the derivatives has not │ │ │ │ │ +41 * been fully implemented for general pyramid │ │ │ │ │ +42 * construction, i.e., in the case where a pyramid is │ │ │ │ │ +43 * build over a non simplex base geometry. │ │ │ │ │ +44 * │ │ │ │ │ +45 * Central classes: │ │ │ │ │ +46 * 1) template< GeometryType::Id geometryId, class F > │ │ │ │ │ +47 * class MonomialBasisImpl; │ │ │ │ │ +48 * Implementation of the monomial evaluation for │ │ │ │ │ +49 * a given topology and field type. │ │ │ │ │ +50 * The method evaluate fills a F* vector │ │ │ │ │ +51 * 2) template< GeometryType::Id geometryId, class F > │ │ │ │ │ +52 * class MonomialBasis │ │ │ │ │ +53 * The base class for the static monomial evaluation │ │ │ │ │ +54 * providing addiional evaluate methods including │ │ │ │ │ +55 * one taking std::vector. │ │ │ │ │ +56 * 3) template< int dim, class F > │ │ │ │ │ +57 * class VirtualMonomialBasis │ │ │ │ │ +58 * Virtualization of the MonomialBasis. │ │ │ │ │ +59 * 4) template< int dim, class F > │ │ │ │ │ +60 * struct MonomialBasisFactory; │ │ │ │ │ +61 * A factory class for the VirtualMonomialBasis │ │ │ │ │ +62 * 5) template< int dim, class F > │ │ │ │ │ +63 * struct MonomialBasisProvider │ │ │ │ │ +64 * A singleton container for the virtual monomial │ │ │ │ │ +65 * basis │ │ │ │ │ +66 ************************************************/ │ │ │ │ │ 67 │ │ │ │ │ -68 out[0] = 1-in[0]; │ │ │ │ │ -69 out[1] = in[0]; │ │ │ │ │ -70 out[2] = 1-4*(in[0]-0.5)*(in[0]-0.5); │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -74 inline void │ │ │ │ │ -_7_5 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -76 std::vector& out) const // return value │ │ │ │ │ -77 { │ │ │ │ │ -78 out.resize(3); │ │ │ │ │ -79 │ │ │ │ │ -80 out[0][0][0] = -1; │ │ │ │ │ -81 out[1][0][0] = 1; │ │ │ │ │ -82 out[2][0][0] = 4-8*in[0]; │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_6 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -87 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -88 std::vector& out) const // return value │ │ │ │ │ +68 // Internal Forward Declarations │ │ │ │ │ +69 // ----------------------------- │ │ │ │ │ +70 │ │ │ │ │ +71 template< GeometryType::Id geometryId > │ │ │ │ │ +72 class MonomialBasisSize; │ │ │ │ │ +73 │ │ │ │ │ +74 template< GeometryType::Id geometryId, class F > │ │ │ │ │ +75 class MonomialBasis; │ │ │ │ │ +76 │ │ │ │ │ +77 │ │ │ │ │ +78 │ │ │ │ │ +79 // MonomialBasisSize │ │ │ │ │ +80 // ----------------- │ │ │ │ │ +81 │ │ │ │ │ +82 template< GeometryType::Id geometryId > │ │ │ │ │ +_8_3 class _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ +84 { │ │ │ │ │ +85 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_ _g_e_o_m_e_t_r_y_I_d_ _> _T_h_i_s; │ │ │ │ │ +86 │ │ │ │ │ +87 public: │ │ │ │ │ +_8_8 static _T_h_i_s &_i_n_s_t_a_n_c_e () │ │ │ │ │ 89 { │ │ │ │ │ -90 auto totalOrder = order[0]; │ │ │ │ │ -91 if (totalOrder == 0) { │ │ │ │ │ -92 evaluateFunction(in, out); │ │ │ │ │ -93 } else if (totalOrder == 1) { │ │ │ │ │ -94 out.resize(size()); │ │ │ │ │ -95 out[0] = -1; │ │ │ │ │ -96 out[1] = 1; │ │ │ │ │ -97 out[2] = 4-8*in[0]; │ │ │ │ │ -98 } else if (totalOrder == 2) { │ │ │ │ │ -99 out.resize(size()); │ │ │ │ │ -100 out[0] = 0; │ │ │ │ │ -101 out[1] = 0; │ │ │ │ │ -102 out[2] =-8; │ │ │ │ │ -103 } else { │ │ │ │ │ -104 out.resize(size()); │ │ │ │ │ -105 out[0] = out[1] = out[2] = 0; │ │ │ │ │ -106 } │ │ │ │ │ -107 } │ │ │ │ │ -108 │ │ │ │ │ -_1_1_1 unsigned int _o_r_d_e_r () const │ │ │ │ │ -112 { │ │ │ │ │ -113 return 2; │ │ │ │ │ +90 static _T_h_i_s _instance; │ │ │ │ │ +91 return _instance; │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +_9_4 unsigned int _m_a_x_O_r_d_e_r__; │ │ │ │ │ +95 │ │ │ │ │ +96 // sizes_[ k ]: number of basis functions of exactly order k │ │ │ │ │ +_9_7 mutable unsigned int *_s_i_z_e_s__; │ │ │ │ │ +98 │ │ │ │ │ +99 // numBaseFunctions_[ k ] = sizes_[ 0 ] + ... + sizes_[ k ] │ │ │ │ │ +_1_0_0 mutable unsigned int *_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ +101 │ │ │ │ │ +_1_0_2 _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e () │ │ │ │ │ +103 : _m_a_x_O_r_d_e_r__( 0 ), │ │ │ │ │ +104 _s_i_z_e_s__( 0 ), │ │ │ │ │ +105 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__( 0 ) │ │ │ │ │ +106 { │ │ │ │ │ +107 _c_o_m_p_u_t_e_S_i_z_e_s( 2 ); │ │ │ │ │ +108 } │ │ │ │ │ +109 │ │ │ │ │ +_1_1_0 _~_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e () │ │ │ │ │ +111 { │ │ │ │ │ +112 delete[] _s_i_z_e_s__; │ │ │ │ │ +113 delete[] _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ 114 } │ │ │ │ │ 115 │ │ │ │ │ -116 }; │ │ │ │ │ -117 │ │ │ │ │ -138 template │ │ │ │ │ -_1_3_9 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -140 { │ │ │ │ │ -141 public: │ │ │ │ │ -143 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_1_4_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -145 │ │ │ │ │ -_1_4_7 unsigned int _s_i_z_e () const │ │ │ │ │ +_1_1_6 unsigned int _o_p_e_r_a_t_o_r_(_)_ ( const unsigned int order ) const │ │ │ │ │ +117 { │ │ │ │ │ +118 return _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ order ]; │ │ │ │ │ +119 } │ │ │ │ │ +120 │ │ │ │ │ +_1_2_1 unsigned int _m_a_x_O_r_d_e_r() const │ │ │ │ │ +122 { │ │ │ │ │ +123 return _m_a_x_O_r_d_e_r__; │ │ │ │ │ +124 } │ │ │ │ │ +125 │ │ │ │ │ +_1_2_6 void _c_o_m_p_u_t_e_S_i_z_e_s ( unsigned int order ) │ │ │ │ │ +127 { │ │ │ │ │ +128 if (order <= _m_a_x_O_r_d_e_r__) │ │ │ │ │ +129 return; │ │ │ │ │ +130 │ │ │ │ │ +131 _m_a_x_O_r_d_e_r__ = order; │ │ │ │ │ +132 │ │ │ │ │ +133 delete[] _s_i_z_e_s__; │ │ │ │ │ +134 delete[] _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ +135 _s_i_z_e_s__ = new unsigned int[ order+1 ]; │ │ │ │ │ +136 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__ = new unsigned int[ order+1 ]; │ │ │ │ │ +137 │ │ │ │ │ +138 constexpr GeometryType geometry = geometryId; │ │ │ │ │ +139 constexpr auto dim = geometry.dim(); │ │ │ │ │ +140 │ │ │ │ │ +141 _s_i_z_e_s__[ 0 ] = 1; │ │ │ │ │ +142 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +143 _s_i_z_e_s__[ k ] = 0; │ │ │ │ │ +144 │ │ │ │ │ +145 std::fill(_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__, _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__+order+1, 1); │ │ │ │ │ +146 │ │ │ │ │ +147 for( int codim=dim-1; codim>=0; codim--) │ │ │ │ │ 148 { │ │ │ │ │ -149 return 7; │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -_1_5_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -154 std::vector& out) const │ │ │ │ │ -155 { │ │ │ │ │ -156 out.resize(7); │ │ │ │ │ -157 │ │ │ │ │ -158 out[0] = 1 - in[0] - in[1]; │ │ │ │ │ -159 out[1] = 4*in[0]*(1-in[0]-in[1]); │ │ │ │ │ -160 out[2] = in[0]; │ │ │ │ │ -161 out[3] = 4*in[1]*(1-in[0]-in[1]); │ │ │ │ │ -162 out[4] = 4*in[0]*in[1]; │ │ │ │ │ -163 out[5] = in[1]; │ │ │ │ │ -164 out[6] = 27*in[0]*in[1]*(1-in[0]-in[1]); │ │ │ │ │ -165 │ │ │ │ │ +149 if (Impl::isPrism(geometry.id(),dim,codim)) │ │ │ │ │ +150 { │ │ │ │ │ +151 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +152 { │ │ │ │ │ +153 _s_i_z_e_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] + k*_s_i_z_e_s__[ k ]; │ │ │ │ │ +154 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k-1 ] + _s_i_z_e_s__[ k ]; │ │ │ │ │ +155 } │ │ │ │ │ +156 } │ │ │ │ │ +157 else │ │ │ │ │ +158 { │ │ │ │ │ +159 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +160 { │ │ │ │ │ +161 _s_i_z_e_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ]; │ │ │ │ │ +162 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k-1 ] + _s_i_z_e_s__[ k ]; │ │ │ │ │ +163 } │ │ │ │ │ +164 } │ │ │ │ │ +165 } │ │ │ │ │ 166 } │ │ │ │ │ -167 │ │ │ │ │ -169 inline void │ │ │ │ │ -_1_7_0 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -171 std::vector& out) const // return value │ │ │ │ │ -172 { │ │ │ │ │ -173 out.resize(7); │ │ │ │ │ +167 }; │ │ │ │ │ +168 │ │ │ │ │ +169 │ │ │ │ │ +170 │ │ │ │ │ +171 // MonomialBasisHelper │ │ │ │ │ +172 // ------------------- │ │ │ │ │ +173 │ │ │ │ │ 174 │ │ │ │ │ -175 out[0][0][0] = -1; out[0][0][1] = -1; │ │ │ │ │ -176 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0]; │ │ │ │ │ -177 out[2][0][0] = 1; out[2][0][1] = 0; │ │ │ │ │ -178 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]; │ │ │ │ │ -179 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; │ │ │ │ │ -180 out[5][0][0] = 0; out[5][0][1] = 1; │ │ │ │ │ -181 │ │ │ │ │ -182 // Cubic bubble │ │ │ │ │ -183 out[6][0][0] = 27 * in[1] * (1 - 2*in[0] - in[1]); │ │ │ │ │ -184 out[6][0][1] = 27 * in[0] * (1 - 2*in[1] - in[0]); │ │ │ │ │ -185 │ │ │ │ │ -186 } │ │ │ │ │ +175 template< int mydim, int dim, class F > │ │ │ │ │ +_1_7_6 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r │ │ │ │ │ +177 { │ │ │ │ │ +_1_7_8 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(mydim).toId() > _M_y_S_i_z_e; │ │ │ │ │ +_1_7_9 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(dim).toId() > _S_i_z_e; │ │ │ │ │ +180 │ │ │ │ │ +_1_8_1 static void _c_o_p_y ( const unsigned int deriv, F *&wit, F *&rit, │ │ │ │ │ +182 const unsigned int numBaseFunctions, const F &z ) │ │ │ │ │ +183 { │ │ │ │ │ +184 // n(d,k) = size[d]; │ │ │ │ │ +185 _M_y_S_i_z_e &mySize = _M_y_S_i_z_e_:_:_i_n_s_t_a_n_c_e(); │ │ │ │ │ +186 _S_i_z_e &size = _S_i_z_e_:_:_i_n_s_t_a_n_c_e(); │ │ │ │ │ 187 │ │ │ │ │ -_1_8_9 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -190 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -191 std::vector& out) const // return value │ │ │ │ │ -192 { │ │ │ │ │ -193 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -194 if (totalOrder == 0) { │ │ │ │ │ -195 evaluateFunction(in, out); │ │ │ │ │ -196 } else if (totalOrder == 1) { │ │ │ │ │ -197 out.resize(size()); │ │ │ │ │ -198 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -199 │ │ │ │ │ -200 switch (direction) { │ │ │ │ │ -201 case 0: │ │ │ │ │ -202 out[0] = -1; │ │ │ │ │ -203 out[1] = 4-8*in[0]-4*in[1]; │ │ │ │ │ -204 out[2] = 1; │ │ │ │ │ -205 out[3] = -4*in[1]; │ │ │ │ │ -206 out[4] = 4*in[1]; │ │ │ │ │ -207 out[5] = 0; │ │ │ │ │ -208 out[6] = 27 * in[1] * (1 - 2*in[0] - in[1]); │ │ │ │ │ -209 break; │ │ │ │ │ -210 case 1: │ │ │ │ │ -211 out[0] = -1; │ │ │ │ │ -212 out[1] = -4*in[0]; │ │ │ │ │ -213 out[2] = 0; │ │ │ │ │ -214 out[3] = 4-4*in[0]-8*in[1]; │ │ │ │ │ -215 out[4] = 4*in[0]; │ │ │ │ │ -216 out[5] = 1; │ │ │ │ │ -217 out[6] = 27 * in[0] * (1 - 2*in[1] - in[0]); │ │ │ │ │ -218 break; │ │ │ │ │ -219 default: │ │ │ │ │ -220 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -221 } │ │ │ │ │ -222 } else { │ │ │ │ │ -223 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +188 const F *const rend = rit + size( deriv )*numBaseFunctions; │ │ │ │ │ +189 for( ; rit != rend; ) │ │ │ │ │ +190 { │ │ │ │ │ +191 F *prit = rit; │ │ │ │ │ +192 │ │ │ │ │ +193 *wit = z * *rit; │ │ │ │ │ +194 ++rit, ++wit; │ │ │ │ │ +195 │ │ │ │ │ +196 for( unsigned d = 1; d <= deriv; ++d ) │ │ │ │ │ +197 { │ │ │ │ │ +198 #ifndef NDEBUG │ │ │ │ │ +199 const F *const derivEnd = rit + mySize._s_i_z_e_s__[ d ]; │ │ │ │ │ +200 #endif │ │ │ │ │ +201 │ │ │ │ │ +202 { │ │ │ │ │ +203 const F *const drend = rit + mySize._s_i_z_e_s__[ d ] - mySize._s_i_z_e_s__[ d-1 ]; │ │ │ │ │ +204 for( ; rit != drend ; ++rit, ++wit ) │ │ │ │ │ +205 *wit = z * *rit; │ │ │ │ │ +206 } │ │ │ │ │ +207 │ │ │ │ │ +208 for (unsigned int j=1; j(); │ │ │ │ │ +222 } │ │ │ │ │ +223 } │ │ │ │ │ 224 } │ │ │ │ │ -225 } │ │ │ │ │ +225 }; │ │ │ │ │ 226 │ │ │ │ │ -_2_2_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ -230 { │ │ │ │ │ -231 return 3; │ │ │ │ │ -232 } │ │ │ │ │ -233 │ │ │ │ │ -234 }; │ │ │ │ │ -235 │ │ │ │ │ -260 template │ │ │ │ │ -_2_6_1 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -262 { │ │ │ │ │ -263 public: │ │ │ │ │ -265 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_2_6_6 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -267 │ │ │ │ │ -_2_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ -270 { │ │ │ │ │ -271 return 11; │ │ │ │ │ -272 } │ │ │ │ │ -273 │ │ │ │ │ -_2_7_5 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -276 std::vector& out) const │ │ │ │ │ -277 { │ │ │ │ │ -278 out.resize(10); │ │ │ │ │ -279 │ │ │ │ │ -280 out[0] = 1 - in[0] - in[1] - in[2]; │ │ │ │ │ -281 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -282 out[2] = in[0]; │ │ │ │ │ -283 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -284 out[4] = 4 * in[0] * in[1]; │ │ │ │ │ -285 out[5] = in[1]; │ │ │ │ │ -286 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ -287 out[7] = 4 * in[0] * in[2]; │ │ │ │ │ -288 out[8] = 4 * in[1] * in[2]; │ │ │ │ │ -289 out[9] = in[2]; │ │ │ │ │ -290 │ │ │ │ │ -291 // quartic element bubble │ │ │ │ │ -292 out[10] = 81*in[0]*in[1]*in[2]*(1-in[0]-in[1]-in[2]); │ │ │ │ │ -293 } │ │ │ │ │ -294 │ │ │ │ │ -_2_9_6 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -297 std::vector& out) const // return value │ │ │ │ │ -298 { │ │ │ │ │ -299 out.resize(10); │ │ │ │ │ +227 │ │ │ │ │ +228 │ │ │ │ │ +229 // MonomialBasisImpl │ │ │ │ │ +230 // ----------------- │ │ │ │ │ +231 │ │ │ │ │ +232 template< GeometryType::Id geometryId, class F> │ │ │ │ │ +_2_3_3 class _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ +234 { │ │ │ │ │ +235 public: │ │ │ │ │ +_2_3_6 typedef F _F_i_e_l_d; │ │ │ │ │ +237 │ │ │ │ │ +_2_3_8 static constexpr GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ +239 │ │ │ │ │ +_2_4_0 static const unsigned int _d_i_m_D_o_m_a_i_n = _g_e_o_m_e_t_r_y.dim(); │ │ │ │ │ +241 │ │ │ │ │ +_2_4_2 typedef FieldVector< Field, dimDomain > _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +243 │ │ │ │ │ +244 private: │ │ │ │ │ +245 friend class _M_o_n_o_m_i_a_l_B_a_s_i_s< geometryId, _F_i_e_l_d >; │ │ │ │ │ +246 │ │ │ │ │ +247 _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l () │ │ │ │ │ +248 {} │ │ │ │ │ +249 │ │ │ │ │ +250 template< int dimD > │ │ │ │ │ +251 void evaluate ( const unsigned int deriv, const unsigned int order, │ │ │ │ │ +252 const FieldVector< Field, dimD > &x, │ │ │ │ │ +253 const unsigned int block, const unsigned int *const offsets, │ │ │ │ │ +254 _F_i_e_l_d *const values ) const │ │ │ │ │ +255 { │ │ │ │ │ +256 //start with vertex │ │ │ │ │ +257 *values = _U_n_i_t_y_<_ _F_ _>(); │ │ │ │ │ +258 F *const end = values + block; │ │ │ │ │ +259 for( _F_i_e_l_d *it = values+1 ; it != end; ++it ) │ │ │ │ │ +260 *it = _Z_e_r_o_<_ _F_ _>(); │ │ │ │ │ +261 │ │ │ │ │ +262 constexpr GeometryType gt = GeometryTypes::vertex; │ │ │ │ │ +263 │ │ │ │ │ +264 if constexpr ( _g_e_o_m_e_t_r_y == gt) │ │ │ │ │ +265 return; │ │ │ │ │ +266 else │ │ │ │ │ +267 evaluate(deriv, order, x, block, offsets, values ); │ │ │ │ │ +268 } │ │ │ │ │ +269 │ │ │ │ │ +270 template │ │ │ │ │ +271 void evaluate ( const unsigned int deriv, const unsigned int order, │ │ │ │ │ +272 const FieldVector< Field, dimD > &x, │ │ │ │ │ +273 const unsigned int block, const unsigned int *const offsets, │ │ │ │ │ +274 _F_i_e_l_d *const values ) const │ │ │ │ │ +275 { │ │ │ │ │ +276 │ │ │ │ │ +277 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ +278 │ │ │ │ │ +279 auto constexpr isPrismatic = _g_e_o_m_e_t_r_y.isPrismatic(baseGeometry.dim()); │ │ │ │ │ +280 │ │ │ │ │ +281 // compute │ │ │ │ │ +282 typedef MonomialBasisHelper< baseGeometry.dim() + 1, dimD, _F_i_e_l_d > Helper; │ │ │ │ │ +283 typedef MonomialBasisSize BaseSize; │ │ │ │ │ +284 │ │ │ │ │ +285 const BaseSize &size = BaseSize::instance(); │ │ │ │ │ +286 const_cast(size).computeSizes(order); │ │ │ │ │ +287 │ │ │ │ │ +288 const _F_i_e_l_d &z = x[ baseGeometry.dim() ]; │ │ │ │ │ +289 │ │ │ │ │ +290 _F_i_e_l_d *row0 = values; │ │ │ │ │ +291 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +292 { │ │ │ │ │ +293 _F_i_e_l_d *row1 = values + block*offsets[ k-1 ]; │ │ │ │ │ +294 _F_i_e_l_d *wit = row1 + block*size.sizes_[ k ]; │ │ │ │ │ +295 if constexpr ( isPrismatic ) │ │ │ │ │ +296 Helper::copy( deriv, wit, row1, k*size.sizes_[ k ], z ); │ │ │ │ │ +297 Helper::copy( deriv, wit, row0, size( k-1 ), z ); │ │ │ │ │ +298 row0 = row1; │ │ │ │ │ +299 } │ │ │ │ │ 300 │ │ │ │ │ -301 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1; │ │ │ │ │ -302 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1] │ │ │ │ │ -[0][2] = -4*in[0]; │ │ │ │ │ -303 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ -304 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3] │ │ │ │ │ -[0][2] = -4*in[1]; │ │ │ │ │ -305 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0; │ │ │ │ │ -306 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0; │ │ │ │ │ -307 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]- │ │ │ │ │ -4*in[1]-8*in[2]; │ │ │ │ │ -308 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0]; │ │ │ │ │ -309 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1]; │ │ │ │ │ -310 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1; │ │ │ │ │ -311 │ │ │ │ │ -312 out[10][0][0] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]); │ │ │ │ │ -313 out[10][0][1] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]); │ │ │ │ │ -314 out[10][0][2] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]); │ │ │ │ │ -315 } │ │ │ │ │ -316 │ │ │ │ │ -_3_1_8 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ -319 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -320 std::vector& out) const // return value │ │ │ │ │ -321 { │ │ │ │ │ -322 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -323 if (totalOrder == 0) { │ │ │ │ │ -324 evaluateFunction(in, out); │ │ │ │ │ -325 } else if (totalOrder == 1) { │ │ │ │ │ -326 out.resize(size()); │ │ │ │ │ -327 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -328 │ │ │ │ │ -329 switch (direction) { │ │ │ │ │ -330 case 0: │ │ │ │ │ -331 out[0] = -1; │ │ │ │ │ -332 out[1] = 4-8*in[0]-4*in[1]-4*in[2]; │ │ │ │ │ -333 out[2] = 1; │ │ │ │ │ -334 out[3] = -4*in[1]; │ │ │ │ │ -335 out[4] = 4*in[1]; │ │ │ │ │ -336 out[5] = 0; │ │ │ │ │ -337 out[6] = -4*in[2]; │ │ │ │ │ -338 out[7] = 4*in[2]; │ │ │ │ │ -339 out[8] = 0; │ │ │ │ │ -340 out[9] = 0; │ │ │ │ │ -341 out[10] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]); │ │ │ │ │ -342 break; │ │ │ │ │ -343 case 1: │ │ │ │ │ -344 out[0] = -1; │ │ │ │ │ -345 out[1] = -4*in[0]; │ │ │ │ │ -346 out[2] = 0; │ │ │ │ │ -347 out[3] = 4-4*in[0]-8*in[1]-4*in[2]; │ │ │ │ │ -348 out[4] = 4*in[0]; │ │ │ │ │ -349 out[5] = 1; │ │ │ │ │ -350 out[6] = -4*in[2]; │ │ │ │ │ -351 out[7] = 0; │ │ │ │ │ -352 out[8] = 4*in[2]; │ │ │ │ │ -353 out[9] = 0; │ │ │ │ │ -354 out[10] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]); │ │ │ │ │ -355 break; │ │ │ │ │ -356 case 2: │ │ │ │ │ -357 out[0] = -1; │ │ │ │ │ -358 out[1] = -4*in[0]; │ │ │ │ │ -359 out[2] = 0; │ │ │ │ │ -360 out[3] = -4*in[1]; │ │ │ │ │ -361 out[4] = 0; │ │ │ │ │ -362 out[5] = 0; │ │ │ │ │ -363 out[6] = 4-4*in[0]-4*in[1]-8*in[2]; │ │ │ │ │ -364 out[7] = 4*in[0]; │ │ │ │ │ -365 out[8] = 4*in[1]; │ │ │ │ │ -366 out[9] = 1; │ │ │ │ │ -367 out[10] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]); │ │ │ │ │ -368 break; │ │ │ │ │ -369 default: │ │ │ │ │ -370 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -371 } │ │ │ │ │ -372 } else { │ │ │ │ │ -373 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -374 } │ │ │ │ │ -375 } │ │ │ │ │ +301 // stop if desired dimension is reached │ │ │ │ │ +302 if constexpr( baseGeometry.dim() == _d_i_m_D_o_m_a_i_n-1) │ │ │ │ │ +303 return; │ │ │ │ │ +304 else │ │ │ │ │ +305 { │ │ │ │ │ +306 constexpr GeometryType nextGeometry = isPrismatic ? GeometryTypes:: │ │ │ │ │ +prismaticExtension(baseGeometry) │ │ │ │ │ +307 : GeometryTypes::conicalExtension(baseGeometry); │ │ │ │ │ +308 │ │ │ │ │ +309 evaluate(deriv, order, x, block, offsets, values │ │ │ │ │ +); │ │ │ │ │ +310 } │ │ │ │ │ +311 } │ │ │ │ │ +312 │ │ │ │ │ +313 void integrate ( const unsigned int order, │ │ │ │ │ +314 const unsigned int *const offsets, │ │ │ │ │ +315 _F_i_e_l_d *const values ) const │ │ │ │ │ +316 { │ │ │ │ │ +317 //start with vertex │ │ │ │ │ +318 values[ 0 ] = Unity< Field >(); │ │ │ │ │ +319 static constexpr GeometryType gt = GeometryTypes::vertex; │ │ │ │ │ +320 │ │ │ │ │ +321 if constexpr ( _g_e_o_m_e_t_r_y == gt) │ │ │ │ │ +322 return; │ │ │ │ │ +323 else │ │ │ │ │ +324 integrate(order, offsets, values); │ │ │ │ │ +325 } │ │ │ │ │ +326 │ │ │ │ │ +327 template │ │ │ │ │ +328 void integrate ( const unsigned int order, │ │ │ │ │ +329 const unsigned int *const offsets, │ │ │ │ │ +330 _F_i_e_l_d *const values) const │ │ │ │ │ +331 { │ │ │ │ │ +332 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ +333 │ │ │ │ │ +334 auto constexpr isPrismatic = _g_e_o_m_e_t_r_y.isPrismatic(baseGeometry.dim()); │ │ │ │ │ +335 │ │ │ │ │ +336 // decide which kind of integration should be performed │ │ │ │ │ +337 if constexpr ( isPrismatic ) │ │ │ │ │ +338 integratePrismatic(order, offsets, values); │ │ │ │ │ +339 else │ │ │ │ │ +340 integrateConical(order, offsets, values); │ │ │ │ │ +341 │ │ │ │ │ +342 // stop if the desired dimension is reached │ │ │ │ │ +343 if constexpr( baseGeometry.dim() == _d_i_m_D_o_m_a_i_n-1) │ │ │ │ │ +344 return; │ │ │ │ │ +345 else │ │ │ │ │ +346 { │ │ │ │ │ +347 static constexpr GeometryType nextGeometry = (isPrismatic ? GeometryTypes:: │ │ │ │ │ +prismaticExtension(baseGeometry) │ │ │ │ │ +348 : GeometryTypes::conicalExtension(baseGeometry)); │ │ │ │ │ +349 │ │ │ │ │ +350 integrate(order, offsets, values); │ │ │ │ │ +351 } │ │ │ │ │ +352 │ │ │ │ │ +353 } │ │ │ │ │ +354 │ │ │ │ │ +355 template │ │ │ │ │ +356 void integratePrismatic ( const unsigned int order, │ │ │ │ │ +357 const unsigned int *const offsets, │ │ │ │ │ +358 _F_i_e_l_d *const values ) const │ │ │ │ │ +359 { │ │ │ │ │ +360 typedef MonomialBasisSize BaseSize; │ │ │ │ │ +361 static const BaseSize &size = BaseSize::instance(); │ │ │ │ │ +362 const unsigned int *const baseSizes = size.sizes_; │ │ │ │ │ +363 │ │ │ │ │ +364 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ +365 static constexpr GeometryType nextGeometry = GeometryTypes:: │ │ │ │ │ +prismaticExtension(baseGeometry); │ │ │ │ │ +366 │ │ │ │ │ +367 typedef MonomialBasisSize Size; │ │ │ │ │ +368 static const Size &mySize = Size::instance(); │ │ │ │ │ +369 │ │ │ │ │ +370 _F_i_e_l_d *row0 = values; │ │ │ │ │ +371 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +372 { │ │ │ │ │ +373 _F_i_e_l_d *const row1begin = values + offsets[ k-1 ]; │ │ │ │ │ +374 _F_i_e_l_d *const row1End = row1begin + mySize.sizes_[ k ]; │ │ │ │ │ +375 assert( (unsigned int)(row1End - values) <= offsets[ k ] ); │ │ │ │ │ 376 │ │ │ │ │ -_3_7_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +377 _F_i_e_l_d *row1 = row1begin; │ │ │ │ │ +378 _F_i_e_l_d *it = row1begin + baseSizes[ k ]; │ │ │ │ │ +379 for( unsigned int j = 1; j <= k; ++j ) │ │ │ │ │ 380 { │ │ │ │ │ -381 return 4; │ │ │ │ │ -382 } │ │ │ │ │ -383 │ │ │ │ │ -384 }; │ │ │ │ │ -385 │ │ │ │ │ -386 │ │ │ │ │ -412 template │ │ │ │ │ -_4_1_3 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -414 { │ │ │ │ │ -415 // The binomial coefficient: dim+1 over 1 │ │ │ │ │ -416 static const int numVertices = dim+1; │ │ │ │ │ -417 │ │ │ │ │ -418 // The binomial coefficient: dim+1 over 2 │ │ │ │ │ -419 static const int numEdges = (dim+1)*dim / 2; │ │ │ │ │ -420 │ │ │ │ │ -421 public: │ │ │ │ │ -_4_2_3 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () │ │ │ │ │ -424 : li(numVertices+numEdges + 1) │ │ │ │ │ -425 { │ │ │ │ │ -426 if (dim!=2) │ │ │ │ │ -427 DUNE_THROW(NotImplemented, "only for 2d"); │ │ │ │ │ -428 │ │ │ │ │ -429 li[0] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,2,0); // Vertex (0,0) │ │ │ │ │ -430 li[1] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,1,0); // Edge (0.5, 0) │ │ │ │ │ -431 li[2] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(1,2,0); // Vertex (1,0) │ │ │ │ │ -432 li[3] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(1,1,0); // Edge (0, 0.5) │ │ │ │ │ -433 li[4] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(2,1,0); // Edge (0.5, 0.5) │ │ │ │ │ -434 li[5] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(2,2,0); // Vertex (0,1) │ │ │ │ │ -435 li[6] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,0,0); // Element (1/3, 1/3) │ │ │ │ │ -436 } │ │ │ │ │ -437 │ │ │ │ │ -_4_3_9 size_t _s_i_z_e () const │ │ │ │ │ +381 _F_i_e_l_d *const end = it + baseSizes[ k ]; │ │ │ │ │ +382 assert( (unsigned int)(end - values) <= offsets[ k ] ); │ │ │ │ │ +383 for( ; it != end; ++row1, ++it ) │ │ │ │ │ +384 *it = (_F_i_e_l_d( j ) / _F_i_e_l_d( j+1 )) * (*row1); │ │ │ │ │ +385 } │ │ │ │ │ +386 for( ; it != row1End; ++row0, ++it ) │ │ │ │ │ +387 *it = (_F_i_e_l_d( k ) / _F_i_e_l_d( k+1 )) * (*row0); │ │ │ │ │ +388 row0 = row1; │ │ │ │ │ +389 } │ │ │ │ │ +390 } │ │ │ │ │ +391 │ │ │ │ │ +392 │ │ │ │ │ +393 template │ │ │ │ │ +394 void integrateConical ( const unsigned int order, │ │ │ │ │ +395 const unsigned int *const offsets, │ │ │ │ │ +396 _F_i_e_l_d *const values) const │ │ │ │ │ +397 { │ │ │ │ │ +398 typedef MonomialBasisSize BaseSize; │ │ │ │ │ +399 static const BaseSize &size = BaseSize::instance(); │ │ │ │ │ +400 const unsigned int *const baseSizes = size.sizes_; │ │ │ │ │ +401 │ │ │ │ │ +402 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ +403 │ │ │ │ │ +404 { │ │ │ │ │ +405 _F_i_e_l_d *const col0End = values + baseSizes[ 0 ]; │ │ │ │ │ +406 for( _F_i_e_l_d *it = values; it != col0End; ++it ) │ │ │ │ │ +407 *it *= _F_i_e_l_d( 1 ) / _F_i_e_l_d( int(baseGeometry.dim()+1) ); │ │ │ │ │ +408 } │ │ │ │ │ +409 │ │ │ │ │ +410 _F_i_e_l_d *row0 = values; │ │ │ │ │ +411 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ +412 { │ │ │ │ │ +413 const _F_i_e_l_d factor = (_F_i_e_l_d( 1 ) / _F_i_e_l_d( k + baseGeometry.dim()+1)); │ │ │ │ │ +414 │ │ │ │ │ +415 _F_i_e_l_d *const row1 = values+offsets[ k-1 ]; │ │ │ │ │ +416 _F_i_e_l_d *const col0End = row1 + baseSizes[ k ]; │ │ │ │ │ +417 _F_i_e_l_d *it = row1; │ │ │ │ │ +418 for( ; it != col0End; ++it ) │ │ │ │ │ +419 *it *= factor; │ │ │ │ │ +420 for( unsigned int i = 1; i <= k; ++i ) │ │ │ │ │ +421 { │ │ │ │ │ +422 _F_i_e_l_d *const end = it + baseSizes[ k-i ]; │ │ │ │ │ +423 assert( (unsigned int)(end - values) <= offsets[ k ] ); │ │ │ │ │ +424 for( ; it != end; ++row0, ++it ) │ │ │ │ │ +425 *it = (*row0) * (_F_i_e_l_d( i ) * factor); │ │ │ │ │ +426 } │ │ │ │ │ +427 row0 = row1; │ │ │ │ │ +428 } │ │ │ │ │ +429 } │ │ │ │ │ +430 │ │ │ │ │ +431 }; │ │ │ │ │ +432 │ │ │ │ │ +433 │ │ │ │ │ +434 // MonomialBasis │ │ │ │ │ +435 // ------------- │ │ │ │ │ +436 │ │ │ │ │ +437 template< GeometryType::Id geometryId, class F > │ │ │ │ │ +_4_3_8 class _M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +439 : public _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l< geometryId, F > │ │ │ │ │ 440 { │ │ │ │ │ -441 return numVertices+numEdges + 1; │ │ │ │ │ -442 } │ │ │ │ │ -443 │ │ │ │ │ -_4_4_5 const _D_u_n_e_:_:_L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (size_t i) const │ │ │ │ │ -446 { │ │ │ │ │ -447 return li[i]; │ │ │ │ │ -448 } │ │ │ │ │ -449 │ │ │ │ │ -450 private: │ │ │ │ │ -451 std::vector li; │ │ │ │ │ -452 }; │ │ │ │ │ -453 │ │ │ │ │ -454 template │ │ │ │ │ -_4_5_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -456 { │ │ │ │ │ -457 public: │ │ │ │ │ -458 │ │ │ │ │ -460 template │ │ │ │ │ -_4_6_1 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -462 { │ │ │ │ │ -463 typename LB::Traits::DomainType x; │ │ │ │ │ -464 typename LB::Traits::RangeType y; │ │ │ │ │ -465 │ │ │ │ │ -466 out.resize(7); │ │ │ │ │ -467 │ │ │ │ │ -468 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -469 │ │ │ │ │ -470 // vertices │ │ │ │ │ -471 x[0] = 0.0; x[1] = 0.0; out[0] = f(x); │ │ │ │ │ -472 x[0] = 1.0; x[1] = 0.0; out[2] = f(x); │ │ │ │ │ -473 x[0] = 0.0; x[1] = 1.0; out[5] = f(x); │ │ │ │ │ -474 │ │ │ │ │ -475 // edge bubbles │ │ │ │ │ -476 x[0] = 0.5; x[1] = 0.0; y = f(x); │ │ │ │ │ -477 out[1] = y - out[0]*(1-x[0]) - out[2]*x[0]; │ │ │ │ │ -478 │ │ │ │ │ -479 x[0] = 0.0; x[1] = 0.5; y = f(x); │ │ │ │ │ -480 out[3] = y - out[0]*(1-x[1]) - out[5]*x[1]; │ │ │ │ │ +441 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ +442 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +443 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _B_a_s_e; │ │ │ │ │ +444 │ │ │ │ │ +445 public: │ │ │ │ │ +_4_4_6 static const unsigned int _d_i_m_e_n_s_i_o_n = _B_a_s_e_:_:_d_i_m_D_o_m_a_i_n; │ │ │ │ │ +_4_4_7 static const unsigned int _d_i_m_R_a_n_g_e = 1; │ │ │ │ │ +448 │ │ │ │ │ +_4_4_9 typedef typename _B_a_s_e_:_:_F_i_e_l_d _F_i_e_l_d; │ │ │ │ │ +450 │ │ │ │ │ +_4_5_1 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +452 │ │ │ │ │ +_4_5_3 typedef Dune::FieldVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +454 │ │ │ │ │ +_4_5_5 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_g_e_o_m_e_t_r_y_I_d_> _S_i_z_e; │ │ │ │ │ +456 │ │ │ │ │ +_4_5_7 _M_o_n_o_m_i_a_l_B_a_s_i_s (unsigned int _o_r_d_e_r) │ │ │ │ │ +458 : _B_a_s_e(), │ │ │ │ │ +459 order_(_o_r_d_e_r), │ │ │ │ │ +460 size_(_S_i_z_e::instance()) │ │ │ │ │ +461 { │ │ │ │ │ +462 assert(_o_r_d_e_r<=1024); // avoid wrapping of unsigned int (0-1) order=1024 is │ │ │ │ │ +quite hight...) │ │ │ │ │ +463 } │ │ │ │ │ +464 │ │ │ │ │ +_4_6_5 const unsigned int *_s_i_z_e_s ( unsigned int _o_r_d_e_r ) const │ │ │ │ │ +466 { │ │ │ │ │ +467 size_._c_o_m_p_u_t_e_S_i_z_e_s( _o_r_d_e_r ); │ │ │ │ │ +468 return size_._n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ +469 } │ │ │ │ │ +470 │ │ │ │ │ +_4_7_1 const unsigned int *_s_i_z_e_s () const │ │ │ │ │ +472 { │ │ │ │ │ +473 return _s_i_z_e_s( order_ ); │ │ │ │ │ +474 } │ │ │ │ │ +475 │ │ │ │ │ +_4_7_6 unsigned int _s_i_z_e () const │ │ │ │ │ +477 { │ │ │ │ │ +478 size_._c_o_m_p_u_t_e_S_i_z_e_s( order_ ); │ │ │ │ │ +479 return size_( order_ ); │ │ │ │ │ +480 } │ │ │ │ │ 481 │ │ │ │ │ -482 x[0] = 0.5; x[1] = 0.5; y = f(x); │ │ │ │ │ -483 out[4] = y - out[2]*x[0] - out[5]*x[1]; │ │ │ │ │ -484 │ │ │ │ │ -485 // element bubble │ │ │ │ │ -486 x[0] = 1.0/3; x[1] = 1.0/3; y = f(x); │ │ │ │ │ +_4_8_2 unsigned int _d_e_r_i_v_S_i_z_e ( const unsigned int deriv ) const │ │ │ │ │ +483 { │ │ │ │ │ +484 _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(_d_i_m_e_n_s_i_o_n).toId() >::instance │ │ │ │ │ +()._c_o_m_p_u_t_e_S_i_z_e_s( deriv ); │ │ │ │ │ +485 return _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(_d_i_m_e_n_s_i_o_n).toId() >:: │ │ │ │ │ +instance() ( deriv ); │ │ │ │ │ +486 } │ │ │ │ │ 487 │ │ │ │ │ -489 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_d_o_u_b_l_e_,_d_o_u_b_l_e_,_2_> │ │ │ │ │ -shapeFunctions; │ │ │ │ │ -490 std::vector sfValues; │ │ │ │ │ -491 shapeFunctions.evaluateFunction(x, sfValues); │ │ │ │ │ +_4_8_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ +489 { │ │ │ │ │ +490 return order_ ; │ │ │ │ │ +491 } │ │ │ │ │ 492 │ │ │ │ │ -493 out[6] = y; │ │ │ │ │ -494 for (int i=0; i<6; i++) │ │ │ │ │ -495 out[6] -= out[i]*sfValues[i]; │ │ │ │ │ -496 │ │ │ │ │ -497 } │ │ │ │ │ -498 │ │ │ │ │ -499 }; │ │ │ │ │ -500 │ │ │ │ │ -501 │ │ │ │ │ -502} │ │ │ │ │ -503#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_4_9_3 unsigned int _t_o_p_o_l_o_g_y_I_d ( ) const │ │ │ │ │ +494 { │ │ │ │ │ +495 return geometry.id(); │ │ │ │ │ +496 } │ │ │ │ │ +497 │ │ │ │ │ +_4_9_8 void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +499 _F_i_e_l_d *const values ) const │ │ │ │ │ +500 { │ │ │ │ │ +501 Base::evaluate( deriv, order_, x, _d_e_r_i_v_S_i_z_e( deriv ), _s_i_z_e_s( order_ ), │ │ │ │ │ +values ); │ │ │ │ │ +502 } │ │ │ │ │ +503 │ │ │ │ │ +504 template │ │ │ │ │ +_5_0_5 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +506 _F_i_e_l_d *const values ) const │ │ │ │ │ +507 { │ │ │ │ │ +508 _e_v_a_l_u_a_t_e( deriv, x, values ); │ │ │ │ │ +509 } │ │ │ │ │ +510 │ │ │ │ │ +511 template │ │ │ │ │ +_5_1_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +513 Vector &values ) const │ │ │ │ │ +514 { │ │ │ │ │ +515 evaluate(x,&(values[0])); │ │ │ │ │ +516 } │ │ │ │ │ +517 template │ │ │ │ │ +_5_1_8 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +519 _D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> *values ) const │ │ │ │ │ +520 { │ │ │ │ │ +521 evaluate(x,&(values->block())); │ │ │ │ │ +522 } │ │ │ │ │ +523 template< unsigned int deriv > │ │ │ │ │ +_5_2_4 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +525 FieldVector<_F_i_e_l_d,_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_>_:_:_s_i_z_e> *values ) const │ │ │ │ │ +526 { │ │ │ │ │ +527 _e_v_a_l_u_a_t_e(0,x,&(values[0][0])); │ │ │ │ │ +528 } │ │ │ │ │ +529 │ │ │ │ │ +530 template │ │ │ │ │ +_5_3_1 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +532 Vector &values ) const │ │ │ │ │ +533 { │ │ │ │ │ +534 evaluate<0>(x,&(values[0])); │ │ │ │ │ +535 } │ │ │ │ │ +536 │ │ │ │ │ +537 template< class DVector, class RVector > │ │ │ │ │ +_5_3_8 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ +539 { │ │ │ │ │ +540 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +541 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +542 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +543 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +544 evaluate<0>( bx, values ); │ │ │ │ │ +545 } │ │ │ │ │ +546 │ │ │ │ │ +_5_4_7 void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const │ │ │ │ │ +548 { │ │ │ │ │ +549 Base::integrate( order_, _s_i_z_e_s( order_ ), values ); │ │ │ │ │ +550 } │ │ │ │ │ +551 template │ │ │ │ │ +_5_5_2 void _i_n_t_e_g_r_a_t_e ( Vector &values ) const │ │ │ │ │ +553 { │ │ │ │ │ +554 _i_n_t_e_g_r_a_t_e( &(values[ 0 ]) ); │ │ │ │ │ +555 } │ │ │ │ │ +556 private: │ │ │ │ │ +557 _M_o_n_o_m_i_a_l_B_a_s_i_s(const This&); │ │ │ │ │ +558 This& operator=(const This&); │ │ │ │ │ +559 unsigned int order_; │ │ │ │ │ +560 _S_i_z_e &size_; │ │ │ │ │ +561 }; │ │ │ │ │ +562 │ │ │ │ │ +563 │ │ │ │ │ +564 │ │ │ │ │ +565 // StdMonomialBasis │ │ │ │ │ +566 // ---------------- │ │ │ │ │ +567 │ │ │ │ │ +568 template< int dim,class F > │ │ │ │ │ +_5_6_9 class _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +570 : public _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::simplex(dim).toId() , F > │ │ │ │ │ +571 { │ │ │ │ │ +572 typedef _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +573 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::simplex(dim).toId(), F > _B_a_s_e; │ │ │ │ │ +574 │ │ │ │ │ +575 public: │ │ │ │ │ +_5_7_6 static constexpr GeometryType _g_e_o_m_e_t_r_y = GeometryTypes::simplex(dim); │ │ │ │ │ +_5_7_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +578 │ │ │ │ │ +_5_7_9 _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s ( unsigned int _o_r_d_e_r ) │ │ │ │ │ +580 : _B_a_s_e( _o_r_d_e_r ) │ │ │ │ │ +581 {} │ │ │ │ │ +582 }; │ │ │ │ │ +583 │ │ │ │ │ +584 │ │ │ │ │ +585 │ │ │ │ │ +586 // StandardBiMonomialBasis │ │ │ │ │ +587 // ----------------------- │ │ │ │ │ +588 │ │ │ │ │ +589 template< int dim, class F > │ │ │ │ │ +_5_9_0 class _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +591 : public _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::cube(dim).toId() , F > │ │ │ │ │ +592 { │ │ │ │ │ +593 typedef _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +594 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::cube(dim).toId() , F > _B_a_s_e; │ │ │ │ │ +595 │ │ │ │ │ +596 public: │ │ │ │ │ +_5_9_7 static constexpr GeometryType _g_e_o_m_e_t_r_y = GeometryTypes::cube(dim); │ │ │ │ │ +_5_9_8 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +599 │ │ │ │ │ +_6_0_0 _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s ( unsigned int _o_r_d_e_r ) │ │ │ │ │ +601 : _B_a_s_e( _o_r_d_e_r ) │ │ │ │ │ +602 {} │ │ │ │ │ +603 }; │ │ │ │ │ +604 │ │ │ │ │ +605 // ----------------------------------------------------------- │ │ │ │ │ +606 // ----------------------------------------------------------- │ │ │ │ │ +607 // VirtualMonomialBasis │ │ │ │ │ +608 // ------------------- │ │ │ │ │ +609 │ │ │ │ │ +610 template< int dim, class F > │ │ │ │ │ +_6_1_1 class _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +612 { │ │ │ │ │ +613 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +614 │ │ │ │ │ +615 public: │ │ │ │ │ +_6_1_6 typedef F _F_i_e_l_d; │ │ │ │ │ +_6_1_7 typedef F _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ +_6_1_8 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_6_1_9 static const unsigned int _d_i_m_R_a_n_g_e = 1; │ │ │ │ │ +620 │ │ │ │ │ +_6_2_1 typedef FieldVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_6_2_2 typedef FieldVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ +623 │ │ │ │ │ +_6_2_4 explicit _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s(const GeometryType& gt, │ │ │ │ │ +625 unsigned int _o_r_d_e_r) │ │ │ │ │ +626 : _o_r_d_e_r__(_o_r_d_e_r), _g_e_o_m_e_t_r_y__(gt) {} │ │ │ │ │ +627 │ │ │ │ │ +_6_2_8 virtual _~_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s() {} │ │ │ │ │ +629 │ │ │ │ │ +_6_3_0 virtual const unsigned int *_s_i_z_e_s ( ) const = 0; │ │ │ │ │ +631 │ │ │ │ │ +_6_3_2 unsigned int _s_i_z_e ( ) const │ │ │ │ │ +633 { │ │ │ │ │ +634 return _s_i_z_e_s( )[ _o_r_d_e_r__ ]; │ │ │ │ │ +635 } │ │ │ │ │ +636 │ │ │ │ │ +_6_3_7 unsigned int _o_r_d_e_r () const │ │ │ │ │ +638 { │ │ │ │ │ +639 return _o_r_d_e_r__; │ │ │ │ │ +640 } │ │ │ │ │ +641 │ │ │ │ │ +_6_4_2 GeometryType _t_y_p_e() const │ │ │ │ │ +643 { │ │ │ │ │ +644 return _g_e_o_m_e_t_r_y__; │ │ │ │ │ +645 } │ │ │ │ │ +646 │ │ │ │ │ +_6_4_7 virtual void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +648 _F_i_e_l_d *const values ) const = 0; │ │ │ │ │ +649 template < unsigned int deriv > │ │ │ │ │ +_6_5_0 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +651 _F_i_e_l_d *const values ) const │ │ │ │ │ +652 { │ │ │ │ │ +653 _e_v_a_l_u_a_t_e( deriv, x, values ); │ │ │ │ │ +654 } │ │ │ │ │ +655 template < unsigned int deriv, int size > │ │ │ │ │ +_6_5_6 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +657 Dune::FieldVector *const values ) const │ │ │ │ │ +658 { │ │ │ │ │ +659 _e_v_a_l_u_a_t_e( deriv, x, &(values[0][0]) ); │ │ │ │ │ +660 } │ │ │ │ │ +661 template │ │ │ │ │ +_6_6_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +663 _D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> *values ) const │ │ │ │ │ +664 { │ │ │ │ │ +665 evaluate(x,&(values->block())); │ │ │ │ │ +666 } │ │ │ │ │ +667 template │ │ │ │ │ +_6_6_8 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +669 Vector &values ) const │ │ │ │ │ +670 { │ │ │ │ │ +671 evaluate( x, &(values[ 0 ]) ); │ │ │ │ │ +672 } │ │ │ │ │ +673 template< class Vector > │ │ │ │ │ +_6_7_4 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +675 Vector &values ) const │ │ │ │ │ +676 { │ │ │ │ │ +677 evaluate<0>(x,values); │ │ │ │ │ +678 } │ │ │ │ │ +679 template< class DVector, class RVector > │ │ │ │ │ +_6_8_0 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ +681 { │ │ │ │ │ +682 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +683 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +684 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +685 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +686 evaluate<0>( bx, values ); │ │ │ │ │ +687 } │ │ │ │ │ +688 template< unsigned int deriv, class DVector, class RVector > │ │ │ │ │ +_6_8_9 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ +690 { │ │ │ │ │ +691 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ +692 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ +693 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ +694 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ +695 evaluate( bx, values ); │ │ │ │ │ +696 } │ │ │ │ │ +697 │ │ │ │ │ +_6_9_8 virtual void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const = 0; │ │ │ │ │ +699 template │ │ │ │ │ +_7_0_0 void _i_n_t_e_g_r_a_t_e ( Vector &values ) const │ │ │ │ │ +701 { │ │ │ │ │ +702 _i_n_t_e_g_r_a_t_e( &(values[ 0 ]) ); │ │ │ │ │ +703 } │ │ │ │ │ +704 protected: │ │ │ │ │ +_7_0_5 unsigned int _o_r_d_e_r__; │ │ │ │ │ +_7_0_6 GeometryType _g_e_o_m_e_t_r_y__; │ │ │ │ │ +707 }; │ │ │ │ │ +708 │ │ │ │ │ +709 template< GeometryType::Id geometryId, class F > │ │ │ │ │ +_7_1_0 class _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ +711 : public _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< static_cast(geometryId).dim(), │ │ │ │ │ +F > │ │ │ │ │ +712 { │ │ │ │ │ +713 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ +714 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< geometry.dim(), F > _B_a_s_e; │ │ │ │ │ +715 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +716 │ │ │ │ │ +717 public: │ │ │ │ │ +_7_1_8 typedef typename _B_a_s_e_:_:_F_i_e_l_d _F_i_e_l_d; │ │ │ │ │ +_7_1_9 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +720 │ │ │ │ │ +_7_2_1 _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l(unsigned int _o_r_d_e_r) │ │ │ │ │ +722 : _B_a_s_e(geometry,_o_r_d_e_r), basis_(_o_r_d_e_r) │ │ │ │ │ +723 {} │ │ │ │ │ +724 │ │ │ │ │ +_7_2_5 const unsigned int *_s_i_z_e_s ( ) const │ │ │ │ │ +726 { │ │ │ │ │ +727 return basis_._s_i_z_e_s(order_); │ │ │ │ │ +728 } │ │ │ │ │ +729 │ │ │ │ │ +_7_3_0 void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ +731 _F_i_e_l_d *const values ) const │ │ │ │ │ +732 { │ │ │ │ │ +733 basis_._e_v_a_l_u_a_t_e(deriv,x,values); │ │ │ │ │ +734 } │ │ │ │ │ +735 │ │ │ │ │ +_7_3_6 void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const │ │ │ │ │ +737 { │ │ │ │ │ +738 basis_._i_n_t_e_g_r_a_t_e(values); │ │ │ │ │ +739 } │ │ │ │ │ +740 │ │ │ │ │ +741 private: │ │ │ │ │ +742 _M_o_n_o_m_i_a_l_B_a_s_i_s_<_g_e_o_m_e_t_r_y_I_d_,_F_i_e_l_d_> basis_; │ │ │ │ │ +743 using _B_a_s_e_:_:_o_r_d_e_r__; │ │ │ │ │ +744 }; │ │ │ │ │ +745 │ │ │ │ │ +746 // MonomialBasisFactory │ │ │ │ │ +747 // -------------------- │ │ │ │ │ +748 │ │ │ │ │ +749 template< int dim, class F > │ │ │ │ │ +_7_5_0 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +751 { │ │ │ │ │ +_7_5_2 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_7_5_3 typedef F _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ +754 │ │ │ │ │ +_7_5_5 typedef unsigned int _K_e_y; │ │ │ │ │ +_7_5_6 typedef const _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> _O_b_j_e_c_t; │ │ │ │ │ +757 │ │ │ │ │ +758 template < int dd, class FF > │ │ │ │ │ +_7_5_9 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +760 { │ │ │ │ │ +_7_6_1 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ +762 }; │ │ │ │ │ +763 │ │ │ │ │ +764 template< GeometryType::Id geometryId > │ │ │ │ │ +_7_6_5 static _O_b_j_e_c_t* _c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ +766 { │ │ │ │ │ +767 return new _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _S_t_o_r_a_g_e_F_i_e_l_d_ _>( order ); │ │ │ │ │ +768 } │ │ │ │ │ +_7_6_9 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +770 }; │ │ │ │ │ +771 │ │ │ │ │ +772 │ │ │ │ │ +773 │ │ │ │ │ +774 // MonomialBasisProvider │ │ │ │ │ +775 // --------------------- │ │ │ │ │ +776 │ │ │ │ │ +777 template< int dim, class SF > │ │ │ │ │ +_7_7_8 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ +779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > > │ │ │ │ │ +780 { │ │ │ │ │ +_7_8_1 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +_7_8_2 typedef SF _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ +783 template < int dd, class FF > │ │ │ │ │ +_7_8_4 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +785 { │ │ │ │ │ +_7_8_6 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ +787 }; │ │ │ │ │ +788 }; │ │ │ │ │ +789 │ │ │ │ │ +790} │ │ │ │ │ +791 │ │ │ │ │ +792#endif │ │ │ │ │ +_t_e_n_s_o_r_._h_h │ │ │ │ │ +_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_:_: │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 1 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (2, in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 1 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__ │ │ │ │ │ +unsigned int * numBaseFunctions_ │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:100 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_c_o_m_p_u_t_e_S_i_z_e_s │ │ │ │ │ +void computeSizes(unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_s_i_z_e_s__ │ │ │ │ │ +unsigned int * sizes_ │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ +MonomialBasisSize() │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_~_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ +~MonomialBasisSize() │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +unsigned int operator()(const unsigned int order) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_m_a_x_O_r_d_e_r__ │ │ │ │ │ +unsigned int maxOrder_ │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_m_a_x_O_r_d_e_r │ │ │ │ │ +unsigned int maxOrder() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:121 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_i_n_s_t_a_n_c_e │ │ │ │ │ +static This & instance() │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_o_r_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:446 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +Dune::FieldVector< Field, dimRange > RangeVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:453 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ +const unsigned int * sizes() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:471 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ │ +unsigned int topologyId() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:493 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +void integrate(Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:552 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_F_i_e_l_d │ │ │ │ │ +Base::Field Field │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:449 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +void integrate(Field *const values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:547 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:447 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:451 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:505 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:531 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, │ │ │ │ │ +dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:524 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ +layout > *values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:518 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:538 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_i_z_e │ │ │ │ │ +MonomialBasisSize< geometryId > Size │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:455 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:512 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +MonomialBasis(unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:457 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_e_r_i_v_S_i_z_e │ │ │ │ │ +unsigned int derivSize(const unsigned int deriv) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:482 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ +const unsigned int * sizes(unsigned int order) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:465 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (3 in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:229 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:153 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:269 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:275 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_o_r_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:488 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:177 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_S_i_z_e │ │ │ │ │ +MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_c_o_p_y │ │ │ │ │ +static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int │ │ │ │ │ +numBaseFunctions, const F &z) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_M_y_S_i_z_e │ │ │ │ │ +MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:234 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +FieldVector< Field, dimDomain > DomainVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:242 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:238 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ +static const unsigned int dimDomain │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:240 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:571 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:576 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +StandardMonomialBasis(unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:579 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:577 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:592 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:598 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:597 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +StandardBiMonomialBasis(unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:600 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y__ │ │ │ │ │ +GeometryType geometry_ │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:706 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +FieldVector< Field, dimension > DomainVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:621 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r__ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:705 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:674 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:650 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:616 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:668 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:680 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions (4 in this case) │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:379 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_: │ │ │ │ │ -_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:296 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:318 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:266 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ -problems. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:439 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const Dune::LocalKey & localKey(size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:445 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_: │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -HierarchicalSimplexP2WithElementBubbleLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:423 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:461 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:637 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const unsigned int dimRange │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:619 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ +F StorageField │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:617 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:618 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:632 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ +FieldVector< Field, dimRange > RangeVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:622 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_~_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +virtual ~VirtualMonomialBasis() │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:628 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field │ │ │ │ │ +*const values) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +virtual void integrate(Field *const values) const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const │ │ │ │ │ +values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:656 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:689 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:642 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ +layout > *values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:662 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +VirtualMonomialBasis(const GeometryType >, unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:624 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ +virtual const unsigned int * sizes() const =0 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +void integrate(Vector &values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:700 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:712 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +void integrate(Field *const values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:736 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_s_i_z_e_s │ │ │ │ │ +const unsigned int * sizes() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:725 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Base::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:719 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_F_i_e_l_d │ │ │ │ │ +Base::Field Field │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:718 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:730 │ │ │ │ │ +_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ +VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:721 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:751 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:769 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const VirtualMonomialBasis< dimension, F > Object │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:756 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:765 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ +F StorageField │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:753 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:752 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +unsigned int Key │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:755 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:760 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ +MonomialBasisFactory< dd, FF > Type │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:761 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:781 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ +SF StorageField │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:782 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:785 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:786 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: lfematrix.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,46 @@ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hierarchicalprismp2localinterpolation.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
lfematrix.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "field.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalPrismP2LocalInterpolation< LB >
class  Dune::LFEMatrix< F >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<class Field >
std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > &mat)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +lfematrix.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include "_f_i_e_l_d_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _L_F_E_M_a_t_r_i_x< Field > │ │ │ │ │ + &mat) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00134_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: lfematrix.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,108 +70,230 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2localinterpolation.hh
│ │ │ │ +
lfematrix.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ - │ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11namespace Dune
│ │ │ │ -
12{
│ │ │ │ -
16 template<class LB>
│ │ │ │ +
11#include "field.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
16 template< class F >
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
18 {
│ │ │ │ -
19 public:
│ │ │ │ -
20
│ │ │ │ -
21 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
22 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
23 {
│ │ │ │ -
24 typename LB::Traits::DomainType x;
│ │ │ │ -
25 typename LB::Traits::RangeType y;
│ │ │ │ -
26 out.resize(18);
│ │ │ │ -
27
│ │ │ │ -
28 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ -
29
│ │ │ │ -
30 //First the vertex dofs
│ │ │ │ -
31 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x);
│ │ │ │ -
32 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[1] = f(x);
│ │ │ │ -
33 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[2] = f(x);
│ │ │ │ -
34 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[3] = f(x);
│ │ │ │ -
35 x[0] = 1.0; x[1] = 0.0; x[2] = 1.0; out[4] = f(x);
│ │ │ │ -
36 x[0] = 0.0; x[1] = 1.0; x[2] = 1.0; out[5] = f(x);
│ │ │ │ -
37
│ │ │ │ -
38
│ │ │ │ -
39 // Then: the 9 edge dofs and the 3 face dofs
│ │ │ │ -
40 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
41 out[6] = y - 0.5*(out[0] + out[3]);
│ │ │ │ -
42
│ │ │ │ -
43 x[0] = 1.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
44 out[7] = y - 0.5*(out[1] + out[4]);
│ │ │ │ -
45
│ │ │ │ -
46 x[0] = 0.0; x[1] = 1.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
47 out[8] = y - 0.5*(out[2] + out[5]);
│ │ │ │ -
48
│ │ │ │ -
49 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x);
│ │ │ │ -
50 out[9] = y - 0.5*(out[0] + out[1]);
│ │ │ │ -
51
│ │ │ │ -
52 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ -
53 out[10] = y - 0.5*(out[2] + out[0]);
│ │ │ │ -
54
│ │ │ │ -
55 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ -
56 out[11] = y - 0.5*(out[2] + out[1]);
│ │ │ │ +
19 typedef LFEMatrix< F > This;
│ │ │ │ +
20 typedef std::vector< F > Row;
│ │ │ │ +
21 typedef std::vector<Row> RealMatrix;
│ │ │ │ +
22
│ │ │ │ +
23 public:
│ │ │ │ +
24 typedef F Field;
│ │ │ │ +
25
│ │ │ │ +
│ │ │ │ +
26 operator const RealMatrix & () const
│ │ │ │ +
27 {
│ │ │ │ +
28 return matrix_;
│ │ │ │ +
29 }
│ │ │ │ +
│ │ │ │ +
30
│ │ │ │ +
│ │ │ │ +
31 operator RealMatrix & ()
│ │ │ │ +
32 {
│ │ │ │ +
33 return matrix_;
│ │ │ │ +
34 }
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
36 template <class Vector>
│ │ │ │ +
│ │ │ │ +
37 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
38 {
│ │ │ │ +
39 assert(row<rows());
│ │ │ │ +
40 for (int i=0; i<cols(); ++i)
│ │ │ │ +
41 field_cast(matrix_[row][i], vec[i]);
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
44 const Field &operator() ( const unsigned int row, const unsigned int col ) const
│ │ │ │ +
45 {
│ │ │ │ +
46 assert(row<rows());
│ │ │ │ +
47 assert(col<cols());
│ │ │ │ +
48 return matrix_[ row ][ col ];
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 Field &operator() ( const unsigned int row, const unsigned int col )
│ │ │ │ +
52 {
│ │ │ │ +
53 assert(row<rows());
│ │ │ │ +
54 assert(col<cols());
│ │ │ │ +
55 return matrix_[ row ][ col ];
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │
57
│ │ │ │ -
58 x[0] = 0.5; x[1] = 0.0; x[2] = 1.0; y = f(x);
│ │ │ │ -
59 out[12] = y - 0.5*(out[3] + out[4]);
│ │ │ │ -
60
│ │ │ │ -
61 x[0] = 0.0; x[1] = 0.5; x[2] = 1.0; y = f(x);
│ │ │ │ -
62 out[13] = y - 0.5*(out[3] + out[5]);
│ │ │ │ -
63
│ │ │ │ -
64 x[0] = 0.5; x[1] = 0.5; x[2] = 1.0; y = f(x);
│ │ │ │ -
65 out[14] = y - 0.5*(out[4] + out[5]);
│ │ │ │ -
66
│ │ │ │ +
│ │ │ │ +
58 unsigned int rows () const
│ │ │ │ +
59 {
│ │ │ │ +
60 return rows_;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 unsigned int cols () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return cols_;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │
67
│ │ │ │ -
68 //faces
│ │ │ │ -
69 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ -
70 out[15] = y - 0.25*(out[4] + out[1] + out[0] + out[3] );
│ │ │ │ -
71
│ │ │ │ -
72 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ -
73 out[16] = y - 0.25*(out[2] + out[0] + out[3] + out[5] );
│ │ │ │ -
74
│ │ │ │ -
75 x[0] = 0.5; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ -
76 out[17] = y - 0.25*(out[2] + out[1] + out[4] + out[5] );
│ │ │ │ -
77
│ │ │ │ +
│ │ │ │ +
68 const Field *rowPtr ( const unsigned int row ) const
│ │ │ │ +
69 {
│ │ │ │ +
70 assert(row<rows());
│ │ │ │ +
71 return &(matrix_[row][0]);
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
74 Field *rowPtr ( const unsigned int row )
│ │ │ │ +
75 {
│ │ │ │ +
76 assert(row<rows());
│ │ │ │ +
77 return &(matrix_[row][0]);
│ │ │ │
78 }
│ │ │ │
│ │ │ │ -
79 };
│ │ │ │ +
79
│ │ │ │ +
│ │ │ │ +
80 void resize ( const unsigned int rows, const unsigned int cols )
│ │ │ │ +
81 {
│ │ │ │ +
82 matrix_.resize(rows);
│ │ │ │ +
83 for (unsigned int i=0; i<rows; ++i)
│ │ │ │ +
84 matrix_[i].resize(cols);
│ │ │ │ +
85 rows_ = rows;
│ │ │ │ +
86 cols_ = cols;
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88
│ │ │ │ +
│ │ │ │ +
89 bool invert ()
│ │ │ │ +
90 {
│ │ │ │ +
91 using std::abs;
│ │ │ │ +
92 assert( rows() == cols() );
│ │ │ │ +
93 std::vector<unsigned int> p(rows());
│ │ │ │ +
94 for (unsigned int j=0; j<rows(); ++j)
│ │ │ │ +
95 p[j] = j;
│ │ │ │ +
96 for (unsigned int j=0; j<rows(); ++j)
│ │ │ │ +
97 {
│ │ │ │ +
98 // pivot search
│ │ │ │ +
99 unsigned int r = j;
│ │ │ │ +
100 Field max = abs( (*this)(j,j) );
│ │ │ │ +
101 for (unsigned int i=j+1; i<rows(); ++i)
│ │ │ │ +
102 {
│ │ │ │ +
103 if ( abs( (*this)(i,j) ) > max )
│ │ │ │ +
104 {
│ │ │ │ +
105 max = abs( (*this)(i,j) );
│ │ │ │ +
106 r = i;
│ │ │ │ +
107 }
│ │ │ │ +
108 }
│ │ │ │ +
109 if (max == Zero<Field>())
│ │ │ │ +
110 return false;
│ │ │ │ +
111 // row swap
│ │ │ │ +
112 if (r > j)
│ │ │ │ +
113 {
│ │ │ │ +
114 for (unsigned int k=0; k<cols(); ++k)
│ │ │ │ +
115 std::swap( (*this)(j,k), (*this)(r,k) );
│ │ │ │ +
116 std::swap( p[j], p[r] );
│ │ │ │ +
117 }
│ │ │ │ +
118 // transformation
│ │ │ │ +
119 Field hr = Unity<Field>()/(*this)(j,j);
│ │ │ │ +
120 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ +
121 (*this)(i,j) *= hr;
│ │ │ │ +
122 (*this)(j,j) = hr;
│ │ │ │ +
123 for (unsigned int k=0; k<cols(); ++k)
│ │ │ │ +
124 {
│ │ │ │ +
125 if (k==j) continue;
│ │ │ │ +
126 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ +
127 {
│ │ │ │ +
128 if (i==j) continue;
│ │ │ │ +
129 (*this)(i,k) -= (*this)(i,j)*(*this)(j,k);
│ │ │ │ +
130 }
│ │ │ │ +
131 (*this)(j,k) *= -hr;
│ │ │ │ +
132 }
│ │ │ │ +
133 }
│ │ │ │ +
134 // column exchange
│ │ │ │ +
135 Row hv(rows());
│ │ │ │ +
136 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ +
137 {
│ │ │ │ +
138 for (unsigned int k=0; k<rows(); ++k)
│ │ │ │ +
139 hv[ p[k] ] = (*this)(i,k);
│ │ │ │ +
140 for (unsigned int k=0; k<rows(); ++k)
│ │ │ │ +
141 (*this)(i,k) = hv[k];
│ │ │ │ +
142 }
│ │ │ │ +
143 return true;
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
146 private:
│ │ │ │ +
147 RealMatrix matrix_;
│ │ │ │ +
148 unsigned int cols_,rows_;
│ │ │ │ +
149 };
│ │ │ │ +
│ │ │ │ +
150
│ │ │ │ +
151 template< class Field >
│ │ │ │ +
│ │ │ │ +
152 inline std::ostream &operator<<(std::ostream &out, const LFEMatrix<Field> &mat)
│ │ │ │ +
153 {
│ │ │ │ +
154 for (unsigned int r=0; r<mat.rows(); ++r)
│ │ │ │ +
155 {
│ │ │ │ +
156 out << field_cast<double>(mat(r,0));
│ │ │ │ +
157 for (unsigned int c=1; c<mat.cols(); ++c)
│ │ │ │ +
158 {
│ │ │ │ +
159 out << " , " << field_cast<double>(mat(r,c));
│ │ │ │ +
160 }
│ │ │ │ +
161 out << std::endl;
│ │ │ │ +
162 }
│ │ │ │ +
163 return out;
│ │ │ │ +
164 }
│ │ │ │
│ │ │ │ -
80}
│ │ │ │ -
81
│ │ │ │ -
82#endif
│ │ │ │ +
165}
│ │ │ │ +
166
│ │ │ │ +
167#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition hierarchicalprismp2localinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalprismp2localinterpolation.hh:22
│ │ │ │ - │ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ +
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
Definition lfematrix.hh:18
│ │ │ │ +
Field * rowPtr(const unsigned int row)
Definition lfematrix.hh:74
│ │ │ │ +
unsigned int cols() const
Definition lfematrix.hh:63
│ │ │ │ +
const Field * rowPtr(const unsigned int row) const
Definition lfematrix.hh:68
│ │ │ │ +
void resize(const unsigned int rows, const unsigned int cols)
Definition lfematrix.hh:80
│ │ │ │ +
const Field & operator()(const unsigned int row, const unsigned int col) const
Definition lfematrix.hh:44
│ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition lfematrix.hh:37
│ │ │ │ +
unsigned int rows() const
Definition lfematrix.hh:58
│ │ │ │ +
bool invert()
Definition lfematrix.hh:89
│ │ │ │ +
F Field
Definition lfematrix.hh:24
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,100 +1,226 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ -hierarchicalprismp2localinterpolation.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +lfematrix.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11namespace _D_u_n_e │ │ │ │ │ -12{ │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +11#include "_f_i_e_l_d_._h_h" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +16 template< class F > │ │ │ │ │ +_1_7 class _L_F_E_M_a_t_r_i_x │ │ │ │ │ 18 { │ │ │ │ │ -19 public: │ │ │ │ │ -20 │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -23 { │ │ │ │ │ -24 typename LB::Traits::DomainType x; │ │ │ │ │ -25 typename LB::Traits::RangeType y; │ │ │ │ │ -26 out.resize(18); │ │ │ │ │ -27 │ │ │ │ │ -28 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -29 │ │ │ │ │ -30 //First the vertex dofs │ │ │ │ │ -31 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x); │ │ │ │ │ -32 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[1] = f(x); │ │ │ │ │ -33 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[2] = f(x); │ │ │ │ │ -34 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[3] = f(x); │ │ │ │ │ -35 x[0] = 1.0; x[1] = 0.0; x[2] = 1.0; out[4] = f(x); │ │ │ │ │ -36 x[0] = 0.0; x[1] = 1.0; x[2] = 1.0; out[5] = f(x); │ │ │ │ │ -37 │ │ │ │ │ -38 │ │ │ │ │ -39 // Then: the 9 edge dofs and the 3 face dofs │ │ │ │ │ -40 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -41 out[6] = y - 0.5*(out[0] + out[3]); │ │ │ │ │ -42 │ │ │ │ │ -43 x[0] = 1.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -44 out[7] = y - 0.5*(out[1] + out[4]); │ │ │ │ │ -45 │ │ │ │ │ -46 x[0] = 0.0; x[1] = 1.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -47 out[8] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ -48 │ │ │ │ │ -49 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x); │ │ │ │ │ -50 out[9] = y - 0.5*(out[0] + out[1]); │ │ │ │ │ -51 │ │ │ │ │ -52 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ -53 out[10] = y - 0.5*(out[2] + out[0]); │ │ │ │ │ -54 │ │ │ │ │ -55 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ -56 out[11] = y - 0.5*(out[2] + out[1]); │ │ │ │ │ +19 typedef _L_F_E_M_a_t_r_i_x_<_ _F_ _> _T_h_i_s; │ │ │ │ │ +20 typedef std::vector< F > Row; │ │ │ │ │ +21 typedef std::vector RealMatrix; │ │ │ │ │ +22 │ │ │ │ │ +23 public: │ │ │ │ │ +_2_4 typedef F _F_i_e_l_d; │ │ │ │ │ +25 │ │ │ │ │ +_2_6 operator const RealMatrix & () const │ │ │ │ │ +27 { │ │ │ │ │ +28 return matrix_; │ │ │ │ │ +29 } │ │ │ │ │ +30 │ │ │ │ │ +_3_1 operator RealMatrix & () │ │ │ │ │ +32 { │ │ │ │ │ +33 return matrix_; │ │ │ │ │ +34 } │ │ │ │ │ +35 │ │ │ │ │ +36 template │ │ │ │ │ +_3_7 void _r_o_w( const unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ +38 { │ │ │ │ │ +39 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ +40 for (int i=0; i<_c_o_l_s(); ++i) │ │ │ │ │ +41 _f_i_e_l_d___c_a_s_t(matrix_[_r_o_w][i], vec[i]); │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_4 const _F_i_e_l_d &_o_p_e_r_a_t_o_r_(_)_ ( const unsigned int _r_o_w, const unsigned int col ) │ │ │ │ │ +const │ │ │ │ │ +45 { │ │ │ │ │ +46 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ +47 assert(col<_c_o_l_s()); │ │ │ │ │ +48 return matrix_[ _r_o_w ][ col ]; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_1 _F_i_e_l_d &_o_p_e_r_a_t_o_r_(_)_ ( const unsigned int _r_o_w, const unsigned int col ) │ │ │ │ │ +52 { │ │ │ │ │ +53 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ +54 assert(col<_c_o_l_s()); │ │ │ │ │ +55 return matrix_[ _r_o_w ][ col ]; │ │ │ │ │ +56 } │ │ │ │ │ 57 │ │ │ │ │ -58 x[0] = 0.5; x[1] = 0.0; x[2] = 1.0; y = f(x); │ │ │ │ │ -59 out[12] = y - 0.5*(out[3] + out[4]); │ │ │ │ │ -60 │ │ │ │ │ -61 x[0] = 0.0; x[1] = 0.5; x[2] = 1.0; y = f(x); │ │ │ │ │ -62 out[13] = y - 0.5*(out[3] + out[5]); │ │ │ │ │ -63 │ │ │ │ │ -64 x[0] = 0.5; x[1] = 0.5; x[2] = 1.0; y = f(x); │ │ │ │ │ -65 out[14] = y - 0.5*(out[4] + out[5]); │ │ │ │ │ -66 │ │ │ │ │ +_5_8 unsigned int _r_o_w_s () const │ │ │ │ │ +59 { │ │ │ │ │ +60 return rows_; │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +_6_3 unsigned int _c_o_l_s () const │ │ │ │ │ +64 { │ │ │ │ │ +65 return cols_; │ │ │ │ │ +66 } │ │ │ │ │ 67 │ │ │ │ │ -68 //faces │ │ │ │ │ -69 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ -70 out[15] = y - 0.25*(out[4] + out[1] + out[0] + out[3] ); │ │ │ │ │ -71 │ │ │ │ │ -72 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x); │ │ │ │ │ -73 out[16] = y - 0.25*(out[2] + out[0] + out[3] + out[5] ); │ │ │ │ │ -74 │ │ │ │ │ -75 x[0] = 0.5; x[1] = 0.5; x[2] = 0.5; y = f(x); │ │ │ │ │ -76 out[17] = y - 0.25*(out[2] + out[1] + out[4] + out[5] ); │ │ │ │ │ -77 │ │ │ │ │ +_6_8 const _F_i_e_l_d *_r_o_w_P_t_r ( const unsigned int _r_o_w ) const │ │ │ │ │ +69 { │ │ │ │ │ +70 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ +71 return &(matrix_[_r_o_w][0]); │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_7_4 _F_i_e_l_d *_r_o_w_P_t_r ( const unsigned int _r_o_w ) │ │ │ │ │ +75 { │ │ │ │ │ +76 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ +77 return &(matrix_[_r_o_w][0]); │ │ │ │ │ 78 } │ │ │ │ │ -79 }; │ │ │ │ │ -80} │ │ │ │ │ -81 │ │ │ │ │ -82#endif │ │ │ │ │ +79 │ │ │ │ │ +_8_0 void _r_e_s_i_z_e ( const unsigned int _r_o_w_s, const unsigned int _c_o_l_s ) │ │ │ │ │ +81 { │ │ │ │ │ +82 matrix_.resize(_r_o_w_s); │ │ │ │ │ +83 for (unsigned int i=0; i<_r_o_w_s; ++i) │ │ │ │ │ +84 matrix_[i]._r_e_s_i_z_e(_c_o_l_s); │ │ │ │ │ +85 rows_ = _r_o_w_s; │ │ │ │ │ +86 cols_ = _c_o_l_s; │ │ │ │ │ +87 } │ │ │ │ │ +88 │ │ │ │ │ +_8_9 bool _i_n_v_e_r_t () │ │ │ │ │ +90 { │ │ │ │ │ +91 using std::abs; │ │ │ │ │ +92 assert( _r_o_w_s() == _c_o_l_s() ); │ │ │ │ │ +93 std::vector p(_r_o_w_s()); │ │ │ │ │ +94 for (unsigned int j=0; j<_r_o_w_s(); ++j) │ │ │ │ │ +95 p[j] = j; │ │ │ │ │ +96 for (unsigned int j=0; j<_r_o_w_s(); ++j) │ │ │ │ │ +97 { │ │ │ │ │ +98 // pivot search │ │ │ │ │ +99 unsigned int r = j; │ │ │ │ │ +100 _F_i_e_l_d max = abs( (*this)(j,j) ); │ │ │ │ │ +101 for (unsigned int i=j+1; i<_r_o_w_s(); ++i) │ │ │ │ │ +102 { │ │ │ │ │ +103 if ( abs( (*this)(i,j) ) > max ) │ │ │ │ │ +104 { │ │ │ │ │ +105 max = abs( (*this)(i,j) ); │ │ │ │ │ +106 r = i; │ │ │ │ │ +107 } │ │ │ │ │ +108 } │ │ │ │ │ +109 if (max == _Z_e_r_o_<_F_i_e_l_d_>()) │ │ │ │ │ +110 return false; │ │ │ │ │ +111 // row swap │ │ │ │ │ +112 if (r > j) │ │ │ │ │ +113 { │ │ │ │ │ +114 for (unsigned int k=0; k<_c_o_l_s(); ++k) │ │ │ │ │ +115 std::swap( (*this)(j,k), (*this)(r,k) ); │ │ │ │ │ +116 std::swap( p[j], p[r] ); │ │ │ │ │ +117 } │ │ │ │ │ +118 // transformation │ │ │ │ │ +119 _F_i_e_l_d hr = _U_n_i_t_y_<_F_i_e_l_d_>()/(*this)(j,j); │ │ │ │ │ +120 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ +121 (*this)(i,j) *= hr; │ │ │ │ │ +122 (*this)(j,j) = hr; │ │ │ │ │ +123 for (unsigned int k=0; k<_c_o_l_s(); ++k) │ │ │ │ │ +124 { │ │ │ │ │ +125 if (k==j) continue; │ │ │ │ │ +126 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ +127 { │ │ │ │ │ +128 if (i==j) continue; │ │ │ │ │ +129 (*this)(i,k) -= (*this)(i,j)*(*this)(j,k); │ │ │ │ │ +130 } │ │ │ │ │ +131 (*this)(j,k) *= -hr; │ │ │ │ │ +132 } │ │ │ │ │ +133 } │ │ │ │ │ +134 // column exchange │ │ │ │ │ +135 Row hv(_r_o_w_s()); │ │ │ │ │ +136 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ +137 { │ │ │ │ │ +138 for (unsigned int k=0; k<_r_o_w_s(); ++k) │ │ │ │ │ +139 hv[ p[k] ] = (*this)(i,k); │ │ │ │ │ +140 for (unsigned int k=0; k<_r_o_w_s(); ++k) │ │ │ │ │ +141 (*this)(i,k) = hv[k]; │ │ │ │ │ +142 } │ │ │ │ │ +143 return true; │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146 private: │ │ │ │ │ +147 RealMatrix matrix_; │ │ │ │ │ +148 unsigned int cols_,rows_; │ │ │ │ │ +149 }; │ │ │ │ │ +150 │ │ │ │ │ +151 template< class Field > │ │ │ │ │ +_1_5_2 inline std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream &out, const _L_F_E_M_a_t_r_i_x_<_F_i_e_l_d_> │ │ │ │ │ +&mat) │ │ │ │ │ +153 { │ │ │ │ │ +154 for (unsigned int r=0; r(mat(r,0)); │ │ │ │ │ +157 for (unsigned int c=1; c(mat(r,c)); │ │ │ │ │ +160 } │ │ │ │ │ +161 out << std::endl; │ │ │ │ │ +162 } │ │ │ │ │ +163 return out; │ │ │ │ │ +164 } │ │ │ │ │ +165} │ │ │ │ │ +166 │ │ │ │ │ +167#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:22 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_P_t_r │ │ │ │ │ +Field * rowPtr(const unsigned int row) │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ +unsigned int cols() const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_P_t_r │ │ │ │ │ +const Field * rowPtr(const unsigned int row) const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_i_n_v_e_r_t │ │ │ │ │ +bool invert() │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:24 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localbasis.hh File Reference │ │ │ │ +dune-localfunctions: basisevaluator.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,53 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
hierarchicalprismp2localbasis.hh File Reference
│ │ │ │ +
basisevaluator.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Hierarchical prism p2 shape functions for the simplex. │ │ │ │ -More...

│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/typetraits.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ +#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalPrismP2LocalBasis< D, R >
struct  Dune::MonomialEvaluator< B >
 
struct  Dune::MonomialEvaluator< B >::Iterator< deriv >
 
struct  Dune::MonomialEvaluator< B >::BaseIterator< Deriv >
 
struct  Dune::StandardEvaluator< B >
 
struct  Dune::StandardEvaluator< B >::Iterator< deriv >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Hierarchical prism p2 shape functions for the simplex.

│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,34 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +basisevaluator.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_I_t_e_r_a_t_o_r_<_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_B_a_s_e_I_t_e_r_a_t_o_r_<_ _D_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _B_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_I_t_e_r_a_t_o_r_<_ _d_e_r_i_v_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00137_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalprismp2localbasis.hh Source File │ │ │ │ +dune-localfunctions: basisevaluator.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,271 +70,279 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalprismp2localbasis.hh
│ │ │ │ +
basisevaluator.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_BASISEVALUATOR_HH
│ │ │ │ +
6#define DUNE_BASISEVALUATOR_HH
│ │ │ │
7
│ │ │ │ -
12#include <numeric>
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │ +
12#include <dune/common/typetraits.hh>
│ │ │ │
13
│ │ │ │ -
14#include <dune/common/fvector.hh>
│ │ │ │ -
15#include <dune/common/fmatrix.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ -
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24 public:
│ │ │ │ -
26 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ +
14#include <dune/geometry/type.hh>
│ │ │ │ +
15
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
19
│ │ │ │ +
20namespace Dune
│ │ │ │ +
21{
│ │ │ │ +
22 /*******************************************
│ │ │ │ +
23 * Should be removed as soon as the Tensor
│ │ │ │ +
24 * classes have been revisited. See remarks
│ │ │ │ +
25 * in tensor.hh (also hold true here).
│ │ │ │ +
26 *******************************************/
│ │ │ │
27
│ │ │ │ -
│ │ │ │ -
29 unsigned int size () const
│ │ │ │ -
30 {
│ │ │ │ -
31 return 18;
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33
│ │ │ │ -
│ │ │ │ -
35 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
36 std::vector<typename Traits::RangeType> & out) const
│ │ │ │ -
37 {
│ │ │ │ -
38 out.resize(18);
│ │ │ │ +
28
│ │ │ │ +
29 template <class B>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
31 {
│ │ │ │ +
32 typedef B Basis;
│ │ │ │ +
33 typedef typename Basis::Field Field;
│ │ │ │ +
34 typedef typename Basis::DomainVector DomainVector;
│ │ │ │ +
35 static const int dimension = Basis::dimension;
│ │ │ │ +
36 static const int dimRange = Basis::dimRange;
│ │ │ │ +
37
│ │ │ │ +
38 typedef std::vector<Field> Container;
│ │ │ │
39
│ │ │ │ -
40 out[0]=(1.0-in[0]-in[1])*(1.0-in[2]);
│ │ │ │ -
41 out[1]= in[0]*(1-in[2]);
│ │ │ │ -
42 out[2]=in[1]*(1-in[2]);
│ │ │ │ -
43 out[3]=in[2]*(1.0-in[0]-in[1]);
│ │ │ │ -
44 out[4]=in[0]*in[2];
│ │ │ │ -
45 out[5]=in[1]*in[2];
│ │ │ │ -
46
│ │ │ │ -
47 //edges
│ │ │ │ -
48 out[6]=2*(1.0-in[0]-in[1])*(0.5-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
49 out[7]=2*in[0]*(-0.5+in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
50 out[8]=2*in[1]*(-0.5+in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
51 out[9]=4*in[0]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
52 out[10]=4*in[1]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
53 out[11]=4*in[0]*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
54 out[12]=4*in[0]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
55 out[13]=4*in[1]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
56 out[14]=4*in[0]*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
57
│ │ │ │ -
58 //faces
│ │ │ │ -
59 out[15]=4*in[0]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
60 out[16]=4*in[1]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
61 out[17]=4*in[0]*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65
│ │ │ │ -
│ │ │ │ -
67 void evaluateJacobian (const typename Traits::DomainType& in, //position
│ │ │ │ -
68 std::vector<typename Traits::JacobianType>& out) const //return value
│ │ │ │ -
69 {
│ │ │ │ -
70 out.resize(18);
│ │ │ │ -
71
│ │ │ │ -
72 //vertices
│ │ │ │ -
73 out[0][0][0] = in[2]-1;
│ │ │ │ -
74 out[0][0][1] = in[2]-1;
│ │ │ │ -
75 out[0][0][2] = in[0]+in[1]-1;
│ │ │ │ -
76
│ │ │ │ -
77 out[1][0][0] = 1-in[2];
│ │ │ │ -
78 out[1][0][1] = 0;
│ │ │ │ -
79 out[1][0][2] =-in[0];
│ │ │ │ -
80
│ │ │ │ -
81 out[2][0][0] = 0;
│ │ │ │ -
82 out[2][0][1] = 1-in[2];
│ │ │ │ -
83 out[2][0][2] = -in[1];
│ │ │ │ -
84
│ │ │ │ -
85 out[3][0][0] = -in[2];
│ │ │ │ -
86 out[3][0][1] = -in[2];
│ │ │ │ -
87 out[3][0][2] = 1-in[0]-in[1];
│ │ │ │ -
88
│ │ │ │ -
89 out[4][0][0] = in[2];
│ │ │ │ -
90 out[4][0][1] = 0;
│ │ │ │ -
91 out[4][0][2] = in[0];
│ │ │ │ -
92
│ │ │ │ -
93 out[5][0][0] = 0;
│ │ │ │ -
94 out[5][0][1] = in[2];
│ │ │ │ -
95 out[5][0][2] = in[1];
│ │ │ │ -
96
│ │ │ │ -
97 //edges
│ │ │ │ -
98 out[6][0][0] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
99 out[6][0][1] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
100 out[6][0][2] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
101
│ │ │ │ -
102 out[7][0][0] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
103 out[7][0][1] = 0;
│ │ │ │ -
104 out[7][0][2] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]);
│ │ │ │ -
105
│ │ │ │ -
106 out[8][0][0] = 0;
│ │ │ │ -
107 out[8][0][1] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
108 out[8][0][2] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]);
│ │ │ │ -
109
│ │ │ │ -
110 out[9][0][0] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
111 out[9][0][1] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
112 out[9][0][2] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ -
113
│ │ │ │ -
114 out[10][0][0] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
115 out[10][0][1] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
116 out[10][0][2] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ -
117
│ │ │ │ -
118 out[11][0][0] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
119 out[11][0][1] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
120 out[11][0][2] = 4*in[0]*in[1]*(-3+4*in[2]);
│ │ │ │ -
121
│ │ │ │ -
122 out[12][0][0] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
123 out[12][0][1] = (-4*in[0])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
124 out[12][0][2] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ -
125
│ │ │ │ -
126 out[13][0][0] = -4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
127 out[13][0][1] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
128 out[13][0][2] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ -
129
│ │ │ │ -
130 out[14][0][0] = 4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
131 out[14][0][1] = 4*in[0]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
132 out[14][0][2] = 4*in[0]*in[1]*(-1+4*in[2]);
│ │ │ │ -
133
│ │ │ │ -
134 //faces
│ │ │ │ -
135 out[15][0][0] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
136 out[15][0][1] = -4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
137 out[15][0][2] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
138
│ │ │ │ -
139 out[16][0][0] = -4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
140 out[16][0][1] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
141 out[16][0][2] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
142
│ │ │ │ -
143 out[17][0][0] = 4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
144 out[17][0][1] = 4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
145 out[17][0][2] = 4*in[0]*in[1]*(4-8*in[2]);
│ │ │ │ -
146 }
│ │ │ │ -
│ │ │ │ -
147
│ │ │ │ -
│ │ │ │ -
149 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
150 const typename Traits::DomainType& in, // position
│ │ │ │ -
151 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
152 {
│ │ │ │ -
153 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
154 if (totalOrder == 0) {
│ │ │ │ -
155 evaluateFunction(in, out);
│ │ │ │ -
156 } else if (totalOrder == 1) {
│ │ │ │ -
157 out.resize(size());
│ │ │ │ -
158 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
159
│ │ │ │ -
160 switch (direction) {
│ │ │ │ -
161 case 0:
│ │ │ │ -
162 out[0] = in[2]-1;
│ │ │ │ -
163 out[1] = 1-in[2];
│ │ │ │ -
164 out[2] = 0;
│ │ │ │ -
165 out[3] = -in[2];
│ │ │ │ -
166 out[4] = in[2];
│ │ │ │ -
167 out[5] = 0;
│ │ │ │ -
168 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
169 out[7] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
170 out[8] = 0;
│ │ │ │ -
171 out[9] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
172 out[10] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
173 out[11] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
174 out[12] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
175 out[13] = -4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
176 out[14] = 4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
177 out[15] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
178 out[16] = -4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
179 out[17] = 4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
180 break;
│ │ │ │ -
181 case 1:
│ │ │ │ -
182 out[0] = in[2]-1;
│ │ │ │ -
183 out[1] = 0;
│ │ │ │ -
184 out[2] = 1-in[2];
│ │ │ │ -
185 out[3] = -in[2];
│ │ │ │ -
186 out[4] = 0;
│ │ │ │ -
187 out[5] = in[2];
│ │ │ │ -
188 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
189 out[7] = 0;
│ │ │ │ -
190 out[8] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
191 out[9] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
192 out[10] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
193 out[11] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ -
194 out[12] = (-4*in[0])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
195 out[13] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
196 out[14] = 4*in[0]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ -
197 out[15] = -4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
198 out[16] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
199 out[17] = 4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ -
200 break;
│ │ │ │ -
201 case 2:
│ │ │ │ -
202 out[0] = in[0]+in[1]-1;
│ │ │ │ -
203 out[1] =-in[0];
│ │ │ │ -
204 out[2] = -in[1];
│ │ │ │ -
205 out[3] = 1-in[0]-in[1];
│ │ │ │ -
206 out[4] = in[0];
│ │ │ │ -
207 out[5] = in[1];
│ │ │ │ -
208 out[6] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
209 out[7] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]);
│ │ │ │ -
210 out[8] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]);
│ │ │ │ -
211 out[9] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ -
212 out[10] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ -
213 out[11] = 4*in[0]*in[1]*(-3+4*in[2]);
│ │ │ │ -
214 out[12] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ -
215 out[13] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ -
216 out[14] = 4*in[0]*in[1]*(-1+4*in[2]);
│ │ │ │ -
217 out[15] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
218 out[16] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ -
219 out[17] = 4*in[0]*in[1]*(4-8*in[2]);
│ │ │ │ -
220 break;
│ │ │ │ -
221 default:
│ │ │ │ -
222 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
223 }
│ │ │ │ -
224 } else {
│ │ │ │ -
225 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
226 }
│ │ │ │ -
227 }
│ │ │ │ -
│ │ │ │ -
228
│ │ │ │ -
│ │ │ │ -
231 unsigned int order() const
│ │ │ │ -
232 {
│ │ │ │ -
233 return 2;
│ │ │ │ -
234 }
│ │ │ │ -
│ │ │ │ -
235
│ │ │ │ -
236 };
│ │ │ │ +
40 template< class Deriv >
│ │ │ │ +
41 struct BaseIterator;
│ │ │ │ +
42
│ │ │ │ +
43 template <unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
44 struct Iterator
│ │ │ │ +
45 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
48 };
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 unsigned int size() const
│ │ │ │ +
51 {
│ │ │ │ +
52 return size_;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 protected:
│ │ │ │ +
│ │ │ │ +
56 MonomialEvaluator(const Basis &basis,unsigned int order,unsigned int size)
│ │ │ │ +
57 : basis_(basis),
│ │ │ │ +
58 order_(order),
│ │ │ │ +
59 size_(size),
│ │ │ │ +
60 container_(0)
│ │ │ │ +
61 {}
│ │ │ │ +
│ │ │ │ +
62 template <int deriv>
│ │ │ │ +
│ │ │ │ +
63 void resize()
│ │ │ │ +
64 {
│ │ │ │ + │ │ │ │ +
66 container_.resize(totalSize);
│ │ │ │ +
67 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
69 const Basis &basis_;
│ │ │ │ +
70 unsigned int order_,size_;
│ │ │ │ + │ │ │ │ +
72 };
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
74
│ │ │ │ +
75 template< class B >
│ │ │ │ +
76 template< class Deriv >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
78 {
│ │ │ │ +
79 typedef Deriv Derivatives;
│ │ │ │ +
80 typedef typename Deriv::Field Field;
│ │ │ │ +
81 static const unsigned int blockSize = Deriv::size;
│ │ │ │ +
82 typedef Dune::FieldVector<Field,blockSize> Block;
│ │ │ │ +
83 static const DerivativeLayoutNS::DerivativeLayout layout = Deriv::layout;
│ │ │ │ +
84 static const unsigned int dimDomain = Deriv::dimDomain;
│ │ │ │ +
85 static const unsigned int dimRange = Deriv::dimRange;
│ │ │ │ +
86
│ │ │ │ +
87 typedef std::vector<Field> Container;
│ │ │ │ +
88 typedef typename Container::iterator CIter;
│ │ │ │ +
89
│ │ │ │ +
│ │ │ │ +
90 explicit BaseIterator ( Container &container )
│ │ │ │ +
91 : pos_( container.begin() ),
│ │ │ │ +
92 end_( container.end() )
│ │ │ │ +
93 {}
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
│ │ │ │ +
95 const Deriv &operator*() const
│ │ │ │ +
96 {
│ │ │ │ +
97 assert(!done());
│ │ │ │ +
98 return reinterpret_cast<const Deriv&>(*pos_);
│ │ │ │ +
99 }
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
│ │ │ │ +
101 const Deriv *operator->() const
│ │ │ │ +
102 {
│ │ │ │ +
103 return &(operator*());
│ │ │ │ +
104 }
│ │ │ │
│ │ │ │ -
237}
│ │ │ │ -
238#endif
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
106 bool done () const
│ │ │ │ +
107 {
│ │ │ │ +
108 return pos_ == end_;
│ │ │ │ +
109 }
│ │ │ │ +
│ │ │ │ +
110
│ │ │ │ +
│ │ │ │ +
111 BaseIterator &operator++ ()
│ │ │ │ +
112 {
│ │ │ │ +
113 pos_ += blockSize;
│ │ │ │ +
114 return *this;
│ │ │ │ +
115 }
│ │ │ │ +
│ │ │ │ +
116
│ │ │ │ +
│ │ │ │ +
117 BaseIterator &operator+= ( unsigned int skip )
│ │ │ │ +
118 {
│ │ │ │ +
119 pos_ += skip*blockSize;
│ │ │ │ +
120 return *this;
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
122
│ │ │ │ +
123 private:
│ │ │ │ +
124 CIter pos_;
│ │ │ │ +
125 const CIter end_;
│ │ │ │ +
126 };
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
128 template< class B >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
130 : public MonomialEvaluator< B >
│ │ │ │ +
131 {
│ │ │ │ +
132 typedef B Basis;
│ │ │ │ +
133 typedef typename Basis::Field Field;
│ │ │ │ +
134 typedef typename Basis::DomainVector DomainVector;
│ │ │ │ +
135 typedef std::vector<Field> Container;
│ │ │ │ +
136 static const int dimension = Basis::dimension;
│ │ │ │ +
137 static const int dimRange = Basis::dimRange;
│ │ │ │ + │ │ │ │ +
139
│ │ │ │ +
140 template <unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
141 struct Iterator : public Base::template Iterator<deriv>
│ │ │ │ +
142 {};
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
145 : Base(basis,basis.order(),basis.size())
│ │ │ │ +
146 {}
│ │ │ │ +
│ │ │ │ +
147 template <unsigned int deriv,class DVector>
│ │ │ │ +
│ │ │ │ +
148 typename Iterator<deriv>::All evaluate(const DVector &x)
│ │ │ │ +
149 {
│ │ │ │ +
150 Base::template resize<deriv>();
│ │ │ │ +
151 basis_.template evaluate<deriv>(x,&(container_[0]));
│ │ │ │ +
152 return typename Iterator<deriv>::All(container_);
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
155 {
│ │ │ │ +
156 Base::template resize<0>();
│ │ │ │ +
157 basis_.integrate(&(container_[0]));
│ │ │ │ +
158 return typename Iterator<0>::Integrate(container_);
│ │ │ │ +
159 }
│ │ │ │ +
│ │ │ │ +
160
│ │ │ │ +
161 protected:
│ │ │ │ +
│ │ │ │ +
162 StandardEvaluator ( const Basis &basis, unsigned int size )
│ │ │ │ +
163 : Base( basis, basis.order(), size )
│ │ │ │ +
164 {}
│ │ │ │ +
│ │ │ │ +
165
│ │ │ │ +
166 private:
│ │ │ │ + │ │ │ │ +
168 using Base::basis_;
│ │ │ │ +
169 using Base::container_;
│ │ │ │ +
170 };
│ │ │ │ +
│ │ │ │ +
171
│ │ │ │ +
172}
│ │ │ │ +
173
│ │ │ │ +
174#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Definition hierarchicalprismp2localbasis.hh:23
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalprismp2localbasis.hh:26
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition hierarchicalprismp2localbasis.hh:29
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition hierarchicalprismp2localbasis.hh:231
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalprismp2localbasis.hh:149
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalprismp2localbasis.hh:35
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalprismp2localbasis.hh:67
│ │ │ │ - │ │ │ │ +
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ +
DerivativeLayout
Definition tensor.hh:168
│ │ │ │ +
Definition basisevaluator.hh:31
│ │ │ │ +
static const int dimRange
Definition basisevaluator.hh:36
│ │ │ │ +
B Basis
Definition basisevaluator.hh:32
│ │ │ │ +
unsigned int order_
Definition basisevaluator.hh:70
│ │ │ │ +
const Basis & basis_
Definition basisevaluator.hh:69
│ │ │ │ +
MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size)
Definition basisevaluator.hh:56
│ │ │ │ +
Basis::Field Field
Definition basisevaluator.hh:33
│ │ │ │ +
unsigned int size_
Definition basisevaluator.hh:70
│ │ │ │ +
Basis::DomainVector DomainVector
Definition basisevaluator.hh:34
│ │ │ │ +
void resize()
Definition basisevaluator.hh:63
│ │ │ │ +
Container container_
Definition basisevaluator.hh:71
│ │ │ │ +
unsigned int size() const
Definition basisevaluator.hh:50
│ │ │ │ +
std::vector< Field > Container
Definition basisevaluator.hh:38
│ │ │ │ +
MonomialEvaluator(const MonomialEvaluator &)
│ │ │ │ +
static const int dimension
Definition basisevaluator.hh:35
│ │ │ │ +
Definition basisevaluator.hh:78
│ │ │ │ +
BaseIterator(Container &container)
Definition basisevaluator.hh:90
│ │ │ │ +
const Deriv & operator*() const
Definition basisevaluator.hh:95
│ │ │ │ +
Dune::FieldVector< Field, blockSize > Block
Definition basisevaluator.hh:82
│ │ │ │ +
bool done() const
Definition basisevaluator.hh:106
│ │ │ │ +
Container::iterator CIter
Definition basisevaluator.hh:88
│ │ │ │ +
const Deriv * operator->() const
Definition basisevaluator.hh:101
│ │ │ │ +
Deriv Derivatives
Definition basisevaluator.hh:79
│ │ │ │ +
std::vector< Field > Container
Definition basisevaluator.hh:87
│ │ │ │ +
Deriv::Field Field
Definition basisevaluator.hh:80
│ │ │ │ +
Definition basisevaluator.hh:45
│ │ │ │ +
BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > > Integrate
Definition basisevaluator.hh:47
│ │ │ │ +
BaseIterator< Derivatives< Field, dimension, dimRange, deriv, DerivativeLayoutNS::derivative > > All
Definition basisevaluator.hh:46
│ │ │ │ +
Definition basisevaluator.hh:131
│ │ │ │ +
Basis::Field Field
Definition basisevaluator.hh:133
│ │ │ │ +
Basis::DomainVector DomainVector
Definition basisevaluator.hh:134
│ │ │ │ +
Iterator< deriv >::All evaluate(const DVector &x)
Definition basisevaluator.hh:148
│ │ │ │ +
MonomialEvaluator< B > Base
Definition basisevaluator.hh:138
│ │ │ │ +
StandardEvaluator(const Basis &basis)
Definition basisevaluator.hh:144
│ │ │ │ +
static const int dimRange
Definition basisevaluator.hh:137
│ │ │ │ +
std::vector< Field > Container
Definition basisevaluator.hh:135
│ │ │ │ +
Iterator< 0 >::Integrate integrate()
Definition basisevaluator.hh:154
│ │ │ │ +
B Basis
Definition basisevaluator.hh:132
│ │ │ │ +
StandardEvaluator(const Basis &basis, unsigned int size)
Definition basisevaluator.hh:162
│ │ │ │ +
static const int dimension
Definition basisevaluator.hh:136
│ │ │ │ +
Definition basisevaluator.hh:142
│ │ │ │ +
Definition tensor.hh:172
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,282 +1,323 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ -hierarchicalprismp2localbasis.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +basisevaluator.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_BASISEVALUATOR_HH │ │ │ │ │ +6#define DUNE_BASISEVALUATOR_HH │ │ │ │ │ 7 │ │ │ │ │ -12#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -23 { │ │ │ │ │ -24 public: │ │ │ │ │ -_2_6 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ -FieldVector, Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +19 │ │ │ │ │ +20namespace _D_u_n_e │ │ │ │ │ +21{ │ │ │ │ │ +22 /******************************************* │ │ │ │ │ +23 * Should be removed as soon as the Tensor │ │ │ │ │ +24 * classes have been revisited. See remarks │ │ │ │ │ +25 * in tensor.hh (also hold true here). │ │ │ │ │ +26 *******************************************/ │ │ │ │ │ 27 │ │ │ │ │ -_2_9 unsigned int _s_i_z_e () const │ │ │ │ │ -30 { │ │ │ │ │ -31 return 18; │ │ │ │ │ -32 } │ │ │ │ │ -33 │ │ │ │ │ -_3_5 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -36 std::vector & out) const │ │ │ │ │ -37 { │ │ │ │ │ -38 out.resize(18); │ │ │ │ │ +28 │ │ │ │ │ +29 template │ │ │ │ │ +_3_0 struct _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ +31 { │ │ │ │ │ +_3_2 typedef B _B_a_s_i_s; │ │ │ │ │ +_3_3 typedef typename Basis::Field _F_i_e_l_d; │ │ │ │ │ +_3_4 typedef typename Basis::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_3_5 static const int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ +_3_6 static const int _d_i_m_R_a_n_g_e = Basis::dimRange; │ │ │ │ │ +37 │ │ │ │ │ +_3_8 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ 39 │ │ │ │ │ -40 out[0]=(1.0-in[0]-in[1])*(1.0-in[2]); │ │ │ │ │ -41 out[1]= in[0]*(1-in[2]); │ │ │ │ │ -42 out[2]=in[1]*(1-in[2]); │ │ │ │ │ -43 out[3]=in[2]*(1.0-in[0]-in[1]); │ │ │ │ │ -44 out[4]=in[0]*in[2]; │ │ │ │ │ -45 out[5]=in[1]*in[2]; │ │ │ │ │ -46 │ │ │ │ │ -47 //edges │ │ │ │ │ -48 out[6]=2*(1.0-in[0]-in[1])*(0.5-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -49 out[7]=2*in[0]*(-0.5+in[0])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -50 out[8]=2*in[1]*(-0.5+in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -51 out[9]=4*in[0]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -52 out[10]=4*in[1]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -53 out[11]=4*in[0]*in[1]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -54 out[12]=4*in[0]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -55 out[13]=4*in[1]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -56 out[14]=4*in[0]*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -57 │ │ │ │ │ -58 //faces │ │ │ │ │ -59 out[15]=4*in[0]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -60 out[16]=4*in[1]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -61 out[17]=4*in[0]*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -64 │ │ │ │ │ -65 │ │ │ │ │ -_6_7 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, //position │ │ │ │ │ -68 std::vector& out) const //return value │ │ │ │ │ -69 { │ │ │ │ │ -70 out.resize(18); │ │ │ │ │ -71 │ │ │ │ │ -72 //vertices │ │ │ │ │ -73 out[0][0][0] = in[2]-1; │ │ │ │ │ -74 out[0][0][1] = in[2]-1; │ │ │ │ │ -75 out[0][0][2] = in[0]+in[1]-1; │ │ │ │ │ -76 │ │ │ │ │ -77 out[1][0][0] = 1-in[2]; │ │ │ │ │ -78 out[1][0][1] = 0; │ │ │ │ │ -79 out[1][0][2] =-in[0]; │ │ │ │ │ -80 │ │ │ │ │ -81 out[2][0][0] = 0; │ │ │ │ │ -82 out[2][0][1] = 1-in[2]; │ │ │ │ │ -83 out[2][0][2] = -in[1]; │ │ │ │ │ -84 │ │ │ │ │ -85 out[3][0][0] = -in[2]; │ │ │ │ │ -86 out[3][0][1] = -in[2]; │ │ │ │ │ -87 out[3][0][2] = 1-in[0]-in[1]; │ │ │ │ │ -88 │ │ │ │ │ -89 out[4][0][0] = in[2]; │ │ │ │ │ -90 out[4][0][1] = 0; │ │ │ │ │ -91 out[4][0][2] = in[0]; │ │ │ │ │ -92 │ │ │ │ │ -93 out[5][0][0] = 0; │ │ │ │ │ -94 out[5][0][1] = in[2]; │ │ │ │ │ -95 out[5][0][2] = in[1]; │ │ │ │ │ -96 │ │ │ │ │ -97 //edges │ │ │ │ │ -98 out[6][0][0] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -99 out[6][0][1] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -100 out[6][0][2] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -101 │ │ │ │ │ -102 out[7][0][0] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -103 out[7][0][1] = 0; │ │ │ │ │ -104 out[7][0][2] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]); │ │ │ │ │ +40 template< class Deriv > │ │ │ │ │ +41 struct _B_a_s_e_I_t_e_r_a_t_o_r; │ │ │ │ │ +42 │ │ │ │ │ +43 template │ │ │ │ │ +_4_4 struct _I_t_e_r_a_t_o_r │ │ │ │ │ +45 { │ │ │ │ │ +_4_6 typedef │ │ │ │ │ +_B_a_s_e_I_t_e_r_a_t_o_r_<_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_d_i_m_R_a_n_g_e_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> > _A_l_l; │ │ │ │ │ +_4_7 typedef _B_a_s_e_I_t_e_r_a_t_o_r_<_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_> > _I_n_t_e_g_r_a_t_e; │ │ │ │ │ +48 }; │ │ │ │ │ +49 │ │ │ │ │ +_5_0 unsigned int _s_i_z_e() const │ │ │ │ │ +51 { │ │ │ │ │ +52 return _s_i_z_e__; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 protected: │ │ │ │ │ +_5_6 _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r(const _B_a_s_i_s &basis,unsigned int order,unsigned int _s_i_z_e) │ │ │ │ │ +57 : _b_a_s_i_s__(basis), │ │ │ │ │ +58 _o_r_d_e_r__(order), │ │ │ │ │ +59 _s_i_z_e__(_s_i_z_e), │ │ │ │ │ +60 _c_o_n_t_a_i_n_e_r__(0) │ │ │ │ │ +61 {} │ │ │ │ │ +62 template │ │ │ │ │ +_6_3 void _r_e_s_i_z_e() │ │ │ │ │ +64 { │ │ │ │ │ +65 const int totalSize = │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_d_i_m_R_a_n_g_e_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_>_:_: │ │ │ │ │ +_s_i_z_e*_s_i_z_e__; │ │ │ │ │ +66 _c_o_n_t_a_i_n_e_r__.resize(totalSize); │ │ │ │ │ +67 } │ │ │ │ │ +_6_8 _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r(const _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r&); │ │ │ │ │ +_6_9 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ +_7_0 unsigned int _o_r_d_e_r__,_s_i_z_e__; │ │ │ │ │ +_7_1 _C_o_n_t_a_i_n_e_r _c_o_n_t_a_i_n_e_r__; │ │ │ │ │ +72 }; │ │ │ │ │ +73 │ │ │ │ │ +74 │ │ │ │ │ +75 template< class B > │ │ │ │ │ +76 template< class Deriv > │ │ │ │ │ +_7_7 struct _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r< B >::_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ +78 { │ │ │ │ │ +_7_9 typedef Deriv _D_e_r_i_v_a_t_i_v_e_s; │ │ │ │ │ +_8_0 typedef typename Deriv::Field _F_i_e_l_d; │ │ │ │ │ +_8_1 static const unsigned int blockSize = Deriv::size; │ │ │ │ │ +_8_2 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +_8_3 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = Deriv::layout; │ │ │ │ │ +_8_4 static const unsigned int dimDomain = Deriv::dimDomain; │ │ │ │ │ +_8_5 static const unsigned int _d_i_m_R_a_n_g_e = Deriv::dimRange; │ │ │ │ │ +86 │ │ │ │ │ +_8_7 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ +_8_8 typedef typename Container::iterator _C_I_t_e_r; │ │ │ │ │ +89 │ │ │ │ │ +_9_0 explicit _B_a_s_e_I_t_e_r_a_t_o_r ( _C_o_n_t_a_i_n_e_r &container ) │ │ │ │ │ +91 : pos_( container.begin() ), │ │ │ │ │ +92 end_( container.end() ) │ │ │ │ │ +93 {} │ │ │ │ │ +94 │ │ │ │ │ +_9_5 const Deriv &_o_p_e_r_a_t_o_r_*() const │ │ │ │ │ +96 { │ │ │ │ │ +97 assert(!done()); │ │ │ │ │ +98 return reinterpret_cast(*pos_); │ │ │ │ │ +99 } │ │ │ │ │ +100 │ │ │ │ │ +_1_0_1 const Deriv *_o_p_e_r_a_t_o_r_-_>() const │ │ │ │ │ +102 { │ │ │ │ │ +103 return &(_o_p_e_r_a_t_o_r_*()); │ │ │ │ │ +104 } │ │ │ │ │ 105 │ │ │ │ │ -106 out[8][0][0] = 0; │ │ │ │ │ -107 out[8][0][1] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -108 out[8][0][2] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]); │ │ │ │ │ -109 │ │ │ │ │ -110 out[9][0][0] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -111 out[9][0][1] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -112 out[9][0][2] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ -113 │ │ │ │ │ -114 out[10][0][0] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -115 out[10][0][1] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -116 out[10][0][2] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ -117 │ │ │ │ │ -118 out[11][0][0] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -119 out[11][0][1] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -120 out[11][0][2] = 4*in[0]*in[1]*(-3+4*in[2]); │ │ │ │ │ -121 │ │ │ │ │ -122 out[12][0][0] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -123 out[12][0][1] = (-4*in[0])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -124 out[12][0][2] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ -125 │ │ │ │ │ -126 out[13][0][0] = -4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -127 out[13][0][1] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -128 out[13][0][2] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ -129 │ │ │ │ │ -130 out[14][0][0] = 4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -131 out[14][0][1] = 4*in[0]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -132 out[14][0][2] = 4*in[0]*in[1]*(-1+4*in[2]); │ │ │ │ │ -133 │ │ │ │ │ -134 //faces │ │ │ │ │ -135 out[15][0][0] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -136 out[15][0][1] = -4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -137 out[15][0][2] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -138 │ │ │ │ │ -139 out[16][0][0] = -4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -140 out[16][0][1] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -141 out[16][0][2] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -142 │ │ │ │ │ -143 out[17][0][0] = 4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -144 out[17][0][1] = 4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -145 out[17][0][2] = 4*in[0]*in[1]*(4-8*in[2]); │ │ │ │ │ -146 } │ │ │ │ │ -147 │ │ │ │ │ -_1_4_9 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -150 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -151 std::vector& out) const // return value │ │ │ │ │ -152 { │ │ │ │ │ -153 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -154 if (totalOrder == 0) { │ │ │ │ │ -155 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -156 } else if (totalOrder == 1) { │ │ │ │ │ -157 out.resize(_s_i_z_e()); │ │ │ │ │ -158 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ -(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ -159 │ │ │ │ │ -160 switch (direction) { │ │ │ │ │ -161 case 0: │ │ │ │ │ -162 out[0] = in[2]-1; │ │ │ │ │ -163 out[1] = 1-in[2]; │ │ │ │ │ -164 out[2] = 0; │ │ │ │ │ -165 out[3] = -in[2]; │ │ │ │ │ -166 out[4] = in[2]; │ │ │ │ │ -167 out[5] = 0; │ │ │ │ │ -168 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -169 out[7] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -170 out[8] = 0; │ │ │ │ │ -171 out[9] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -172 out[10] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -173 out[11] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -174 out[12] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -175 out[13] = -4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -176 out[14] = 4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -177 out[15] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -178 out[16] = -4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -179 out[17] = 4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -180 break; │ │ │ │ │ -181 case 1: │ │ │ │ │ -182 out[0] = in[2]-1; │ │ │ │ │ -183 out[1] = 0; │ │ │ │ │ -184 out[2] = 1-in[2]; │ │ │ │ │ -185 out[3] = -in[2]; │ │ │ │ │ -186 out[4] = 0; │ │ │ │ │ -187 out[5] = in[2]; │ │ │ │ │ -188 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -189 out[7] = 0; │ │ │ │ │ -190 out[8] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -191 out[9] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -192 out[10] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -193 out[11] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ -194 out[12] = (-4*in[0])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -195 out[13] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -196 out[14] = 4*in[0]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ -197 out[15] = -4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -198 out[16] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -199 out[17] = 4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ -200 break; │ │ │ │ │ -201 case 2: │ │ │ │ │ -202 out[0] = in[0]+in[1]-1; │ │ │ │ │ -203 out[1] =-in[0]; │ │ │ │ │ -204 out[2] = -in[1]; │ │ │ │ │ -205 out[3] = 1-in[0]-in[1]; │ │ │ │ │ -206 out[4] = in[0]; │ │ │ │ │ -207 out[5] = in[1]; │ │ │ │ │ -208 out[6] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -209 out[7] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]); │ │ │ │ │ -210 out[8] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]); │ │ │ │ │ -211 out[9] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ -212 out[10] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ -213 out[11] = 4*in[0]*in[1]*(-3+4*in[2]); │ │ │ │ │ -214 out[12] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ -215 out[13] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ -216 out[14] = 4*in[0]*in[1]*(-1+4*in[2]); │ │ │ │ │ -217 out[15] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -218 out[16] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ -219 out[17] = 4*in[0]*in[1]*(4-8*in[2]); │ │ │ │ │ -220 break; │ │ │ │ │ -221 default: │ │ │ │ │ -222 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -223 } │ │ │ │ │ -224 } else { │ │ │ │ │ -225 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -226 } │ │ │ │ │ -227 } │ │ │ │ │ -228 │ │ │ │ │ -_2_3_1 unsigned int _o_r_d_e_r() const │ │ │ │ │ -232 { │ │ │ │ │ -233 return 2; │ │ │ │ │ -234 } │ │ │ │ │ -235 │ │ │ │ │ -236 }; │ │ │ │ │ -237} │ │ │ │ │ -238#endif │ │ │ │ │ +_1_0_6 bool _d_o_n_e () const │ │ │ │ │ +107 { │ │ │ │ │ +108 return pos_ == end_; │ │ │ │ │ +109 } │ │ │ │ │ +110 │ │ │ │ │ +_1_1_1 _B_a_s_e_I_t_e_r_a_t_o_r &operator++ () │ │ │ │ │ +112 { │ │ │ │ │ +113 pos_ += blockSize; │ │ │ │ │ +114 return *this; │ │ │ │ │ +115 } │ │ │ │ │ +116 │ │ │ │ │ +_1_1_7 _B_a_s_e_I_t_e_r_a_t_o_r &operator+= ( unsigned int skip ) │ │ │ │ │ +118 { │ │ │ │ │ +119 pos_ += skip*blockSize; │ │ │ │ │ +120 return *this; │ │ │ │ │ +121 } │ │ │ │ │ +122 │ │ │ │ │ +123 private: │ │ │ │ │ +124 CIter pos_; │ │ │ │ │ +125 const CIter end_; │ │ │ │ │ +126 }; │ │ │ │ │ +127 │ │ │ │ │ +128 template< class B > │ │ │ │ │ +_1_2_9 struct _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +130 : public _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r< B > │ │ │ │ │ +131 { │ │ │ │ │ +_1_3_2 typedef B _B_a_s_i_s; │ │ │ │ │ +_1_3_3 typedef typename Basis::Field _F_i_e_l_d; │ │ │ │ │ +_1_3_4 typedef typename Basis::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ +_1_3_5 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ +_1_3_6 static const int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ +_1_3_7 static const int _d_i_m_R_a_n_g_e = Basis::dimRange; │ │ │ │ │ +_1_3_8 typedef _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_B_> _B_a_s_e; │ │ │ │ │ +139 │ │ │ │ │ +140 template │ │ │ │ │ +_1_4_1 struct _I_t_e_r_a_t_o_r : public Base::template _I_t_e_r_a_t_o_r │ │ │ │ │ +142 {}; │ │ │ │ │ +143 │ │ │ │ │ +_1_4_4 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r(const _B_a_s_i_s &basis) │ │ │ │ │ +145 : _B_a_s_e(basis,basis.order(),basis._s_i_z_e()) │ │ │ │ │ +146 {} │ │ │ │ │ +147 template │ │ │ │ │ +_1_4_8 typename _I_t_e_r_a_t_o_r_<_d_e_r_i_v_>_:_:_A_l_l _e_v_a_l_u_a_t_e(const DVector &x) │ │ │ │ │ +149 { │ │ │ │ │ +150 Base::template resize(); │ │ │ │ │ +151 basis_.template evaluate(x,&(container_[0])); │ │ │ │ │ +152 return typename _I_t_e_r_a_t_o_r_<_d_e_r_i_v_>_:_:_A_l_l(container_); │ │ │ │ │ +153 } │ │ │ │ │ +_1_5_4 typename _I_t_e_r_a_t_o_r_<_0_>_:_:_I_n_t_e_g_r_a_t_e _i_n_t_e_g_r_a_t_e() │ │ │ │ │ +155 { │ │ │ │ │ +156 Base::template resize<0>(); │ │ │ │ │ +157 basis_.integrate(&(container_[0])); │ │ │ │ │ +158 return typename _I_t_e_r_a_t_o_r_<_0_>_:_:_I_n_t_e_g_r_a_t_e(container_); │ │ │ │ │ +159 } │ │ │ │ │ +160 │ │ │ │ │ +161 protected: │ │ │ │ │ +_1_6_2 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r ( const _B_a_s_i_s &basis, unsigned int _s_i_z_e ) │ │ │ │ │ +163 : _B_a_s_e( basis, basis.order(), _s_i_z_e ) │ │ │ │ │ +164 {} │ │ │ │ │ +165 │ │ │ │ │ +166 private: │ │ │ │ │ +167 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r(const _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r&); │ │ │ │ │ +168 using _B_a_s_e_:_:_b_a_s_i_s__; │ │ │ │ │ +169 using _B_a_s_e_:_:_c_o_n_t_a_i_n_e_r__; │ │ │ │ │ +170 }; │ │ │ │ │ +171 │ │ │ │ │ +172} │ │ │ │ │ +173 │ │ │ │ │ +174#endif │ │ │ │ │ +_t_e_n_s_o_r_._h_h │ │ │ │ │ +_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t │ │ │ │ │ +DerivativeLayout │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const int dimRange │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_i_s │ │ │ │ │ +B Basis │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_o_r_d_e_r__ │ │ │ │ │ +unsigned int order_ │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_b_a_s_i_s__ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ +MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size) │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ +Basis::Field Field │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_s_i_z_e__ │ │ │ │ │ +unsigned int size_ │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Basis::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ │ +void resize() │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_c_o_n_t_a_i_n_e_r__ │ │ │ │ │ +Container container_ │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:67 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ +MonomialEvaluator(const MonomialEvaluator &) │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:78 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ +BaseIterator(Container &container) │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +const Deriv & operator*() const │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< Field, blockSize > Block │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:82 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_d_o_n_e │ │ │ │ │ +bool done() const │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:106 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_C_I_t_e_r │ │ │ │ │ +Container::iterator CIter │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ │ +const Deriv * operator->() const │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +Deriv Derivatives │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ +Deriv::Field Field │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r_:_:_I_n_t_e_g_r_a_t_e │ │ │ │ │ +BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > │ │ │ │ │ +> Integrate │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r_:_:_A_l_l │ │ │ │ │ +BaseIterator< Derivatives< Field, dimension, dimRange, deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative > > All │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ +Basis::Field Field │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ +Basis::DomainVector DomainVector │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +Iterator< deriv >::All evaluate(const DVector &x) │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:148 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e │ │ │ │ │ +MonomialEvaluator< B > Base │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +StandardEvaluator(const Basis &basis) │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ +static const int dimRange │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ +std::vector< Field > Container │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ +Iterator< 0 >::Integrate integrate() │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_B_a_s_i_s │ │ │ │ │ +B Basis │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +StandardEvaluator(const Basis &basis, unsigned int size) │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:162 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:136 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:142 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2.hh File Reference │ │ │ │ +dune-localfunctions: tensor.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,128 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
hierarchicalp2.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Enumerations | │ │ │ │ +Functions
│ │ │ │ +
tensor.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh"
│ │ │ │ -#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh"
│ │ │ │ +
#include <ostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::HierarchicalP2LocalFiniteElement< D, R, dim >
class  Dune::LFETensor< F, dimD, deriv >
 
struct  Dune::LFETensor< F, 0, deriv >
 
struct  Dune::LFETensor< F, 0, 0 >
 
class  Dune::LFETensor< F, dimD, 0 >
 
struct  Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value >
 
struct  Dune::Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value >
 
struct  Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative >
 
struct  Dune::LFETensorAxpy< Vec1, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value >, Vec2, deriv >
 
struct  Dune::DerivativeAssign< Vec1, Vec2 >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, layout > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, F2 >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, 1 > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, 1 > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::DerivativeLayoutNS
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Enumerations

enum  Dune::DerivativeLayoutNS::DerivativeLayout { Dune::DerivativeLayoutNS::value │ │ │ │ +, Dune::DerivativeLayoutNS::derivative │ │ │ │ + }
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<class F , int dimD, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const LFETensor< F, dimD, deriv > &tensor)
 
template<class F , int dimD, int dimR, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &d)
 
template<class F , int dimD, int dimR, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > &d)
 
template<class F , int dimD, int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::derivative > &d)
 
template<class F , int dimD, int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > &d)
 
template<class F , int dimD, int dimR, unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Derivatives< F, dimD, dimR, deriv, layout > > &y)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,137 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -hierarchicalp2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +tensor.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _0_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _0_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ + class   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ + _d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _V_e_c_1_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ + _d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ + _v_a_l_u_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _V_e_c_1_,_ _V_e_c_2_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2 │ │ │ │ │ + _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +namespace   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S │ │ │ │ │ +  │ │ │ │ │ +EEnnuummeerraattiioonnss │ │ │ │ │ +enum   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t { _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ + _v_a_l_u_e , _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e } │ │ │ │ │ +  │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _L_F_E_T_e_n_s_o_r< F, dimD, │ │ │ │ │ + deriv > &tensor) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ + dimD, dimR, deriv, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ + dimD, dimR, deriv, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ + dimD, dimR, 0, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ + dimD, dimR, 0, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e > &d) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std::vector< │ │ │ │ │ + _D_e_r_i_v_a_t_i_v_e_s< F, dimD, dimR, deriv, layout > > &y) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00140_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: hierarchicalp2.hh Source File │ │ │ │ +dune-localfunctions: tensor.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,124 +70,1393 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
hierarchicalp2.hh
│ │ │ │ +
tensor.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5
│ │ │ │ +
6#ifndef DUNE_TENSOR_HH
│ │ │ │ +
7#define DUNE_TENSOR_HH
│ │ │ │ +
8
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/fvector.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │
15
│ │ │ │
16namespace Dune
│ │ │ │
17{
│ │ │ │ -
18
│ │ │ │ -
21 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ -
24
│ │ │ │ -
25 static_assert(1 <= dim && dim <= 3,
│ │ │ │ -
26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3.");
│ │ │ │ -
27
│ │ │ │ -
28 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
35
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
39 {}
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
43 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
44 {
│ │ │ │ -
45 return basis;
│ │ │ │ -
46 }
│ │ │ │ +
18 /***********************************************
│ │ │ │ +
19 * The classes here are work in progress.
│ │ │ │ +
20 * Basically they provide tensor structures for
│ │ │ │ +
21 * higher order derivatives of vector valued function.
│ │ │ │ +
22 * Two storage structures are provided
│ │ │ │ +
23 * (either based on the components of the vector valued
│ │ │ │ +
24 * functions or on the order of the derivative).
│ │ │ │ +
25 * Conversions are supplied between the two storage
│ │ │ │ +
26 * structures and simple operations, which make the
│ │ │ │ +
27 * code difficult to use and requires rewritting...
│ │ │ │ +
28 ***************************************************/
│ │ │ │ +
29
│ │ │ │ +
30 // Structure for scalar tensor of order deriv
│ │ │ │ +
31 template <class F,int dimD,unsigned int deriv>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │ + │ │ │ │ +
35 typedef LFETensor<F,dimD-1,deriv> BaseDim;
│ │ │ │ +
36 typedef LFETensor<F,dimD,deriv-1> BaseDeriv;
│ │ │ │ +
37
│ │ │ │ +
38 public:
│ │ │ │ +
39 typedef F field_type;
│ │ │ │ +
40 static const unsigned int size = BaseDim::size+BaseDeriv::size;
│ │ │ │ +
41 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
42
│ │ │ │ +
43 template< class FF >
│ │ │ │ +
│ │ │ │ +
44 This &operator= ( const FF &f )
│ │ │ │ +
45 {
│ │ │ │ +
46 block() = field_cast< F >( f );
│ │ │ │ +
47 return *this;
│ │ │ │ +
48 }
│ │ │ │
│ │ │ │ -
47
│ │ │ │ +
49
│ │ │ │
│ │ │ │ - │ │ │ │ -
51 {
│ │ │ │ -
52 return coefficients;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
58 {
│ │ │ │ -
59 return interpolation;
│ │ │ │ +
50 This &operator= ( const Block &b )
│ │ │ │ +
51 {
│ │ │ │ +
52 block() = b;
│ │ │ │ +
53 return *this;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 block() *= f;
│ │ │ │ +
59 return *this;
│ │ │ │
60 }
│ │ │ │
│ │ │ │
61
│ │ │ │ -
│ │ │ │ -
63 unsigned int size () const
│ │ │ │ -
64 {
│ │ │ │ -
65 return basis.size();
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
70 static constexpr GeometryType type ()
│ │ │ │ -
71 {
│ │ │ │ -
72 return GeometryTypes::simplex(dim);
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 private:
│ │ │ │ - │ │ │ │ -
77
│ │ │ │ -
78 typename Traits::LocalCoefficientsType coefficients;
│ │ │ │ -
79
│ │ │ │ - │ │ │ │ -
81 };
│ │ │ │ -
│ │ │ │ -
82
│ │ │ │ -
83}
│ │ │ │ -
84
│ │ │ │ -
85#endif
│ │ │ │ - │ │ │ │ -
Hierarchical p2 shape functions for the simplex.
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
62 const field_type &operator[] ( const unsigned int i ) const
│ │ │ │ +
63 {
│ │ │ │ +
64 return block()[ i ];
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ +
67 field_type &operator[] ( const unsigned int i )
│ │ │ │ +
68 {
│ │ │ │ +
69 return block()[ i ];
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
73 {
│ │ │ │ +
74 return block_;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
76 const Block &block() const
│ │ │ │ +
77 {
│ │ │ │ +
78 return block_;
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
80 void axpy(const F& a, const This &y)
│ │ │ │ +
81 {
│ │ │ │ +
82 block().axpy(a,y.block());
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
84 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
86 {
│ │ │ │ +
87 field_cast(y.block(),block());
│ │ │ │ +
88 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
90 };
│ │ │ │ +
│ │ │ │ +
91
│ │ │ │ +
92 // ******************************************
│ │ │ │ +
93 template <class F,unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
94 struct LFETensor<F,0,deriv>
│ │ │ │ +
95 {
│ │ │ │ +
96 static const int size = 0;
│ │ │ │ +
97 };
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
99 template <class F>
│ │ │ │ +
│ │ │ │ +
100 struct LFETensor<F,0,0>
│ │ │ │ +
101 {
│ │ │ │ +
102 static const int size = 1;
│ │ │ │ +
103 };
│ │ │ │ +
│ │ │ │ +
104
│ │ │ │ +
105 template <class F,int dimD>
│ │ │ │ +
│ │ │ │ +
106 class LFETensor<F,dimD,0>
│ │ │ │ +
107 {
│ │ │ │ + │ │ │ │ +
109
│ │ │ │ +
110 public:
│ │ │ │ +
111 typedef F field_type;
│ │ │ │ +
112 static const int size = 1;
│ │ │ │ +
113 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
114
│ │ │ │ +
115 template< class FF >
│ │ │ │ +
│ │ │ │ +
116 This &operator= ( const FF &f )
│ │ │ │ +
117 {
│ │ │ │ +
118 block() = field_cast< F >( f );
│ │ │ │ +
119 return *this;
│ │ │ │ +
120 }
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ +
122 This &operator= ( const Block &b )
│ │ │ │ +
123 {
│ │ │ │ +
124 block() = b;
│ │ │ │ +
125 return *this;
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
129 {
│ │ │ │ +
130 block() *= f;
│ │ │ │ +
131 return *this;
│ │ │ │ +
132 }
│ │ │ │ +
│ │ │ │ +
133
│ │ │ │ +
│ │ │ │ +
134 const F &operator[] ( const unsigned int i ) const
│ │ │ │ +
135 {
│ │ │ │ +
136 return block()[ i ];
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
│ │ │ │ +
139 F &operator[] ( const unsigned int i )
│ │ │ │ +
140 {
│ │ │ │ +
141 return block()[ i ];
│ │ │ │ +
142 }
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
│ │ │ │ +
144 void axpy(const F& a, const This &y)
│ │ │ │ +
145 {
│ │ │ │ +
146 block().axpy(a,y.block());
│ │ │ │ +
147 }
│ │ │ │ +
│ │ │ │ +
148 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
150 {
│ │ │ │ +
151 field_cast(y.block(),block());
│ │ │ │ +
152 }
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
155 {
│ │ │ │ +
156 return block_;
│ │ │ │ +
157 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
158 const Block &block() const
│ │ │ │ +
159 {
│ │ │ │ +
160 return block_;
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
163 };
│ │ │ │ +
│ │ │ │ +
164 // ***********************************************************
│ │ │ │ +
165 // Structure for all derivatives up to order deriv
│ │ │ │ +
166 // for vector valued function
│ │ │ │ +
│ │ │ │ +
167 namespace DerivativeLayoutNS {
│ │ │ │ + │ │ │ │ +
169 }
│ │ │ │ +
│ │ │ │ +
170 template <class F,int dimD,int dimR,unsigned int deriv,
│ │ │ │ + │ │ │ │ + │ │ │ │ +
173
│ │ │ │ +
174 // Implemnetation for valued based layout
│ │ │ │ +
175 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
176 struct Derivatives<F,dimD,dimR,deriv,DerivativeLayoutNS::value>
│ │ │ │ +
177 : public Derivatives<F,dimD,dimR,deriv-1,DerivativeLayoutNS::value>
│ │ │ │ +
178 {
│ │ │ │ + │ │ │ │ +
180 typedef Derivatives<F,dimD,dimR,deriv-1,DerivativeLayoutNS::value> Base;
│ │ │ │ + │ │ │ │ +
182
│ │ │ │ +
183 typedef F Field;
│ │ │ │ +
184 typedef F field_type;
│ │ │ │ +
185
│ │ │ │ + │ │ │ │ +
187 static const unsigned int dimDomain = dimD;
│ │ │ │ +
188 static const unsigned int dimRange = dimR;
│ │ │ │ +
189 constexpr static int size = Base::size+ThisLFETensor::size*dimR;
│ │ │ │ +
190 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
191
│ │ │ │ +
│ │ │ │ +
192 This &operator=(const F& f)
│ │ │ │ +
193 {
│ │ │ │ +
194 block() = f;
│ │ │ │ +
195 return *this;
│ │ │ │ +
196 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
197 This &operator=(const Dune::FieldVector<ThisLFETensor,dimR> &t)
│ │ │ │ +
198 {
│ │ │ │ +
199 tensor_ = t;
│ │ │ │ +
200 return *this;
│ │ │ │ +
201 }
│ │ │ │ +
│ │ │ │ +
202 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
203 This &operator=(const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &t)
│ │ │ │ +
204 {
│ │ │ │ +
205 tensor<dorder>() = t;
│ │ │ │ +
206 return *this;
│ │ │ │ +
207 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
209 {
│ │ │ │ +
210 block() = t;
│ │ │ │ +
211 return *this;
│ │ │ │ +
212 }
│ │ │ │ +
│ │ │ │ +
213
│ │ │ │ +
│ │ │ │ +
214 This &operator*= ( const field_type &f )
│ │ │ │ +
215 {
│ │ │ │ +
216 block() *= f;
│ │ │ │ +
217 return *this;
│ │ │ │ +
218 }
│ │ │ │ +
│ │ │ │ +
219
│ │ │ │ +
│ │ │ │ +
220 void axpy(const F &a, const This &y)
│ │ │ │ +
221 {
│ │ │ │ +
222 block().axpy(a,y.block());
│ │ │ │ +
223 }
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225 // assign with same layout (only different Field)
│ │ │ │ +
226 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
228 {
│ │ │ │ +
229 field_cast(y.block(),block());
│ │ │ │ +
230 }
│ │ │ │ +
│ │ │ │ +
231 // assign with different layout (same dimRange)
│ │ │ │ +
232 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
234 {
│ │ │ │ +
235 Base::assign(y);
│ │ │ │ +
236 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ +
237 tensor_[rr] = y[rr].template tensor<deriv>()[0];
│ │ │ │ +
238 }
│ │ │ │ +
│ │ │ │ +
239 // assign with rth component of function
│ │ │ │ +
240 template <class Fy,int dimRy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
242 {
│ │ │ │ +
243 assign<Fy,dimRy>(y.block(),r);
│ │ │ │ +
244 }
│ │ │ │ +
│ │ │ │ +
245 // assign with scalar functions to component r
│ │ │ │ +
246 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
248 {
│ │ │ │ +
249 assign(r,y.block());
│ │ │ │ +
250 }
│ │ │ │ +
│ │ │ │ +
251 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
253 {
│ │ │ │ +
254 assign(r,y[0]);
│ │ │ │ +
255 }
│ │ │ │ +
│ │ │ │ +
256
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
258 {
│ │ │ │ +
259 return reinterpret_cast<Block&>(*this);
│ │ │ │ +
260 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
261 const Block &block() const
│ │ │ │ +
262 {
│ │ │ │ +
263 return reinterpret_cast<const Block&>(*this);
│ │ │ │ +
264 }
│ │ │ │ +
│ │ │ │ +
265
│ │ │ │ +
266 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
267 const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &tensor() const
│ │ │ │ +
268 {
│ │ │ │ +
269 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
270 const std::integral_constant<int,dorder> a = {};
│ │ │ │ +
271 return tensor(a);
│ │ │ │ +
272 }
│ │ │ │ +
│ │ │ │ +
273 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
274 Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &tensor()
│ │ │ │ +
275 {
│ │ │ │ +
276 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
277 return tensor(std::integral_constant<int,dorder>());
│ │ │ │ +
278 }
│ │ │ │ +
│ │ │ │ +
279 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
280 const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block() const
│ │ │ │ +
281 {
│ │ │ │ +
282 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
283 const std::integral_constant<int,dorder> a = {};
│ │ │ │ +
284 return reinterpret_cast<const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ +
285 }
│ │ │ │ +
│ │ │ │ +
286 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
287 Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block()
│ │ │ │ +
288 {
│ │ │ │ +
289 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
290 const std::integral_constant<int,dorder> a = {};
│ │ │ │ +
291 return reinterpret_cast<Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ +
292 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
294 return tensor_[r];
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
296 const ThisLFETensor &operator[](int r) const {
│ │ │ │ +
297 return tensor_[r];
│ │ │ │ +
298 }
│ │ │ │ +
│ │ │ │ +
299 protected:
│ │ │ │ +
300 template <class Fy,int dimRy>
│ │ │ │ +
│ │ │ │ +
301 void assign(const FieldVector<Fy,size*dimRy> &y,unsigned int r)
│ │ │ │ +
302 {
│ │ │ │ +
303 Base::template assign<Fy,dimRy>(reinterpret_cast<const FieldVector<Fy,Base::size*dimRy>&>(y),r);
│ │ │ │ +
304 tensor_[0] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[Base::size*dimRy+r*ThisLFETensor::size]);
│ │ │ │ +
305 }
│ │ │ │ +
│ │ │ │ +
306 template <class Fy>
│ │ │ │ +
│ │ │ │ +
307 void assign(unsigned int r,const FieldVector<Fy,size/dimR> &y)
│ │ │ │ +
308 {
│ │ │ │ +
309 Base::assign(r,reinterpret_cast<const FieldVector<Fy,Base::size/dimR>&>(y));
│ │ │ │ +
310 tensor_[r] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[Base::size/dimR]);
│ │ │ │ +
311 }
│ │ │ │ +
│ │ │ │ +
312 // assign with different layout (same dimRange)
│ │ │ │ +
313 template <class Fy,unsigned int dy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
315 {
│ │ │ │ +
316 Base::assign(y);
│ │ │ │ +
317 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ +
318 tensor_[rr] = y[rr].template tensor<deriv>()[0];
│ │ │ │ +
319 }
│ │ │ │ +
│ │ │ │ +
320
│ │ │ │ +
321 template <int dorder>
│ │ │ │ +
322 const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &
│ │ │ │ +
│ │ │ │ +
323 tensor(const std::integral_constant<int,dorder> &dorderVar) const
│ │ │ │ +
324 {
│ │ │ │ +
325 return Base::tensor(dorderVar);
│ │ │ │ +
326 }
│ │ │ │ +
│ │ │ │ +
327 const Dune::FieldVector<LFETensor<F,dimD,deriv>,dimR> &
│ │ │ │ +
│ │ │ │ +
328 tensor(const std::integral_constant<int,deriv> &dorderVar) const
│ │ │ │ +
329 {
│ │ │ │ +
330 return tensor_;
│ │ │ │ +
331 }
│ │ │ │ +
│ │ │ │ +
332 template <int dorder>
│ │ │ │ +
333 Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &
│ │ │ │ +
│ │ │ │ +
334 tensor(const std::integral_constant<int,dorder> &dorderVar)
│ │ │ │ +
335 {
│ │ │ │ +
336 return Base::tensor(dorderVar);
│ │ │ │ +
337 }
│ │ │ │ +
│ │ │ │ +
338 Dune::FieldVector<LFETensor<F,dimD,deriv>,dimR> &
│ │ │ │ +
│ │ │ │ +
339 tensor(const std::integral_constant<int,deriv> &dorderVar)
│ │ │ │ +
340 {
│ │ │ │ +
341 return tensor_;
│ │ │ │ +
342 }
│ │ │ │ +
│ │ │ │ +
343 Dune::FieldVector<ThisLFETensor,dimR> tensor_;
│ │ │ │ +
344 };
│ │ │ │ +
│ │ │ │ +
345
│ │ │ │ +
346 template <class F,int dimD,int dimR>
│ │ │ │ +
│ │ │ │ +
347 struct Derivatives<F,dimD,dimR,0,DerivativeLayoutNS::value>
│ │ │ │ +
348 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
351
│ │ │ │ +
352 typedef F Field;
│ │ │ │ +
353 typedef F field_type;
│ │ │ │ +
354
│ │ │ │ + │ │ │ │ +
356 static const unsigned int dimDomain = dimD;
│ │ │ │ +
357 static const unsigned int dimRange = dimR;
│ │ │ │ +
358 constexpr static int size = ThisLFETensor::size*dimR;
│ │ │ │ +
359 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
360
│ │ │ │ +
361 template <class FF>
│ │ │ │ +
│ │ │ │ +
362 This &operator=(const FF& f)
│ │ │ │ +
363 {
│ │ │ │ +
364 for (int r=0; r<dimR; ++r)
│ │ │ │ +
365 tensor_[r] = field_cast<F>(f);
│ │ │ │ +
366 return *this;
│ │ │ │ +
367 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
368 This &operator=(const Dune::FieldVector<ThisLFETensor,dimR> &t)
│ │ │ │ +
369 {
│ │ │ │ +
370 tensor_ = t;
│ │ │ │ +
371 return *this;
│ │ │ │ +
372 }
│ │ │ │ +
│ │ │ │ +
373
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
375 {
│ │ │ │ +
376 block() = t;
│ │ │ │ +
377 return *this;
│ │ │ │ +
378 }
│ │ │ │ +
│ │ │ │ +
379
│ │ │ │ +
│ │ │ │ +
380 This &operator*= ( const field_type &f )
│ │ │ │ +
381 {
│ │ │ │ +
382 block() *= f;
│ │ │ │ +
383 return *this;
│ │ │ │ +
384 }
│ │ │ │ +
│ │ │ │ +
385
│ │ │ │ +
│ │ │ │ +
386 void axpy(const F &a, const This &y)
│ │ │ │ +
387 {
│ │ │ │ +
388 block().axpy(a,y.block());
│ │ │ │ +
389 }
│ │ │ │ +
│ │ │ │ +
390 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
392 {
│ │ │ │ +
393 field_cast(y.block(),block());
│ │ │ │ +
394 }
│ │ │ │ +
│ │ │ │ +
395 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
397 {
│ │ │ │ +
398 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ +
399 tensor_[rr] = y[rr].template tensor<0>()[0];
│ │ │ │ +
400 }
│ │ │ │ +
│ │ │ │ +
401 template <class Fy,int dimRy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
403 {
│ │ │ │ +
404 assign<Fy,dimRy>(y.block(),r);
│ │ │ │ +
405 }
│ │ │ │ +
│ │ │ │ +
406 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
408 {
│ │ │ │ +
409 tensor_[r].assign(y[0]);
│ │ │ │ +
410 }
│ │ │ │ +
│ │ │ │ +
411 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
413 {
│ │ │ │ +
414 tensor_[r].assign(y[0][0]);
│ │ │ │ +
415 }
│ │ │ │ +
│ │ │ │ +
416
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
418 {
│ │ │ │ +
419 return reinterpret_cast<Block&>(*this);
│ │ │ │ +
420 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
421 const Block &block() const
│ │ │ │ +
422 {
│ │ │ │ +
423 return reinterpret_cast<const Block&>(*this);
│ │ │ │ +
424 }
│ │ │ │ +
│ │ │ │ +
425
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
427 return tensor_[r];
│ │ │ │ +
428 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
429 const ThisLFETensor &operator[](int r) const {
│ │ │ │ +
430 return tensor_[r];
│ │ │ │ +
431 }
│ │ │ │ +
│ │ │ │ +
432 template <int dorder>
│ │ │ │ +
│ │ │ │ +
433 const Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &tensor() const
│ │ │ │ +
434 {
│ │ │ │ +
435 return tensor_;
│ │ │ │ +
436 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
437 Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &tensor()
│ │ │ │ +
438 {
│ │ │ │ +
439 return tensor_;
│ │ │ │ +
440 }
│ │ │ │ +
│ │ │ │ +
441 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
442 const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block() const
│ │ │ │ +
443 {
│ │ │ │ +
444 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
445 const std::integral_constant<int,dorder> a = {};
│ │ │ │ +
446 return reinterpret_cast<const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ +
447 }
│ │ │ │ +
│ │ │ │ +
448 template <unsigned int dorder>
│ │ │ │ +
│ │ │ │ +
449 Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block()
│ │ │ │ +
450 {
│ │ │ │ +
451 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ +
452 const std::integral_constant<int,dorder> a = {};
│ │ │ │ +
453 return reinterpret_cast<Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ +
454 }
│ │ │ │ +
│ │ │ │ +
455
│ │ │ │ +
456 protected:
│ │ │ │ +
457 const Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &
│ │ │ │ +
│ │ │ │ +
458 tensor(const std::integral_constant<int,0> &dorderVar) const
│ │ │ │ +
459 {
│ │ │ │ +
460 return tensor_;
│ │ │ │ +
461 }
│ │ │ │ +
│ │ │ │ +
462 Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &
│ │ │ │ +
│ │ │ │ +
463 tensor(const std::integral_constant<int,0> &dorderVar)
│ │ │ │ +
464 {
│ │ │ │ +
465 return tensor_;
│ │ │ │ +
466 }
│ │ │ │ +
│ │ │ │ +
467 template <class Fy,unsigned int dy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
469 {
│ │ │ │ +
470 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ +
471 tensor_[rr] = y[rr].template tensor<0>()[0];
│ │ │ │ +
472 }
│ │ │ │ +
│ │ │ │ +
473 template <class Fy,int dimRy>
│ │ │ │ +
│ │ │ │ +
474 void assign(const FieldVector<Fy,size*dimRy> &y,unsigned int r)
│ │ │ │ +
475 {
│ │ │ │ +
476 tensor_[0] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[r*ThisLFETensor::size]);
│ │ │ │ +
477 }
│ │ │ │ +
│ │ │ │ +
478 template <class Fy>
│ │ │ │ +
│ │ │ │ +
479 void assign(unsigned int r,const FieldVector<Fy,size/dimR> &y)
│ │ │ │ +
480 {
│ │ │ │ +
481 tensor_[r] = y;
│ │ │ │ +
482 }
│ │ │ │ +
│ │ │ │ +
483 Dune::FieldVector<ThisLFETensor,dimR> tensor_;
│ │ │ │ +
484 };
│ │ │ │ +
│ │ │ │ +
485
│ │ │ │ +
486 // Implemnetation for DerivativeLayoutNS::derivative based layout
│ │ │ │ +
487 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
488 struct Derivatives<F,dimD,dimR,deriv,DerivativeLayoutNS::derivative>
│ │ │ │ +
489 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
492
│ │ │ │ +
493 typedef F Field;
│ │ │ │ +
494 typedef F field_type;
│ │ │ │ +
495
│ │ │ │ + │ │ │ │ +
497 static const unsigned int dimDomain = dimD;
│ │ │ │ +
498 static const unsigned int dimRange = dimR;
│ │ │ │ +
499 constexpr static int size = ScalarDeriv::size*dimR;
│ │ │ │ +
500 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
501
│ │ │ │ +
502 template <class FF>
│ │ │ │ +
│ │ │ │ +
503 This &operator=(const FF& f)
│ │ │ │ +
504 {
│ │ │ │ +
505 block() = field_cast<F>(f);
│ │ │ │ +
506 return *this;
│ │ │ │ +
507 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
509 {
│ │ │ │ +
510 block() = t;
│ │ │ │ +
511 return *this;
│ │ │ │ +
512 }
│ │ │ │ +
│ │ │ │ +
513
│ │ │ │ +
│ │ │ │ +
514 This &operator*= ( const field_type &f )
│ │ │ │ +
515 {
│ │ │ │ +
516 block() *= f;
│ │ │ │ +
517 return *this;
│ │ │ │ +
518 }
│ │ │ │ +
│ │ │ │ +
519
│ │ │ │ +
520 template <class FF>
│ │ │ │ +
│ │ │ │ +
521 void axpy(const FF &a, const This &y)
│ │ │ │ +
522 {
│ │ │ │ +
523 block().axpy(field_cast<F>(a),y.block());
│ │ │ │ +
524 }
│ │ │ │ +
│ │ │ │ +
525 // assign with same layout (only different Field)
│ │ │ │ +
526 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
528 {
│ │ │ │ +
529 field_cast(y.block(),block());
│ │ │ │ +
530 }
│ │ │ │ +
│ │ │ │ +
531 // assign with different layout (same dimRange)
│ │ │ │ +
532 template <class Fy>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
534 {
│ │ │ │ +
535 for (unsigned int rr=0; rr<dimR; ++rr)
│ │ │ │ +
536 deriv_[rr].assign(y,rr);
│ │ │ │ +
537 }
│ │ │ │ +
│ │ │ │ +
538 // assign with scalar functions to component r
│ │ │ │ +
539 template <class Fy,DerivativeLayoutNS::DerivativeLayout layouty>
│ │ │ │ +
│ │ │ │ +
540 void assign(unsigned int r,const Derivatives<Fy,dimD,1,deriv,layouty> &y)
│ │ │ │ +
541 {
│ │ │ │ +
542 deriv_[r].assign(r,y);
│ │ │ │ +
543 }
│ │ │ │ +
│ │ │ │ +
544
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
546 {
│ │ │ │ +
547 return reinterpret_cast<Block&>(*this);
│ │ │ │ +
548 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
549 const Block &block() const
│ │ │ │ +
550 {
│ │ │ │ +
551 return reinterpret_cast<const Block&>(*this);
│ │ │ │ +
552 }
│ │ │ │ +
│ │ │ │ +
553
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
555 return deriv_[r];
│ │ │ │ +
556 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
557 const ScalarDeriv &operator[](int r) const {
│ │ │ │ +
558 return deriv_[r];
│ │ │ │ +
559 }
│ │ │ │ +
│ │ │ │ +
560 protected:
│ │ │ │ +
561 Dune::FieldVector<ScalarDeriv,dimR> deriv_;
│ │ │ │ +
562 };
│ │ │ │ +
│ │ │ │ +
563
│ │ │ │ +
564 // ******************************************
│ │ │ │ +
565 // AXPY *************************************
│ │ │ │ +
566 // ******************************************
│ │ │ │ +
567 template <class Vec1,class Vec2,unsigned int deriv>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
569 {
│ │ │ │ +
570 template <class Field>
│ │ │ │ +
│ │ │ │ +
571 static void apply(unsigned int r,const Field &a,
│ │ │ │ +
572 const Vec1 &x, Vec2 &y)
│ │ │ │ +
573 {
│ │ │ │ +
574 y.axpy(a,x);
│ │ │ │ +
575 }
│ │ │ │ +
│ │ │ │ +
576 };
│ │ │ │ +
│ │ │ │ +
577 template <class F1,int dimD,int dimR,
│ │ │ │ +
578 unsigned int d,
│ │ │ │ +
579 class Vec2,
│ │ │ │ +
580 unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
581 struct LFETensorAxpy<Derivatives<F1,dimD,dimR,d,DerivativeLayoutNS::value>,Vec2,deriv>
│ │ │ │ +
582 {
│ │ │ │ + │ │ │ │ +
584 template <class Field>
│ │ │ │ +
│ │ │ │ +
585 static void apply(unsigned int r,const Field &a,
│ │ │ │ +
586 const Vec1 &x, Vec2 &y)
│ │ │ │ +
587 {
│ │ │ │ +
588 const FieldVector<F1,Vec2::size> &xx = x.template block<deriv>();
│ │ │ │ +
589 for (int i=0; i<y.size; ++i)
│ │ │ │ +
590 y[i] += xx[i]*a;
│ │ │ │ +
591 }
│ │ │ │ +
│ │ │ │ +
592 };
│ │ │ │ +
│ │ │ │ +
593 template <class F1,int dimD,int dimR,
│ │ │ │ +
594 unsigned int d,
│ │ │ │ +
595 class Vec2,
│ │ │ │ +
596 unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
597 struct LFETensorAxpy<Derivatives<F1,dimD,dimR,d,DerivativeLayoutNS::derivative>,Vec2,deriv>
│ │ │ │ +
598 {
│ │ │ │ + │ │ │ │ +
600 template <class Field>
│ │ │ │ +
│ │ │ │ +
601 static void apply(unsigned int r,const Field &a,
│ │ │ │ +
602 const Vec1 &x, Vec2 &y)
│ │ │ │ +
603 {
│ │ │ │ +
604 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ + │ │ │ │ +
606 Vec2,deriv>::apply(rr,a,x[rr],y);
│ │ │ │ +
607 }
│ │ │ │ +
│ │ │ │ +
608 };
│ │ │ │ +
│ │ │ │ +
609 template <class F1,int dimD,
│ │ │ │ +
610 unsigned int d,
│ │ │ │ +
611 class Vec2,
│ │ │ │ +
612 unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
613 struct LFETensorAxpy<Derivatives<F1,dimD,1,d,DerivativeLayoutNS::derivative>,Vec2,deriv>
│ │ │ │ +
614 {
│ │ │ │ + │ │ │ │ +
616 template <class Field>
│ │ │ │ +
│ │ │ │ +
617 static void apply(unsigned int r,const Field &a,
│ │ │ │ +
618 const Vec1 &x, Vec2 &y)
│ │ │ │ +
619 {
│ │ │ │ + │ │ │ │ +
621 Vec2,deriv>::apply(r,a,x[0],y);
│ │ │ │ +
622 }
│ │ │ │ +
│ │ │ │ +
623 };
│ │ │ │ +
│ │ │ │ +
624 template <class F1,int dimD,
│ │ │ │ +
625 unsigned int d,
│ │ │ │ +
626 class Vec2,
│ │ │ │ +
627 unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
628 struct LFETensorAxpy<Derivatives<F1,dimD,1,d,DerivativeLayoutNS::value>,Vec2,deriv>
│ │ │ │ +
629 {
│ │ │ │ + │ │ │ │ +
631 template <class Field>
│ │ │ │ +
│ │ │ │ +
632 static void apply(unsigned int r,const Field &a,
│ │ │ │ +
633 const Vec1 &x, Vec2 &y)
│ │ │ │ +
634 {
│ │ │ │ +
635 typedef LFETensor<F1,dimD,deriv> LFETensorType;
│ │ │ │ +
636 const unsigned int rr = r*LFETensorType::size;
│ │ │ │ +
637 const FieldVector<F1,LFETensorType::size> &xx = x.template block<deriv>();
│ │ │ │ +
638 for (int i=0; i<FieldVector<F1,LFETensorType::size>::dimension; ++i)
│ │ │ │ +
639 y[rr+i] += xx[i]*a;
│ │ │ │ +
640 }
│ │ │ │ +
│ │ │ │ +
641 };
│ │ │ │ +
│ │ │ │ +
642
│ │ │ │ +
643 // ***********************************************
│ │ │ │ +
644 // Assign ****************************************
│ │ │ │ +
645 // ***********************************************
│ │ │ │ +
646 template <class Vec1,class Vec2>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
648 {
│ │ │ │ +
│ │ │ │ +
649 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
650 {
│ │ │ │ +
651 field_cast(vec1,vec2);
│ │ │ │ +
652 }
│ │ │ │ +
│ │ │ │ +
653 };
│ │ │ │ +
│ │ │ │ +
654 template <int dimD,int dimR,unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ +
655 class F1,class F2>
│ │ │ │ +
│ │ │ │ +
656 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,layout>,
│ │ │ │ +
657 Derivatives<F2,dimD,dimR,deriv,layout> >
│ │ │ │ +
658 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
661 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
662 {
│ │ │ │ +
663 field_cast(vec1.block(),vec2.block());
│ │ │ │ +
664 }
│ │ │ │ +
│ │ │ │ +
665 };
│ │ │ │ +
│ │ │ │ +
666 template <int dimD,int dimR,unsigned int deriv,
│ │ │ │ +
667 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
668 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::value>,
│ │ │ │ +
669 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ +
670 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
673 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
674 {
│ │ │ │ +
675 vec2.assign(vec1);
│ │ │ │ +
676 }
│ │ │ │ +
│ │ │ │ +
677 };
│ │ │ │ +
│ │ │ │ +
678 template <int dimD,int dimR,unsigned int deriv,
│ │ │ │ +
679 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
680 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ +
681 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::value> >
│ │ │ │ +
682 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
685 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
686 {
│ │ │ │ +
687 vec2.assign(vec1);
│ │ │ │ +
688 }
│ │ │ │ +
│ │ │ │ +
689 };
│ │ │ │ +
│ │ │ │ +
690 template <int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ +
691 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
692 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ +
693 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::value> >
│ │ │ │ +
694 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
697 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
698 {
│ │ │ │ +
699 vec2.assign(r,vec1);
│ │ │ │ +
700 }
│ │ │ │ +
│ │ │ │ +
701 };
│ │ │ │ +
│ │ │ │ +
702 template <int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ +
703 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
704 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ +
705 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ +
706 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
709 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
710 {
│ │ │ │ +
711 vec2.assign(r,vec1);
│ │ │ │ +
712 }
│ │ │ │ +
│ │ │ │ +
713 };
│ │ │ │ +
│ │ │ │ +
714 template <int dimD,unsigned int deriv,
│ │ │ │ +
715 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
716 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,
│ │ │ │ +
717 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::value> >
│ │ │ │ +
718 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
721 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
722 {
│ │ │ │ +
723 field_cast(vec1.block(),vec2.block());
│ │ │ │ +
724 }
│ │ │ │ +
│ │ │ │ +
725 };
│ │ │ │ +
│ │ │ │ +
726 template <int dimD,unsigned int deriv,
│ │ │ │ +
727 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
728 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ +
729 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ +
730 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
733 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
734 {
│ │ │ │ +
735 field_cast(vec1.block(),vec2.block());
│ │ │ │ +
736 }
│ │ │ │ +
│ │ │ │ +
737 };
│ │ │ │ +
│ │ │ │ +
738 template <int dimD,unsigned int deriv,
│ │ │ │ +
739 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
740 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ +
741 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::value> >
│ │ │ │ +
742 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
745 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
746 {
│ │ │ │ +
747 field_cast(vec1.block(),vec2.block());
│ │ │ │ +
748 }
│ │ │ │ +
│ │ │ │ +
749 };
│ │ │ │ +
│ │ │ │ +
750 template <int dimD,unsigned int deriv,
│ │ │ │ +
751 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
752 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,
│ │ │ │ +
753 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ +
754 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
757 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
758 {
│ │ │ │ +
759 field_cast(vec1.block(),vec2.block());
│ │ │ │ +
760 }
│ │ │ │ +
│ │ │ │ +
761 };
│ │ │ │ +
│ │ │ │ +
762 template <int dimD,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ +
763 class F1, class F2>
│ │ │ │ +
│ │ │ │ +
764 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ +
765 F2 >
│ │ │ │ +
766 {
│ │ │ │ + │ │ │ │ +
768 typedef F2 Vec2;
│ │ │ │ +
│ │ │ │ +
769 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
770 {
│ │ │ │ +
771 field_cast(vec1.block(),vec2);
│ │ │ │ +
772 }
│ │ │ │ +
│ │ │ │ +
773 };
│ │ │ │ +
│ │ │ │ +
774 template <int dimD,int dimR,
│ │ │ │ +
775 class F1,unsigned int deriv,
│ │ │ │ +
776 class F2>
│ │ │ │ +
│ │ │ │ +
777 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::value>,FieldVector<F2,dimR> >
│ │ │ │ +
778 {
│ │ │ │ + │ │ │ │ +
780 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ +
│ │ │ │ +
781 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
782 {
│ │ │ │ +
783 field_cast(vec1.template block<0>(),vec2);
│ │ │ │ +
784 }
│ │ │ │ +
│ │ │ │ +
785 };
│ │ │ │ +
│ │ │ │ +
786 template <int dimD,int dimR,
│ │ │ │ +
787 class F1,unsigned int deriv,
│ │ │ │ +
788 class F2>
│ │ │ │ +
│ │ │ │ +
789 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,dimR> >
│ │ │ │ +
790 {
│ │ │ │ + │ │ │ │ +
792 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ +
│ │ │ │ +
793 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
794 {
│ │ │ │ +
795 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ +
796 field_cast(vec1[rr].template tensor<0>()[0].block(),vec2[rr]);
│ │ │ │ +
797 }
│ │ │ │ +
│ │ │ │ +
798 };
│ │ │ │ +
│ │ │ │ +
799 template <int dimD,
│ │ │ │ +
800 class F1,unsigned int deriv,
│ │ │ │ +
801 class F2,int dimR>
│ │ │ │ +
│ │ │ │ +
802 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,FieldVector<F2,dimR> >
│ │ │ │ +
803 {
│ │ │ │ + │ │ │ │ +
805 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ +
│ │ │ │ +
806 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
807 {
│ │ │ │ +
808 field_cast(vec1.template tensor<0>()[0].block(),vec2[r]);
│ │ │ │ +
809 }
│ │ │ │ +
│ │ │ │ +
810 };
│ │ │ │ +
│ │ │ │ +
811 template <int dimD,
│ │ │ │ +
812 class F1,unsigned int deriv,
│ │ │ │ +
813 class F2,int dimR>
│ │ │ │ +
│ │ │ │ +
814 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,dimR> >
│ │ │ │ +
815 {
│ │ │ │ + │ │ │ │ +
817 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ +
│ │ │ │ +
818 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
819 {
│ │ │ │ +
820 field_cast(vec1[0].template tensor<0>()[0].block(),vec2[r]);
│ │ │ │ +
821 }
│ │ │ │ +
│ │ │ │ +
822 };
│ │ │ │ +
│ │ │ │ +
823 template <int dimD,
│ │ │ │ +
824 class F1,unsigned int deriv,
│ │ │ │ +
825 class F2>
│ │ │ │ +
│ │ │ │ +
826 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,FieldVector<F2,1> >
│ │ │ │ +
827 {
│ │ │ │ + │ │ │ │ +
829 typedef FieldVector<F2,1> Vec2;
│ │ │ │ +
│ │ │ │ +
830 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
831 {
│ │ │ │ +
832 field_cast(vec1.template tensor<0>()[0].block(),vec2);
│ │ │ │ +
833 }
│ │ │ │ +
│ │ │ │ +
834 };
│ │ │ │ +
│ │ │ │ +
835 template <int dimD,
│ │ │ │ +
836 class F1,unsigned int deriv,
│ │ │ │ +
837 class F2>
│ │ │ │ +
│ │ │ │ +
838 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,1> >
│ │ │ │ +
839 {
│ │ │ │ + │ │ │ │ +
841 typedef FieldVector<F2,1> Vec2;
│ │ │ │ +
│ │ │ │ +
842 static void apply(unsigned int /*r*/,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ +
843 {
│ │ │ │ +
844 field_cast(vec1[0].template tensor<0>()[0].block(),vec2);
│ │ │ │ +
845 }
│ │ │ │ +
│ │ │ │ +
846 };
│ │ │ │ +
│ │ │ │ +
847
│ │ │ │ +
848 // ***********************************************
│ │ │ │ +
849 // IO ********************************************
│ │ │ │ +
850 // ***********************************************
│ │ │ │ +
851 template <class F,int dimD,unsigned int deriv>
│ │ │ │ +
│ │ │ │ +
852 std::ostream &operator<< ( std::ostream &out, const LFETensor< F,dimD,deriv > &tensor )
│ │ │ │ +
853 {
│ │ │ │ +
854 return out << tensor.block();
│ │ │ │ +
855 }
│ │ │ │ +
│ │ │ │ +
856#if 0
│ │ │ │ +
857 template <class F,int dimD,unsigned int deriv>
│ │ │ │ +
858 std::ostream &operator<< ( std::ostream &out, const ScalarDerivatives< F,dimD,deriv > &d )
│ │ │ │ +
859 {
│ │ │ │ +
860 out << static_cast<const ScalarDerivatives< F,dimD,deriv-1 > &>(d);
│ │ │ │ +
861 out << " , " << d.tensor() << std::endl;
│ │ │ │ +
862 return out;
│ │ │ │ +
863 }
│ │ │ │ +
864 template <class F,int dimD>
│ │ │ │ +
865 std::ostream &operator<< ( std::ostream &out, const ScalarDerivatives< F,dimD,0 > &d )
│ │ │ │ +
866 {
│ │ │ │ +
867 out << d.tensor() << std::endl;
│ │ │ │ +
868 return out;
│ │ │ │ +
869 }
│ │ │ │ +
870#endif
│ │ │ │ +
871 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
873 {
│ │ │ │ +
874 out << " ( ";
│ │ │ │ +
875 out << d[0];
│ │ │ │ +
876 for (int r=1; r<dimR; ++r)
│ │ │ │ +
877 {
│ │ │ │ +
878 out << " , " << d[r];
│ │ │ │ +
879 }
│ │ │ │ +
880 out << " ) " << std::endl;
│ │ │ │ +
881 return out;
│ │ │ │ +
882 }
│ │ │ │ +
│ │ │ │ +
883 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
885 {
│ │ │ │ +
886 out << static_cast<const Derivatives< F,dimD,dimR,deriv-1,DerivativeLayoutNS::value > &>(d);
│ │ │ │ +
887 out << " ( ";
│ │ │ │ +
888 out << d[0];
│ │ │ │ +
889 for (int r=1; r<dimR; ++r)
│ │ │ │ +
890 {
│ │ │ │ +
891 out << " , " << d[r];
│ │ │ │ +
892 }
│ │ │ │ +
893 out << " ) " << std::endl;
│ │ │ │ +
894 return out;
│ │ │ │ +
895 }
│ │ │ │ +
│ │ │ │ +
896 template <class F,int dimD,int dimR>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
898 {
│ │ │ │ +
899 out << " ( ";
│ │ │ │ +
900 out << d[0];
│ │ │ │ +
901 for (int r=1; r<dimR; ++r)
│ │ │ │ +
902 {
│ │ │ │ +
903 out << " , " << d[r];
│ │ │ │ +
904 }
│ │ │ │ +
905 out << " ) " << std::endl;
│ │ │ │ +
906 return out;
│ │ │ │ +
907 }
│ │ │ │ +
│ │ │ │ +
908 template <class F,int dimD,int dimR>
│ │ │ │ +
│ │ │ │ +
909 std::ostream &operator<< ( std::ostream &out, const Derivatives< F,dimD,dimR,0,DerivativeLayoutNS::value > &d )
│ │ │ │ +
910 {
│ │ │ │ +
911 out << " ( ";
│ │ │ │ +
912 out << d[0];
│ │ │ │ +
913 for (int r=1; r<dimR; ++r)
│ │ │ │ +
914 {
│ │ │ │ +
915 out << " , " << d[r];
│ │ │ │ +
916 }
│ │ │ │ +
917 out << " ) " << std::endl;
│ │ │ │ +
918 return out;
│ │ │ │ +
919 }
│ │ │ │ +
│ │ │ │ +
920 template <class F,int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout>
│ │ │ │ +
│ │ │ │ +
921 std::ostream &operator<< ( std::ostream &out, const std::vector<Derivatives< F,dimD,dimR,deriv,layout > > &y )
│ │ │ │ +
922 {
│ │ │ │ +
923 out << "Number of basis functions: " << y.size() << std::endl;
│ │ │ │ +
924 for (unsigned int i=0; i<y.size(); ++i)
│ │ │ │ +
925 {
│ │ │ │ +
926 out << "Base " << i << " : " << std::endl;
│ │ │ │ +
927 out << y[i];
│ │ │ │ +
928 out << std::endl;
│ │ │ │ +
929 }
│ │ │ │ +
930 return out;
│ │ │ │ +
931 }
│ │ │ │ +
│ │ │ │ +
932}
│ │ │ │ +
933#endif // DUNE_TENSOR_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Definition hierarchicalp2.hh:23
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalp2.hh:43
│ │ │ │ -
HierarchicalP2LocalFiniteElement()
Definition hierarchicalp2.hh:38
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalp2.hh:63
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalp2.hh:50
│ │ │ │ -
LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits::LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits
Definition hierarchicalp2.hh:34
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalp2.hh:57
│ │ │ │ -
static constexpr GeometryType type()
Definition hierarchicalp2.hh:70
│ │ │ │ -
Definition hierarchicalsimplexp2localbasis.hh:23
│ │ │ │ -
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ +
DerivativeLayout
Definition tensor.hh:168
│ │ │ │ +
@ derivative
Definition tensor.hh:168
│ │ │ │ +
@ value
Definition tensor.hh:168
│ │ │ │ +
Definition tensor.hh:33
│ │ │ │ +
const Block & block() const
Definition tensor.hh:76
│ │ │ │ +
This & operator*=(const field_type &f)
Definition tensor.hh:56
│ │ │ │ +
Dune::FieldVector< F, size > Block
Definition tensor.hh:41
│ │ │ │ +
This & operator=(const FF &f)
Definition tensor.hh:44
│ │ │ │ +
Block block_
Definition tensor.hh:89
│ │ │ │ +
F field_type
Definition tensor.hh:39
│ │ │ │ +
void axpy(const F &a, const This &y)
Definition tensor.hh:80
│ │ │ │ +
Block & block()
Definition tensor.hh:72
│ │ │ │ +
void assign(const LFETensor< Fy, dimD, deriv > &y)
Definition tensor.hh:85
│ │ │ │ +
static const unsigned int size
Definition tensor.hh:40
│ │ │ │ +
const field_type & operator[](const unsigned int i) const
Definition tensor.hh:62
│ │ │ │ +
Definition tensor.hh:107
│ │ │ │ +
Block & block()
Definition tensor.hh:154
│ │ │ │ +
F field_type
Definition tensor.hh:111
│ │ │ │ +
Block block_
Definition tensor.hh:162
│ │ │ │ +
void assign(const LFETensor< Fy, dimD, 0 > &y)
Definition tensor.hh:149
│ │ │ │ +
const Block & block() const
Definition tensor.hh:158
│ │ │ │ +
void axpy(const F &a, const This &y)
Definition tensor.hh:144
│ │ │ │ +
Dune::FieldVector< F, size > Block
Definition tensor.hh:113
│ │ │ │ +
Definition tensor.hh:172
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This
Definition tensor.hh:179
│ │ │ │ +
This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > &t)
Definition tensor.hh:203
│ │ │ │ + │ │ │ │ +
Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base
Definition tensor.hh:180
│ │ │ │ +
const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std::integral_constant< int, dorder > &dorderVar) const
Definition tensor.hh:323
│ │ │ │ +
void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r)
Definition tensor.hh:301
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:227
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:314
│ │ │ │ + │ │ │ │ +
const ThisLFETensor & operator[](int r) const
Definition tensor.hh:296
│ │ │ │ +
Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block()
Definition tensor.hh:287
│ │ │ │ +
LFETensor< F, dimD, deriv > ThisLFETensor
Definition tensor.hh:181
│ │ │ │ +
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:247
│ │ │ │ +
const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() const
Definition tensor.hh:280
│ │ │ │ +
Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std::integral_constant< int, dorder > &dorderVar)
Definition tensor.hh:334
│ │ │ │ +
const Block & block() const
Definition tensor.hh:261
│ │ │ │ +
void axpy(const F &a, const This &y)
Definition tensor.hh:220
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:233
│ │ │ │ +
This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t)
Definition tensor.hh:197
│ │ │ │ +
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:252
│ │ │ │ +
This & operator=(const Block &t)
Definition tensor.hh:208
│ │ │ │ +
Dune::FieldVector< F, size > Block
Definition tensor.hh:190
│ │ │ │ +
Dune::FieldVector< ThisLFETensor, dimR > tensor_
Definition tensor.hh:343
│ │ │ │ +
Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std::integral_constant< int, deriv > &dorderVar)
Definition tensor.hh:339
│ │ │ │ +
Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor()
Definition tensor.hh:274
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS::value > &y, unsigned int r)
Definition tensor.hh:241
│ │ │ │ +
const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const
Definition tensor.hh:267
│ │ │ │ +
const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std::integral_constant< int, deriv > &dorderVar) const
Definition tensor.hh:328
│ │ │ │ +
ThisLFETensor & operator[](int r)
Definition tensor.hh:293
│ │ │ │ + │ │ │ │ +
void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y)
Definition tensor.hh:307
│ │ │ │ + │ │ │ │ +
ThisLFETensor & operator[](int r)
Definition tensor.hh:426
│ │ │ │ +
LFETensor< F, dimD, 0 > ThisLFETensor
Definition tensor.hh:350
│ │ │ │ +
Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block()
Definition tensor.hh:449
│ │ │ │ +
Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std::integral_constant< int, 0 > &dorderVar)
Definition tensor.hh:463
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > &y)
Definition tensor.hh:391
│ │ │ │ + │ │ │ │ +
Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This
Definition tensor.hh:349
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:468
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > &y, unsigned int r)
Definition tensor.hh:402
│ │ │ │ +
const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const
Definition tensor.hh:433
│ │ │ │ +
Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor()
Definition tensor.hh:437
│ │ │ │ +
This & operator=(const Block &t)
Definition tensor.hh:374
│ │ │ │ + │ │ │ │ +
const ThisLFETensor & operator[](int r) const
Definition tensor.hh:429
│ │ │ │ +
const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std::integral_constant< int, 0 > &dorderVar) const
Definition tensor.hh:458
│ │ │ │ +
Dune::FieldVector< F, size > Block
Definition tensor.hh:359
│ │ │ │ +
const Block & block() const
Definition tensor.hh:421
│ │ │ │ +
const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() const
Definition tensor.hh:442
│ │ │ │ +
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:412
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:396
│ │ │ │ +
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, DerivativeLayoutNS::value > &y)
Definition tensor.hh:407
│ │ │ │ +
This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t)
Definition tensor.hh:368
│ │ │ │ +
void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r)
Definition tensor.hh:474
│ │ │ │ +
Dune::FieldVector< ThisLFETensor, dimR > tensor_
Definition tensor.hh:483
│ │ │ │ +
void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y)
Definition tensor.hh:479
│ │ │ │ +
This & operator=(const FF &f)
Definition tensor.hh:362
│ │ │ │ + │ │ │ │ +
void axpy(const F &a, const This &y)
Definition tensor.hh:386
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > &y)
Definition tensor.hh:540
│ │ │ │ + │ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:533
│ │ │ │ +
Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This
Definition tensor.hh:490
│ │ │ │ +
Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv
Definition tensor.hh:491
│ │ │ │ +
const ScalarDeriv & operator[](int r) const
Definition tensor.hh:557
│ │ │ │ +
void axpy(const FF &a, const This &y)
Definition tensor.hh:521
│ │ │ │ +
This & operator=(const Block &t)
Definition tensor.hh:508
│ │ │ │ +
Dune::FieldVector< F, size > Block
Definition tensor.hh:500
│ │ │ │ +
Dune::FieldVector< ScalarDeriv, dimR > deriv_
Definition tensor.hh:561
│ │ │ │ +
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:527
│ │ │ │ +
Definition tensor.hh:569
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:571
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:585
│ │ │ │ +
Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:583
│ │ │ │ +
Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:599
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:601
│ │ │ │ +
Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:615
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:617
│ │ │ │ +
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:632
│ │ │ │ +
Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:630
│ │ │ │ +
Definition tensor.hh:648
│ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:649
│ │ │ │ + │ │ │ │ + │ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:661
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2
Definition tensor.hh:696
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2
Definition tensor.hh:708
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:769
│ │ │ │ +
Derivatives< F1, dimD, 1, deriv, layout > Vec1
Definition tensor.hh:767
│ │ │ │ +
Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:779
│ │ │ │ + │ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:781
│ │ │ │ +
Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:791
│ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:793
│ │ │ │ + │ │ │ │ +
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:804
│ │ │ │ + │ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:806
│ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:818
│ │ │ │ +
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:816
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:828
│ │ │ │ +
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:830
│ │ │ │ +
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:840
│ │ │ │ +
static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:842
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,137 +1,1607 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ -hierarchicalp2.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +tensor.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -14#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +5 │ │ │ │ │ +6#ifndef DUNE_TENSOR_HH │ │ │ │ │ +7#define DUNE_TENSOR_HH │ │ │ │ │ +8 │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ 15 │ │ │ │ │ 16namespace _D_u_n_e │ │ │ │ │ 17{ │ │ │ │ │ -18 │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -23 { │ │ │ │ │ -24 │ │ │ │ │ -25 static_assert(1 <= dim && dim <= 3, │ │ │ │ │ -26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3."); │ │ │ │ │ -27 │ │ │ │ │ -28 public: │ │ │ │ │ -31 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -32 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ -33 typename _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_2_>_:_:_T_r_a_i_t_s_:_: │ │ │ │ │ -_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e, │ │ │ │ │ -_3_4 │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ -> > _T_r_a_i_t_s; │ │ │ │ │ -35 │ │ │ │ │ -_3_8 _H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -39 {} │ │ │ │ │ -40 │ │ │ │ │ -_4_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -44 { │ │ │ │ │ -45 return basis; │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +18 /*********************************************** │ │ │ │ │ +19 * The classes here are work in progress. │ │ │ │ │ +20 * Basically they provide tensor structures for │ │ │ │ │ +21 * higher order derivatives of vector valued function. │ │ │ │ │ +22 * Two storage structures are provided │ │ │ │ │ +23 * (either based on the components of the vector valued │ │ │ │ │ +24 * functions or on the order of the derivative). │ │ │ │ │ +25 * Conversions are supplied between the two storage │ │ │ │ │ +26 * structures and simple operations, which make the │ │ │ │ │ +27 * code difficult to use and requires rewritting... │ │ │ │ │ +28 ***************************************************/ │ │ │ │ │ +29 │ │ │ │ │ +30 // Structure for scalar tensor of order deriv │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 class _L_F_E_T_e_n_s_o_r │ │ │ │ │ +33 { │ │ │ │ │ +34 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_e_r_i_v_> _T_h_i_s; │ │ │ │ │ +35 typedef _L_F_E_T_e_n_s_o_r _B_a_s_e_D_i_m; │ │ │ │ │ +36 typedef _L_F_E_T_e_n_s_o_r _B_a_s_e_D_e_r_i_v; │ │ │ │ │ +37 │ │ │ │ │ +38 public: │ │ │ │ │ +_3_9 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ +_4_0 static const unsigned int _s_i_z_e = _B_a_s_e_D_i_m_:_:_s_i_z_e+_B_a_s_e_D_e_r_i_v_:_:_s_i_z_e; │ │ │ │ │ +_4_1 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +42 │ │ │ │ │ +43 template< class FF > │ │ │ │ │ +_4_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const FF &f ) │ │ │ │ │ +45 { │ │ │ │ │ +46 _b_l_o_c_k() = field_cast< F >( f ); │ │ │ │ │ +47 return *this; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _B_l_o_c_k &b ) │ │ │ │ │ 51 { │ │ │ │ │ -52 return coefficients; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -_5_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -58 { │ │ │ │ │ -59 return interpolation; │ │ │ │ │ +52 _b_l_o_c_k() = b; │ │ │ │ │ +53 return *this; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +_5_6 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ +57 { │ │ │ │ │ +58 _b_l_o_c_k() *= f; │ │ │ │ │ +59 return *this; │ │ │ │ │ 60 } │ │ │ │ │ 61 │ │ │ │ │ -_6_3 unsigned int _s_i_z_e () const │ │ │ │ │ -64 { │ │ │ │ │ -65 return basis.size(); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -71 { │ │ │ │ │ -72 return GeometryTypes::simplex(dim); │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -75 private: │ │ │ │ │ -76 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis; │ │ │ │ │ -77 │ │ │ │ │ -78 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e coefficients; │ │ │ │ │ -79 │ │ │ │ │ -80 │ │ │ │ │ -_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ -> interpolation; │ │ │ │ │ -81 }; │ │ │ │ │ -82 │ │ │ │ │ -83} │ │ │ │ │ -84 │ │ │ │ │ -85#endif │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -Hierarchical p2 shape functions for the simplex. │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +_6_2 const _f_i_e_l_d___t_y_p_e &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) const │ │ │ │ │ +63 { │ │ │ │ │ +64 return _b_l_o_c_k()[ i ]; │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +_6_7 _f_i_e_l_d___t_y_p_e &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) │ │ │ │ │ +68 { │ │ │ │ │ +69 return _b_l_o_c_k()[ i ]; │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +_7_2 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ +73 { │ │ │ │ │ +74 return _b_l_o_c_k__; │ │ │ │ │ +75 } │ │ │ │ │ +_7_6 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ +77 { │ │ │ │ │ +78 return _b_l_o_c_k__; │ │ │ │ │ +79 } │ │ │ │ │ +_8_0 void _a_x_p_y(const F& a, const _T_h_i_s &y) │ │ │ │ │ +81 { │ │ │ │ │ +82 _b_l_o_c_k().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ +83 } │ │ │ │ │ +84 template │ │ │ │ │ +_8_5 void _a_s_s_i_g_n(const _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_D_,_d_e_r_i_v_> &y) │ │ │ │ │ +86 { │ │ │ │ │ +87 _f_i_e_l_d___c_a_s_t(y._b_l_o_c_k(),_b_l_o_c_k()); │ │ │ │ │ +88 } │ │ │ │ │ +_8_9 _B_l_o_c_k _b_l_o_c_k__; │ │ │ │ │ +90 }; │ │ │ │ │ +91 │ │ │ │ │ +92 // ****************************************** │ │ │ │ │ +93 template │ │ │ │ │ +_9_4 struct _L_F_E_T_e_n_s_o_r │ │ │ │ │ +95 { │ │ │ │ │ +_9_6 static const int _s_i_z_e = 0; │ │ │ │ │ +97 }; │ │ │ │ │ +98 │ │ │ │ │ +99 template │ │ │ │ │ +_1_0_0 struct _L_F_E_T_e_n_s_o_r │ │ │ │ │ +101 { │ │ │ │ │ +_1_0_2 static const int _s_i_z_e = 1; │ │ │ │ │ +103 }; │ │ │ │ │ +104 │ │ │ │ │ +105 template │ │ │ │ │ +_1_0_6 class _L_F_E_T_e_n_s_o_r │ │ │ │ │ +107 { │ │ │ │ │ +108 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_0_> _T_h_i_s; │ │ │ │ │ +109 │ │ │ │ │ +110 public: │ │ │ │ │ +_1_1_1 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ +_1_1_2 static const int _s_i_z_e = 1; │ │ │ │ │ +_1_1_3 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +114 │ │ │ │ │ +115 template< class FF > │ │ │ │ │ +_1_1_6 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const FF &f ) │ │ │ │ │ +117 { │ │ │ │ │ +118 _b_l_o_c_k() = field_cast< F >( f ); │ │ │ │ │ +119 return *this; │ │ │ │ │ +120 } │ │ │ │ │ +121 │ │ │ │ │ +_1_2_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _B_l_o_c_k &b ) │ │ │ │ │ +123 { │ │ │ │ │ +124 _b_l_o_c_k() = b; │ │ │ │ │ +125 return *this; │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ +129 { │ │ │ │ │ +130 _b_l_o_c_k() *= f; │ │ │ │ │ +131 return *this; │ │ │ │ │ +132 } │ │ │ │ │ +133 │ │ │ │ │ +_1_3_4 const F &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) const │ │ │ │ │ +135 { │ │ │ │ │ +136 return _b_l_o_c_k()[ i ]; │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +_1_3_9 F &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) │ │ │ │ │ +140 { │ │ │ │ │ +141 return _b_l_o_c_k()[ i ]; │ │ │ │ │ +142 } │ │ │ │ │ +143 │ │ │ │ │ +_1_4_4 void _a_x_p_y(const F& a, const _T_h_i_s &y) │ │ │ │ │ +145 { │ │ │ │ │ +146 _b_l_o_c_k().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ +147 } │ │ │ │ │ +148 template │ │ │ │ │ +_1_4_9 void _a_s_s_i_g_n(const _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_D_,_0_> &y) │ │ │ │ │ +150 { │ │ │ │ │ +151 _f_i_e_l_d___c_a_s_t(y._b_l_o_c_k(),_b_l_o_c_k()); │ │ │ │ │ +152 } │ │ │ │ │ +153 │ │ │ │ │ +_1_5_4 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ +155 { │ │ │ │ │ +156 return _b_l_o_c_k__; │ │ │ │ │ +157 } │ │ │ │ │ +_1_5_8 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ +159 { │ │ │ │ │ +160 return _b_l_o_c_k__; │ │ │ │ │ +161 } │ │ │ │ │ +_1_6_2 _B_l_o_c_k _b_l_o_c_k__; │ │ │ │ │ +163 }; │ │ │ │ │ +164 // *********************************************************** │ │ │ │ │ +165 // Structure for all derivatives up to order deriv │ │ │ │ │ +166 // for vector valued function │ │ │ │ │ +_1_6_7 namespace DerivativeLayoutNS { │ │ │ │ │ +_1_6_8 enum _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t {_v_a_l_u_e,_d_e_r_i_v_a_t_i_v_e}; │ │ │ │ │ +169 } │ │ │ │ │ +170 template │ │ │ │ │ +_1_7_2 struct _D_e_r_i_v_a_t_i_v_e_s; │ │ │ │ │ +173 │ │ │ │ │ +174 // Implemnetation for valued based layout │ │ │ │ │ +175 template │ │ │ │ │ +_1_7_6 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +177 : public _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +178 { │ │ │ │ │ +_1_7_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _T_h_i_s; │ │ │ │ │ +_1_8_0 typedef _D_e_r_i_v_a_t_i_v_e_s _B_a_s_e; │ │ │ │ │ +_1_8_1 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_e_r_i_v_> _T_h_i_s_L_F_E_T_e_n_s_o_r; │ │ │ │ │ +182 │ │ │ │ │ +_1_8_3 typedef F _F_i_e_l_d; │ │ │ │ │ +_1_8_4 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ +185 │ │ │ │ │ +_1_8_6 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ +_1_8_7 static const unsigned int dimDomain = dimD; │ │ │ │ │ +_1_8_8 static const unsigned int dimRange = dimR; │ │ │ │ │ +_1_8_9 constexpr static int size = Base::size+ThisLFETensor::size*dimR; │ │ │ │ │ +_1_9_0 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +191 │ │ │ │ │ +_1_9_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const F& f) │ │ │ │ │ +193 { │ │ │ │ │ +194 block() = f; │ │ │ │ │ +195 return *this; │ │ │ │ │ +196 } │ │ │ │ │ +_1_9_7 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector &t) │ │ │ │ │ +198 { │ │ │ │ │ +199 tensor_ = t; │ │ │ │ │ +200 return *this; │ │ │ │ │ +201 } │ │ │ │ │ +202 template │ │ │ │ │ +_2_0_3 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector<_L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_o_r_d_e_r_>,dimR> &t) │ │ │ │ │ +204 { │ │ │ │ │ +205 tensor() = t; │ │ │ │ │ +206 return *this; │ │ │ │ │ +207 } │ │ │ │ │ +_2_0_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ +209 { │ │ │ │ │ +210 block() = t; │ │ │ │ │ +211 return *this; │ │ │ │ │ +212 } │ │ │ │ │ +213 │ │ │ │ │ +_2_1_4 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ +215 { │ │ │ │ │ +216 block() *= f; │ │ │ │ │ +217 return *this; │ │ │ │ │ +218 } │ │ │ │ │ +219 │ │ │ │ │ +_2_2_0 void _a_x_p_y(const F &a, const _T_h_i_s &y) │ │ │ │ │ +221 { │ │ │ │ │ +222 block().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ +223 } │ │ │ │ │ +224 │ │ │ │ │ +225 // assign with same layout (only different Field) │ │ │ │ │ +226 template │ │ │ │ │ +_2_2_7 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ +&y) │ │ │ │ │ +228 { │ │ │ │ │ +229 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ +230 } │ │ │ │ │ +231 // assign with different layout (same dimRange) │ │ │ │ │ +232 template │ │ │ │ │ +_2_3_3 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +234 { │ │ │ │ │ +235 Base::assign(y); │ │ │ │ │ +236 for (int rr=0; rr()[0]; │ │ │ │ │ +238 } │ │ │ │ │ +239 // assign with rth component of function │ │ │ │ │ +240 template │ │ │ │ │ +_2_4_1 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_y_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_> &y,unsigned int r) │ │ │ │ │ +242 { │ │ │ │ │ +243 assign(y.block(),r); │ │ │ │ │ +244 } │ │ │ │ │ +245 // assign with scalar functions to component r │ │ │ │ │ +246 template │ │ │ │ │ +_2_4_7 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ +248 { │ │ │ │ │ +249 assign(r,y.block()); │ │ │ │ │ +250 } │ │ │ │ │ +251 template │ │ │ │ │ +_2_5_2 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +253 { │ │ │ │ │ +254 assign(r,y[0]); │ │ │ │ │ +255 } │ │ │ │ │ +256 │ │ │ │ │ +_2_5_7 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ +258 { │ │ │ │ │ +259 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ +260 } │ │ │ │ │ +_2_6_1 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ +262 { │ │ │ │ │ +263 return reinterpret_cast(*this); │ │ │ │ │ +264 } │ │ │ │ │ +265 │ │ │ │ │ +266 template │ │ │ │ │ +_2_6_7 const Dune::FieldVector,dimR> &_t_e_n_s_o_r() const │ │ │ │ │ +268 { │ │ │ │ │ +269 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +270 const std::integral_constant a = {}; │ │ │ │ │ +271 return tensor(a); │ │ │ │ │ +272 } │ │ │ │ │ +273 template │ │ │ │ │ +_2_7_4 Dune::FieldVector,dimR> &_t_e_n_s_o_r() │ │ │ │ │ +275 { │ │ │ │ │ +276 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +277 return tensor(std::integral_constant()); │ │ │ │ │ +278 } │ │ │ │ │ +279 template │ │ │ │ │ +_2_8_0 const Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ +const │ │ │ │ │ +281 { │ │ │ │ │ +282 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +283 const std::integral_constant a = {}; │ │ │ │ │ +284 return reinterpret_cast::size*dimR>&>(tensor(a)); │ │ │ │ │ +285 } │ │ │ │ │ +286 template │ │ │ │ │ +_2_8_7 Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ +288 { │ │ │ │ │ +289 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +290 const std::integral_constant a = {}; │ │ │ │ │ +291 return reinterpret_cast:: │ │ │ │ │ +size*dimR>&>(tensor(a)); │ │ │ │ │ +292 } │ │ │ │ │ +_2_9_3 _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ +294 return tensor_[r]; │ │ │ │ │ +295 } │ │ │ │ │ +_2_9_6 const _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ +297 return tensor_[r]; │ │ │ │ │ +298 } │ │ │ │ │ +299 protected: │ │ │ │ │ +300 template │ │ │ │ │ +_3_0_1 void _a_s_s_i_g_n(const FieldVector &y,unsigned int r) │ │ │ │ │ +302 { │ │ │ │ │ +303 Base::template assign(reinterpret_cast&>(y),r); │ │ │ │ │ +304 tensor_[0] = reinterpret_cast&>(y │ │ │ │ │ +[Base::size*dimRy+r*ThisLFETensor::size]); │ │ │ │ │ +305 } │ │ │ │ │ +306 template │ │ │ │ │ +_3_0_7 void _a_s_s_i_g_n(unsigned int r,const FieldVector &y) │ │ │ │ │ +308 { │ │ │ │ │ +309 Base::assign(r,reinterpret_cast&> │ │ │ │ │ +(y)); │ │ │ │ │ +310 tensor_[r] = reinterpret_cast&>(y │ │ │ │ │ +[Base::size/dimR]); │ │ │ │ │ +311 } │ │ │ │ │ +312 // assign with different layout (same dimRange) │ │ │ │ │ +313 template │ │ │ │ │ +_3_1_4 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_y_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +315 { │ │ │ │ │ +316 Base::assign(y); │ │ │ │ │ +317 for (int rr=0; rr()[0]; │ │ │ │ │ +319 } │ │ │ │ │ +320 │ │ │ │ │ +321 template │ │ │ │ │ +322 const Dune::FieldVector,dimR> & │ │ │ │ │ +_3_2_3 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ +324 { │ │ │ │ │ +325 return Base::tensor(dorderVar); │ │ │ │ │ +326 } │ │ │ │ │ +327 const Dune::FieldVector,dimR> & │ │ │ │ │ +_3_2_8 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ +329 { │ │ │ │ │ +330 return tensor_; │ │ │ │ │ +331 } │ │ │ │ │ +332 template │ │ │ │ │ +333 Dune::FieldVector,dimR> & │ │ │ │ │ +_3_3_4 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ +335 { │ │ │ │ │ +336 return Base::tensor(dorderVar); │ │ │ │ │ +337 } │ │ │ │ │ +338 Dune::FieldVector,dimR> & │ │ │ │ │ +_3_3_9 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ +340 { │ │ │ │ │ +341 return tensor_; │ │ │ │ │ +342 } │ │ │ │ │ +_3_4_3 Dune::FieldVector _t_e_n_s_o_r__; │ │ │ │ │ +344 }; │ │ │ │ │ +345 │ │ │ │ │ +346 template │ │ │ │ │ +_3_4_7 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +348 { │ │ │ │ │ +_3_4_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _T_h_i_s; │ │ │ │ │ +_3_5_0 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_0_> _T_h_i_s_L_F_E_T_e_n_s_o_r; │ │ │ │ │ +351 │ │ │ │ │ +_3_5_2 typedef F _F_i_e_l_d; │ │ │ │ │ +_3_5_3 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ +354 │ │ │ │ │ +_3_5_5 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ +_3_5_6 static const unsigned int dimDomain = dimD; │ │ │ │ │ +_3_5_7 static const unsigned int dimRange = dimR; │ │ │ │ │ +_3_5_8 constexpr static int size = ThisLFETensor::size*dimR; │ │ │ │ │ +_3_5_9 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +360 │ │ │ │ │ +361 template │ │ │ │ │ +_3_6_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const FF& f) │ │ │ │ │ +363 { │ │ │ │ │ +364 for (int r=0; r(f); │ │ │ │ │ +366 return *this; │ │ │ │ │ +367 } │ │ │ │ │ +_3_6_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector &t) │ │ │ │ │ +369 { │ │ │ │ │ +370 tensor_ = t; │ │ │ │ │ +371 return *this; │ │ │ │ │ +372 } │ │ │ │ │ +373 │ │ │ │ │ +_3_7_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ +375 { │ │ │ │ │ +376 block() = t; │ │ │ │ │ +377 return *this; │ │ │ │ │ +378 } │ │ │ │ │ +379 │ │ │ │ │ +_3_8_0 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ +381 { │ │ │ │ │ +382 block() *= f; │ │ │ │ │ +383 return *this; │ │ │ │ │ +384 } │ │ │ │ │ +385 │ │ │ │ │ +_3_8_6 void _a_x_p_y(const F &a, const _T_h_i_s &y) │ │ │ │ │ +387 { │ │ │ │ │ +388 block().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ +389 } │ │ │ │ │ +390 template │ │ │ │ │ +_3_9_1 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ +392 { │ │ │ │ │ +393 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ +394 } │ │ │ │ │ +395 template │ │ │ │ │ +_3_9_6 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +397 { │ │ │ │ │ +398 for (int rr=0; rr()[0]; │ │ │ │ │ +400 } │ │ │ │ │ +401 template │ │ │ │ │ +_4_0_2 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_y_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ +&y,unsigned int r) │ │ │ │ │ +403 { │ │ │ │ │ +404 assign(y.block(),r); │ │ │ │ │ +405 } │ │ │ │ │ +406 template │ │ │ │ │ +_4_0_7 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ +408 { │ │ │ │ │ +409 tensor_[r].assign(y[0]); │ │ │ │ │ +410 } │ │ │ │ │ +411 template │ │ │ │ │ +_4_1_2 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +413 { │ │ │ │ │ +414 tensor_[r].assign(y[0][0]); │ │ │ │ │ +415 } │ │ │ │ │ +416 │ │ │ │ │ +_4_1_7 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ +418 { │ │ │ │ │ +419 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ +420 } │ │ │ │ │ +_4_2_1 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ +422 { │ │ │ │ │ +423 return reinterpret_cast(*this); │ │ │ │ │ +424 } │ │ │ │ │ +425 │ │ │ │ │ +_4_2_6 _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ +427 return tensor_[r]; │ │ │ │ │ +428 } │ │ │ │ │ +_4_2_9 const _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ +430 return tensor_[r]; │ │ │ │ │ +431 } │ │ │ │ │ +432 template │ │ │ │ │ +_4_3_3 const Dune::FieldVector,dimR> &_t_e_n_s_o_r() const │ │ │ │ │ +434 { │ │ │ │ │ +435 return tensor_; │ │ │ │ │ +436 } │ │ │ │ │ +_4_3_7 Dune::FieldVector,dimR> &_t_e_n_s_o_r() │ │ │ │ │ +438 { │ │ │ │ │ +439 return tensor_; │ │ │ │ │ +440 } │ │ │ │ │ +441 template │ │ │ │ │ +_4_4_2 const Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ +const │ │ │ │ │ +443 { │ │ │ │ │ +444 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +445 const std::integral_constant a = {}; │ │ │ │ │ +446 return reinterpret_cast::size*dimR>&>(tensor(a)); │ │ │ │ │ +447 } │ │ │ │ │ +448 template │ │ │ │ │ +_4_4_9 Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ +450 { │ │ │ │ │ +451 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ +452 const std::integral_constant a = {}; │ │ │ │ │ +453 return reinterpret_cast:: │ │ │ │ │ +size*dimR>&>(tensor(a)); │ │ │ │ │ +454 } │ │ │ │ │ +455 │ │ │ │ │ +456 protected: │ │ │ │ │ +457 const Dune::FieldVector,dimR> & │ │ │ │ │ +_4_5_8 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ +459 { │ │ │ │ │ +460 return tensor_; │ │ │ │ │ +461 } │ │ │ │ │ +462 Dune::FieldVector,dimR> & │ │ │ │ │ +_4_6_3 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ +464 { │ │ │ │ │ +465 return tensor_; │ │ │ │ │ +466 } │ │ │ │ │ +467 template │ │ │ │ │ +_4_6_8 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_y_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +469 { │ │ │ │ │ +470 for (int rr=0; rr()[0]; │ │ │ │ │ +472 } │ │ │ │ │ +473 template │ │ │ │ │ +_4_7_4 void _a_s_s_i_g_n(const FieldVector &y,unsigned int r) │ │ │ │ │ +475 { │ │ │ │ │ +476 tensor_[0] = reinterpret_cast&>(y │ │ │ │ │ +[r*ThisLFETensor::size]); │ │ │ │ │ +477 } │ │ │ │ │ +478 template │ │ │ │ │ +_4_7_9 void _a_s_s_i_g_n(unsigned int r,const FieldVector &y) │ │ │ │ │ +480 { │ │ │ │ │ +481 tensor_[r] = y; │ │ │ │ │ +482 } │ │ │ │ │ +_4_8_3 Dune::FieldVector _t_e_n_s_o_r__; │ │ │ │ │ +484 }; │ │ │ │ │ +485 │ │ │ │ │ +486 // Implemnetation for DerivativeLayoutNS::derivative based layout │ │ │ │ │ +487 template │ │ │ │ │ +_4_8_8 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +489 { │ │ │ │ │ +_4_9_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _T_h_i_s; │ │ │ │ │ +_4_9_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _S_c_a_l_a_r_D_e_r_i_v; │ │ │ │ │ +492 │ │ │ │ │ +_4_9_3 typedef F _F_i_e_l_d; │ │ │ │ │ +_4_9_4 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ +495 │ │ │ │ │ +_4_9_6 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ +_4_9_7 static const unsigned int dimDomain = dimD; │ │ │ │ │ +_4_9_8 static const unsigned int dimRange = dimR; │ │ │ │ │ +_4_9_9 constexpr static int size = ScalarDeriv::size*dimR; │ │ │ │ │ +_5_0_0 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +501 │ │ │ │ │ +502 template │ │ │ │ │ +_5_0_3 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const FF& f) │ │ │ │ │ +504 { │ │ │ │ │ +505 block() = field_cast(f); │ │ │ │ │ +506 return *this; │ │ │ │ │ +507 } │ │ │ │ │ +_5_0_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ +509 { │ │ │ │ │ +510 block() = t; │ │ │ │ │ +511 return *this; │ │ │ │ │ +512 } │ │ │ │ │ +513 │ │ │ │ │ +_5_1_4 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ +515 { │ │ │ │ │ +516 block() *= f; │ │ │ │ │ +517 return *this; │ │ │ │ │ +518 } │ │ │ │ │ +519 │ │ │ │ │ +520 template │ │ │ │ │ +_5_2_1 void _a_x_p_y(const FF &a, const _T_h_i_s &y) │ │ │ │ │ +522 { │ │ │ │ │ +523 block().axpy(field_cast(a),y._b_l_o_c_k()); │ │ │ │ │ +524 } │ │ │ │ │ +525 // assign with same layout (only different Field) │ │ │ │ │ +526 template │ │ │ │ │ +_5_2_7 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ +528 { │ │ │ │ │ +529 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ +530 } │ │ │ │ │ +531 // assign with different layout (same dimRange) │ │ │ │ │ +532 template │ │ │ │ │ +_5_3_3 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ +&y) │ │ │ │ │ +534 { │ │ │ │ │ +535 for (unsigned int rr=0; rr │ │ │ │ │ +_5_4_0 void _a_s_s_i_g_n(unsigned int r,const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_y_> &y) │ │ │ │ │ +541 { │ │ │ │ │ +542 deriv_[r].assign(r,y); │ │ │ │ │ +543 } │ │ │ │ │ +544 │ │ │ │ │ +_5_4_5 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ +546 { │ │ │ │ │ +547 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ +548 } │ │ │ │ │ +_5_4_9 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ +550 { │ │ │ │ │ +551 return reinterpret_cast(*this); │ │ │ │ │ +552 } │ │ │ │ │ +553 │ │ │ │ │ +_5_5_4 _S_c_a_l_a_r_D_e_r_i_v &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ +555 return deriv_[r]; │ │ │ │ │ +556 } │ │ │ │ │ +_5_5_7 const _S_c_a_l_a_r_D_e_r_i_v &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ +558 return deriv_[r]; │ │ │ │ │ +559 } │ │ │ │ │ +560 protected: │ │ │ │ │ +_5_6_1 Dune::FieldVector _d_e_r_i_v__; │ │ │ │ │ +562 }; │ │ │ │ │ +563 │ │ │ │ │ +564 // ****************************************** │ │ │ │ │ +565 // AXPY ************************************* │ │ │ │ │ +566 // ****************************************** │ │ │ │ │ +567 template │ │ │ │ │ +_5_6_8 struct _L_F_E_T_e_n_s_o_r_A_x_p_y │ │ │ │ │ +569 { │ │ │ │ │ +570 template │ │ │ │ │ +_5_7_1 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ +572 const Vec1 &x, Vec2 &y) │ │ │ │ │ +573 { │ │ │ │ │ +574 y.axpy(a,x); │ │ │ │ │ +575 } │ │ │ │ │ +576 }; │ │ │ │ │ +577 template │ │ │ │ │ +_5_8_1 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ +582 { │ │ │ │ │ +_5_8_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +584 template │ │ │ │ │ +_5_8_5 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ +586 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ +587 { │ │ │ │ │ +588 const FieldVector &xx = x.template block(); │ │ │ │ │ +589 for (int i=0; i │ │ │ │ │ +_5_9_7 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ +598 { │ │ │ │ │ +_5_9_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +600 template │ │ │ │ │ +_6_0_1 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ +602 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ +603 { │ │ │ │ │ +604 for (int rr=0; rr, │ │ │ │ │ +606 Vec2,deriv>_:_:_a_p_p_l_y(rr,a,x[rr],y); │ │ │ │ │ +607 } │ │ │ │ │ +608 }; │ │ │ │ │ +609 template │ │ │ │ │ +_6_1_3 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ +614 { │ │ │ │ │ +_6_1_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +616 template │ │ │ │ │ +_6_1_7 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ +618 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ +619 { │ │ │ │ │ +620 _L_F_E_T_e_n_s_o_r_A_x_p_y_<_D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_>, │ │ │ │ │ +621 Vec2,deriv>_:_:_a_p_p_l_y(r,a,x[0],y); │ │ │ │ │ +622 } │ │ │ │ │ +623 }; │ │ │ │ │ +624 template │ │ │ │ │ +_6_2_8 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ +629 { │ │ │ │ │ +_6_3_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +631 template │ │ │ │ │ +_6_3_2 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ +633 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ +634 { │ │ │ │ │ +635 typedef _L_F_E_T_e_n_s_o_r_<_F_1_,_d_i_m_D_,_d_e_r_i_v_> LFETensorType; │ │ │ │ │ +636 const unsigned int rr = r*LFETensorType::size; │ │ │ │ │ +637 const FieldVector &xx = x.template block(); │ │ │ │ │ +638 for (int i=0; i::dimension; ++i) │ │ │ │ │ +639 y[rr+i] += xx[i]*a; │ │ │ │ │ +640 } │ │ │ │ │ +641 }; │ │ │ │ │ +642 │ │ │ │ │ +643 // *********************************************** │ │ │ │ │ +644 // Assign **************************************** │ │ │ │ │ +645 // *********************************************** │ │ │ │ │ +646 template │ │ │ │ │ +_6_4_7 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n │ │ │ │ │ +648 { │ │ │ │ │ +_6_4_9 static void _a_p_p_l_y(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ +650 { │ │ │ │ │ +651 _f_i_e_l_d___c_a_s_t(vec1,vec2); │ │ │ │ │ +652 } │ │ │ │ │ +653 }; │ │ │ │ │ +654 template │ │ │ │ │ +_6_5_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +657 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +658 { │ │ │ │ │ +_6_5_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ +_6_6_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_2; │ │ │ │ │ +_6_6_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +662 { │ │ │ │ │ +663 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ +664 } │ │ │ │ │ +665 }; │ │ │ │ │ +666 template │ │ │ │ │ +_6_6_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +669 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +670 { │ │ │ │ │ +_6_7_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_6_7_2 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ +_V_e_c_2; │ │ │ │ │ +_6_7_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +674 { │ │ │ │ │ +675 vec2.assign(vec1); │ │ │ │ │ +676 } │ │ │ │ │ +677 }; │ │ │ │ │ +678 template │ │ │ │ │ +_6_8_0 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +681 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +682 { │ │ │ │ │ +_6_8_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ +_V_e_c_1; │ │ │ │ │ +_6_8_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ +_6_8_5 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +686 { │ │ │ │ │ +687 vec2.assign(vec1); │ │ │ │ │ +688 } │ │ │ │ │ +689 }; │ │ │ │ │ +690 template │ │ │ │ │ +_6_9_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +693 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +694 { │ │ │ │ │ +_6_9_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ +_6_9_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ +_6_9_7 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +698 { │ │ │ │ │ +699 vec2.assign(r,vec1); │ │ │ │ │ +700 } │ │ │ │ │ +701 }; │ │ │ │ │ +702 template │ │ │ │ │ +_7_0_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +705 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +706 { │ │ │ │ │ +_7_0_7 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ +_7_0_8 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ +_V_e_c_2; │ │ │ │ │ +_7_0_9 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +710 { │ │ │ │ │ +711 vec2.assign(r,vec1); │ │ │ │ │ +712 } │ │ │ │ │ +713 }; │ │ │ │ │ +714 template │ │ │ │ │ +_7_1_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +717 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +718 { │ │ │ │ │ +_7_1_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_7_2_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ +_7_2_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +722 { │ │ │ │ │ +723 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ +724 } │ │ │ │ │ +725 }; │ │ │ │ │ +726 template │ │ │ │ │ +_7_2_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +729 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +730 { │ │ │ │ │ +_7_3_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +_7_3_2 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_2; │ │ │ │ │ +_7_3_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +734 { │ │ │ │ │ +735 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ +736 } │ │ │ │ │ +737 }; │ │ │ │ │ +738 template │ │ │ │ │ +_7_4_0 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +741 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +742 { │ │ │ │ │ +_7_4_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +_7_4_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ +_7_4_5 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +746 { │ │ │ │ │ +747 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ +748 } │ │ │ │ │ +749 }; │ │ │ │ │ +750 template │ │ │ │ │ +_7_5_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +753 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ +754 { │ │ │ │ │ +_7_5_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_7_5_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_2; │ │ │ │ │ +_7_5_7 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +758 { │ │ │ │ │ +759 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ +760 } │ │ │ │ │ +761 }; │ │ │ │ │ +762 template │ │ │ │ │ +_7_6_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ +765 F2 > │ │ │ │ │ +766 { │ │ │ │ │ +_7_6_7 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ +_7_6_8 typedef F2 _V_e_c_2; │ │ │ │ │ +_7_6_9 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +770 { │ │ │ │ │ +771 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2); │ │ │ │ │ +772 } │ │ │ │ │ +773 }; │ │ │ │ │ +774 template │ │ │ │ │ +_7_7_7 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +778 { │ │ │ │ │ +_7_7_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_7_8_0 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_7_8_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +782 { │ │ │ │ │ +783 _f_i_e_l_d___c_a_s_t(vec1.template block<0>(),vec2); │ │ │ │ │ +784 } │ │ │ │ │ +785 }; │ │ │ │ │ +786 template │ │ │ │ │ +_7_8_9 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +790 { │ │ │ │ │ +_7_9_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ +_V_e_c_1; │ │ │ │ │ +_7_9_2 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_7_9_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +794 { │ │ │ │ │ +795 for (int rr=0; rr()[0].block(),vec2[rr]); │ │ │ │ │ +797 } │ │ │ │ │ +798 }; │ │ │ │ │ +799 template │ │ │ │ │ +_8_0_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +803 { │ │ │ │ │ +_8_0_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_8_0_5 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_8_0_6 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +807 { │ │ │ │ │ +808 _f_i_e_l_d___c_a_s_t(vec1.template tensor<0>()[0].block(),vec2[r]); │ │ │ │ │ +809 } │ │ │ │ │ +810 }; │ │ │ │ │ +811 template │ │ │ │ │ +_8_1_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +815 { │ │ │ │ │ +_8_1_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +_8_1_7 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_8_1_8 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +819 { │ │ │ │ │ +820 _f_i_e_l_d___c_a_s_t(vec1[0].template tensor<0>()[0].block(),vec2[r]); │ │ │ │ │ +821 } │ │ │ │ │ +822 }; │ │ │ │ │ +823 template │ │ │ │ │ +_8_2_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +827 { │ │ │ │ │ +_8_2_8 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ +_8_2_9 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_8_3_0 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +831 { │ │ │ │ │ +832 _f_i_e_l_d___c_a_s_t(vec1.template tensor<0>()[0].block(),vec2); │ │ │ │ │ +833 } │ │ │ │ │ +834 }; │ │ │ │ │ +835 template │ │ │ │ │ +_8_3_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ +839 { │ │ │ │ │ +_8_4_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ +_8_4_1 typedef FieldVector _V_e_c_2; │ │ │ │ │ +_8_4_2 static void _a_p_p_l_y(unsigned int /*r*/,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ +843 { │ │ │ │ │ +844 _f_i_e_l_d___c_a_s_t(vec1[0].template tensor<0>()[0].block(),vec2); │ │ │ │ │ +845 } │ │ │ │ │ +846 }; │ │ │ │ │ +847 │ │ │ │ │ +848 // *********************************************** │ │ │ │ │ +849 // IO ******************************************** │ │ │ │ │ +850 // *********************************************** │ │ │ │ │ +851 template │ │ │ │ │ +_8_5_2 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _L_F_E_T_e_n_s_o_r_<_ _F_,_d_i_m_D_,_d_e_r_i_v │ │ │ │ │ +_> &tensor ) │ │ │ │ │ +853 { │ │ │ │ │ +854 return out << tensor._b_l_o_c_k(); │ │ │ │ │ +855 } │ │ │ │ │ +856#if 0 │ │ │ │ │ +857 template │ │ │ │ │ +858 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const ScalarDerivatives< │ │ │ │ │ +F,dimD,deriv > &d ) │ │ │ │ │ +859 { │ │ │ │ │ +860 out << static_cast &>(d); │ │ │ │ │ +861 out << " , " << d.tensor() << std::endl; │ │ │ │ │ +862 return out; │ │ │ │ │ +863 } │ │ │ │ │ +864 template │ │ │ │ │ +865 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const ScalarDerivatives< │ │ │ │ │ +F,dimD,0 > &d ) │ │ │ │ │ +866 { │ │ │ │ │ +867 out << d.tensor() << std::endl; │ │ │ │ │ +868 return out; │ │ │ │ │ +869 } │ │ │ │ │ +870#endif │ │ │ │ │ +871 template │ │ │ │ │ +_8_7_2 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> &d ) │ │ │ │ │ +873 { │ │ │ │ │ +874 out << " ( "; │ │ │ │ │ +875 out << d[0]; │ │ │ │ │ +876 for (int r=1; r │ │ │ │ │ +_8_8_4 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> &d ) │ │ │ │ │ +885 { │ │ │ │ │ +886 out << static_cast &>(d); │ │ │ │ │ +887 out << " ( "; │ │ │ │ │ +888 out << d[0]; │ │ │ │ │ +889 for (int r=1; r │ │ │ │ │ +_8_9_7 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> &d ) │ │ │ │ │ +898 { │ │ │ │ │ +899 out << " ( "; │ │ │ │ │ +900 out << d[0]; │ │ │ │ │ +901 for (int r=1; r │ │ │ │ │ +_9_0_9 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> &d ) │ │ │ │ │ +910 { │ │ │ │ │ +911 out << " ( "; │ │ │ │ │ +912 out << d[0]; │ │ │ │ │ +913 for (int r=1; r │ │ │ │ │ +_9_2_1 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const std:: │ │ │ │ │ +vector<_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_ _> > &y ) │ │ │ │ │ +922 { │ │ │ │ │ +923 out << "Number of basis functions: " << y.size() << std::endl; │ │ │ │ │ +924 for (unsigned int i=0; i, │ │ │ │ │ -typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits:: │ │ │ │ │ -LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< │ │ │ │ │ -HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalp2.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t │ │ │ │ │ +DerivativeLayout │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e │ │ │ │ │ +@ derivative │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ +@ value │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k │ │ │ │ │ +const Block & block() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:76 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ │ +This & operator*=(const field_type &f) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k__ │ │ │ │ │ +Block block_ │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ +F field_type │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_a_x_p_y │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k │ │ │ │ │ +Block & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const LFETensor< Fy, dimD, deriv > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_s_i_z_e │ │ │ │ │ +static const unsigned int size │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const field_type & operator[](const unsigned int i) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _> │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k │ │ │ │ │ +Block & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:154 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ +F field_type │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k__ │ │ │ │ │ +Block block_ │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:162 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const LFETensor< Fy, dimD, 0 > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k │ │ │ │ │ +const Block & block() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:158 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_a_x_p_y │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:113 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:178 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:183 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > │ │ │ │ │ +&t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_: │ │ │ │ │ +_f_i_e_l_d___t_y_p_e │ │ │ │ │ +F field_type │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:184 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_a_s_e │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:180 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const │ │ │ │ │ +std::integral_constant< int, dorder > &dorderVar) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:323 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:301 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ +> &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:227 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:314 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const F &f) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:192 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r │ │ │ │ │ +_[_] │ │ │ │ │ +const ThisLFETensor & operator[](int r) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:287 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_: │ │ │ │ │ +_T_h_i_s_L_F_E_T_e_n_s_o_r │ │ │ │ │ +LFETensor< F, dimD, deriv > ThisLFETensor │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:181 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ +DerivativeLayoutNS::value > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:247 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ +() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, dorder > &dorderVar) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:334 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +const Block & block() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:261 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_x_p_y │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:233 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:197 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ +DerivativeLayoutNS::derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:252 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:208 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:190 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r__ │ │ │ │ │ +Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:343 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, deriv > &dorderVar) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:339 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS:: │ │ │ │ │ +value > &y, unsigned int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:241 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:267 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const │ │ │ │ │ +std::integral_constant< int, deriv > &dorderVar) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:328 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r │ │ │ │ │ +_[_] │ │ │ │ │ +ThisLFETensor & operator[](int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:293 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +Block & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:257 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:307 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +ThisLFETensor & operator[](int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:426 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s_L_F_E_T_e_n_s_o_r │ │ │ │ │ +LFETensor< F, dimD, 0 > ThisLFETensor │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:350 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:449 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, 0 > &dorderVar) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:463 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > │ │ │ │ │ +&y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:391 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:352 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s │ │ │ │ │ +Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:349 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:468 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > │ │ │ │ │ +&y, unsigned int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:402 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:433 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:437 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:374 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ +F field_type │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:353 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const ThisLFETensor & operator[](int r) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:429 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ +const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ +integral_constant< int, 0 > &dorderVar) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:458 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:359 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +const Block & block() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:421 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ +() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:442 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ +DerivativeLayoutNS::derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:412 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:396 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ +DerivativeLayoutNS::value > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:407 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:368 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:474 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r__ │ │ │ │ │ +Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:483 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:479 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:362 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ +Block & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:417 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_x_p_y │ │ │ │ │ +void axpy(const F &a, const This &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:386 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:489 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const FF &f) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:503 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_b_l_o_c_k │ │ │ │ │ +Block & block() │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:545 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:493 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_b_l_o_c_k │ │ │ │ │ +const Block & block() const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:549 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_f_i_e_l_d___t_y_p_e │ │ │ │ │ +F field_type │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:494 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_a_s_s_i_g_n │ │ │ │ │ +void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > │ │ │ │ │ +&y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:540 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +ScalarDeriv & operator[](int r) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:554 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ +> &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:533 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_:_T_h_i_s │ │ │ │ │ +Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:490 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_S_c_a_l_a_r_D_e_r_i_v │ │ │ │ │ +Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:491 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ +const ScalarDeriv & operator[](int r) const │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:557 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_:_a_x_p_y │ │ │ │ │ +void axpy(const FF &a, const This &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:521 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const Block &t) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:508 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_B_l_o_c_k │ │ │ │ │ +Dune::FieldVector< F, size > Block │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:500 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_d_e_r_i_v__ │ │ │ │ │ +Dune::FieldVector< ScalarDeriv, dimR > deriv_ │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:561 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ +_a_s_s_i_g_n │ │ │ │ │ +void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ +derivative > &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:527 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:569 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:571 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ +_>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:585 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ +_>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:583 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:599 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:601 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:615 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:617 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_, │ │ │ │ │ +_V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:632 │ │ │ │ │ +_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_, │ │ │ │ │ +_V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:630 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:648 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:649 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, layout > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:659 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, layout > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:660 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:661 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:671 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:673 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:672 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:684 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:683 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:685 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:695 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:697 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:696 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:707 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:709 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ +_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:708 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:719 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:720 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:721 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ +_>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:731 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ +_>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:733 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ +_>_:_:_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:732 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ +_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:744 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ +_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:745 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ +_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:743 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ +_V_e_c_2 │ │ │ │ │ +Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:756 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ +_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:757 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ +_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:755 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_V_e_c_2 │ │ │ │ │ +F2 Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:768 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:769 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:767 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:779 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:780 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:781 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:791 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:793 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ +_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:792 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:804 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:805 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:806 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:818 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:816 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, dimR > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:817 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, 1 > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:829 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:828 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:830 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ +Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:840 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ +static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:842 │ │ │ │ │ +_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ +_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ +FieldVector< F2, 1 > Vec2 │ │ │ │ │ +DDeeffiinniittiioonn tensor.hh:841 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimeticall.hh File Reference │ │ │ │ +dune-localfunctions: dglocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,37 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
mimeticall.hh File Reference
│ │ │ │ +
dglocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localbasis.hh"
│ │ │ │ -#include "../common/localkey.hh"
│ │ │ │ +
#include <cassert>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::MimeticLocalBasis< D, R, dim >
class  Dune::DGLocalCoefficients
 A class providing local coefficients for dg spaces. More...
 
class  Dune::MimeticLocalInterpolation< LB >
 
class  Dune::MimeticLocalCoefficients
 ! More...
struct  Dune::DGLocalCoefficientsFactory< BasisFactory >
 A factory class for the dg local coefficients. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _m_i_m_e_t_i_c │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -mimeticall.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ +dglocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  A class providing local coefficients for dg spaces. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  ! _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _B_a_s_i_s_F_a_c_t_o_r_y_ _> │ │ │ │ │ +  A factory class for the dg local coefficients. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00143_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: mimeticall.hh Source File │ │ │ │ +dune-localfunctions: dglocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,173 +70,117 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
mimeticall.hh
│ │ │ │ +
dglocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_MIMETIC_ALL_HH
│ │ │ │ -
6#define DUNE_MIMETIC_ALL_HH
│ │ │ │ +
5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/exceptions.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <cassert>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16#include "../common/localbasis.hh"
│ │ │ │ -
17#include "../common/localkey.hh"
│ │ │ │ +
16 // DGLocalCoefficients
│ │ │ │ +
17 // -------------------
│ │ │ │
18
│ │ │ │ -
19namespace Dune
│ │ │ │ -
20{
│ │ │ │ -
21 template<class D, class R, int dim>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
23 {
│ │ │ │ -
24 public:
│ │ │ │ - │ │ │ │ -
26 R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,dim> > Traits;
│ │ │ │ -
27
│ │ │ │ + │ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │
│ │ │ │ -
28 MimeticLocalBasis (unsigned int variant_)
│ │ │ │ -
29 : variant(variant_)
│ │ │ │ -
30 {}
│ │ │ │ -
│ │ │ │ -
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 : variant(0)
│ │ │ │ -
34 {}
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
36 unsigned int size () const { return variant; }
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 inline void evaluateFunction (
│ │ │ │ -
40 const typename Traits::DomainType& in,
│ │ │ │ -
41 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
28 DGLocalCoefficients ( const unsigned int n )
│ │ │ │ +
29 : localKey_( n )
│ │ │ │ +
30 {
│ │ │ │ +
31 for( unsigned i = 0; i < n; ++i )
│ │ │ │ +
32 localKey_[ i ] = LocalKey( 0, 0, i );
│ │ │ │ +
33 }
│ │ │ │ +
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
35 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ +
36 {
│ │ │ │ +
37 assert( i < size() );
│ │ │ │ +
38 return localKey_[ i ];
│ │ │ │ +
39 }
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
41 unsigned int size () const
│ │ │ │
42 {
│ │ │ │ -
43 DUNE_THROW(Dune::Exception,"mimetic basis evaluation not available");
│ │ │ │ +
43 return localKey_.size();
│ │ │ │
44 }
│ │ │ │
│ │ │ │
45
│ │ │ │ -
│ │ │ │ -
47 inline void evaluateJacobian (
│ │ │ │ -
48 const typename Traits::DomainType& in,
│ │ │ │ -
49 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
50 {
│ │ │ │ -
51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not available");
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
55 void partial (const std::array<unsigned int, dim>& /*order*/,
│ │ │ │ -
56 const typename Traits::DomainType& /*in*/, // position
│ │ │ │ -
57 std::vector<typename Traits::RangeType>& /*out*/) const // return value
│ │ │ │ -
58 {
│ │ │ │ -
59 DUNE_THROW(Dune::Exception,"mimetic basis partial derivative evaluation not available");
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
63 unsigned int order () const
│ │ │ │ -
64 {
│ │ │ │ -
65 DUNE_THROW(Dune::Exception,"mimetic order evaluation not available");
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68 private:
│ │ │ │ -
69 unsigned int variant;
│ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
74 {
│ │ │ │ -
75 public:
│ │ │ │ -
76
│ │ │ │ -
78 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
79 void interpolate (const F& f, std::vector<C>& out) const {
│ │ │ │ -
80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available");
│ │ │ │ -
81 }
│ │ │ │ -
│ │ │ │ -
82 };
│ │ │ │ -
│ │ │ │ -
83
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
88 {
│ │ │ │ -
89 public:
│ │ │ │ -
│ │ │ │ -
90 MimeticLocalCoefficients (unsigned int variant_)
│ │ │ │ -
91 : variant(variant_), li(variant_)
│ │ │ │ -
92 {
│ │ │ │ -
93 for (unsigned int i=0; i<variant; i++)
│ │ │ │ - │ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
98 : variant(0), li(0)
│ │ │ │ -
99 {}
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
102 std::size_t size () const { return variant; }
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
105 const Dune::LocalKey& localKey (std::size_t i) const {
│ │ │ │ -
106 return li[i];
│ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
109 private:
│ │ │ │ -
110 unsigned int variant;
│ │ │ │ -
111 std::vector<Dune::LocalKey> li;
│ │ │ │ -
112 };
│ │ │ │ -
│ │ │ │ -
113}
│ │ │ │ -
114
│ │ │ │ -
115#endif
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector< LocalKey > localKey_;
│ │ │ │ +
48 };
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
50
│ │ │ │ +
51
│ │ │ │ +
52 // DGLocalCoefficientsFactory
│ │ │ │ +
53 // --------------------------
│ │ │ │ +
57 template< class BasisFactory >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 {
│ │ │ │ +
60 static const unsigned int dimension = BasisFactory::dimension;
│ │ │ │ +
61 typedef typename BasisFactory::Key Key;
│ │ │ │ + │ │ │ │ +
63
│ │ │ │ +
64 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
65 static Object *create ( const Key &key )
│ │ │ │ +
66 {
│ │ │ │ +
67 const typename BasisFactory::Object *basis
│ │ │ │ +
68 = BasisFactory::template create< geometryId >( key );
│ │ │ │ +
69 Object *coefficients = new Object( basis->size() );
│ │ │ │ +
70 BasisFactory::release( basis );
│ │ │ │ +
71 return coefficients;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73 static void release( Object *object ) { delete object; }
│ │ │ │ +
74 };
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76}
│ │ │ │ +
77
│ │ │ │ +
78#endif // #ifndef DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
@ intersectionCodim
Codimension returned by LocalKey::codim() for degrees of freedom attached to an intersection.
Definition localkey.hh:36
│ │ │ │ -
Definition mimeticall.hh:23
│ │ │ │ -
MimeticLocalBasis(unsigned int variant_)
Definition mimeticall.hh:28
│ │ │ │ -
Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
Definition mimeticall.hh:26
│ │ │ │ -
MimeticLocalBasis()
Definition mimeticall.hh:32
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition mimeticall.hh:47
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition mimeticall.hh:63
│ │ │ │ -
void partial(const std::array< unsigned int, dim > &, const typename Traits::DomainType &, std::vector< typename Traits::RangeType > &) const
Evaluate partial derivatives of all shape functions.
Definition mimeticall.hh:55
│ │ │ │ -
unsigned int size() const
Definition mimeticall.hh:36
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition mimeticall.hh:39
│ │ │ │ -
Definition mimeticall.hh:74
│ │ │ │ -
void interpolate(const F &f, std::vector< C > &out) const
Local interpolation of a function.
Definition mimeticall.hh:79
│ │ │ │ -
!
Definition mimeticall.hh:88
│ │ │ │ -
const Dune::LocalKey & localKey(std::size_t i) const
map index i to local key
Definition mimeticall.hh:105
│ │ │ │ -
MimeticLocalCoefficients(unsigned int variant_)
Definition mimeticall.hh:90
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition mimeticall.hh:102
│ │ │ │ -
MimeticLocalCoefficients()
Definition mimeticall.hh:97
│ │ │ │ +
A class providing local coefficients for dg spaces.
Definition dglocalcoefficients.hh:23
│ │ │ │ +
unsigned int size() const
Definition dglocalcoefficients.hh:41
│ │ │ │ +
const LocalKey & localKey(const unsigned int i) const
Definition dglocalcoefficients.hh:35
│ │ │ │ +
DGLocalCoefficients(const unsigned int n)
construct local keys for n basis functions
Definition dglocalcoefficients.hh:28
│ │ │ │ +
A factory class for the dg local coefficients.
Definition dglocalcoefficients.hh:59
│ │ │ │ +
static void release(Object *object)
Definition dglocalcoefficients.hh:73
│ │ │ │ +
const DGLocalCoefficients Object
Definition dglocalcoefficients.hh:62
│ │ │ │ +
static Object * create(const Key &key)
Definition dglocalcoefficients.hh:65
│ │ │ │ +
BasisFactory::Key Key
Definition dglocalcoefficients.hh:61
│ │ │ │ +
static const unsigned int dimension
Definition dglocalcoefficients.hh:60
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,193 +1,120 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _m_i_m_e_t_i_c │ │ │ │ │ -mimeticall.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +dglocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_MIMETIC_ALL_HH │ │ │ │ │ -6#define DUNE_MIMETIC_ALL_HH │ │ │ │ │ +5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16#include "../common/localbasis.hh" │ │ │ │ │ -17#include "../common/localkey.hh" │ │ │ │ │ +16 // DGLocalCoefficients │ │ │ │ │ +17 // ------------------- │ │ │ │ │ 18 │ │ │ │ │ -19namespace _D_u_n_e │ │ │ │ │ -20{ │ │ │ │ │ -21 template │ │ │ │ │ -_2_2 class _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +_2_2 class _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ 23 { │ │ │ │ │ -24 public: │ │ │ │ │ -25 typedef _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_>, │ │ │ │ │ -_2_6 R,1,Dune::FieldVector, Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -27 │ │ │ │ │ -_2_8 _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s (unsigned int variant_) │ │ │ │ │ -29 : variant(variant_) │ │ │ │ │ -30 {} │ │ │ │ │ -31 │ │ │ │ │ -_3_2 _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s () │ │ │ │ │ -33 : variant(0) │ │ │ │ │ -34 {} │ │ │ │ │ -35 │ │ │ │ │ -_3_6 unsigned int _s_i_z_e () const { return variant; } │ │ │ │ │ -37 │ │ │ │ │ -_3_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n ( │ │ │ │ │ -40 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -41 std::vector& out) const │ │ │ │ │ +24 typedef _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s _T_h_i_s; │ │ │ │ │ +25 │ │ │ │ │ +26 public: │ │ │ │ │ +_2_8 _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s ( const unsigned int n ) │ │ │ │ │ +29 : localKey_( n ) │ │ │ │ │ +30 { │ │ │ │ │ +31 for( unsigned i = 0; i < n; ++i ) │ │ │ │ │ +32 localKey_[ i ] = _L_o_c_a_l_K_e_y( 0, 0, i ); │ │ │ │ │ +33 } │ │ │ │ │ +34 │ │ │ │ │ +_3_5 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ +36 { │ │ │ │ │ +37 assert( i < _s_i_z_e() ); │ │ │ │ │ +38 return localKey_[ i ]; │ │ │ │ │ +39 } │ │ │ │ │ +40 │ │ │ │ │ +_4_1 unsigned int _s_i_z_e () const │ │ │ │ │ 42 { │ │ │ │ │ -43 DUNE_THROW(Dune::Exception,"mimetic basis evaluation not available"); │ │ │ │ │ +43 return localKey_.size(); │ │ │ │ │ 44 } │ │ │ │ │ 45 │ │ │ │ │ -_4_7 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n ( │ │ │ │ │ -48 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -49 std::vector& out) const │ │ │ │ │ -50 { │ │ │ │ │ -51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not │ │ │ │ │ -available"); │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_5 void _p_a_r_t_i_a_l (const std::array& /*order*/, │ │ │ │ │ -56 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& /*in*/, // position │ │ │ │ │ -57 std::vector& /*out*/) const // return value │ │ │ │ │ -58 { │ │ │ │ │ -59 DUNE_THROW(Dune::Exception,"mimetic basis partial derivative evaluation not │ │ │ │ │ -available"); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_3 unsigned int _o_r_d_e_r () const │ │ │ │ │ -64 { │ │ │ │ │ -65 DUNE_THROW(Dune::Exception,"mimetic order evaluation not available"); │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -68 private: │ │ │ │ │ -69 unsigned int variant; │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72 template │ │ │ │ │ -_7_3 class _M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -74 { │ │ │ │ │ -75 public: │ │ │ │ │ -76 │ │ │ │ │ -78 template │ │ │ │ │ -_7_9 void _i_n_t_e_r_p_o_l_a_t_e (const F& f, std::vector& out) const { │ │ │ │ │ -80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available"); │ │ │ │ │ -81 } │ │ │ │ │ -82 }; │ │ │ │ │ -83 │ │ │ │ │ -_8_7 class _M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -88 { │ │ │ │ │ -89 public: │ │ │ │ │ -_9_0 _M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s (unsigned int variant_) │ │ │ │ │ -91 : variant(variant_), li(variant_) │ │ │ │ │ -92 { │ │ │ │ │ -93 for (unsigned int i=0; i li; │ │ │ │ │ -112 }; │ │ │ │ │ -113} │ │ │ │ │ -114 │ │ │ │ │ -115#endif │ │ │ │ │ +46 private: │ │ │ │ │ +47 std::vector< LocalKey > localKey_; │ │ │ │ │ +48 }; │ │ │ │ │ +49 │ │ │ │ │ +50 │ │ │ │ │ +51 │ │ │ │ │ +52 // DGLocalCoefficientsFactory │ │ │ │ │ +53 // -------------------------- │ │ │ │ │ +57 template< class BasisFactory > │ │ │ │ │ +_5_8 struct _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +59 { │ │ │ │ │ +_6_0 static const unsigned int _d_i_m_e_n_s_i_o_n = BasisFactory::dimension; │ │ │ │ │ +_6_1 typedef typename BasisFactory::Key _K_e_y; │ │ │ │ │ +_6_2 typedef const _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s _O_b_j_e_c_t; │ │ │ │ │ +63 │ │ │ │ │ +64 template< GeometryType::Id geometryId > │ │ │ │ │ +_6_5 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ +66 { │ │ │ │ │ +67 const typename BasisFactory::Object *basis │ │ │ │ │ +68 = BasisFactory::template create< geometryId >( key ); │ │ │ │ │ +69 _O_b_j_e_c_t *coefficients = new _O_b_j_e_c_t( basis->size() ); │ │ │ │ │ +70 BasisFactory::release( basis ); │ │ │ │ │ +71 return coefficients; │ │ │ │ │ +72 } │ │ │ │ │ +_7_3 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ +76} │ │ │ │ │ +77 │ │ │ │ │ +78#endif // #ifndef DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_i_n_t_e_r_s_e_c_t_i_o_n_C_o_d_i_m │ │ │ │ │ -@ intersectionCodim │ │ │ │ │ -Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ -intersection. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -MimeticLocalBasis(unsigned int variant_) │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune:: │ │ │ │ │ -FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -MimeticLocalBasis() │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, dim > &, const typename Traits:: │ │ │ │ │ -DomainType &, std::vector< typename Traits::RangeType > &) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +A class providing local coefficients for dg spaces. │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ -Local interpolation of a function. │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -! │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const Dune::LocalKey & localKey(std::size_t i) const │ │ │ │ │ -map index i to local key │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -MimeticLocalCoefficients(unsigned int variant_) │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -MimeticLocalCoefficients() │ │ │ │ │ -DDeeffiinniittiioonn mimeticall.hh:97 │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +DGLocalCoefficients(const unsigned int n) │ │ │ │ │ +construct local keys for n basis functions │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +A factory class for the dg local coefficients. │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const DGLocalCoefficients Object │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:62 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +BasisFactory::Key Key │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn dglocalcoefficients.hh:60 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomial.hh File Reference │ │ │ │ +dune-localfunctions: multiindex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,51 +65,75 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
monomial.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
multiindex.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <cstddef>
│ │ │ │ -#include <cstdlib>
│ │ │ │ -#include <memory>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include "common/localfiniteelementtraits.hh"
│ │ │ │ -#include "common/localtoglobaladaptors.hh"
│ │ │ │ -#include "monomial/monomiallocalbasis.hh"
│ │ │ │ -#include "monomial/monomiallocalcoefficients.hh"
│ │ │ │ -#include "monomial/monomiallocalinterpolation.hh"
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <ostream>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::MonomialLocalFiniteElement< D, R, d, p >
 Monomial basis for discontinuous Galerkin methods. More...
class  Dune::MultiIndex< dim, Field >
 
class  Dune::MonomialFiniteElementFactory< Geometry, RF, p >
 Factory for global-valued MonomFiniteElement objects. More...
struct  Dune::Unity< MultiIndex< dim, F > >
 
struct  Dune::Zero< MultiIndex< dim, F > >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<int dim, class Field >
std::ostream & Dune::operator<< (std::ostream &, const MultiIndex< dim, Field > &)
 
template<int dim, class Field , class F >
MultiIndex< dim, Field > Dune::operator* (const F &f, const MultiIndex< dim, Field > &m)
 
template<int dim, class Field , class F >
MultiIndex< dim, Field > Dune::operator/ (const F &f, const MultiIndex< dim, Field > &m)
 
template<int d, class F >
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< MultiIndex< d, F > > &y)
 
template<int d, class F , int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Dune::FieldVector< MultiIndex< d, F >, dimR > > &y)
 
template<int d, class F , int dimR1, int dimR2>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Dune::FieldMatrix< MultiIndex< d, F >, dimR1, dimR2 > > &y)
 
template<int d, class F >
std::ostream & Dune::operator<< (std::ostream &out, const MultiIndex< d, F > &val)
 
template<int dim, class Field >
bool Dune::operator< (const Zero< MultiIndex< dim, Field > > &, const MultiIndex< dim, Field > &)
 
template<int dim, class Field >
bool Dune::operator< (const MultiIndex< dim, Field > &f, const Zero< MultiIndex< dim, Field > > &)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,65 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -monomial.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +multiindex.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include "_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ -#include "_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h" │ │ │ │ │ -#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_,_ _p_ _> │ │ │ │ │ -  Monomial basis for discontinuous Galerkin methods. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _p_ _> │ │ │ │ │ -  Factory for global-valued MonomFiniteElement objects. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_U_n_i_t_y_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_Z_e_r_o_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &, const _M_u_l_t_i_I_n_d_e_x< │ │ │ │ │ + dim, Field > &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +_M_u_l_t_i_I_n_d_e_x< dim, Field >  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_* (const F &f, const _M_u_l_t_i_I_n_d_e_x< dim, │ │ │ │ │ + Field > &m) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +_M_u_l_t_i_I_n_d_e_x< dim, Field >  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ (const F &f, const _M_u_l_t_i_I_n_d_e_x< dim, │ │ │ │ │ + Field > &m) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ + vector< _M_u_l_t_i_I_n_d_e_x< d, F > > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ + vector< Dune::FieldVector< _M_u_l_t_i_I_n_d_e_x< d, F >, dimR > │ │ │ │ │ + > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ + vector< Dune::FieldMatrix< _M_u_l_t_i_I_n_d_e_x< d, F >, dimR1, │ │ │ │ │ + dimR2 > > &y) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ + _M_u_l_t_i_I_n_d_e_x< d, F > &val) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim, Field > │ │ │ │ │ + > &, const _M_u_l_t_i_I_n_d_e_x< dim, Field > &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _M_u_l_t_i_I_n_d_e_x< dim, Field > &f, │ │ │ │ │ + const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim, Field > > &) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00146_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomial.hh Source File │ │ │ │ +dune-localfunctions: multiindex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,223 +70,644 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomial.hh
│ │ │ │ +
multiindex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_MONOMIAL_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_MONOMIAL_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <cassert>
│ │ │ │ -
10#include <cstddef>
│ │ │ │ -
11#include <cstdlib>
│ │ │ │ -
12#include <memory>
│ │ │ │ -
13#include <vector>
│ │ │ │ +
5#ifndef DUNE_MULTIINDEX_HH
│ │ │ │ +
6#define DUNE_MULTIINDEX_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9#include <ostream>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │ +
12
│ │ │ │ + │ │ │ │
14
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 /****************************************************************
│ │ │ │ +
18 * Provide a Field class which can be used in evaluation methods
│ │ │ │ +
19 * to produce MultiIndex presentation of polynomials.
│ │ │ │ +
20 ****************************************************************/
│ │ │ │ +
21 // Internal Forward Declarations
│ │ │ │ +
22 // -----------------------------
│ │ │ │ +
23
│ │ │ │ +
24 template< int dim, class Field >
│ │ │ │ +
25 class MultiIndex;
│ │ │ │
26
│ │ │ │ -
39 template<class D, class R, int d, int p>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 {
│ │ │ │ -
42 constexpr static int static_size = MonomialLocalBasis<D,R,d,p>::size();
│ │ │ │ -
43
│ │ │ │ -
44 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
│ │ │ │ -
54 MonomialLocalFiniteElement (const GeometryType &gt_)
│ │ │ │ -
55 : basis(), interpolation(gt_, basis), gt(gt_)
│ │ │ │ -
56 {}
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
60 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
61 {
│ │ │ │ -
62 return basis;
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
68 {
│ │ │ │ -
69 return coefficients;
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
75 {
│ │ │ │ -
76 return interpolation;
│ │ │ │ -
77 }
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
│ │ │ │ -
80 unsigned int size () const
│ │ │ │ -
81 {
│ │ │ │ -
82 return basis.size();
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
87 GeometryType type () const
│ │ │ │ -
88 {
│ │ │ │ -
89 return gt;
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
96 GeometryType gt;
│ │ │ │ -
97 };
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
100
│ │ │ │ -
112 template<class Geometry, class RF, std::size_t p>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
114 typedef typename Geometry::ctype DF;
│ │ │ │ -
115 static const std::size_t dim = Geometry::mydimension;
│ │ │ │ -
116
│ │ │ │ - │ │ │ │ -
118
│ │ │ │ -
119 std::vector<std::shared_ptr<const LocalFE> > localFEs;
│ │ │ │ -
120
│ │ │ │ -
121 void init(const GeometryType &gt) {
│ │ │ │ -
122 std::size_t index = gt.id() >> 1;
│ │ │ │ -
123 if(localFEs.size() <= index)
│ │ │ │ -
124 localFEs.resize(index+1);
│ │ │ │ -
125 localFEs[index].reset(new LocalFE(gt));
│ │ │ │ -
126 }
│ │ │ │ -
127
│ │ │ │ -
128 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
131
│ │ │ │ -
133
│ │ │ │ -
137 template<class ForwardIterator>
│ │ │ │ -
│ │ │ │ -
138 MonomialFiniteElementFactory(const ForwardIterator &begin,
│ │ │ │ -
139 const ForwardIterator &end)
│ │ │ │ -
140 {
│ │ │ │ -
141 for(ForwardIterator it = begin; it != end; ++it)
│ │ │ │ -
142 init(*it);
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
149 MonomialFiniteElementFactory(const GeometryType &gt)
│ │ │ │ -
150 { init(gt); }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
157 static_assert(dim <= 3, "MonomFiniteElementFactory knows the "
│ │ │ │ -
158 "available geometry types only up to dimension 3");
│ │ │ │ -
159
│ │ │ │ -
160 GeometryType gt;
│ │ │ │ -
161 switch(dim) {
│ │ │ │ -
162 case 0 :
│ │ │ │ -
163 gt = Dune::GeometryTypes::vertex; init(gt);
│ │ │ │ -
164 break;
│ │ │ │ -
165 case 1 :
│ │ │ │ -
166 gt = Dune::GeometryTypes::line; init(gt);
│ │ │ │ -
167 break;
│ │ │ │ -
168 case 2 :
│ │ │ │ -
169 gt = Dune::GeometryTypes::triangle; init(gt);
│ │ │ │ -
170 gt = Dune::GeometryTypes::quadrilateral; init(gt);
│ │ │ │ -
171 break;
│ │ │ │ -
172 case 3 :
│ │ │ │ -
173 gt = Dune::GeometryTypes::tetrahedron; init(gt);
│ │ │ │ -
174 gt = Dune::GeometryTypes::pyramid; init(gt);
│ │ │ │ -
175 gt = Dune::GeometryTypes::prism; init(gt);
│ │ │ │ -
176 gt = Dune::GeometryTypes::hexahedron; init(gt);
│ │ │ │ -
177 break;
│ │ │ │ -
178 default :
│ │ │ │ -
179 // this should never happen -- it should be caught by the static
│ │ │ │ -
180 // assert above.
│ │ │ │ -
181 std::abort();
│ │ │ │ -
182 };
│ │ │ │ -
183 }
│ │ │ │ -
│ │ │ │ -
184
│ │ │ │ -
186
│ │ │ │ -
│ │ │ │ -
196 const FiniteElement make(const Geometry& geometry) {
│ │ │ │ -
197 std::size_t index = geometry.type().id() >> 1;
│ │ │ │ -
198 assert(localFEs.size() > index && localFEs[index]);
│ │ │ │ -
199 return FiniteElement(*localFEs[index], geometry);
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201 };
│ │ │ │ -
│ │ │ │ -
202}
│ │ │ │ -
203
│ │ │ │ -
204#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
27 template< int dim, class Field >
│ │ │ │ +
28 std::ostream &operator<< ( std::ostream &, const MultiIndex< dim,Field > & );
│ │ │ │ +
29
│ │ │ │ +
30
│ │ │ │ +
31
│ │ │ │ +
32 // MultiIndex
│ │ │ │ +
33 // ----------
│ │ │ │ +
34
│ │ │ │ +
35 template< int dim,class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {
│ │ │ │ + │ │ │ │ +
39
│ │ │ │ +
40 friend std::ostream &operator<<<> ( std::ostream &, const This & );
│ │ │ │ +
41
│ │ │ │ +
42 public:
│ │ │ │ +
43 static const int dimension = dim;
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 : vecZ_( 0 ),
│ │ │ │ +
47 vecOMZ_( 0 ),
│ │ │ │ +
48 factor_( 1. ),
│ │ │ │ +
49 next_( 0 )
│ │ │ │ +
50 {}
│ │ │ │ +
│ │ │ │ +
51 template <class F>
│ │ │ │ +
│ │ │ │ +
52 explicit MultiIndex (const F &f)
│ │ │ │ +
53 : vecZ_( 0 ),
│ │ │ │ +
54 vecOMZ_( 0 ),
│ │ │ │ +
55 factor_( field_cast<Field>(f) ),
│ │ │ │ +
56 next_( 0 )
│ │ │ │ +
57 {}
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
59 MultiIndex ( int, const This &other )
│ │ │ │ +
60 : vecZ_( other.vecOMZ_ ),
│ │ │ │ +
61 vecOMZ_( other.vecZ_ ),
│ │ │ │ +
62 factor_( other.factor_ )
│ │ │ │ +
63 {
│ │ │ │ +
64 assert(!other.next_);
│ │ │ │ +
65 if (other.next_)
│ │ │ │ +
66 {
│ │ │ │ +
67 next_ = new This( *(other.next_) );
│ │ │ │ +
68 }
│ │ │ │ +
69 else
│ │ │ │ +
70 next_ = 0;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
│ │ │ │ +
73 MultiIndex ( const This &other )
│ │ │ │ +
74 : vecZ_( other.vecZ_ ),
│ │ │ │ +
75 vecOMZ_( other.vecOMZ_ ),
│ │ │ │ +
76 factor_( other.factor_ )
│ │ │ │ +
77 {
│ │ │ │ +
78 if (other.next_)
│ │ │ │ +
79 {
│ │ │ │ +
80 next_ = new This( *(other.next_) );
│ │ │ │ +
81 }
│ │ │ │ +
82 else
│ │ │ │ +
83 next_ = 0;
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
87 {
│ │ │ │ +
88 remove();
│ │ │ │ +
89 }
│ │ │ │ +
│ │ │ │ +
90
│ │ │ │ +
│ │ │ │ +
91 int z(int i) const
│ │ │ │ +
92 {
│ │ │ │ +
93 return vecZ_[i];
│ │ │ │ +
94 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
95 int omz(int i) const
│ │ │ │ +
96 {
│ │ │ │ +
97 return vecOMZ_[i];
│ │ │ │ +
98 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
99 const Field &factor() const
│ │ │ │ +
100 {
│ │ │ │ +
101 return factor_;
│ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
104 This &operator= ( const This &other )
│ │ │ │ +
105 {
│ │ │ │ +
106 remove();
│ │ │ │ +
107 vecZ_ = other.vecZ_;
│ │ │ │ +
108 vecOMZ_ = other.vecOMZ_;
│ │ │ │ +
109 factor_ = other.factor_;
│ │ │ │ +
110 if (other.next_)
│ │ │ │ +
111 next_ = new This(*(other.next_));
│ │ │ │ +
112 return *this;
│ │ │ │ +
113 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 {
│ │ │ │ +
116 remove();
│ │ │ │ +
117 vecZ_ = 0;
│ │ │ │ +
118 vecOMZ_ = 0;
│ │ │ │ +
119 factor_ = 0.;
│ │ │ │ +
120 return *this;
│ │ │ │ +
121 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
123 {
│ │ │ │ +
124 remove();
│ │ │ │ +
125 vecZ_ = 0;
│ │ │ │ +
126 vecOMZ_ = 0;
│ │ │ │ +
127 factor_ = 1.;
│ │ │ │ +
128 return *this;
│ │ │ │ +
129 }
│ │ │ │ +
│ │ │ │ +
130 template <class F>
│ │ │ │ +
│ │ │ │ +
131 This &operator= ( const F &f )
│ │ │ │ +
132 {
│ │ │ │ +
133 remove();
│ │ │ │ +
134 vecZ_ = 0;
│ │ │ │ +
135 vecOMZ_ = 0;
│ │ │ │ +
136 factor_ = field_cast<Field>(f);
│ │ │ │ +
137 return *this;
│ │ │ │ +
138 }
│ │ │ │ +
│ │ │ │ +
139
│ │ │ │ +
│ │ │ │ +
140 bool operator== (const This &other) const
│ │ │ │ +
141 {
│ │ │ │ +
142 assert(!next_ && !other.next_);
│ │ │ │ +
143 return (vecZ_==other.vecZ_ && vecOMZ_==other.vecOMZ_ && factor_==other.factor_);
│ │ │ │ +
144 }
│ │ │ │ +
│ │ │ │ +
145
│ │ │ │ +
146 template <class F>
│ │ │ │ +
│ │ │ │ +
147 This &operator*= ( const F &f )
│ │ │ │ +
148 {
│ │ │ │ +
149 factor_ *= field_cast<Field>(f);
│ │ │ │ +
150 if (next_)
│ │ │ │ +
151 (*next_) *= f;
│ │ │ │ +
152 return *this;
│ │ │ │ +
153 }
│ │ │ │ +
│ │ │ │ +
154 template <class F>
│ │ │ │ +
│ │ │ │ +
155 This &operator/= ( const F &f )
│ │ │ │ +
156 {
│ │ │ │ +
157 factor_ /= field_cast<Field>(f);
│ │ │ │ +
158 if (next_)
│ │ │ │ +
159 (*next_) /= f;
│ │ │ │ +
160 return *this;
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
│ │ │ │ +
163 This &operator*= ( const This &other )
│ │ │ │ +
164 {
│ │ │ │ +
165 assert(!other.next_);
│ │ │ │ +
166 vecZ_ += other.vecZ_;
│ │ │ │ +
167 vecOMZ_ += other.vecOMZ_;
│ │ │ │ +
168 factor_ *= other.factor_;
│ │ │ │ +
169 if (next_)
│ │ │ │ +
170 (*next_) *= other;
│ │ │ │ +
171 return *this;
│ │ │ │ +
172 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
173 This &operator/= ( const This &other )
│ │ │ │ +
174 {
│ │ │ │ +
175 assert(!other.next_);
│ │ │ │ +
176 vecZ_ -= other.vecZ_;
│ │ │ │ +
177 vecOMZ_ -= other.vecOMZ_;
│ │ │ │ +
178 factor_ /= other.factor_;
│ │ │ │ +
179 if (next_)
│ │ │ │ +
180 (*next_) /= other;
│ │ │ │ +
181 return *this;
│ │ │ │ +
182 }
│ │ │ │ +
│ │ │ │ +
183
│ │ │ │ +
│ │ │ │ +
184 This &operator+= ( const This &other )
│ │ │ │ +
185 {
│ │ │ │ +
186 assert(!other.next_);
│ │ │ │ +
187 if (std::abs(other.factor_)<1e-10)
│ │ │ │ +
188 return *this;
│ │ │ │ +
189 if (std::abs(factor_)<1e-10)
│ │ │ │ +
190 {
│ │ │ │ +
191 *this = other;
│ │ │ │ +
192 return *this;
│ │ │ │ +
193 }
│ │ │ │ +
194 if (!sameMultiIndex(other))
│ │ │ │ +
195 {
│ │ │ │ +
196 if (next_)
│ │ │ │ +
197 (*next_)+=other;
│ │ │ │ +
198 else
│ │ │ │ +
199 {
│ │ │ │ +
200 next_ = new This(other);
│ │ │ │ +
201 }
│ │ │ │ +
202 }
│ │ │ │ +
203 else
│ │ │ │ +
204 factor_ += other.factor_;
│ │ │ │ +
205 return *this;
│ │ │ │ +
206 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
207 This &operator-= ( const This &other )
│ │ │ │ +
208 {
│ │ │ │ +
209 assert(!other.next_);
│ │ │ │ +
210 if (!sameMultiIndex(other))
│ │ │ │ +
211 {
│ │ │ │ +
212 if (next_)
│ │ │ │ +
213 next_-=other;
│ │ │ │ +
214 else
│ │ │ │ +
215 {
│ │ │ │ +
216 next_ = new This(other);
│ │ │ │ +
217 }
│ │ │ │ +
218 }
│ │ │ │ +
219 else
│ │ │ │ +
220 factor_ -= other.factor_;
│ │ │ │ +
221 return *this;
│ │ │ │ +
222 }
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
224 template <class F>
│ │ │ │ +
│ │ │ │ +
225 This operator* ( const F &f ) const
│ │ │ │ +
226 {
│ │ │ │ +
227 This z = *this;
│ │ │ │ +
228 return (z *= f);
│ │ │ │ +
229 }
│ │ │ │ +
│ │ │ │ +
230 template <class F>
│ │ │ │ +
│ │ │ │ +
231 This operator/ ( const F &f ) const
│ │ │ │ +
232 {
│ │ │ │ +
233 This z = *this;
│ │ │ │ +
234 return (z /= f);
│ │ │ │ +
235 }
│ │ │ │ +
│ │ │ │ +
236
│ │ │ │ +
│ │ │ │ +
237 This operator* ( const This &other ) const
│ │ │ │ +
238 {
│ │ │ │ +
239 This z = *this;
│ │ │ │ +
240 return (z *= other);
│ │ │ │ +
241 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
242 This operator/ ( const This &other ) const
│ │ │ │ +
243 {
│ │ │ │ +
244 This z = *this;
│ │ │ │ +
245 return (z /= other);
│ │ │ │ +
246 }
│ │ │ │ +
│ │ │ │ +
247
│ │ │ │ +
│ │ │ │ +
248 This operator+ ( const This &other ) const
│ │ │ │ +
249 {
│ │ │ │ +
250 This z = *this;
│ │ │ │ +
251 return (z += other);
│ │ │ │ +
252 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
253 This operator- ( const This &other ) const
│ │ │ │ +
254 {
│ │ │ │ +
255 This z = *this;
│ │ │ │ +
256 return (z -= other);
│ │ │ │ +
257 }
│ │ │ │ +
│ │ │ │ +
258
│ │ │ │ +
│ │ │ │ +
259 void set ( int d, int power = 1 )
│ │ │ │ +
260 {
│ │ │ │ +
261 vecZ_[ d ] = power;
│ │ │ │ +
262 }
│ │ │ │ +
│ │ │ │ +
263
│ │ │ │ +
│ │ │ │ +
264 int absZ () const
│ │ │ │ +
265 {
│ │ │ │ +
266 int ret = 0;
│ │ │ │ +
267 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
268 ret += std::abs( vecZ_[ i ] );
│ │ │ │ +
269 return ret;
│ │ │ │ +
270 }
│ │ │ │ +
│ │ │ │ +
271
│ │ │ │ +
│ │ │ │ +
272 int absOMZ() const
│ │ │ │ +
273 {
│ │ │ │ +
274 int ret = 0;
│ │ │ │ +
275 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
276 ret += std::abs( vecOMZ_[ i ] );
│ │ │ │ +
277 return ret;
│ │ │ │ +
278 }
│ │ │ │ +
│ │ │ │ +
279
│ │ │ │ +
│ │ │ │ +
280 bool sameMultiIndex(const This &ind)
│ │ │ │ +
281 {
│ │ │ │ +
282 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
283 {
│ │ │ │ +
284 if ( vecZ_[i] != ind.vecZ_[i] ||
│ │ │ │ +
285 vecOMZ_[i] != vecOMZ_[i] )
│ │ │ │ +
286 return false;
│ │ │ │ +
287 }
│ │ │ │ +
288 return true;
│ │ │ │ +
289 }
│ │ │ │ +
│ │ │ │ +
290
│ │ │ │ +
291 private:
│ │ │ │ +
292 void remove()
│ │ │ │ +
293 {
│ │ │ │ +
294 if (next_)
│ │ │ │ +
295 {
│ │ │ │ +
296 next_->remove();
│ │ │ │ +
297 delete next_;
│ │ │ │ +
298 next_ = 0;
│ │ │ │ +
299 }
│ │ │ │ +
300 }
│ │ │ │ +
301
│ │ │ │ +
302 typedef Dune::FieldVector< int, dimension > Vector;
│ │ │ │ +
303
│ │ │ │ +
304 Vector vecZ_;
│ │ │ │ +
305 Vector vecOMZ_;
│ │ │ │ +
306 Field factor_;
│ │ │ │ +
307
│ │ │ │ +
308 This *next_;
│ │ │ │ +
309 };
│ │ │ │ +
│ │ │ │ +
310
│ │ │ │ +
311 template <int dim, class Field, class F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
313 const MultiIndex<dim,Field> &m)
│ │ │ │ +
314 {
│ │ │ │ + │ │ │ │ +
316 return (z *= f);
│ │ │ │ +
317 }
│ │ │ │ +
│ │ │ │ +
318 template <int dim, class Field, class F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
320 const MultiIndex<dim,Field> &m)
│ │ │ │ +
321 {
│ │ │ │ + │ │ │ │ +
323 return (z /= f);
│ │ │ │ +
324 }
│ │ │ │ +
│ │ │ │ +
325
│ │ │ │ +
326 template <int d, class F>
│ │ │ │ +
│ │ │ │ +
327 std::ostream &operator<<(std::ostream& out,const std::vector<MultiIndex<d,F> >& y) {
│ │ │ │ +
328 for (unsigned int r=0; r<y.size(); ++r) {
│ │ │ │ +
329 out << "f_{" << r << "}(" << char('a');
│ │ │ │ +
330 for (int i=1; i<d; ++i)
│ │ │ │ +
331 out << "," << char('a'+i);
│ │ │ │ +
332 out << ")=";
│ │ │ │ +
333 out << y[r] << std::endl;
│ │ │ │ +
334 }
│ │ │ │ +
335 return out;
│ │ │ │ +
336 }
│ │ │ │ +
│ │ │ │ +
337 template <int d,class F,int dimR>
│ │ │ │ +
│ │ │ │ +
338 std::ostream &operator<<(std::ostream& out,
│ │ │ │ +
339 const std::vector<Dune::FieldVector<MultiIndex<d,F>,dimR> >& y) {
│ │ │ │ +
340 out << "\\begin{eqnarray*}" << std::endl;
│ │ │ │ +
341 for (unsigned int k=0; k<y.size(); ++k) {
│ │ │ │ +
342 out << "f_{" << k << "}(" << char('a');
│ │ │ │ +
343 for (int i=1; i<d; ++i)
│ │ │ │ +
344 out << "," << char('a'+i);
│ │ │ │ +
345 out << ") &=& ( ";
│ │ │ │ +
346 out << y[k][0] ;
│ │ │ │ +
347 for (unsigned int r=1; r<dimR; ++r) {
│ │ │ │ +
348 out << " , " << y[k][r] ;
│ │ │ │ +
349 }
│ │ │ │ +
350 out << " ) \\\\" << std::endl;
│ │ │ │ +
351 }
│ │ │ │ +
352 out << "\\end{eqnarray*}" << std::endl;
│ │ │ │ +
353 return out;
│ │ │ │ +
354 }
│ │ │ │ +
│ │ │ │ +
355 template <int d,class F,int dimR1,int dimR2>
│ │ │ │ +
│ │ │ │ +
356 std::ostream &operator<<(std::ostream& out,
│ │ │ │ +
357 const std::vector<Dune::FieldMatrix<MultiIndex<d,F>,dimR1,dimR2> >& y) {
│ │ │ │ +
358 out << "\\begin{eqnarray*}" << std::endl;
│ │ │ │ +
359 for (unsigned int k=0; k<y.size(); ++k) {
│ │ │ │ +
360 for (int q=0; q<dimR2; q++) {
│ │ │ │ +
361 out << "d_{" << char('a'+q) << "}f_{" << k << "}(" << char('a');
│ │ │ │ +
362 for (int i=1; i<d; ++i)
│ │ │ │ +
363 out << "," << char('a'+i);
│ │ │ │ +
364 out << ") &=& ( ";
│ │ │ │ +
365 out << y[k][0][q] ;
│ │ │ │ +
366 for (unsigned int r=1; r<dimR1; ++r) {
│ │ │ │ +
367 out << " , " << y[k][r][q] ;
│ │ │ │ +
368 }
│ │ │ │ +
369 out << " ) \\\\" << std::endl;
│ │ │ │ +
370 }
│ │ │ │ +
371 }
│ │ │ │ +
372 out << "\\end{eqnarray*}" << std::endl;
│ │ │ │ +
373 return out;
│ │ │ │ +
374 }
│ │ │ │ +
│ │ │ │ +
375 template <int d, class F>
│ │ │ │ +
│ │ │ │ +
376 std::ostream &operator<<(std::ostream& out,const MultiIndex<d,F>& val)
│ │ │ │ +
377 {
│ │ │ │ +
378 bool first = true;
│ │ │ │ +
379 const MultiIndex<d,F> *m = &val;
│ │ │ │ +
380 do {
│ │ │ │ +
381 if (m->absZ()==0 && std::abs(m->factor())<1e-10)
│ │ │ │ +
382 {
│ │ │ │ +
383 if (!m->next_ || !first)
│ │ │ │ +
384 {
│ │ │ │ +
385 out << "0";
│ │ │ │ +
386 break;
│ │ │ │ +
387 }
│ │ │ │ +
388 else {
│ │ │ │ +
389 m = m->next_;
│ │ │ │ +
390 continue;
│ │ │ │ +
391 }
│ │ │ │ +
392 }
│ │ │ │ +
393 if (m->factor()>0 && !first)
│ │ │ │ +
394 out << " + ";
│ │ │ │ +
395 else if (m->factor()<0)
│ │ │ │ +
396 if (!first)
│ │ │ │ +
397 out << " - ";
│ │ │ │ +
398 else
│ │ │ │ +
399 out << "- ";
│ │ │ │ +
400 else
│ │ │ │ +
401 out << " ";
│ │ │ │ +
402 first = false;
│ │ │ │ +
403 F f = std::abs(m->factor());
│ │ │ │ +
404 if (m->absZ()==0)
│ │ │ │ +
405 out << f;
│ │ │ │ +
406 else {
│ │ │ │ +
407 if ( std::abs(f)<1e-10)
│ │ │ │ +
408 out << 0;
│ │ │ │ +
409 else
│ │ │ │ +
410 {
│ │ │ │ +
411 F f_1(f);
│ │ │ │ +
412 f_1 -= 1.; // better Unity<F>();
│ │ │ │ +
413 if ( std::abs(f_1)>1e-10)
│ │ │ │ +
414 out << f;
│ │ │ │ +
415 int absVal = 0;
│ │ │ │ +
416 for (int i=0; i<d; ++i) {
│ │ │ │ +
417 if (m->vecZ_[i]==0)
│ │ │ │ +
418 continue;
│ │ │ │ +
419 else if (m->vecZ_[i]==1)
│ │ │ │ +
420 out << char('a'+i);
│ │ │ │ +
421 else if (m->vecZ_[i]>0)
│ │ │ │ +
422 out << char('a'+i) << "^" << m->vecZ_[i] << "";
│ │ │ │ +
423 else if (m->vecZ_[i]<0)
│ │ │ │ +
424 out << char('a'+i) << "^" << m->vecZ_[i] << "";
│ │ │ │ +
425 absVal += m->vecZ_[i];
│ │ │ │ +
426 if (absVal<m->absZ()) out << "";
│ │ │ │ +
427 }
│ │ │ │ +
428 }
│ │ │ │ +
429 }
│ │ │ │ +
430 /*
│ │ │ │ +
431 if (mi.absOMZ()>0) {
│ │ │ │ +
432 for (int i=0;i<=mi.absZ();++i) {
│ │ │ │ +
433 if (mi.vecOMZ_[i]==0)
│ │ │ │ +
434 continue;
│ │ │ │ +
435 else if (mi.vecOMZ_[i]==1)
│ │ │ │ +
436 out << (1-char('a'+i));
│ │ │ │ +
437 else if (mi.vecOMZ_[i]>0)
│ │ │ │ +
438 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i];
│ │ │ │ +
439 else if (mi.vecOMZ_[i]<0)
│ │ │ │ +
440 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i];
│ │ │ │ +
441 if (i==mi.absZ()+1) out << "*";
│ │ │ │ +
442 }
│ │ │ │ +
443 }
│ │ │ │ +
444 */
│ │ │ │ +
445 m = m->next_;
│ │ │ │ +
446 } while (m);
│ │ │ │ +
447 return out;
│ │ │ │ +
448 }
│ │ │ │ +
│ │ │ │ +
449
│ │ │ │ +
450 template< int dim, class F>
│ │ │ │ +
│ │ │ │ +
451 struct Unity< MultiIndex< dim, F > >
│ │ │ │ +
452 {
│ │ │ │ + │ │ │ │ +
454
│ │ │ │ +
│ │ │ │ +
455 operator Field () const
│ │ │ │ +
456 {
│ │ │ │ +
457 return Field();
│ │ │ │ +
458 }
│ │ │ │ +
│ │ │ │ +
459
│ │ │ │ +
│ │ │ │ +
460 Field operator- ( const Field &other ) const
│ │ │ │ +
461 {
│ │ │ │ +
462 return Field( 1, other );
│ │ │ │ +
463 }
│ │ │ │ +
│ │ │ │ +
464
│ │ │ │ +
│ │ │ │ +
465 Field operator/ ( const Field &other ) const
│ │ │ │ +
466 {
│ │ │ │ +
467 return Field() / other;
│ │ │ │ +
468 }
│ │ │ │ +
│ │ │ │ +
469 };
│ │ │ │ +
│ │ │ │ +
470
│ │ │ │ +
471
│ │ │ │ +
472
│ │ │ │ +
473 template< int dim, class F >
│ │ │ │ +
│ │ │ │ +
474 struct Zero< MultiIndex< dim,F > >
│ │ │ │ +
475 {
│ │ │ │ + │ │ │ │ +
477
│ │ │ │ +
478 // zero does not acutally exist
│ │ │ │ +
│ │ │ │ +
479 operator Field ()
│ │ │ │ +
480 {
│ │ │ │ +
481 return Field(0);
│ │ │ │ +
482 }
│ │ │ │ +
│ │ │ │ +
483 };
│ │ │ │ +
│ │ │ │ +
484
│ │ │ │ +
485 template< int dim, class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
487 {
│ │ │ │ +
488 return true;
│ │ │ │ +
489 }
│ │ │ │ +
│ │ │ │ +
490
│ │ │ │ +
491 template< int dim, class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
493 {
│ │ │ │ +
494 return true;
│ │ │ │ +
495 }
│ │ │ │ +
│ │ │ │ +
496
│ │ │ │ +
497}
│ │ │ │ +
498
│ │ │ │ +
499#endif // #ifndef DUNE_MULTIINDEX_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Convert a simple scalar local finite element into a global finite element.
Definition localtoglobaladaptors.hh:187
│ │ │ │ -
GeometryType type() const
Definition localtoglobaladaptors.hh:229
│ │ │ │ -
Monomial basis for discontinuous Galerkin methods.
Definition monomial.hh:41
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition monomial.hh:80
│ │ │ │ -
GeometryType type() const
Definition monomial.hh:87
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition monomial.hh:74
│ │ │ │ -
LocalFiniteElementTraits< MonomialLocalBasis< D, R, d, p >, MonomialLocalCoefficients< static_size >, MonomialLocalInterpolation< MonomialLocalBasis< D, R, d, p >, static_size > > Traits
Definition monomial.hh:51
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition monomial.hh:67
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition monomial.hh:60
│ │ │ │ -
MonomialLocalFiniteElement(const GeometryType &gt_)
Construct a MonomLocalFiniteElement.
Definition monomial.hh:54
│ │ │ │ -
Factory for global-valued MonomFiniteElement objects.
Definition monomial.hh:113
│ │ │ │ -
MonomialFiniteElementFactory(const ForwardIterator &begin, const ForwardIterator &end)
construct a MonomialFiniteElementFactory from a list of GeometryType's
Definition monomial.hh:138
│ │ │ │ -
MonomialFiniteElementFactory(const GeometryType &gt)
construct a MonomialFiniteElementFactory from a single GeometryType
Definition monomial.hh:149
│ │ │ │ -
const FiniteElement make(const Geometry &geometry)
construct a global-valued MonomFiniteElement
Definition monomial.hh:196
│ │ │ │ -
ScalarLocalToGlobalFiniteElementAdaptor< LocalFE, Geometry > FiniteElement
Definition monomial.hh:130
│ │ │ │ -
MonomialFiniteElementFactory()
construct a MonomFiniteElementFactory for all applicable GeometryType's
Definition monomial.hh:156
│ │ │ │ -
Constant shape function.
Definition monomiallocalbasis.hh:201
│ │ │ │ -
static constexpr unsigned int size()
Number of shape functions.
Definition monomiallocalbasis.hh:216
│ │ │ │ -
Layout map for monomial finite elements.
Definition monomiallocalcoefficients.hh:24
│ │ │ │ -
Definition monomiallocalinterpolation.hh:22
│ │ │ │ +
Field operator-(const Unity< Field > &u, const Field &f)
Definition field.hh:44
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
bool operator<(const Zero< Field > &, const Field &f)
Definition field.hh:119
│ │ │ │ +
Field operator/(const Unity< Field > &u, const Field &f)
Definition field.hh:56
│ │ │ │ +
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ +
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ +
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
Definition multiindex.hh:37
│ │ │ │ +
This operator+(const This &other) const
Definition multiindex.hh:248
│ │ │ │ +
int absOMZ() const
Definition multiindex.hh:272
│ │ │ │ +
~MultiIndex()
Definition multiindex.hh:86
│ │ │ │ +
This & operator-=(const This &other)
Definition multiindex.hh:207
│ │ │ │ +
MultiIndex(int, const This &other)
Definition multiindex.hh:59
│ │ │ │ +
static const int dimension
Definition multiindex.hh:43
│ │ │ │ +
int absZ() const
Definition multiindex.hh:264
│ │ │ │ +
int omz(int i) const
Definition multiindex.hh:95
│ │ │ │ +
This & operator+=(const This &other)
Definition multiindex.hh:184
│ │ │ │ +
bool operator==(const This &other) const
Definition multiindex.hh:140
│ │ │ │ +
bool sameMultiIndex(const This &ind)
Definition multiindex.hh:280
│ │ │ │ +
This & operator=(const This &other)
Definition multiindex.hh:104
│ │ │ │ +
MultiIndex(const This &other)
Definition multiindex.hh:73
│ │ │ │ +
This & operator*=(const F &f)
Definition multiindex.hh:147
│ │ │ │ +
const Field & factor() const
Definition multiindex.hh:99
│ │ │ │ +
This operator/(const F &f) const
Definition multiindex.hh:231
│ │ │ │ +
MultiIndex(const F &f)
Definition multiindex.hh:52
│ │ │ │ +
This & operator/=(const F &f)
Definition multiindex.hh:155
│ │ │ │ +
This operator*(const F &f) const
Definition multiindex.hh:225
│ │ │ │ +
void set(int d, int power=1)
Definition multiindex.hh:259
│ │ │ │ +
This operator-(const This &other) const
Definition multiindex.hh:253
│ │ │ │ +
int z(int i) const
Definition multiindex.hh:91
│ │ │ │ +
MultiIndex()
Definition multiindex.hh:45
│ │ │ │ +
MultiIndex< dim, F > Field
Definition multiindex.hh:453
│ │ │ │ +
MultiIndex< dim, F > Field
Definition multiindex.hh:476
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,248 +1,621 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -monomial.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +multiindex.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ -7#define DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +5#ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ +6#define DUNE_MULTIINDEX_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ 14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include "_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ -18#include "_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h" │ │ │ │ │ -19#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -20#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -21#include "_m_o_n_o_m_i_a_l_/_m_o_n_o_m_i_a_l_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e │ │ │ │ │ -24{ │ │ │ │ │ -25 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 /**************************************************************** │ │ │ │ │ +18 * Provide a Field class which can be used in evaluation methods │ │ │ │ │ +19 * to produce MultiIndex presentation of polynomials. │ │ │ │ │ +20 ****************************************************************/ │ │ │ │ │ +21 // Internal Forward Declarations │ │ │ │ │ +22 // ----------------------------- │ │ │ │ │ +23 │ │ │ │ │ +24 template< int dim, class Field > │ │ │ │ │ +25 class MultiIndex; │ │ │ │ │ 26 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 class _M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -41 { │ │ │ │ │ -42 constexpr static int static_size = _M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_p_>_:_:_s_i_z_e(); │ │ │ │ │ -43 │ │ │ │ │ -44 public: │ │ │ │ │ -47 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -48 _M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_p_>, │ │ │ │ │ -49 _M_o_n_o_m_i_a_l_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_s_t_a_t_i_c___s_i_z_e_>, │ │ │ │ │ -50 _M_o_n_o_m_i_a_l_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_p_>,static_size> │ │ │ │ │ -_5_1 > _T_r_a_i_t_s; │ │ │ │ │ -52 │ │ │ │ │ -_5_4 _M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (const GeometryType >_) │ │ │ │ │ -55 : basis(), interpolation(gt_, basis), gt(gt_) │ │ │ │ │ -56 {} │ │ │ │ │ -57 │ │ │ │ │ -_6_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -61 { │ │ │ │ │ -62 return basis; │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -_6_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -68 { │ │ │ │ │ -69 return coefficients; │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -_7_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -75 { │ │ │ │ │ -76 return interpolation; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -_8_0 unsigned int _s_i_z_e () const │ │ │ │ │ -81 { │ │ │ │ │ -82 return basis.size(); │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_7 GeometryType _t_y_p_e () const │ │ │ │ │ -88 { │ │ │ │ │ -89 return gt; │ │ │ │ │ -90 } │ │ │ │ │ -91 │ │ │ │ │ -92 private: │ │ │ │ │ -93 _M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_p_> basis; │ │ │ │ │ -94 _M_o_n_o_m_i_a_l_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_s_t_a_t_i_c___s_i_z_e_> coefficients; │ │ │ │ │ -95 _M_o_n_o_m_i_a_l_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_p_>,static_size> │ │ │ │ │ -interpolation; │ │ │ │ │ -96 GeometryType gt; │ │ │ │ │ -97 }; │ │ │ │ │ -98 │ │ │ │ │ -100 │ │ │ │ │ -112 template │ │ │ │ │ -_1_1_3 class _M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ -114 typedef typename Geometry::ctype DF; │ │ │ │ │ -115 static const std::size_t dim = Geometry::mydimension; │ │ │ │ │ -116 │ │ │ │ │ -117 typedef _M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_F_,_ _R_F_,_ _d_i_m_,_ _p_> _L_o_c_a_l_F_E; │ │ │ │ │ -118 │ │ │ │ │ -119 std::vector > localFEs; │ │ │ │ │ -120 │ │ │ │ │ -121 void init(const GeometryType >) { │ │ │ │ │ -122 std::size_t index = gt.id() >> 1; │ │ │ │ │ -123 if(localFEs.size() <= index) │ │ │ │ │ -124 localFEs.resize(index+1); │ │ │ │ │ -125 localFEs[index].reset(new _L_o_c_a_l_F_E(gt)); │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -128 public: │ │ │ │ │ -129 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_<_L_o_c_a_l_F_E_,_ _G_e_o_m_e_t_r_y_> │ │ │ │ │ -_1_3_0 _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ -131 │ │ │ │ │ -133 │ │ │ │ │ -137 template │ │ │ │ │ -_1_3_8 _M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y(const ForwardIterator &begin, │ │ │ │ │ -139 const ForwardIterator &end) │ │ │ │ │ -140 { │ │ │ │ │ -141 for(ForwardIterator it = begin; it != end; ++it) │ │ │ │ │ -142 init(*it); │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -146 │ │ │ │ │ -_1_4_9 _M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y(const GeometryType >) │ │ │ │ │ -150 { init(gt); } │ │ │ │ │ -151 │ │ │ │ │ -153 │ │ │ │ │ -_1_5_6 _M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y() { │ │ │ │ │ -157 static_assert(dim <= 3, "MonomFiniteElementFactory knows the " │ │ │ │ │ -158 "available geometry types only up to dimension 3"); │ │ │ │ │ -159 │ │ │ │ │ -160 GeometryType gt; │ │ │ │ │ -161 switch(dim) { │ │ │ │ │ -162 case 0 : │ │ │ │ │ -163 gt = Dune::GeometryTypes::vertex; init(gt); │ │ │ │ │ -164 break; │ │ │ │ │ -165 case 1 : │ │ │ │ │ -166 gt = Dune::GeometryTypes::line; init(gt); │ │ │ │ │ -167 break; │ │ │ │ │ -168 case 2 : │ │ │ │ │ -169 gt = Dune::GeometryTypes::triangle; init(gt); │ │ │ │ │ -170 gt = Dune::GeometryTypes::quadrilateral; init(gt); │ │ │ │ │ -171 break; │ │ │ │ │ -172 case 3 : │ │ │ │ │ -173 gt = Dune::GeometryTypes::tetrahedron; init(gt); │ │ │ │ │ -174 gt = Dune::GeometryTypes::pyramid; init(gt); │ │ │ │ │ -175 gt = Dune::GeometryTypes::prism; init(gt); │ │ │ │ │ -176 gt = Dune::GeometryTypes::hexahedron; init(gt); │ │ │ │ │ -177 break; │ │ │ │ │ -178 default : │ │ │ │ │ -179 // this should never happen -- it should be caught by the static │ │ │ │ │ -180 // assert above. │ │ │ │ │ -181 std::abort(); │ │ │ │ │ -182 }; │ │ │ │ │ -183 } │ │ │ │ │ -184 │ │ │ │ │ -186 │ │ │ │ │ -_1_9_6 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry) { │ │ │ │ │ -197 std::size_t index = geometry._t_y_p_e().id() >> 1; │ │ │ │ │ -198 assert(localFEs.size() > index && localFEs[index]); │ │ │ │ │ -199 return _F_i_n_i_t_e_E_l_e_m_e_n_t(*localFEs[index], geometry); │ │ │ │ │ -200 } │ │ │ │ │ -201 }; │ │ │ │ │ -202} │ │ │ │ │ -203 │ │ │ │ │ -204#endif // DUNE_LOCALFUNCTIONS_MONOMIAL_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ -_m_o_n_o_m_i_a_l_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_m_o_n_o_m_i_a_l_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_m_o_n_o_m_i_a_l_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +27 template< int dim, class Field > │ │ │ │ │ +_2_8 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &, const _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_i_e_l_d_ _> & │ │ │ │ │ +); │ │ │ │ │ +29 │ │ │ │ │ +30 │ │ │ │ │ +31 │ │ │ │ │ +32 // MultiIndex │ │ │ │ │ +33 // ---------- │ │ │ │ │ +34 │ │ │ │ │ +35 template< int dim,class Field > │ │ │ │ │ +_3_6 class _M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +37 { │ │ │ │ │ +38 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> _T_h_i_s; │ │ │ │ │ +39 │ │ │ │ │ +_4_0 friend std::ostream &operator<<<> ( std::ostream &, const _T_h_i_s & ); │ │ │ │ │ +41 │ │ │ │ │ +42 public: │ │ │ │ │ +_4_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +44 │ │ │ │ │ +_4_5 _M_u_l_t_i_I_n_d_e_x () │ │ │ │ │ +46 : vecZ_( 0 ), │ │ │ │ │ +47 vecOMZ_( 0 ), │ │ │ │ │ +48 factor_( 1. ), │ │ │ │ │ +49 next_( 0 ) │ │ │ │ │ +50 {} │ │ │ │ │ +51 template │ │ │ │ │ +_5_2 explicit _M_u_l_t_i_I_n_d_e_x (const F &f) │ │ │ │ │ +53 : vecZ_( 0 ), │ │ │ │ │ +54 vecOMZ_( 0 ), │ │ │ │ │ +55 factor_( _f_i_e_l_d___c_a_s_t(f) ), │ │ │ │ │ +56 next_( 0 ) │ │ │ │ │ +57 {} │ │ │ │ │ +58 │ │ │ │ │ +_5_9 _M_u_l_t_i_I_n_d_e_x ( int, const _T_h_i_s &other ) │ │ │ │ │ +60 : vecZ_( other.vecOMZ_ ), │ │ │ │ │ +61 vecOMZ_( other.vecZ_ ), │ │ │ │ │ +62 factor_( other.factor_ ) │ │ │ │ │ +63 { │ │ │ │ │ +64 assert(!other.next_); │ │ │ │ │ +65 if (other.next_) │ │ │ │ │ +66 { │ │ │ │ │ +67 next_ = new _T_h_i_s( *(other.next_) ); │ │ │ │ │ +68 } │ │ │ │ │ +69 else │ │ │ │ │ +70 next_ = 0; │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +_7_3 _M_u_l_t_i_I_n_d_e_x ( const _T_h_i_s &other ) │ │ │ │ │ +74 : vecZ_( other.vecZ_ ), │ │ │ │ │ +75 vecOMZ_( other.vecOMZ_ ), │ │ │ │ │ +76 factor_( other.factor_ ) │ │ │ │ │ +77 { │ │ │ │ │ +78 if (other.next_) │ │ │ │ │ +79 { │ │ │ │ │ +80 next_ = new _T_h_i_s( *(other.next_) ); │ │ │ │ │ +81 } │ │ │ │ │ +82 else │ │ │ │ │ +83 next_ = 0; │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +_8_6 _~_M_u_l_t_i_I_n_d_e_x() │ │ │ │ │ +87 { │ │ │ │ │ +88 remove(); │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +_9_1 int _z(int i) const │ │ │ │ │ +92 { │ │ │ │ │ +93 return vecZ_[i]; │ │ │ │ │ +94 } │ │ │ │ │ +_9_5 int _o_m_z(int i) const │ │ │ │ │ +96 { │ │ │ │ │ +97 return vecOMZ_[i]; │ │ │ │ │ +98 } │ │ │ │ │ +_9_9 const Field &_f_a_c_t_o_r() const │ │ │ │ │ +100 { │ │ │ │ │ +101 return factor_; │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +105 { │ │ │ │ │ +106 remove(); │ │ │ │ │ +107 vecZ_ = other.vecZ_; │ │ │ │ │ +108 vecOMZ_ = other.vecOMZ_; │ │ │ │ │ +109 factor_ = other.factor_; │ │ │ │ │ +110 if (other.next_) │ │ │ │ │ +111 next_ = new _T_h_i_s(*(other.next_)); │ │ │ │ │ +112 return *this; │ │ │ │ │ +113 } │ │ │ │ │ +_1_1_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _Z_e_r_o_<_T_h_i_s_> &f ) │ │ │ │ │ +115 { │ │ │ │ │ +116 remove(); │ │ │ │ │ +117 vecZ_ = 0; │ │ │ │ │ +118 vecOMZ_ = 0; │ │ │ │ │ +119 factor_ = 0.; │ │ │ │ │ +120 return *this; │ │ │ │ │ +121 } │ │ │ │ │ +_1_2_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _U_n_i_t_y_<_T_h_i_s_> &f ) │ │ │ │ │ +123 { │ │ │ │ │ +124 remove(); │ │ │ │ │ +125 vecZ_ = 0; │ │ │ │ │ +126 vecOMZ_ = 0; │ │ │ │ │ +127 factor_ = 1.; │ │ │ │ │ +128 return *this; │ │ │ │ │ +129 } │ │ │ │ │ +130 template │ │ │ │ │ +_1_3_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const F &f ) │ │ │ │ │ +132 { │ │ │ │ │ +133 remove(); │ │ │ │ │ +134 vecZ_ = 0; │ │ │ │ │ +135 vecOMZ_ = 0; │ │ │ │ │ +136 factor_ = field_cast(f); │ │ │ │ │ +137 return *this; │ │ │ │ │ +138 } │ │ │ │ │ +139 │ │ │ │ │ +_1_4_0 bool _o_p_e_r_a_t_o_r_=_=_ (const _T_h_i_s &other) const │ │ │ │ │ +141 { │ │ │ │ │ +142 assert(!next_ && !other.next_); │ │ │ │ │ +143 return (vecZ_==other.vecZ_ && vecOMZ_==other.vecOMZ_ && │ │ │ │ │ +factor_==other.factor_); │ │ │ │ │ +144 } │ │ │ │ │ +145 │ │ │ │ │ +146 template │ │ │ │ │ +_1_4_7 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const F &f ) │ │ │ │ │ +148 { │ │ │ │ │ +149 factor_ *= field_cast(f); │ │ │ │ │ +150 if (next_) │ │ │ │ │ +151 (*next_) *= f; │ │ │ │ │ +152 return *this; │ │ │ │ │ +153 } │ │ │ │ │ +154 template │ │ │ │ │ +_1_5_5 _T_h_i_s &_o_p_e_r_a_t_o_r_/_=_ ( const F &f ) │ │ │ │ │ +156 { │ │ │ │ │ +157 factor_ /= field_cast(f); │ │ │ │ │ +158 if (next_) │ │ │ │ │ +159 (*next_) /= f; │ │ │ │ │ +160 return *this; │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +_1_6_3 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +164 { │ │ │ │ │ +165 assert(!other.next_); │ │ │ │ │ +166 vecZ_ += other.vecZ_; │ │ │ │ │ +167 vecOMZ_ += other.vecOMZ_; │ │ │ │ │ +168 factor_ *= other.factor_; │ │ │ │ │ +169 if (next_) │ │ │ │ │ +170 (*next_) *= other; │ │ │ │ │ +171 return *this; │ │ │ │ │ +172 } │ │ │ │ │ +_1_7_3 _T_h_i_s &_o_p_e_r_a_t_o_r_/_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +174 { │ │ │ │ │ +175 assert(!other.next_); │ │ │ │ │ +176 vecZ_ -= other.vecZ_; │ │ │ │ │ +177 vecOMZ_ -= other.vecOMZ_; │ │ │ │ │ +178 factor_ /= other.factor_; │ │ │ │ │ +179 if (next_) │ │ │ │ │ +180 (*next_) /= other; │ │ │ │ │ +181 return *this; │ │ │ │ │ +182 } │ │ │ │ │ +183 │ │ │ │ │ +_1_8_4 _T_h_i_s &_o_p_e_r_a_t_o_r_+_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +185 { │ │ │ │ │ +186 assert(!other.next_); │ │ │ │ │ +187 if (std::abs(other.factor_)<1e-10) │ │ │ │ │ +188 return *this; │ │ │ │ │ +189 if (std::abs(factor_)<1e-10) │ │ │ │ │ +190 { │ │ │ │ │ +191 *this = other; │ │ │ │ │ +192 return *this; │ │ │ │ │ +193 } │ │ │ │ │ +194 if (!_s_a_m_e_M_u_l_t_i_I_n_d_e_x(other)) │ │ │ │ │ +195 { │ │ │ │ │ +196 if (next_) │ │ │ │ │ +197 (*next_)+=other; │ │ │ │ │ +198 else │ │ │ │ │ +199 { │ │ │ │ │ +200 next_ = new _T_h_i_s(other); │ │ │ │ │ +201 } │ │ │ │ │ +202 } │ │ │ │ │ +203 else │ │ │ │ │ +204 factor_ += other.factor_; │ │ │ │ │ +205 return *this; │ │ │ │ │ +206 } │ │ │ │ │ +_2_0_7 _T_h_i_s &_o_p_e_r_a_t_o_r_-_=_ ( const _T_h_i_s &other ) │ │ │ │ │ +208 { │ │ │ │ │ +209 assert(!other.next_); │ │ │ │ │ +210 if (!_s_a_m_e_M_u_l_t_i_I_n_d_e_x(other)) │ │ │ │ │ +211 { │ │ │ │ │ +212 if (next_) │ │ │ │ │ +213 next_-=other; │ │ │ │ │ +214 else │ │ │ │ │ +215 { │ │ │ │ │ +216 next_ = new _T_h_i_s(other); │ │ │ │ │ +217 } │ │ │ │ │ +218 } │ │ │ │ │ +219 else │ │ │ │ │ +220 factor_ -= other.factor_; │ │ │ │ │ +221 return *this; │ │ │ │ │ +222 } │ │ │ │ │ +223 │ │ │ │ │ +224 template │ │ │ │ │ +_2_2_5 _T_h_i_s _o_p_e_r_a_t_o_r_*_ ( const F &f ) const │ │ │ │ │ +226 { │ │ │ │ │ +227 _T_h_i_s _z = *this; │ │ │ │ │ +228 return (_z *= f); │ │ │ │ │ +229 } │ │ │ │ │ +230 template │ │ │ │ │ +_2_3_1 _T_h_i_s _o_p_e_r_a_t_o_r_/_ ( const F &f ) const │ │ │ │ │ +232 { │ │ │ │ │ +233 _T_h_i_s _z = *this; │ │ │ │ │ +234 return (_z /= f); │ │ │ │ │ +235 } │ │ │ │ │ +236 │ │ │ │ │ +_2_3_7 _T_h_i_s _o_p_e_r_a_t_o_r_*_ ( const _T_h_i_s &other ) const │ │ │ │ │ +238 { │ │ │ │ │ +239 _T_h_i_s _z = *this; │ │ │ │ │ +240 return (_z *= other); │ │ │ │ │ +241 } │ │ │ │ │ +_2_4_2 _T_h_i_s _o_p_e_r_a_t_o_r_/_ ( const _T_h_i_s &other ) const │ │ │ │ │ +243 { │ │ │ │ │ +244 _T_h_i_s _z = *this; │ │ │ │ │ +245 return (_z /= other); │ │ │ │ │ +246 } │ │ │ │ │ +247 │ │ │ │ │ +_2_4_8 _T_h_i_s _o_p_e_r_a_t_o_r_+_ ( const _T_h_i_s &other ) const │ │ │ │ │ +249 { │ │ │ │ │ +250 _T_h_i_s _z = *this; │ │ │ │ │ +251 return (_z += other); │ │ │ │ │ +252 } │ │ │ │ │ +_2_5_3 _T_h_i_s _o_p_e_r_a_t_o_r_-_ ( const _T_h_i_s &other ) const │ │ │ │ │ +254 { │ │ │ │ │ +255 _T_h_i_s _z = *this; │ │ │ │ │ +256 return (_z -= other); │ │ │ │ │ +257 } │ │ │ │ │ +258 │ │ │ │ │ +_2_5_9 void _s_e_t ( int d, int power = 1 ) │ │ │ │ │ +260 { │ │ │ │ │ +261 vecZ_[ d ] = power; │ │ │ │ │ +262 } │ │ │ │ │ +263 │ │ │ │ │ +_2_6_4 int _a_b_s_Z () const │ │ │ │ │ +265 { │ │ │ │ │ +266 int ret = 0; │ │ │ │ │ +267 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +268 ret += std::abs( vecZ_[ i ] ); │ │ │ │ │ +269 return ret; │ │ │ │ │ +270 } │ │ │ │ │ +271 │ │ │ │ │ +_2_7_2 int _a_b_s_O_M_Z() const │ │ │ │ │ +273 { │ │ │ │ │ +274 int ret = 0; │ │ │ │ │ +275 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +276 ret += std::abs( vecOMZ_[ i ] ); │ │ │ │ │ +277 return ret; │ │ │ │ │ +278 } │ │ │ │ │ +279 │ │ │ │ │ +_2_8_0 bool _s_a_m_e_M_u_l_t_i_I_n_d_e_x(const _T_h_i_s &ind) │ │ │ │ │ +281 { │ │ │ │ │ +282 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ +283 { │ │ │ │ │ +284 if ( vecZ_[i] != ind.vecZ_[i] || │ │ │ │ │ +285 vecOMZ_[i] != vecOMZ_[i] ) │ │ │ │ │ +286 return false; │ │ │ │ │ +287 } │ │ │ │ │ +288 return true; │ │ │ │ │ +289 } │ │ │ │ │ +290 │ │ │ │ │ +291 private: │ │ │ │ │ +292 void remove() │ │ │ │ │ +293 { │ │ │ │ │ +294 if (next_) │ │ │ │ │ +295 { │ │ │ │ │ +296 next_->remove(); │ │ │ │ │ +297 delete next_; │ │ │ │ │ +298 next_ = 0; │ │ │ │ │ +299 } │ │ │ │ │ +300 } │ │ │ │ │ +301 │ │ │ │ │ +302 typedef Dune::FieldVector< int, dimension > Vector; │ │ │ │ │ +303 │ │ │ │ │ +304 Vector vecZ_; │ │ │ │ │ +305 Vector vecOMZ_; │ │ │ │ │ +306 Field factor_; │ │ │ │ │ +307 │ │ │ │ │ +308 This *next_; │ │ │ │ │ +309 }; │ │ │ │ │ +310 │ │ │ │ │ +311 template │ │ │ │ │ +_3_1_2 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _o_p_e_r_a_t_o_r_*_ ( const F &f, │ │ │ │ │ +313 const _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> &m) │ │ │ │ │ +314 { │ │ │ │ │ +315 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> z = m; │ │ │ │ │ +316 return (z *= f); │ │ │ │ │ +317 } │ │ │ │ │ +318 template │ │ │ │ │ +_3_1_9 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _o_p_e_r_a_t_o_r_/_ ( const F &f, │ │ │ │ │ +320 const _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> &m) │ │ │ │ │ +321 { │ │ │ │ │ +322 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> z = m; │ │ │ │ │ +323 return (z /= f); │ │ │ │ │ +324 } │ │ │ │ │ +325 │ │ │ │ │ +326 template │ │ │ │ │ +_3_2_7 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out,const std:: │ │ │ │ │ +vector<_M_u_l_t_i_I_n_d_e_x_<_d_,_F_> >& y) { │ │ │ │ │ +328 for (unsigned int r=0; r │ │ │ │ │ +_3_5_6 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out, │ │ │ │ │ +357 const std::vector,dimR1,dimR2> >& y) { │ │ │ │ │ +358 out << "\\begin{eqnarray*}" << std::endl; │ │ │ │ │ +359 for (unsigned int k=0; k │ │ │ │ │ +_3_7_6 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out,const _M_u_l_t_i_I_n_d_e_x_<_d_,_F_>& val) │ │ │ │ │ +377 { │ │ │ │ │ +378 bool first = true; │ │ │ │ │ +379 const _M_u_l_t_i_I_n_d_e_x_<_d_,_F_> *m = &val; │ │ │ │ │ +380 do { │ │ │ │ │ +381 if (m->_a_b_s_Z()==0 && std::abs(m->_f_a_c_t_o_r())<1e-10) │ │ │ │ │ +382 { │ │ │ │ │ +383 if (!m->next_ || !first) │ │ │ │ │ +384 { │ │ │ │ │ +385 out << "0"; │ │ │ │ │ +386 break; │ │ │ │ │ +387 } │ │ │ │ │ +388 else { │ │ │ │ │ +389 m = m->next_; │ │ │ │ │ +390 continue; │ │ │ │ │ +391 } │ │ │ │ │ +392 } │ │ │ │ │ +393 if (m->_f_a_c_t_o_r()>0 && !first) │ │ │ │ │ +394 out << " + "; │ │ │ │ │ +395 else if (m->_f_a_c_t_o_r()<0) │ │ │ │ │ +396 if (!first) │ │ │ │ │ +397 out << " - "; │ │ │ │ │ +398 else │ │ │ │ │ +399 out << "- "; │ │ │ │ │ +400 else │ │ │ │ │ +401 out << " "; │ │ │ │ │ +402 first = false; │ │ │ │ │ +403 F f = std::abs(m->_f_a_c_t_o_r()); │ │ │ │ │ +404 if (m->_a_b_s_Z()==0) │ │ │ │ │ +405 out << f; │ │ │ │ │ +406 else { │ │ │ │ │ +407 if ( std::abs(f)<1e-10) │ │ │ │ │ +408 out << 0; │ │ │ │ │ +409 else │ │ │ │ │ +410 { │ │ │ │ │ +411 F f_1(f); │ │ │ │ │ +412 f_1 -= 1.; // better Unity(); │ │ │ │ │ +413 if ( std::abs(f_1)>1e-10) │ │ │ │ │ +414 out << f; │ │ │ │ │ +415 int absVal = 0; │ │ │ │ │ +416 for (int i=0; ivecZ_[i]==0) │ │ │ │ │ +418 continue; │ │ │ │ │ +419 else if (m->vecZ_[i]==1) │ │ │ │ │ +420 out << char('a'+i); │ │ │ │ │ +421 else if (m->vecZ_[i]>0) │ │ │ │ │ +422 out << char('a'+i) << "^" << m->vecZ_[i] << ""; │ │ │ │ │ +423 else if (m->vecZ_[i]<0) │ │ │ │ │ +424 out << char('a'+i) << "^" << m->vecZ_[i] << ""; │ │ │ │ │ +425 absVal += m->vecZ_[i]; │ │ │ │ │ +426 if (absValabsZ()) out << ""; │ │ │ │ │ +427 } │ │ │ │ │ +428 } │ │ │ │ │ +429 } │ │ │ │ │ +430 /* │ │ │ │ │ +431 if (mi.absOMZ()>0) { │ │ │ │ │ +432 for (int i=0;i<=mi.absZ();++i) { │ │ │ │ │ +433 if (mi.vecOMZ_[i]==0) │ │ │ │ │ +434 continue; │ │ │ │ │ +435 else if (mi.vecOMZ_[i]==1) │ │ │ │ │ +436 out << (1-char('a'+i)); │ │ │ │ │ +437 else if (mi.vecOMZ_[i]>0) │ │ │ │ │ +438 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i]; │ │ │ │ │ +439 else if (mi.vecOMZ_[i]<0) │ │ │ │ │ +440 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i]; │ │ │ │ │ +441 if (i==mi.absZ()+1) out << "*"; │ │ │ │ │ +442 } │ │ │ │ │ +443 } │ │ │ │ │ +444 */ │ │ │ │ │ +445 m = m->next_; │ │ │ │ │ +446 } while (m); │ │ │ │ │ +447 return out; │ │ │ │ │ +448 } │ │ │ │ │ +449 │ │ │ │ │ +450 template< int dim, class F> │ │ │ │ │ +_4_5_1 struct _U_n_i_t_y< _M_u_l_t_i_I_n_d_e_x< dim, F > > │ │ │ │ │ +452 { │ │ │ │ │ +_4_5_3 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _> _F_i_e_l_d; │ │ │ │ │ +454 │ │ │ │ │ +_4_5_5 operator _F_i_e_l_d () const │ │ │ │ │ +456 { │ │ │ │ │ +457 return _F_i_e_l_d(); │ │ │ │ │ +458 } │ │ │ │ │ +459 │ │ │ │ │ +_4_6_0 _F_i_e_l_d _o_p_e_r_a_t_o_r_-_ ( const _F_i_e_l_d &other ) const │ │ │ │ │ +461 { │ │ │ │ │ +462 return _F_i_e_l_d( 1, other ); │ │ │ │ │ +463 } │ │ │ │ │ +464 │ │ │ │ │ +_4_6_5 _F_i_e_l_d _o_p_e_r_a_t_o_r_/_ ( const _F_i_e_l_d &other ) const │ │ │ │ │ +466 { │ │ │ │ │ +467 return _F_i_e_l_d() / other; │ │ │ │ │ +468 } │ │ │ │ │ +469 }; │ │ │ │ │ +470 │ │ │ │ │ +471 │ │ │ │ │ +472 │ │ │ │ │ +473 template< int dim, class F > │ │ │ │ │ +_4_7_4 struct _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim,F > > │ │ │ │ │ +475 { │ │ │ │ │ +_4_7_6 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_ _> _F_i_e_l_d; │ │ │ │ │ +477 │ │ │ │ │ +478 // zero does not acutally exist │ │ │ │ │ +_4_7_9 operator _F_i_e_l_d () │ │ │ │ │ +480 { │ │ │ │ │ +481 return _F_i_e_l_d(0); │ │ │ │ │ +482 } │ │ │ │ │ +483 }; │ │ │ │ │ +484 │ │ │ │ │ +485 template< int dim, class Field > │ │ │ │ │ +_4_8_6 bool _o_p_e_r_a_t_o_r_<_ ( const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_i_e_l_d_ _> > &, const _M_u_l_t_i_I_n_d_e_x_< │ │ │ │ │ +_d_i_m_,_F_i_e_l_d_ _> & ) │ │ │ │ │ +487 { │ │ │ │ │ +488 return true; │ │ │ │ │ +489 } │ │ │ │ │ +490 │ │ │ │ │ +491 template< int dim, class Field > │ │ │ │ │ +_4_9_2 bool _o_p_e_r_a_t_o_r_<_ ( const _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> &f, const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x_< │ │ │ │ │ +_d_i_m_,_F_i_e_l_d_ _> > & ) │ │ │ │ │ +493 { │ │ │ │ │ +494 return true; │ │ │ │ │ +495 } │ │ │ │ │ +496 │ │ │ │ │ +497} │ │ │ │ │ +498 │ │ │ │ │ +499#endif // #ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r │ │ │ │ │ -Convert a simple scalar local finite element into a global finite element. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:229 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Monomial basis for discontinuous Galerkin methods. │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< MonomialLocalBasis< D, R, d, p >, │ │ │ │ │ -MonomialLocalCoefficients< static_size >, MonomialLocalInterpolation< │ │ │ │ │ -MonomialLocalBasis< D, R, d, p >, static_size > > Traits │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -MonomialLocalFiniteElement(const GeometryType >_) │ │ │ │ │ -Construct a MonomLocalFiniteElement. │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for global-valued MonomFiniteElement objects. │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -MonomialFiniteElementFactory(const ForwardIterator &begin, const │ │ │ │ │ -ForwardIterator &end) │ │ │ │ │ -construct a MonomialFiniteElementFactory from a list of GeometryType's │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -MonomialFiniteElementFactory(const GeometryType >) │ │ │ │ │ -construct a MonomialFiniteElementFactory from a single GeometryType │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -const FiniteElement make(const Geometry &geometry) │ │ │ │ │ -construct a global-valued MonomFiniteElement │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -ScalarLocalToGlobalFiniteElementAdaptor< LocalFE, Geometry > FiniteElement │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -MonomialFiniteElementFactory() │ │ │ │ │ -construct a MonomFiniteElementFactory for all applicable GeometryType's │ │ │ │ │ -DDeeffiinniittiioonn monomial.hh:156 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Constant shape function. │ │ │ │ │ -DDeeffiinniittiioonn monomiallocalbasis.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn monomiallocalbasis.hh:216 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for monomial finite elements. │ │ │ │ │ -DDeeffiinniittiioonn monomiallocalcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn monomiallocalinterpolation.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ +Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ +bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ +Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ +std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ +DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ │ +This operator+(const This &other) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:248 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_a_b_s_O_M_Z │ │ │ │ │ +int absOMZ() const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:272 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_~_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +~MultiIndex() │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_-_= │ │ │ │ │ +This & operator-=(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +MultiIndex(int, const This &other) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const int dimension │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_a_b_s_Z │ │ │ │ │ +int absZ() const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:264 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_m_z │ │ │ │ │ +int omz(int i) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:95 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ │ +This & operator+=(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:184 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const This &other) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_s_a_m_e_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +bool sameMultiIndex(const This &ind) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ +This & operator=(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +MultiIndex(const This &other) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:73 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ │ +This & operator*=(const F &f) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_f_a_c_t_o_r │ │ │ │ │ +const Field & factor() const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ +This operator/(const F &f) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +MultiIndex(const F &f) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:52 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_/_= │ │ │ │ │ +This & operator/=(const F &f) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +This operator*(const F &f) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:225 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_s_e_t │ │ │ │ │ +void set(int d, int power=1) │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:259 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ +This operator-(const This &other) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_z │ │ │ │ │ +int z(int i) const │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +MultiIndex() │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_U_n_i_t_y_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _>_:_:_F_i_e_l_d │ │ │ │ │ +MultiIndex< dim, F > Field │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:453 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _>_:_:_F_i_e_l_d │ │ │ │ │ +MultiIndex< dim, F > Field │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:476 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexprebasis.hh File Reference │ │ │ │ +dune-localfunctions: field.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,128 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces
│ │ │ │ -
nedelecsimplexprebasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
field.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +
#include <dune/common/gmpfield.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::NedelecPreBasisFactory< dim, Field >
struct  Dune::Unity< Field >
 A class representing the unit of a given Field. More...
 
struct  Dune::NedelecPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF >
struct  Dune::Zero< Field >
 A class representing the zero of a given Field. More...
 
struct  Dune::NedelecVecMatrix< geometryId, Field >
struct  Dune::FieldCast< F2, V >
 
struct  Dune::FieldCast< F2, Dune::FieldVector< F1, dim > >
 
struct  Dune::FieldCast< F2, Dune::FieldMatrix< F1, dim1, dim2 > >
 
struct  Dune::Precision< double >
 
struct  Dune::Precision< long double >
 
struct  Dune::Precision< float >
 
struct  Dune::ComputeField< Field, sum >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<class Field >
Field Dune::operator+ (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator- (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator* (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator/ (const Unity< Field > &u, const Field &f)
 
template<class Field >
bool Dune::operator== (const Zero< Field > &, const Field &f)
 
template<class Field >
bool Dune::operator== (const Field &f, const Zero< Field > &z)
 
template<class Field >
bool Dune::operator< (const Zero< Field > &, const Field &f)
 
template<class Field >
bool Dune::operator< (const Field &f, const Zero< Field > &)
 
template<class Field >
bool Dune::operator> (const Zero< Field > &z, const Field &f)
 
template<class Field >
bool Dune::operator> (const Field &f, const Zero< Field > &z)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, F2 &f2)
 a helper class to cast from one field to another
 
template<class F2 , class F1 , int dim>
void Dune::field_cast (const Dune::FieldVector< F1, dim > &f1, Dune::FieldVector< F2, dim > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, F2 &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class F1 , int rdim, int cdim>
void Dune::field_cast (const Dune::FieldMatrix< F1, rdim, cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, F2 &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class V >
FieldCast< F2, V >::type Dune::field_cast (const V &f1)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,127 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -nedelecsimplexprebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +field.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_U_n_i_t_y_<_ _F_i_e_l_d_ _> │ │ │ │ │ +  A class representing the unit of a given Field. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_< │ │ │ │ │ - _d_d_,_ _F_F_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_Z_e_r_o_<_ _F_i_e_l_d_ _> │ │ │ │ │ +  A class representing the zero of a given Field. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_i_e_l_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _V_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _F_1_,_ _d_i_m_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_M_a_t_r_i_x_<_ _F_1_,_ _d_i_m_1_,_ _d_i_m_2_ _>_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _d_o_u_b_l_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _l_o_n_g_ _d_o_u_b_l_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _f_l_o_a_t_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d_<_ _F_i_e_l_d_,_ _s_u_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ + Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_+ (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_- (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_* (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= (const _Z_e_r_o< Field > &, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ + &z) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _Z_e_r_o< Field > &, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ + &) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_> (const _Z_e_r_o< Field > &z, const Field │ │ │ │ │ + &f) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_> (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ + &z) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, F2 &f2) │ │ │ │ │ +  a helper class to cast from one field to another │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, dim > │ │ │ │ │ + &f1, Dune::FieldVector< F2, dim > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, F2 &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, Dune::FieldVector< │ │ │ │ │ + F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, rdim, │ │ │ │ │ + cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, F2 &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, Dune::FieldMatrix< │ │ │ │ │ + F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ + &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ + void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ + &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +_F_i_e_l_d_C_a_s_t< F2, V >::type  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const V &f1) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00149_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexprebasis.hh Source File │ │ │ │ +dune-localfunctions: field.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,353 +70,385 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexprebasis.hh
│ │ │ │ +
field.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ +
8#include <dune/common/gmpfield.hh>
│ │ │ │ +
9#include <dune/common/fvector.hh>
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 template < GeometryType::Id geometryId, class Field >
│ │ │ │ -
18 struct NedelecVecMatrix;
│ │ │ │ -
19
│ │ │ │ -
20 template <unsigned int dim, class Field>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ - │ │ │ │ -
24 typedef typename MBasisFactory::Object MBasis;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28 typedef const Basis Object;
│ │ │ │ -
29 typedef std::size_t Key;
│ │ │ │ -
30
│ │ │ │ -
31 template <unsigned int dd, class FF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ - │ │ │ │ -
35 };
│ │ │ │ +
15 // Unity
│ │ │ │ +
16 // -----
│ │ │ │ +
17
│ │ │ │ +
28 template< class Field >
│ │ │ │ +
│ │ │ │ +
29 struct Unity
│ │ │ │ +
30 {
│ │ │ │ +
│ │ │ │ +
31 operator Field () const
│ │ │ │ +
32 {
│ │ │ │ +
33 return Field( 1 );
│ │ │ │ +
34 }
│ │ │ │ +
│ │ │ │ +
35 };
│ │ │ │
│ │ │ │
36
│ │ │ │ -
37 template< GeometryType::Id geometryId >
│ │ │ │ +
37 template< class Field >
│ │ │ │
│ │ │ │ -
38 static Object *create ( Key order )
│ │ │ │ -
39 {
│ │ │ │ -
40 /*
│ │ │ │ -
41 * The nedelec parameter begins at 1.
│ │ │ │ -
42 * This is the numbering used by J.C. Nedelec himself.
│ │ │ │ -
43 * See "Mixed Finite Elements in \R^3" published in 1980.
│ │ │ │ -
44 *
│ │ │ │ -
45 * This construction is based on the construction of Raviart-Thomas elements.
│ │ │ │ -
46 * There the numbering starts at 0.
│ │ │ │ -
47 * Because of this we reduce the order internally by 1.
│ │ │ │ -
48 */
│ │ │ │ -
49 order--;
│ │ │ │ - │ │ │ │ -
51 MBasis *mbasis = MBasisFactory::template create<geometryId>(order+1);
│ │ │ │ -
52 std::remove_const_t<Object>* tmBasis = new std::remove_const_t<Object>(*mbasis);
│ │ │ │ -
53 tmBasis->fill(vecMatrix);
│ │ │ │ -
54 return tmBasis;
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56 static void release( Object *object ) { delete object; }
│ │ │ │ -
57 };
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59 template <GeometryType::Id geometryId, class Field>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
61 {
│ │ │ │ -
62 static constexpr GeometryType geometry = geometryId;
│ │ │ │ -
63 static const unsigned int dim = geometry.dim();
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
66 NedelecVecMatrix(std::size_t order)
│ │ │ │ -
67 {
│ │ │ │ -
68 /*
│ │ │ │ -
69 * Construction of Nedelec elements see "Mixed Finite Elements in \R^3" by Nedelec, 1980.
│ │ │ │ -
70 *
│ │ │ │ -
71 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree $\leq k$.
│ │ │ │ -
72 * The space of Nedelec functions in $n$ dimensions with index $k$ is defined as
│ │ │ │ -
73 *
│ │ │ │ -
74 * \begin{equation*}
│ │ │ │ -
75 * Ned_k := (\P_{n,k-1})^n \oplus \{p \in (\P_{n,k})^n: <p,x>=0 \}
│ │ │ │ -
76 * \end{equation*}
│ │ │ │ -
77 * with $x=(x,y)$ in two dimensions and $x=(x,y,z)$ in three dimensions.
│ │ │ │ -
78 *
│ │ │ │ -
79 * For $Ned_k$ holds
│ │ │ │ -
80 * \begin{equation*}
│ │ │ │ -
81 * (\P_{n,k-1})^n \subset Ned_k \subset (\P_{n,k})^n.
│ │ │ │ -
82 * \end{equation*}
│ │ │ │ -
83 *
│ │ │ │ -
84 * We construct $(\P_{n,k})^n$ and and only use the monomials contained in $Ned$.
│ │ │ │ -
85 *
│ │ │ │ -
86 */
│ │ │ │ -
87 if( (dim!=2 && dim!=3) || !geometry.isSimplex())
│ │ │ │ -
88 DUNE_THROW(Dune::NotImplemented,"High order nedelec elements are only supported by simplices in 2d and 3d");
│ │ │ │ +
38 Field operator+ ( const Unity< Field > &u, const Field &f )
│ │ │ │ +
39 {
│ │ │ │ +
40 return (Field)u + f;
│ │ │ │ +
41 }
│ │ │ │ +
│ │ │ │ +
42
│ │ │ │ +
43 template< class Field >
│ │ │ │ +
│ │ │ │ +
44 Field operator- ( const Unity< Field > &u, const Field &f )
│ │ │ │ +
45 {
│ │ │ │ +
46 return (Field)u - f;
│ │ │ │ +
47 }
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49 template< class Field >
│ │ │ │ +
│ │ │ │ +
50 Field operator* ( const Unity< Field > &u, const Field &f )
│ │ │ │ +
51 {
│ │ │ │ +
52 return f;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 template< class Field >
│ │ │ │ +
│ │ │ │ +
56 Field operator/ ( const Unity< Field > &u, const Field &f )
│ │ │ │ +
57 {
│ │ │ │ +
58 return (Field)u / f;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
61
│ │ │ │ +
62
│ │ │ │ +
63 // Zero
│ │ │ │ +
64 // ----
│ │ │ │ +
65
│ │ │ │ +
77 template< class Field >
│ │ │ │ +
│ │ │ │ +
78 struct Zero
│ │ │ │ +
79 {
│ │ │ │ +
│ │ │ │ +
80 operator Field () const
│ │ │ │ +
81 {
│ │ │ │ +
82 return Field( 0 );
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
84 static const Field epsilon()
│ │ │ │ +
85 {
│ │ │ │ +
86 return Field(1e-12);
│ │ │ │ +
87 }
│ │ │ │ +
│ │ │ │ +
88 };
│ │ │ │ +
│ │ │ │
89
│ │ │ │ -
90 MIBasis basis(order+1);
│ │ │ │ -
91 FieldVector< MI, dim > x;
│ │ │ │ -
92 /*
│ │ │ │ -
93 * Init MultiIndices
│ │ │ │ -
94 * x[0]=(1,0,0) x
│ │ │ │ -
95 * x[1]=(0,1,0) y
│ │ │ │ -
96 * x[2]=(0,0,1) z
│ │ │ │ -
97 */
│ │ │ │ -
98 for( unsigned int i = 0; i < dim; ++i )
│ │ │ │ -
99 x[i].set(i,1);
│ │ │ │ -
100 std::vector< MI > val( basis.size() );
│ │ │ │ -
101
│ │ │ │ -
102 // val now contains all monomials in $n$ dimensions with degree $\leq order+1$
│ │ │ │ -
103 basis.evaluate( x, val );
│ │ │ │ -
104
│ │ │ │ -
105 col_ = basis.size();
│ │ │ │ -
106
│ │ │ │ -
107 // get $\dim (\P_{n,order-1})$
│ │ │ │ -
108 unsigned int notHomogen = 0;
│ │ │ │ -
109 if (order>0)
│ │ │ │ -
110 notHomogen = basis.sizes()[order-1];
│ │ │ │ -
111
│ │ │ │ -
112 // the number of basis functions for the set of homogeneous polynomials with degree $order$
│ │ │ │ -
113 unsigned int homogen = basis.sizes()[order]-notHomogen;
│ │ │ │ -
114
│ │ │ │ -
115 /*
│ │ │ │ -
116 * 2D:
│ │ │ │ -
117 * \begin{equation*}
│ │ │ │ -
118 * Ned_{order} = (\P_{order-1})^2 \oplus (-y,x)^T \widetilde \P_{order-1}
│ │ │ │ -
119 * \end{equation*}
│ │ │ │ -
120 *
│ │ │ │ -
121 * It gets more complicated in higher dimensions.
│ │ │ │ -
122 *
│ │ │ │ -
123 * 3D:
│ │ │ │ -
124 * \begin{equation*}
│ │ │ │ -
125 * Ned_{order} = (\P_{n,order-1})^3 \oplus (z,0,-x)^T \widetilde \P_{n,order-1} \oplus (-y,x,0)^T \widetilde \P_{n,order-1} \oplus (0,-z,y)^T \widetilde \P_{n-1,order-1}
│ │ │ │ -
126 * \end{equation*}
│ │ │ │ -
127 *
│ │ │ │ -
128 * Note the last term. The index $n-1$ is on purpose.
│ │ │ │ -
129 * Else i.e. k=2
│ │ │ │ -
130 *
│ │ │ │ -
131 * (0,z,-y)^T x = (z,0,-x)^T y - (y,-x,0)^T z.
│ │ │ │ -
132 *
│ │ │ │ -
133 */
│ │ │ │ -
134
│ │ │ │ -
135 /*
│ │ │ │ -
136 * compute the number of rows for the coefficient matrix
│ │ │ │ -
137 *
│ │ │ │ -
138 * row_ = dim* \dim Ned_{order}
│ │ │ │ -
139 */
│ │ │ │ -
140 if (dim == 2)
│ │ │ │ -
141 row_ = (notHomogen*dim+homogen*(dim+1))*dim;
│ │ │ │ -
142 else if (dim==3)
│ │ │ │ -
143 {
│ │ │ │ -
144 // get dim \P_{n-1,order-1}
│ │ │ │ -
145 int homogenTwoVariables = 0;
│ │ │ │ -
146 for( int w = notHomogen; w<notHomogen + homogen; w++)
│ │ │ │ -
147 if (val[w].z(0)==0)
│ │ │ │ -
148 homogenTwoVariables++;
│ │ │ │ -
149 row_ = (notHomogen*dim+homogen*(dim+2) + homogenTwoVariables)*dim;
│ │ │ │ -
150 }
│ │ │ │ -
151
│ │ │ │ -
152 mat_ = new Field*[row_];
│ │ │ │ -
153 int row = 0;
│ │ │ │ -
154
│ │ │ │ -
155 /* Assign the correct values for the nonhomogeneous polymonials $p\in (\P_{n,order-1})^dim$
│ │ │ │ -
156 * A basis function is represented by $dim$ rows.
│ │ │ │ -
157 */
│ │ │ │ -
158 for (unsigned int i=0; i<notHomogen+homogen; ++i)
│ │ │ │ -
159 {
│ │ │ │ -
160 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ -
161 {
│ │ │ │ -
162 for (unsigned int rr=0; rr<dim; ++rr)
│ │ │ │ -
163 {
│ │ │ │ -
164 // init row to zero
│ │ │ │ -
165 mat_[row] = new Field[col_];
│ │ │ │ -
166 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ -
167 mat_[row][j] = 0.;
│ │ │ │ -
168
│ │ │ │ -
169 if (r==rr)
│ │ │ │ -
170 mat_[row][i] = 1.;
│ │ │ │ -
171 ++row;
│ │ │ │ -
172 }
│ │ │ │ -
173 }
│ │ │ │ -
174 }
│ │ │ │ -
175
│ │ │ │ -
176 /* Assign the correct values for the homogeneous polymonials $p\in Ned_{order} \backslash (\P_{n,order-1})^dim$
│ │ │ │ -
177 * A basis function is represented by $dim$ rows.
│ │ │ │ -
178 */
│ │ │ │ -
179 for (unsigned int i=0; i<homogen; ++i)
│ │ │ │ -
180 {
│ │ │ │ -
181 // get a monomial $ p \in \P_{n,order}\backslash \P_{n,order-1}$
│ │ │ │ -
182 MI xval = val[notHomogen+i];
│ │ │ │ -
183 if(dim==2)
│ │ │ │ -
184 {
│ │ │ │ -
185 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ -
186 {
│ │ │ │ -
187 // init rows to zero
│ │ │ │ -
188 mat_[row+r] = new Field[col_];
│ │ │ │ -
189 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ -
190 mat_[row+r][j] = 0.;
│ │ │ │ -
191 }
│ │ │ │ -
192
│ │ │ │ -
193 /* set $(-y,x)^T p$ with a homogeneous monomial $p$
│ │ │ │ -
194 *
│ │ │ │ -
195 * The loop over the monomials is needed to obtain the corresponding column index.
│ │ │ │ -
196 */
│ │ │ │ -
197 for (int w=homogen+notHomogen; w<val.size(); ++w)
│ │ │ │ -
198 {
│ │ │ │ -
199 if (val[w] == xval*x[0])
│ │ │ │ -
200 mat_[row+1][w] = 1.;
│ │ │ │ -
201 if (val[w] == xval*x[1])
│ │ │ │ -
202 mat_[row][w] = -1.;
│ │ │ │ -
203 }
│ │ │ │ -
204 row +=dim;
│ │ │ │ -
205 }
│ │ │ │ -
206 else if(dim==3)
│ │ │ │ -
207 {
│ │ │ │ -
208 int skipLastDim = xval.z(0)>0;
│ │ │ │ -
209 /*
│ │ │ │ -
210 * Init 9 rows to zero.
│ │ │ │ -
211 * If the homogeneous monomial has a positive x-exponent (0,-z,y) gets skipped ( see example for the Nedelec space in 3D )
│ │ │ │ -
212 * In this case only 6 rows get initialised.
│ │ │ │ -
213 */
│ │ │ │ -
214 for (unsigned int r=0; r<dim*(dim-skipLastDim); ++r)
│ │ │ │ -
215 {
│ │ │ │ -
216 // init rows to zero
│ │ │ │ -
217 mat_[row+r] = new Field[col_];
│ │ │ │ -
218 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ -
219 mat_[row+r][j] = 0.;
│ │ │ │ -
220 }
│ │ │ │ -
221
│ │ │ │ -
222 /*
│ │ │ │ -
223 * first $dim$ rows are for (z,0,-x)
│ │ │ │ -
224 *
│ │ │ │ -
225 * second $dim$ rows are for (-y,x,0)
│ │ │ │ -
226 *
│ │ │ │ -
227 * third $dim$ rows are for (0,-z,y)
│ │ │ │ -
228 *
│ │ │ │ -
229 */
│ │ │ │ -
230 for (unsigned int r=0; r<dim - skipLastDim; ++r)
│ │ │ │ -
231 {
│ │ │ │ -
232 int index = (r+dim-1)%dim;
│ │ │ │ -
233 for (int w=homogen+notHomogen; w<val.size(); ++w)
│ │ │ │ -
234 {
│ │ │ │ -
235 if (val[w] == xval*x[index])
│ │ │ │ -
236 mat_[row+r][w] = 1.;
│ │ │ │ -
237 if (val[w] == xval*x[r])
│ │ │ │ -
238 mat_[row+index][w] = -1.;
│ │ │ │ -
239 }
│ │ │ │ -
240 row +=dim;
│ │ │ │ -
241 }
│ │ │ │ -
242
│ │ │ │ -
243 }
│ │ │ │ -
244 }
│ │ │ │ -
245 }
│ │ │ │ -
│ │ │ │ -
246
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
248 {
│ │ │ │ -
249 for (unsigned int i=0; i<rows(); ++i) {
│ │ │ │ -
250 delete [] mat_[i];
│ │ │ │ -
251 }
│ │ │ │ -
252 delete [] mat_;
│ │ │ │ -
253 }
│ │ │ │ -
│ │ │ │ -
254
│ │ │ │ -
│ │ │ │ -
255 unsigned int cols() const {
│ │ │ │ -
256 return col_;
│ │ │ │ -
257 }
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
│ │ │ │ -
259 unsigned int rows() const {
│ │ │ │ -
260 return row_;
│ │ │ │ -
261 }
│ │ │ │ +
90#if HAVE_GMP
│ │ │ │ +
91 template< unsigned int precision >
│ │ │ │ +
92 struct Zero< GMPField< precision > >
│ │ │ │ +
93 {
│ │ │ │ +
94 typedef GMPField< precision > Field;
│ │ │ │ +
95 operator Field () const
│ │ │ │ +
96 {
│ │ │ │ +
97 return Field( 0 );
│ │ │ │ +
98 }
│ │ │ │ +
99 static const Field epsilon()
│ │ │ │ +
100 {
│ │ │ │ +
101 return Field(1e-20);
│ │ │ │ +
102 }
│ │ │ │ +
103 };
│ │ │ │ +
104#endif
│ │ │ │ +
105
│ │ │ │ +
106 template< class Field >
│ │ │ │ +
│ │ │ │ +
107 inline bool operator == ( const Zero< Field > &, const Field &f )
│ │ │ │ +
108 {
│ │ │ │ +
109 return ( f < Zero<Field>::epsilon() && f > -Zero<Field>::epsilon() );
│ │ │ │ +
110 }
│ │ │ │
│ │ │ │ +
111
│ │ │ │ +
112 template< class Field >
│ │ │ │ +
│ │ │ │ +
113 inline bool operator == ( const Field &f, const Zero< Field > &z)
│ │ │ │ +
114 {
│ │ │ │ +
115 return ( z == f );
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117
│ │ │ │ +
118 template< class Field >
│ │ │ │ +
│ │ │ │ +
119 inline bool operator< ( const Zero< Field > &, const Field &f )
│ │ │ │ +
120 {
│ │ │ │ +
121 return f > Zero<Field>::epsilon();
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
124 template< class Field >
│ │ │ │ +
│ │ │ │ +
125 inline bool operator< ( const Field &f, const Zero< Field > & )
│ │ │ │ +
126 {
│ │ │ │ +
127 return f < -Zero<Field>::epsilon();
│ │ │ │ +
128 }
│ │ │ │ +
│ │ │ │ +
129
│ │ │ │ +
130 template< class Field >
│ │ │ │ +
│ │ │ │ +
131 inline bool operator> ( const Zero< Field > &z, const Field &f )
│ │ │ │ +
132 {
│ │ │ │ +
133 return f < z;
│ │ │ │ +
134 }
│ │ │ │ +
│ │ │ │ +
135
│ │ │ │ +
136 template< class Field >
│ │ │ │ +
│ │ │ │ +
137 inline bool operator> ( const Field &f, const Zero< Field > &z )
│ │ │ │ +
138 {
│ │ │ │ +
139 return z < f;
│ │ │ │ +
140 }
│ │ │ │ +
│ │ │ │ +
141
│ │ │ │ +
142
│ │ │ │ +
143 // field_cast
│ │ │ │ +
144 // ----------
│ │ │ │ +
145
│ │ │ │ +
158 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
159 inline void field_cast ( const F1 &f1, F2 &f2 )
│ │ │ │ +
160 {
│ │ │ │ +
161 f2 = f1;
│ │ │ │ +
162 }
│ │ │ │ +
│ │ │ │ +
163
│ │ │ │ +
164#if HAVE_GMP
│ │ │ │ +
165 template< unsigned int precision >
│ │ │ │ +
166 inline void field_cast ( const Dune::GMPField< precision > &f1, double &f2 )
│ │ │ │ +
167 {
│ │ │ │ +
168 f2 = f1.get_d();
│ │ │ │ +
169 }
│ │ │ │ +
170
│ │ │ │ +
171 template< unsigned int precision >
│ │ │ │ +
172 inline void field_cast ( const Dune::GMPField< precision > &f1, long double &f2 )
│ │ │ │ +
173 {
│ │ │ │ +
174 f2 = f1.get_d();
│ │ │ │ +
175 }
│ │ │ │ +
176#endif
│ │ │ │ +
177
│ │ │ │ +
178 template< class F2, class F1, int dim >
│ │ │ │ +
│ │ │ │ +
179 inline void field_cast ( const Dune::FieldVector< F1, dim > &f1, Dune::FieldVector< F2, dim > &f2 )
│ │ │ │ +
180 {
│ │ │ │ +
181 for( int d = 0; d < dim; ++d )
│ │ │ │ +
182 field_cast( f1[ d ], f2[ d ] );
│ │ │ │ +
183 }
│ │ │ │ +
│ │ │ │ +
184 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
185 inline void field_cast ( const Dune::FieldVector< F1, 1 > &f1, F2 &f2 )
│ │ │ │ +
186 {
│ │ │ │ +
187 field_cast( f1[ 0 ], f2 );
│ │ │ │ +
188 }
│ │ │ │ +
│ │ │ │ +
189 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
190 inline void field_cast ( const F1 &f1, Dune::FieldVector< F2, 1 > &f2 )
│ │ │ │ +
191 {
│ │ │ │ +
192 field_cast( f1, f2[ 0 ] );
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
195 template< class F2, class F1, int rdim, int cdim >
│ │ │ │ +
│ │ │ │ +
196 inline void field_cast ( const Dune::FieldMatrix< F1, rdim, cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2 )
│ │ │ │ +
197 {
│ │ │ │ +
198 for( int r = 0; r < rdim; ++r )
│ │ │ │ +
199 field_cast( f1[ r ], f2[ r ] );
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
202 inline void field_cast ( const Dune::FieldMatrix<F1,1,1> &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ +
203 {
│ │ │ │ +
204 field_cast( f1[ 0 ][ 0 ], f2[ 0 ][ 0 ] );
│ │ │ │ +
205 }
│ │ │ │ +
│ │ │ │ +
206 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
207 inline void field_cast ( const Dune::FieldMatrix< F1, 1,1 > &f1, F2 &f2 )
│ │ │ │ +
208 {
│ │ │ │ +
209 field_cast( f1[ 0 ][ 0 ], f2 );
│ │ │ │ +
210 }
│ │ │ │ +
│ │ │ │ +
211 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
212 inline void field_cast ( const F1 &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ +
213 {
│ │ │ │ +
214 field_cast( f1, f2[ 0 ][ 0 ] );
│ │ │ │ +
215 }
│ │ │ │ +
│ │ │ │ +
216 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
217 inline void field_cast ( const Dune::FieldVector<F1,1> &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ +
218 {
│ │ │ │ +
219 field_cast( f1[ 0 ], f2[ 0 ][ 0 ] );
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
222 inline void field_cast ( const Dune::FieldMatrix<F1,1,1> &f1, Dune::FieldVector< F2, 1 > &f2 )
│ │ │ │ +
223 {
│ │ │ │ +
224 field_cast( f1[ 0 ][ 0 ], f2[ 0 ] );
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
227 template< class F2, class F1 >
│ │ │ │ +
│ │ │ │ +
228 inline void field_cast ( const Dune::FieldVector< F1, 1 > &f1, Dune::FieldVector<F2, 1> &f2 )
│ │ │ │ +
229 {
│ │ │ │ +
230 field_cast( f1[ 0 ], f2[ 0 ] );
│ │ │ │ +
231 }
│ │ │ │ +
│ │ │ │ +
232
│ │ │ │ +
233 template< class F2,class V >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
235 {
│ │ │ │ +
236 typedef F2 type;
│ │ │ │ +
237 };
│ │ │ │ +
│ │ │ │ +
238 template< class F2,class F1,int dim >
│ │ │ │ +
│ │ │ │ +
239 struct FieldCast< F2, Dune::FieldVector<F1,dim> >
│ │ │ │ +
240 {
│ │ │ │ +
241 typedef Dune::FieldVector<F2,dim> type;
│ │ │ │ +
242 };
│ │ │ │ +
│ │ │ │ +
243 template< class F2,class F1,int dim1, int dim2>
│ │ │ │ +
│ │ │ │ +
244 struct FieldCast< F2, Dune::FieldMatrix<F1,dim1,dim2> >
│ │ │ │ +
245 {
│ │ │ │ +
246 typedef Dune::FieldMatrix<F2,dim1,dim2> type;
│ │ │ │ +
247 };
│ │ │ │ +
│ │ │ │ +
248 template< class F2,class V >
│ │ │ │ +
│ │ │ │ +
249 inline typename FieldCast<F2,V>::type field_cast ( const V &f1 )
│ │ │ │ +
250 {
│ │ │ │ +
251 typename FieldCast<F2,V>::type f2;
│ │ │ │ +
252 field_cast( f1, f2 );
│ │ │ │ +
253 return f2;
│ │ │ │ +
254 }
│ │ │ │ +
│ │ │ │ +
255
│ │ │ │ +
256
│ │ │ │ +
257 // Precision
│ │ │ │ +
258 // this is not a perfect solution to obtain the
│ │ │ │ +
259 // precision of a field - definition is not clear
│ │ │ │ +
260 // to be removed
│ │ │ │ +
261 // ---------
│ │ │ │
262
│ │ │ │ -
263 template <class Vector>
│ │ │ │ -
│ │ │ │ -
264 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
265 {
│ │ │ │ -
266 const unsigned int N = cols();
│ │ │ │ -
267 assert( vec.size() == N );
│ │ │ │ -
268 for (unsigned int i=0; i<N; ++i)
│ │ │ │ -
269 field_cast(mat_[row][i],vec[i]);
│ │ │ │ -
270 }
│ │ │ │ +
263 template <class Field>
│ │ │ │ +
264 struct Precision;
│ │ │ │ +
265
│ │ │ │ +
266 template<>
│ │ │ │ +
│ │ │ │ +
267 struct Precision< double >
│ │ │ │ +
268 {
│ │ │ │ +
269 static const unsigned int value = 64;
│ │ │ │ +
270 };
│ │ │ │
│ │ │ │
271
│ │ │ │ -
272 unsigned int row_,col_;
│ │ │ │ -
273 Field **mat_;
│ │ │ │ -
274 };
│ │ │ │ -
│ │ │ │ -
275
│ │ │ │ -
276
│ │ │ │ -
277}
│ │ │ │ -
278#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH
│ │ │ │ - │ │ │ │ +
272 template<>
│ │ │ │ +
│ │ │ │ +
273 struct Precision< long double >
│ │ │ │ +
274 {
│ │ │ │ +
275 static const unsigned int value = 80;
│ │ │ │ +
276 };
│ │ │ │ +
│ │ │ │ +
277
│ │ │ │ +
278 template<>
│ │ │ │ +
│ │ │ │ +
279 struct Precision< float >
│ │ │ │ +
280 {
│ │ │ │ +
281 static const unsigned int value = 32;
│ │ │ │ +
282 };
│ │ │ │ +
│ │ │ │ +
283
│ │ │ │ +
284#if HAVE_GMP
│ │ │ │ +
285 template< unsigned int precision >
│ │ │ │ +
286 struct Precision< GMPField< precision > >
│ │ │ │ +
287 {
│ │ │ │ +
288 static const unsigned int value = precision;
│ │ │ │ +
289 };
│ │ │ │ +
290#endif
│ │ │ │ +
291
│ │ │ │ +
292 // ComputeField
│ │ │ │ +
293 // ------------
│ │ │ │ +
294
│ │ │ │ +
295 template <class Field,unsigned int sum>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
297 {
│ │ │ │ +
298 typedef Field Type;
│ │ │ │ +
299 };
│ │ │ │ +
│ │ │ │ +
300
│ │ │ │ +
301#if HAVE_GMP
│ │ │ │ +
302 template< unsigned int precision, unsigned int sum >
│ │ │ │ +
303 struct ComputeField< GMPField< precision >, sum >
│ │ │ │ +
304 {
│ │ │ │ +
305 typedef GMPField<precision+sum> Type;
│ │ │ │ +
306 };
│ │ │ │ +
307#endif
│ │ │ │ +
308} // namespace Dune
│ │ │ │ +
309
│ │ │ │ +
310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ +
Field operator-(const Unity< Field > &u, const Field &f)
Definition field.hh:44
│ │ │ │
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition nedelecsimplexprebasis.hh:61
│ │ │ │ -
NedelecVecMatrix(std::size_t order)
Definition nedelecsimplexprebasis.hh:66
│ │ │ │ -
MultiIndex< dim, Field > MI
Definition nedelecsimplexprebasis.hh:64
│ │ │ │ -
unsigned int row_
Definition nedelecsimplexprebasis.hh:272
│ │ │ │ -
unsigned int cols() const
Definition nedelecsimplexprebasis.hh:255
│ │ │ │ -
~NedelecVecMatrix()
Definition nedelecsimplexprebasis.hh:247
│ │ │ │ -
MonomialBasis< geometryId, MI > MIBasis
Definition nedelecsimplexprebasis.hh:65
│ │ │ │ -
unsigned int col_
Definition nedelecsimplexprebasis.hh:272
│ │ │ │ -
static const unsigned int dim
Definition nedelecsimplexprebasis.hh:63
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition nedelecsimplexprebasis.hh:264
│ │ │ │ -
static constexpr GeometryType geometry
Definition nedelecsimplexprebasis.hh:62
│ │ │ │ -
unsigned int rows() const
Definition nedelecsimplexprebasis.hh:259
│ │ │ │ -
Field ** mat_
Definition nedelecsimplexprebasis.hh:273
│ │ │ │ -
Definition nedelecsimplexprebasis.hh:22
│ │ │ │ -
static void release(Object *object)
Definition nedelecsimplexprebasis.hh:56
│ │ │ │ -
MBasisFactory::Object MBasis
Definition nedelecsimplexprebasis.hh:24
│ │ │ │ -
static Object * create(Key order)
Definition nedelecsimplexprebasis.hh:38
│ │ │ │ -
PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis
Definition nedelecsimplexprebasis.hh:26
│ │ │ │ -
const Basis Object
Definition nedelecsimplexprebasis.hh:28
│ │ │ │ -
StandardEvaluator< MBasis > EvalMBasis
Definition nedelecsimplexprebasis.hh:25
│ │ │ │ -
MonomialBasisProvider< dim, Field > MBasisFactory
Definition nedelecsimplexprebasis.hh:23
│ │ │ │ -
std::size_t Key
Definition nedelecsimplexprebasis.hh:29
│ │ │ │ -
Definition nedelecsimplexprebasis.hh:33
│ │ │ │ -
MonomialBasisProvider< dd, FF > Type
Definition nedelecsimplexprebasis.hh:34
│ │ │ │ -
Definition basisevaluator.hh:131
│ │ │ │ -
Definition monomialbasis.hh:440
│ │ │ │ -
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ -
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ -
const unsigned int * sizes(unsigned int order) const
Definition monomialbasis.hh:465
│ │ │ │ -
Definition monomialbasis.hh:780
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
int z(int i) const
Definition multiindex.hh:91
│ │ │ │ -
Definition polynomialbasis.hh:348
│ │ │ │ +
bool operator<(const Zero< Field > &, const Field &f)
Definition field.hh:119
│ │ │ │ +
bool operator==(const Zero< Field > &, const Field &f)
Definition field.hh:107
│ │ │ │ +
bool operator>(const Zero< Field > &z, const Field &f)
Definition field.hh:131
│ │ │ │ +
Field operator+(const Unity< Field > &u, const Field &f)
Definition field.hh:38
│ │ │ │ +
Field operator/(const Unity< Field > &u, const Field &f)
Definition field.hh:56
│ │ │ │ +
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ +
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
static const Field epsilon()
Definition field.hh:84
│ │ │ │ +
Definition field.hh:235
│ │ │ │ +
F2 type
Definition field.hh:236
│ │ │ │ +
Dune::FieldVector< F2, dim > type
Definition field.hh:241
│ │ │ │ +
Dune::FieldMatrix< F2, dim1, dim2 > type
Definition field.hh:246
│ │ │ │ +
Definition field.hh:264
│ │ │ │ +
Definition field.hh:297
│ │ │ │ +
Field Type
Definition field.hh:298
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,406 +1,351 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ -nedelecsimplexprebasis.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +field.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ 14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ -18 struct NedelecVecMatrix; │ │ │ │ │ -19 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 struct _N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -22 { │ │ │ │ │ -_2_3 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_i_m_,_F_i_e_l_d_> _M_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_2_4 typedef typename MBasisFactory::Object _M_B_a_s_i_s; │ │ │ │ │ -_2_5 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_M_B_a_s_i_s_> _E_v_a_l_M_B_a_s_i_s; │ │ │ │ │ -_2_6 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_E_v_a_l_M_B_a_s_i_s_,_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_F_i_e_l_d_,_d_i_m_> > │ │ │ │ │ -_B_a_s_i_s; │ │ │ │ │ -27 │ │ │ │ │ -_2_8 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ -_2_9 typedef std::size_t _K_e_y; │ │ │ │ │ -30 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -33 { │ │ │ │ │ -_3_4 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ +15 // Unity │ │ │ │ │ +16 // ----- │ │ │ │ │ +17 │ │ │ │ │ +28 template< class Field > │ │ │ │ │ +_2_9 struct _U_n_i_t_y │ │ │ │ │ +30 { │ │ │ │ │ +_3_1 operator Field () const │ │ │ │ │ +32 { │ │ │ │ │ +33 return Field( 1 ); │ │ │ │ │ +34 } │ │ │ │ │ 35 }; │ │ │ │ │ 36 │ │ │ │ │ -37 template< GeometryType::Id geometryId > │ │ │ │ │ -_3_8 static _O_b_j_e_c_t *_c_r_e_a_t_e ( _K_e_y order ) │ │ │ │ │ +37 template< class Field > │ │ │ │ │ +_3_8 Field _o_p_e_r_a_t_o_r_+_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ 39 { │ │ │ │ │ -40 /* │ │ │ │ │ -41 * The nedelec parameter begins at 1. │ │ │ │ │ -42 * This is the numbering used by J.C. Nedelec himself. │ │ │ │ │ -43 * See "Mixed Finite Elements in \R^3" published in 1980. │ │ │ │ │ -44 * │ │ │ │ │ -45 * This construction is based on the construction of Raviart-Thomas elements. │ │ │ │ │ -46 * There the numbering starts at 0. │ │ │ │ │ -47 * Because of this we reduce the order internally by 1. │ │ │ │ │ -48 */ │ │ │ │ │ -49 order--; │ │ │ │ │ -50 _N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_<_g_e_o_m_e_t_r_y_I_d_,_F_i_e_l_d_> vecMatrix(order); │ │ │ │ │ -51 _M_B_a_s_i_s *mbasis = MBasisFactory::template create(order+1); │ │ │ │ │ -52 std::remove_const_t* tmBasis = new std::remove_const_t │ │ │ │ │ -(*mbasis); │ │ │ │ │ -53 tmBasis->fill(vecMatrix); │ │ │ │ │ -54 return tmBasis; │ │ │ │ │ -55 } │ │ │ │ │ -_5_6 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -57 }; │ │ │ │ │ -58 │ │ │ │ │ -59 template │ │ │ │ │ -_6_0 struct _N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x │ │ │ │ │ -61 { │ │ │ │ │ -_6_2 static constexpr GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ -_6_3 static const unsigned int _d_i_m = _g_e_o_m_e_t_r_y._d_i_m(); │ │ │ │ │ -_6_4 typedef _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _M_I; │ │ │ │ │ -_6_5 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_<_g_e_o_m_e_t_r_y_I_d_,_M_I_> _M_I_B_a_s_i_s; │ │ │ │ │ -_6_6 _N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x(std::size_t order) │ │ │ │ │ -67 { │ │ │ │ │ -68 /* │ │ │ │ │ -69 * Construction of Nedelec elements see "Mixed Finite Elements in \R^3" by │ │ │ │ │ -Nedelec, 1980. │ │ │ │ │ -70 * │ │ │ │ │ -71 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree │ │ │ │ │ -$\leq k$. │ │ │ │ │ -72 * The space of Nedelec functions in $n$ dimensions with index $k$ is defined │ │ │ │ │ -as │ │ │ │ │ -73 * │ │ │ │ │ -74 * \begin{equation*} │ │ │ │ │ -75 * Ned_k := (\P_{n,k-1})^n \oplus \{p \in (\P_{n,k})^n: =0 \} │ │ │ │ │ -76 * \end{equation*} │ │ │ │ │ -77 * with $x=(x,y)$ in two dimensions and $x=(x,y,z)$ in three dimensions. │ │ │ │ │ -78 * │ │ │ │ │ -79 * For $Ned_k$ holds │ │ │ │ │ -80 * \begin{equation*} │ │ │ │ │ -81 * (\P_{n,k-1})^n \subset Ned_k \subset (\P_{n,k})^n. │ │ │ │ │ -82 * \end{equation*} │ │ │ │ │ -83 * │ │ │ │ │ -84 * We construct $(\P_{n,k})^n$ and and only use the monomials contained in │ │ │ │ │ -$Ned$. │ │ │ │ │ -85 * │ │ │ │ │ -86 */ │ │ │ │ │ -87 if( (_d_i_m!=2 && _d_i_m!=3) || !_g_e_o_m_e_t_r_y.isSimplex()) │ │ │ │ │ -88 DUNE_THROW(Dune::NotImplemented,"High order nedelec elements are only │ │ │ │ │ -supported by simplices in 2d and 3d"); │ │ │ │ │ +40 return (Field)u + f; │ │ │ │ │ +41 } │ │ │ │ │ +42 │ │ │ │ │ +43 template< class Field > │ │ │ │ │ +_4_4 Field _o_p_e_r_a_t_o_r_-_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ +45 { │ │ │ │ │ +46 return (Field)u - f; │ │ │ │ │ +47 } │ │ │ │ │ +48 │ │ │ │ │ +49 template< class Field > │ │ │ │ │ +_5_0 Field _o_p_e_r_a_t_o_r_*_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ +51 { │ │ │ │ │ +52 return f; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 template< class Field > │ │ │ │ │ +_5_6 Field _o_p_e_r_a_t_o_r_/_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ +57 { │ │ │ │ │ +58 return (Field)u / f; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +61 │ │ │ │ │ +62 │ │ │ │ │ +63 // Zero │ │ │ │ │ +64 // ---- │ │ │ │ │ +65 │ │ │ │ │ +77 template< class Field > │ │ │ │ │ +_7_8 struct _Z_e_r_o │ │ │ │ │ +79 { │ │ │ │ │ +_8_0 operator Field () const │ │ │ │ │ +81 { │ │ │ │ │ +82 return Field( 0 ); │ │ │ │ │ +83 } │ │ │ │ │ +_8_4 static const Field _e_p_s_i_l_o_n() │ │ │ │ │ +85 { │ │ │ │ │ +86 return Field(1e-12); │ │ │ │ │ +87 } │ │ │ │ │ +88 }; │ │ │ │ │ 89 │ │ │ │ │ -90 _M_I_B_a_s_i_s basis(order+1); │ │ │ │ │ -91 FieldVector< MI, dim > x; │ │ │ │ │ -92 /* │ │ │ │ │ -93 * Init MultiIndices │ │ │ │ │ -94 * x[0]=(1,0,0) x │ │ │ │ │ -95 * x[1]=(0,1,0) y │ │ │ │ │ -96 * x[2]=(0,0,1) z │ │ │ │ │ -97 */ │ │ │ │ │ -98 for( unsigned int i = 0; i < _d_i_m; ++i ) │ │ │ │ │ -99 x[i].set(i,1); │ │ │ │ │ -100 std::vector< MI > val( basis._s_i_z_e() ); │ │ │ │ │ -101 │ │ │ │ │ -102 // val now contains all monomials in $n$ dimensions with degree $\leq │ │ │ │ │ -order+1$ │ │ │ │ │ -103 basis._e_v_a_l_u_a_t_e( x, val ); │ │ │ │ │ -104 │ │ │ │ │ -105 _c_o_l__ = basis._s_i_z_e(); │ │ │ │ │ -106 │ │ │ │ │ -107 // get $\dim (\P_{n,order-1})$ │ │ │ │ │ -108 unsigned int notHomogen = 0; │ │ │ │ │ -109 if (order>0) │ │ │ │ │ -110 notHomogen = basis._s_i_z_e_s()[order-1]; │ │ │ │ │ +90#if HAVE_GMP │ │ │ │ │ +91 template< unsigned int precision > │ │ │ │ │ +92 struct Zero< GMPField< precision > > │ │ │ │ │ +93 { │ │ │ │ │ +94 typedef GMPField< precision > Field; │ │ │ │ │ +95 operator Field () const │ │ │ │ │ +96 { │ │ │ │ │ +97 return Field( 0 ); │ │ │ │ │ +98 } │ │ │ │ │ +99 static const Field _e_p_s_i_l_o_n() │ │ │ │ │ +100 { │ │ │ │ │ +101 return Field(1e-20); │ │ │ │ │ +102 } │ │ │ │ │ +103 }; │ │ │ │ │ +104#endif │ │ │ │ │ +105 │ │ │ │ │ +106 template< class Field > │ │ │ │ │ +_1_0_7 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &, const Field &f ) │ │ │ │ │ +108 { │ │ │ │ │ +109 return ( f < _Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n() && f > -_Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n() ); │ │ │ │ │ +110 } │ │ │ │ │ 111 │ │ │ │ │ -112 // the number of basis functions for the set of homogeneous polynomials │ │ │ │ │ -with degree $order$ │ │ │ │ │ -113 unsigned int homogen = basis._s_i_z_e_s()[order]-notHomogen; │ │ │ │ │ -114 │ │ │ │ │ -115 /* │ │ │ │ │ -116 * 2D: │ │ │ │ │ -117 * \begin{equation*} │ │ │ │ │ -118 * Ned_{order} = (\P_{order-1})^2 \oplus (-y,x)^T \widetilde \P_{order-1} │ │ │ │ │ -119 * \end{equation*} │ │ │ │ │ -120 * │ │ │ │ │ -121 * It gets more complicated in higher dimensions. │ │ │ │ │ -122 * │ │ │ │ │ -123 * 3D: │ │ │ │ │ -124 * \begin{equation*} │ │ │ │ │ -125 * Ned_{order} = (\P_{n,order-1})^3 \oplus (z,0,-x)^T \widetilde \P_ │ │ │ │ │ -{n,order-1} \oplus (-y,x,0)^T \widetilde \P_{n,order-1} \oplus (0,-z,y)^T │ │ │ │ │ -\widetilde \P_{n-1,order-1} │ │ │ │ │ -126 * \end{equation*} │ │ │ │ │ -127 * │ │ │ │ │ -128 * Note the last term. The index $n-1$ is on purpose. │ │ │ │ │ -129 * Else i.e. k=2 │ │ │ │ │ -130 * │ │ │ │ │ -131 * (0,z,-y)^T x = (z,0,-x)^T y - (y,-x,0)^T z. │ │ │ │ │ -132 * │ │ │ │ │ -133 */ │ │ │ │ │ -134 │ │ │ │ │ -135 /* │ │ │ │ │ -136 * compute the number of rows for the coefficient matrix │ │ │ │ │ -137 * │ │ │ │ │ -138 * row_ = dim* \dim Ned_{order} │ │ │ │ │ -139 */ │ │ │ │ │ -140 if (_d_i_m == 2) │ │ │ │ │ -141 _r_o_w__ = (notHomogen*_d_i_m+homogen*(_d_i_m+1))*_d_i_m; │ │ │ │ │ -142 else if (_d_i_m==3) │ │ │ │ │ -143 { │ │ │ │ │ -144 // get dim \P_{n-1,order-1} │ │ │ │ │ -145 int homogenTwoVariables = 0; │ │ │ │ │ -146 for( int w = notHomogen; w │ │ │ │ │ +_1_1_3 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z) │ │ │ │ │ +114 { │ │ │ │ │ +115 return ( z == f ); │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +118 template< class Field > │ │ │ │ │ +_1_1_9 inline bool _o_p_e_r_a_t_o_r_<_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &, const Field &f ) │ │ │ │ │ +120 { │ │ │ │ │ +121 return f > _Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n(); │ │ │ │ │ +122 } │ │ │ │ │ +123 │ │ │ │ │ +124 template< class Field > │ │ │ │ │ +_1_2_5 inline bool _o_p_e_r_a_t_o_r_<_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> & ) │ │ │ │ │ +126 { │ │ │ │ │ +127 return f < -_Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n(); │ │ │ │ │ +128 } │ │ │ │ │ +129 │ │ │ │ │ +130 template< class Field > │ │ │ │ │ +_1_3_1 inline bool _o_p_e_r_a_t_o_r_>_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z, const Field &f ) │ │ │ │ │ +132 { │ │ │ │ │ +133 return f < z; │ │ │ │ │ +134 } │ │ │ │ │ +135 │ │ │ │ │ +136 template< class Field > │ │ │ │ │ +_1_3_7 inline bool _o_p_e_r_a_t_o_r_>_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z ) │ │ │ │ │ +138 { │ │ │ │ │ +139 return z < f; │ │ │ │ │ +140 } │ │ │ │ │ +141 │ │ │ │ │ +142 │ │ │ │ │ +143 // field_cast │ │ │ │ │ +144 // ---------- │ │ │ │ │ +145 │ │ │ │ │ +158 template< class F2, class F1 > │ │ │ │ │ +_1_5_9 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, F2 &f2 ) │ │ │ │ │ +160 { │ │ │ │ │ +161 f2 = f1; │ │ │ │ │ +162 } │ │ │ │ │ +163 │ │ │ │ │ +164#if HAVE_GMP │ │ │ │ │ +165 template< unsigned int precision > │ │ │ │ │ +166 inline void _f_i_e_l_d___c_a_s_t ( const Dune::GMPField< precision > &f1, double &f2 │ │ │ │ │ +) │ │ │ │ │ +167 { │ │ │ │ │ +168 f2 = f1.get_d(); │ │ │ │ │ +169 } │ │ │ │ │ +170 │ │ │ │ │ +171 template< unsigned int precision > │ │ │ │ │ +172 inline void _f_i_e_l_d___c_a_s_t ( const Dune::GMPField< precision > &f1, long double │ │ │ │ │ +&f2 ) │ │ │ │ │ +173 { │ │ │ │ │ +174 f2 = f1.get_d(); │ │ │ │ │ +175 } │ │ │ │ │ +176#endif │ │ │ │ │ +177 │ │ │ │ │ +178 template< class F2, class F1, int dim > │ │ │ │ │ +_1_7_9 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, dim > &f1, Dune:: │ │ │ │ │ +FieldVector< F2, dim > &f2 ) │ │ │ │ │ 180 { │ │ │ │ │ -181 // get a monomial $ p \in \P_{n,order}\backslash \P_{n,order-1}$ │ │ │ │ │ -182 _M_I xval = val[notHomogen+i]; │ │ │ │ │ -183 if(_d_i_m==2) │ │ │ │ │ -184 { │ │ │ │ │ -185 for (unsigned int r=0; r<_d_i_m; ++r) │ │ │ │ │ +181 for( int d = 0; d < dim; ++d ) │ │ │ │ │ +182 _f_i_e_l_d___c_a_s_t( f1[ d ], f2[ d ] ); │ │ │ │ │ +183 } │ │ │ │ │ +184 template< class F2, class F1 > │ │ │ │ │ +_1_8_5 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, 1 > &f1, F2 &f2 ) │ │ │ │ │ 186 { │ │ │ │ │ -187 // init rows to zero │ │ │ │ │ -188 _m_a_t__[_r_o_w+r] = new Field[_c_o_l__]; │ │ │ │ │ -189 for (unsigned int j=0; j<_c_o_l__; ++j) │ │ │ │ │ -190 _m_a_t__[_r_o_w+r][j] = 0.; │ │ │ │ │ -191 } │ │ │ │ │ -192 │ │ │ │ │ -193 /* set $(-y,x)^T p$ with a homogeneous monomial $p$ │ │ │ │ │ -194 * │ │ │ │ │ -195 * The loop over the monomials is needed to obtain the corresponding column │ │ │ │ │ -index. │ │ │ │ │ -196 */ │ │ │ │ │ -197 for (int w=homogen+notHomogen; w │ │ │ │ │ +_1_9_0 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, Dune::FieldVector< F2, 1 > &f2 ) │ │ │ │ │ +191 { │ │ │ │ │ +192 _f_i_e_l_d___c_a_s_t( f1, f2[ 0 ] ); │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +195 template< class F2, class F1, int rdim, int cdim > │ │ │ │ │ +_1_9_6 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix< F1, rdim, cdim > &f1, │ │ │ │ │ +Dune::FieldMatrix< F2, rdim, cdim > &f2 ) │ │ │ │ │ +197 { │ │ │ │ │ +198 for( int r = 0; r < rdim; ++r ) │ │ │ │ │ +199 _f_i_e_l_d___c_a_s_t( f1[ r ], f2[ r ] ); │ │ │ │ │ +200 } │ │ │ │ │ +201 template< class F2, class F1 > │ │ │ │ │ +_2_0_2 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix &f1, Dune:: │ │ │ │ │ +FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ +203 { │ │ │ │ │ +204 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2[ 0 ][ 0 ] ); │ │ │ │ │ 205 } │ │ │ │ │ -206 else if(_d_i_m==3) │ │ │ │ │ -207 { │ │ │ │ │ -208 int skipLastDim = xval._z(0)>0; │ │ │ │ │ -209 /* │ │ │ │ │ -210 * Init 9 rows to zero. │ │ │ │ │ -211 * If the homogeneous monomial has a positive x-exponent (0,-z,y) gets │ │ │ │ │ -skipped ( see example for the Nedelec space in 3D ) │ │ │ │ │ -212 * In this case only 6 rows get initialised. │ │ │ │ │ -213 */ │ │ │ │ │ -214 for (unsigned int r=0; r<_d_i_m*(_d_i_m-skipLastDim); ++r) │ │ │ │ │ -215 { │ │ │ │ │ -216 // init rows to zero │ │ │ │ │ -217 _m_a_t__[_r_o_w+r] = new Field[_c_o_l__]; │ │ │ │ │ -218 for (unsigned int j=0; j<_c_o_l__; ++j) │ │ │ │ │ -219 _m_a_t__[_r_o_w+r][j] = 0.; │ │ │ │ │ +206 template< class F2, class F1 > │ │ │ │ │ +_2_0_7 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix< F1, 1,1 > &f1, F2 &f2 ) │ │ │ │ │ +208 { │ │ │ │ │ +209 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2 ); │ │ │ │ │ +210 } │ │ │ │ │ +211 template< class F2, class F1 > │ │ │ │ │ +_2_1_2 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, Dune::FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ +213 { │ │ │ │ │ +214 _f_i_e_l_d___c_a_s_t( f1, f2[ 0 ][ 0 ] ); │ │ │ │ │ +215 } │ │ │ │ │ +216 template< class F2, class F1 > │ │ │ │ │ +_2_1_7 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector &f1, Dune:: │ │ │ │ │ +FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ +218 { │ │ │ │ │ +219 _f_i_e_l_d___c_a_s_t( f1[ 0 ], f2[ 0 ][ 0 ] ); │ │ │ │ │ 220 } │ │ │ │ │ -221 │ │ │ │ │ -222 /* │ │ │ │ │ -223 * first $dim$ rows are for (z,0,-x) │ │ │ │ │ -224 * │ │ │ │ │ -225 * second $dim$ rows are for (-y,x,0) │ │ │ │ │ -226 * │ │ │ │ │ -227 * third $dim$ rows are for (0,-z,y) │ │ │ │ │ -228 * │ │ │ │ │ -229 */ │ │ │ │ │ -230 for (unsigned int r=0; r<_d_i_m - skipLastDim; ++r) │ │ │ │ │ -231 { │ │ │ │ │ -232 int index = (r+_d_i_m-1)%_d_i_m; │ │ │ │ │ -233 for (int w=homogen+notHomogen; w │ │ │ │ │ +_2_2_2 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix &f1, Dune:: │ │ │ │ │ +FieldVector< F2, 1 > &f2 ) │ │ │ │ │ +223 { │ │ │ │ │ +224 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2[ 0 ] ); │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +227 template< class F2, class F1 > │ │ │ │ │ +_2_2_8 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, 1 > &f1, Dune:: │ │ │ │ │ +FieldVector &f2 ) │ │ │ │ │ +229 { │ │ │ │ │ +230 _f_i_e_l_d___c_a_s_t( f1[ 0 ], f2[ 0 ] ); │ │ │ │ │ +231 } │ │ │ │ │ +232 │ │ │ │ │ +233 template< class F2,class V > │ │ │ │ │ +_2_3_4 struct _F_i_e_l_d_C_a_s_t │ │ │ │ │ +235 { │ │ │ │ │ +_2_3_6 typedef F2 _t_y_p_e; │ │ │ │ │ +237 }; │ │ │ │ │ +238 template< class F2,class F1,int dim > │ │ │ │ │ +_2_3_9 struct _F_i_e_l_d_C_a_s_t< F2, _D_u_n_e::FieldVector > │ │ │ │ │ +240 { │ │ │ │ │ +_2_4_1 typedef Dune::FieldVector _t_y_p_e; │ │ │ │ │ +242 }; │ │ │ │ │ +243 template< class F2,class F1,int dim1, int dim2> │ │ │ │ │ +_2_4_4 struct _F_i_e_l_d_C_a_s_t< F2, _D_u_n_e::FieldMatrix > │ │ │ │ │ +245 { │ │ │ │ │ +_2_4_6 typedef Dune::FieldMatrix _t_y_p_e; │ │ │ │ │ +247 }; │ │ │ │ │ +248 template< class F2,class V > │ │ │ │ │ +_2_4_9 inline typename _F_i_e_l_d_C_a_s_t_<_F_2_,_V_>_:_:_t_y_p_e _f_i_e_l_d___c_a_s_t ( const V &f1 ) │ │ │ │ │ +250 { │ │ │ │ │ +251 typename _F_i_e_l_d_C_a_s_t_<_F_2_,_V_>_:_:_t_y_p_e f2; │ │ │ │ │ +252 _f_i_e_l_d___c_a_s_t( f1, f2 ); │ │ │ │ │ +253 return f2; │ │ │ │ │ +254 } │ │ │ │ │ +255 │ │ │ │ │ +256 │ │ │ │ │ +257 // Precision │ │ │ │ │ +258 // this is not a perfect solution to obtain the │ │ │ │ │ +259 // precision of a field - definition is not clear │ │ │ │ │ +260 // to be removed │ │ │ │ │ +261 // --------- │ │ │ │ │ 262 │ │ │ │ │ -263 template │ │ │ │ │ -_2_6_4 void _r_o_w( const unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ -265 { │ │ │ │ │ -266 const unsigned int N = _c_o_l_s(); │ │ │ │ │ -267 assert( vec.size() == N ); │ │ │ │ │ -268 for (unsigned int i=0; i │ │ │ │ │ +_2_6_4 struct _P_r_e_c_i_s_i_o_n; │ │ │ │ │ +265 │ │ │ │ │ +266 template<> │ │ │ │ │ +_2_6_7 struct _P_r_e_c_i_s_i_o_n< double > │ │ │ │ │ +268 { │ │ │ │ │ +_2_6_9 static const unsigned int value = 64; │ │ │ │ │ +270 }; │ │ │ │ │ 271 │ │ │ │ │ -_2_7_2 unsigned int _r_o_w__,_c_o_l__; │ │ │ │ │ -_2_7_3 Field **_m_a_t__; │ │ │ │ │ -274 }; │ │ │ │ │ -275 │ │ │ │ │ -276 │ │ │ │ │ -277} │ │ │ │ │ -278#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXPREBASIS_HH │ │ │ │ │ -_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +272 template<> │ │ │ │ │ +_2_7_3 struct _P_r_e_c_i_s_i_o_n< long double > │ │ │ │ │ +274 { │ │ │ │ │ +_2_7_5 static const unsigned int value = 80; │ │ │ │ │ +276 }; │ │ │ │ │ +277 │ │ │ │ │ +278 template<> │ │ │ │ │ +_2_7_9 struct _P_r_e_c_i_s_i_o_n< float > │ │ │ │ │ +280 { │ │ │ │ │ +_2_8_1 static const unsigned int value = 32; │ │ │ │ │ +282 }; │ │ │ │ │ +283 │ │ │ │ │ +284#if HAVE_GMP │ │ │ │ │ +285 template< unsigned int precision > │ │ │ │ │ +286 struct _P_r_e_c_i_s_i_o_n< GMPField< precision > > │ │ │ │ │ +287 { │ │ │ │ │ +288 static const unsigned int value = precision; │ │ │ │ │ +289 }; │ │ │ │ │ +290#endif │ │ │ │ │ +291 │ │ │ │ │ +292 // ComputeField │ │ │ │ │ +293 // ------------ │ │ │ │ │ +294 │ │ │ │ │ +295 template │ │ │ │ │ +_2_9_6 struct _C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ +297 { │ │ │ │ │ +_2_9_8 typedef Field _T_y_p_e; │ │ │ │ │ +299 }; │ │ │ │ │ +300 │ │ │ │ │ +301#if HAVE_GMP │ │ │ │ │ +302 template< unsigned int precision, unsigned int sum > │ │ │ │ │ +303 struct _C_o_m_p_u_t_e_F_i_e_l_d< GMPField< precision >, sum > │ │ │ │ │ +304 { │ │ │ │ │ +305 typedef GMPField _T_y_p_e; │ │ │ │ │ +306 }; │ │ │ │ │ +307#endif │ │ │ │ │ +308} // namespace Dune │ │ │ │ │ +309 │ │ │ │ │ +310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ +Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:44 │ │ │ │ │ _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ a helper class to cast from one field to another │ │ │ │ │ DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x │ │ │ │ │ -NedelecVecMatrix(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_M_I │ │ │ │ │ -MultiIndex< dim, Field > MI │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_r_o_w__ │ │ │ │ │ -unsigned int row_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:255 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_~_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x │ │ │ │ │ -~NedelecVecMatrix() │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:247 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_M_I_B_a_s_i_s │ │ │ │ │ -MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_c_o_l__ │ │ │ │ │ -unsigned int col_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_d_i_m │ │ │ │ │ -static const unsigned int dim │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:259 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_V_e_c_M_a_t_r_i_x_:_:_m_a_t__ │ │ │ │ │ -Field ** mat_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:273 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s │ │ │ │ │ -MBasisFactory::Object MBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(Key order) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ -PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const Basis Object │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_M_B_a_s_i_s │ │ │ │ │ -StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexprebasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ -const unsigned int * sizes(unsigned int order) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:465 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ +bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ +bool operator==(const Zero< Field > &, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ │ +bool operator>(const Zero< Field > &z, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ │ +Field operator+(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ +Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ +Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ +DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ +A class representing the unit of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o_:_:_e_p_s_i_l_o_n │ │ │ │ │ +static const Field epsilon() │ │ │ │ │ +DDeeffiinniittiioonn field.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t │ │ │ │ │ +DDeeffiinniittiioonn field.hh:235 │ │ │ │ │ +_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_:_:_t_y_p_e │ │ │ │ │ +F2 type │ │ │ │ │ +DDeeffiinniittiioonn field.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _F_1_,_ _d_i_m_ _>_ _>_:_:_t_y_p_e │ │ │ │ │ +Dune::FieldVector< F2, dim > type │ │ │ │ │ +DDeeffiinniittiioonn field.hh:241 │ │ │ │ │ +_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_M_a_t_r_i_x_<_ _F_1_,_ _d_i_m_1_,_ _d_i_m_2_ _>_ _>_:_:_t_y_p_e │ │ │ │ │ +Dune::FieldMatrix< F2, dim1, dim2 > type │ │ │ │ │ +DDeeffiinniittiioonn field.hh:246 │ │ │ │ │ +_D_u_n_e_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn field.hh:264 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ +DDeeffiinniittiioonn field.hh:297 │ │ │ │ │ +_D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d_:_:_T_y_p_e │ │ │ │ │ +Field Type │ │ │ │ │ +DDeeffiinniittiioonn field.hh:298 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexbasis.hh File Reference │ │ │ │ +dune-localfunctions: basisprint.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
nedelecsimplexbasis.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Functions
│ │ │ │ +
basisprint.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ -#include "nedelecsimplexinterpolation.hh"
│ │ │ │ -#include "nedelecsimplexprebasis.hh"
│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

struct  Dune::NedelecBasisFactory< dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Functions

template<int deriv, class BasisFactory , class PrintField , GeometryType::Id geometryId>
void Dune::basisPrint (std::ostream &out, typename BasisFactory::Object &basis)
 
template<int deriv, class BasisFactory , class PrintField = typename BasisFactory::StorageField>
void Dune::basisPrint (std::ostream &out, typename BasisFactory::Key &key)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -nedelecsimplexbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include "_n_e_d_e_l_e_c_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -#include "_n_e_d_e_l_e_c_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ +basisprint.hh File Reference │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +FFuunnccttiioonnss │ │ │ │ │ +template │ │ │ │ │ +void  _D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t (std::ostream &out, typename BasisFactory::Object │ │ │ │ │ + &basis) │ │ │ │ │ +  │ │ │ │ │ +template │ │ │ │ │ +void  _D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t (std::ostream &out, typename BasisFactory::Key &key) │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00152_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexbasis.hh Source File │ │ │ │ +dune-localfunctions: basisprint.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,73 +70,105 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexbasis.hh
│ │ │ │ +
basisprint.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH
│ │ │ │ -
6
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <fstream>
│ │ │ │ -
10#include <dune/common/exceptions.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18 /*
│ │ │ │ -
19 * `NedelecPreBasisFactory` provides a basis for the Nedelec function space.
│ │ │ │ -
20 * `NedelecL2InterpolationFactory` provides the linear functionals.
│ │ │ │ -
21 *
│ │ │ │ -
22 * `Defaultbasisfactory::create` first builds the function space and the linear functionals.
│ │ │ │ -
23 * Then the constructor of `BasisMatrix` gets called. There the matrix
│ │ │ │ -
24 *
│ │ │ │ -
25 * \begin{equation}
│ │ │ │ -
26 * A_{i,j} := N_j(\phi_i)
│ │ │ │ -
27 * \end{equation}
│ │ │ │ -
28 *
│ │ │ │ -
29 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled.
│ │ │ │ -
30 * Then the matrix gets inverted and is then used as a coefficent matrix for the standard monomial basis.
│ │ │ │ -
31 *
│ │ │ │ -
32 * For more details on the theory see the first chapter "Construction of Local Finite Element Spaces Using the Generic Reference Elements"
│ │ │ │ -
33 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published in 2012.
│ │ │ │ -
34 */
│ │ │ │ +
5#ifndef BASISPRINT
│ │ │ │ +
6#define BASISPRINT
│ │ │ │ + │ │ │ │ + │ │ │ │ +
9namespace Dune {
│ │ │ │ +
10 /**********************************************
│ │ │ │ +
11 * Methods for printing a PolynomialBasis.
│ │ │ │ +
12 * Is achieved by using the MultiIndex class as
│ │ │ │ +
13 * Field type and printing the results.
│ │ │ │ +
14 * The basis and higher order derivatives can be
│ │ │ │ +
15 * printed. This could be the basis for printing
│ │ │ │ +
16 * routings providing C++ or matlab methods
│ │ │ │ +
17 * for computing the basisfunctions for given
│ │ │ │ +
18 * orders or reference elements.
│ │ │ │ +
19 **********************************************/
│ │ │ │ +
20 // default argument does not work for gcc 4.1.2
│ │ │ │ +
21 // template <int deriv,class BasisFactory,class PrintField=typename BasisFactory::StorageField>
│ │ │ │ +
22 template <int deriv,class BasisFactory,class PrintField,GeometryType::Id geometryId>
│ │ │ │ +
│ │ │ │ +
23 void basisPrint(std::ostream &out,
│ │ │ │ +
24 typename BasisFactory::Object &basis)
│ │ │ │ +
25 {
│ │ │ │ +
26 typedef typename BasisFactory::Object Basis;
│ │ │ │ +
27 const int dimension = Basis::dimension;
│ │ │ │ +
28
│ │ │ │ + │ │ │ │ +
30 typedef typename BasisFactory::template EvaluationBasisFactory<dimension,Field>::Type
│ │ │ │ +
31 MIBasisFactory;
│ │ │ │ +
32 typedef typename MIBasisFactory::Object MIBasis;
│ │ │ │ +
33 typedef typename Basis::CoefficientMatrix CMatrix;
│ │ │ │ +
34 typedef PolynomialBasis<StandardEvaluator<MIBasis>, CMatrix > PrintBasis;
│ │ │ │
35
│ │ │ │ -
36 template< unsigned int dim, class SF, class CF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 : public DefaultBasisFactory< NedelecPreBasisFactory<dim,CF>,
│ │ │ │ -
39 NedelecL2InterpolationFactory<dim,CF>,
│ │ │ │ -
40 dim,dim,SF,CF >
│ │ │ │ -
41 {};
│ │ │ │ -
│ │ │ │ -
42}
│ │ │ │ +
36 MIBasis *miBasis = MIBasisFactory::template create<geometryId>( basis.basis().order());
│ │ │ │ +
37 PrintBasis printBasis(*miBasis,basis.matrix(),basis.size());
│ │ │ │ +
38
│ │ │ │ +
39 unsigned int size = printBasis.size();
│ │ │ │ +
40
│ │ │ │ +
41 out << "% Number of base functions: " << size << std::endl;
│ │ │ │ +
42 out << "% Derivative order: " << deriv << std::endl;
│ │ │ │
43
│ │ │ │ -
44#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
44 std::vector< FieldVector<
│ │ │ │ +
45 FieldVector<Field,LFETensor<Field,dimension,deriv>::size>,
│ │ │ │ +
46 PrintBasis::dimRange> > y( size );
│ │ │ │ +
47
│ │ │ │ +
48 FieldVector< Field, dimension > x;
│ │ │ │ +
49 for( int i = 0; i < dimension; ++i )
│ │ │ │ +
50 x[ i ].set( i, 1 );
│ │ │ │ +
51 printBasis.template evaluateSingle<deriv>( x, y );
│ │ │ │ +
52 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
53 {
│ │ │ │ +
54 out << "$\\varphi_" << i << "(a,b,c)$&$=$&$" << std::endl;
│ │ │ │ +
55 out << "( ";
│ │ │ │ +
56 for (unsigned int r=0; r<PrintBasis::dimRange; ++r)
│ │ │ │ +
57 out << y[i][r] << (r<PrintBasis::dimRange-1 ? " , $ \\\\ && $" : " )$ \\\\");
│ │ │ │ +
58 out << std::endl;
│ │ │ │ +
59 }
│ │ │ │ +
60 MIBasisFactory::release(miBasis);
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
63 template <int deriv,class BasisFactory,class PrintField=typename BasisFactory::StorageField>
│ │ │ │ +
│ │ │ │ +
64 void basisPrint(std::ostream &out,
│ │ │ │ +
65 typename BasisFactory::Key &key)
│ │ │ │ +
66 {
│ │ │ │ +
67 typename BasisFactory::Object *basis = BasisFactory::create(key);
│ │ │ │ +
68 basisPrint<deriv,BasisFactory,PrintField>(out,*basis);
│ │ │ │ +
69 BasisFactory::release(basis);
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71}
│ │ │ │ +
72
│ │ │ │ +
73
│ │ │ │ +
74#endif // BASISPRINT
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition nedelecsimplexbasis.hh:41
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ +
void basisPrint(std::ostream &out, typename BasisFactory::Object &basis)
Definition basisprint.hh:23
│ │ │ │ +
Definition multiindex.hh:37
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,71 +1,103 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ -nedelecsimplexbasis.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +basisprint.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ -6 │ │ │ │ │ -7#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -13#include "_n_e_d_e_l_e_c_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -14#include "_n_e_d_e_l_e_c_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 /* │ │ │ │ │ -19 * `NedelecPreBasisFactory` provides a basis for the Nedelec function space. │ │ │ │ │ -20 * `NedelecL2InterpolationFactory` provides the linear functionals. │ │ │ │ │ -21 * │ │ │ │ │ -22 * `Defaultbasisfactory::create` first builds the function space and the │ │ │ │ │ -linear functionals. │ │ │ │ │ -23 * Then the constructor of `BasisMatrix` gets called. There the matrix │ │ │ │ │ -24 * │ │ │ │ │ -25 * \begin{equation} │ │ │ │ │ -26 * A_{i,j} := N_j(\phi_i) │ │ │ │ │ -27 * \end{equation} │ │ │ │ │ -28 * │ │ │ │ │ -29 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled. │ │ │ │ │ -30 * Then the matrix gets inverted and is then used as a coefficent matrix for │ │ │ │ │ -the standard monomial basis. │ │ │ │ │ -31 * │ │ │ │ │ -32 * For more details on the theory see the first chapter "Construction of │ │ │ │ │ -Local Finite Element Spaces Using the Generic Reference Elements" │ │ │ │ │ -33 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published │ │ │ │ │ -in 2012. │ │ │ │ │ -34 */ │ │ │ │ │ +5#ifndef BASISPRINT │ │ │ │ │ +6#define BASISPRINT │ │ │ │ │ +7#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +9namespace _D_u_n_e { │ │ │ │ │ +10 /********************************************** │ │ │ │ │ +11 * Methods for printing a PolynomialBasis. │ │ │ │ │ +12 * Is achieved by using the MultiIndex class as │ │ │ │ │ +13 * Field type and printing the results. │ │ │ │ │ +14 * The basis and higher order derivatives can be │ │ │ │ │ +15 * printed. This could be the basis for printing │ │ │ │ │ +16 * routings providing C++ or matlab methods │ │ │ │ │ +17 * for computing the basisfunctions for given │ │ │ │ │ +18 * orders or reference elements. │ │ │ │ │ +19 **********************************************/ │ │ │ │ │ +20 // default argument does not work for gcc 4.1.2 │ │ │ │ │ +21 // template │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 void _b_a_s_i_s_P_r_i_n_t(std::ostream &out, │ │ │ │ │ +24 typename BasisFactory::Object &basis) │ │ │ │ │ +25 { │ │ │ │ │ +26 typedef typename BasisFactory::Object Basis; │ │ │ │ │ +27 const int dimension = Basis::dimension; │ │ │ │ │ +28 │ │ │ │ │ +29 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_e_n_s_i_o_n_,_ _P_r_i_n_t_F_i_e_l_d_ _> Field; │ │ │ │ │ +30 typedef typename BasisFactory::template │ │ │ │ │ +EvaluationBasisFactory::Type │ │ │ │ │ +31 MIBasisFactory; │ │ │ │ │ +32 typedef typename MIBasisFactory::Object MIBasis; │ │ │ │ │ +33 typedef typename Basis::CoefficientMatrix CMatrix; │ │ │ │ │ +34 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_M_I_B_a_s_i_s_>, CMatrix > PrintBasis; │ │ │ │ │ 35 │ │ │ │ │ -36 template< unsigned int dim, class SF, class CF > │ │ │ │ │ -_3_7 struct _N_e_d_e_l_e_c_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -38 : public _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y< NedelecPreBasisFactory, │ │ │ │ │ -39 NedelecL2InterpolationFactory, │ │ │ │ │ -40 dim,dim,SF,CF > │ │ │ │ │ -41 {}; │ │ │ │ │ -42} │ │ │ │ │ +36 MIBasis *miBasis = MIBasisFactory::template create( basis.basis │ │ │ │ │ +().order()); │ │ │ │ │ +37 PrintBasis printBasis(*miBasis,basis.matrix(),basis.size()); │ │ │ │ │ +38 │ │ │ │ │ +39 unsigned int size = printBasis.size(); │ │ │ │ │ +40 │ │ │ │ │ +41 out << "% Number of base functions: " << size << std::endl; │ │ │ │ │ +42 out << "% Derivative order: " << deriv << std::endl; │ │ │ │ │ 43 │ │ │ │ │ -44#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXBASIS_HH │ │ │ │ │ -_n_e_d_e_l_e_c_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h │ │ │ │ │ -_n_e_d_e_l_e_c_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +44 std::vector< FieldVector< │ │ │ │ │ +45 FieldVector::size>, │ │ │ │ │ +46 PrintBasis::dimRange> > y( size ); │ │ │ │ │ +47 │ │ │ │ │ +48 FieldVector< Field, dimension > x; │ │ │ │ │ +49 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ +50 x[ i ].set( i, 1 ); │ │ │ │ │ +51 printBasis.template evaluateSingle( x, y ); │ │ │ │ │ +52 for (unsigned int i=0; i │ │ │ │ │ +_6_4 void _b_a_s_i_s_P_r_i_n_t(std::ostream &out, │ │ │ │ │ +65 typename BasisFactory::Key &key) │ │ │ │ │ +66 { │ │ │ │ │ +67 typename BasisFactory::Object *basis = BasisFactory::create(key); │ │ │ │ │ +68 basisPrint(out,*basis); │ │ │ │ │ +69 BasisFactory::release(basis); │ │ │ │ │ +70 } │ │ │ │ │ +71} │ │ │ │ │ +72 │ │ │ │ │ +73 │ │ │ │ │ +74#endif // BASISPRINT │ │ │ │ │ +_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexbasis.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t │ │ │ │ │ +void basisPrint(std::ostream &out, typename BasisFactory::Object &basis) │ │ │ │ │ +DDeeffiinniittiioonn basisprint.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: interpolationhelper.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
nedelecsimplexinterpolation.hh File Reference
│ │ │ │ +
interpolationhelper.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/utility/interpolationhelper.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/concept.hh>
│ │ │ │ +#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LocalCoefficientsContainer
struct  Dune::InterpolationHelper< F, dimension >
 
struct  Dune::NedelecCoefficientsFactory< dim >
struct  Dune::InterpolationHelper< F, dimension >::Helper< Func, Vector, true >
 
struct  Dune::NedelecL2InterpolationBuilder< dim, Field >
 
class  Dune::NedelecL2Interpolation< dimension, F >
 An L2-based interpolation for Nedelec. More...
 
struct  Dune::NedelecL2InterpolationFactory< dim, Field >
struct  Dune::InterpolationHelper< F, dimension >::Helper< Basis, Matrix, false >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,39 +1,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -nedelecsimplexinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +interpolationhelper.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ +struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _d_i_m_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> │ │ │ │ │ -  An L2-based interpolation for Nedelec. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_, │ │ │ │ │ + _f_a_l_s_e_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00155_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelecsimplexinterpolation.hh Source File │ │ │ │ +dune-localfunctions: interpolationhelper.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,816 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelecsimplexinterpolation.hh
│ │ │ │ +
interpolationhelper.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ +
5#ifndef GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ +
6#define GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ -
10#include <numeric>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/exceptions.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16#include <dune/geometry/type.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ -
26 // Internal Forward Declarations
│ │ │ │ -
27 // -----------------------------
│ │ │ │ -
28
│ │ │ │ -
29 template < unsigned int dim, class Field >
│ │ │ │ -
30 struct NedelecL2InterpolationFactory;
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
33
│ │ │ │ -
34 // LocalCoefficientsContainer
│ │ │ │ -
35 // --------------------------
│ │ │ │ -
36
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ - │ │ │ │ -
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 template <class Setter>
│ │ │ │ -
│ │ │ │ -
43 LocalCoefficientsContainer ( const Setter &setter )
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fvector.hh>
│ │ │ │ +
11#include <dune/common/concept.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 // A small helper class to avoid having to
│ │ │ │ +
18 // write the interpolation twice (once for function
│ │ │ │ +
19 // and once for a basis)
│ │ │ │ +
20 template< class F, unsigned int dimension >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ +
23 template <class Func,class Container, bool type>
│ │ │ │ +
24 struct Helper;
│ │ │ │ +
25 };
│ │ │ │ +
│ │ │ │ +
26 template <class F,unsigned int d>
│ │ │ │ +
27 template <class Func,class Vector>
│ │ │ │ +
│ │ │ │ +
28 struct InterpolationHelper<F,d>::Helper<Func,Vector,true>
│ │ │ │ +
29 // Func is of Function type
│ │ │ │ +
30 {
│ │ │ │ +
31 typedef std::vector< Dune::FieldVector<F,d> > Result;
│ │ │ │ +
│ │ │ │ +
32 Helper(const Func & func, Vector &vec)
│ │ │ │ +
33 : func_(func),
│ │ │ │ +
34 vec_(vec),
│ │ │ │ +
35 tmp_(1)
│ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
37 const typename Vector::value_type &operator()(unsigned int row,unsigned int col)
│ │ │ │ +
38 {
│ │ │ │ +
39 return vec_[row];
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41 template <class Fy>
│ │ │ │ +
│ │ │ │ +
42 void set(unsigned int row,unsigned int col,
│ │ │ │ +
43 const Fy &val)
│ │ │ │
44 {
│ │ │ │ -
45 setter.setLocalKeys(localKey_);
│ │ │ │ -
46 }
│ │ │ │ +
45 assert(col==0);
│ │ │ │ +
46 assert(row<vec_.size());
│ │ │ │ +
47 field_cast( val, vec_[row] );
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49 template <class Fy>
│ │ │ │ +
│ │ │ │ +
50 void add(unsigned int row,unsigned int col,
│ │ │ │ +
51 const Fy &val)
│ │ │ │ +
52 {
│ │ │ │ +
53 assert(col==0);
│ │ │ │ +
54 assert(row<vec_.size());
│ │ │ │ +
55 vec_[row] += field_cast<typename Vector::value_type>(val);
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57 template <class DomainVector,
│ │ │ │ +
58 std::enable_if_t<models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ +
│ │ │ │ +
59 const Result &evaluate(const DomainVector &x) const
│ │ │ │ +
60 {
│ │ │ │ +
61 field_cast(func_(x), tmp_[0] );
│ │ │ │ +
62 return tmp_;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64 template <class DomainVector,
│ │ │ │ +
65 std::enable_if_t<not models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ +
│ │ │ │ +
66 const Result &evaluate(const DomainVector &x) const
│ │ │ │ +
67 {
│ │ │ │ +
68 typename Func::DomainType xx ;
│ │ │ │ +
69 typename Func::RangeType ff ;
│ │ │ │ +
70 field_cast(x,xx);
│ │ │ │ +
71 func_.evaluate(xx,ff);
│ │ │ │ +
72 field_cast(ff, tmp_[0] );
│ │ │ │ +
73 return tmp_;
│ │ │ │ +
74 }
│ │ │ │
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ -
49 {
│ │ │ │ -
50 assert( i < size() );
│ │ │ │ -
51 return localKey_[ i ];
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
54 std::size_t size () const
│ │ │ │ -
55 {
│ │ │ │ -
56 return localKey_.size();
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59 private:
│ │ │ │ -
60 std::vector< LocalKey > localKey_;
│ │ │ │ -
61 };
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65 // NedelecCoefficientsFactory
│ │ │ │ -
66 // --------------------------------
│ │ │ │ -
67
│ │ │ │ -
68 template < unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
70 {
│ │ │ │ -
71 typedef std::size_t Key;
│ │ │ │ - │ │ │ │ -
73
│ │ │ │ -
74 template< GeometryType::Id geometryId >
│ │ │ │
│ │ │ │ -
75 static Object *create( const Key &key )
│ │ │ │ -
76 {
│ │ │ │ -
77 typedef NedelecL2InterpolationFactory< dim, double > InterpolationFactory;
│ │ │ │ -
78 if( !supports< geometryId >( key ) )
│ │ │ │ -
79 return nullptr;
│ │ │ │ -
80 typename InterpolationFactory::Object *interpolation = InterpolationFactory::template create< geometryId >( key );
│ │ │ │ -
81 Object *localKeys = new Object( *interpolation );
│ │ │ │ -
82 InterpolationFactory::release( interpolation );
│ │ │ │ -
83 return localKeys;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
87 static bool supports ( const Key &key )
│ │ │ │ -
88 {
│ │ │ │ -
89 GeometryType gt = geometryId;
│ │ │ │ -
90 return gt.isTriangle() || gt.isTetrahedron() ;
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92 static void release( Object *object ) { delete object; }
│ │ │ │ -
93 };
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
95
│ │ │ │ -
96
│ │ │ │ -
97 // NedelecL2InterpolationBuilder
│ │ │ │ -
98 // ------------------------
│ │ │ │ -
99
│ │ │ │ -
100 // L2 Interpolation requires:
│ │ │ │ -
101 // - for element
│ │ │ │ -
102 // - test basis
│ │ │ │ -
103 // - for each face (dynamic)
│ │ │ │ -
104 // - test basis
│ │ │ │ -
105 // - tangents
│ │ │ │ -
106 // - for each edge (dynamic)
│ │ │ │ -
107 // - test basis
│ │ │ │ -
108 // - tangent
│ │ │ │ -
109 template< unsigned int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 static const unsigned int dimension = dim;
│ │ │ │ -
113
│ │ │ │ -
114 // for the dofs associated to the element
│ │ │ │ - │ │ │ │ - │ │ │ │ -
117
│ │ │ │ -
118 // for the dofs associated to the faces
│ │ │ │ - │ │ │ │ - │ │ │ │ -
121
│ │ │ │ -
122 // for the dofs associated to the edges
│ │ │ │ - │ │ │ │ - │ │ │ │ -
125
│ │ │ │ -
126 // the tangent of the edges
│ │ │ │ -
127 typedef FieldVector< Field, dimension > Tangent;
│ │ │ │ -
128
│ │ │ │ -
129 // the normal and the tangents of the faces
│ │ │ │ -
130 typedef FieldVector< Field, dimension > Normal;
│ │ │ │ -
131 typedef std::array<FieldVector< Field, dimension >,dim-1> FaceTangents;
│ │ │ │ -
132
│ │ │ │ - │ │ │ │ -
134
│ │ │ │ - │ │ │ │ - │ │ │ │ -
137
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
139 {
│ │ │ │ -
140 TestBasisFactory::release( testBasis_ );
│ │ │ │ -
141 for( FaceStructure &f : faceStructure_ )
│ │ │ │ - │ │ │ │ -
143 for( EdgeStructure& e : edgeStructure_ )
│ │ │ │ - │ │ │ │ -
145 }
│ │ │ │ -
│ │ │ │ -
146
│ │ │ │ -
│ │ │ │ -
147 unsigned int topologyId () const
│ │ │ │ -
148 {
│ │ │ │ -
149 return geometry_.id();
│ │ │ │ -
150 }
│ │ │ │ -
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
152 GeometryType type () const
│ │ │ │ -
153 {
│ │ │ │ -
154 return geometry_;
│ │ │ │ -
155 }
│ │ │ │ -
│ │ │ │ -
156
│ │ │ │ -
│ │ │ │ -
157 std::size_t order () const
│ │ │ │ -
158 {
│ │ │ │ -
159 return order_;
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ -
161
│ │ │ │ -
162 // number of faces
│ │ │ │ -
│ │ │ │ -
163 unsigned int faceSize () const
│ │ │ │ -
164 {
│ │ │ │ -
165 return numberOfFaces_;
│ │ │ │ -
166 }
│ │ │ │ -
│ │ │ │ -
167
│ │ │ │ -
168 // number of edges
│ │ │ │ -
│ │ │ │ -
169 unsigned int edgeSize () const
│ │ │ │ -
170 {
│ │ │ │ -
171 return numberOfEdges_;
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
173
│ │ │ │ -
174 // basis associated to the element
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
176 {
│ │ │ │ -
177 return testBasis_;
│ │ │ │ -
178 }
│ │ │ │ -
│ │ │ │ -
179
│ │ │ │ -
180 // basis associated to face f
│ │ │ │ -
│ │ │ │ -
181 TestFaceBasis *testFaceBasis ( unsigned int f ) const
│ │ │ │ -
182 {
│ │ │ │ -
183 assert( f < faceSize() );
│ │ │ │ -
184 return faceStructure_[ f ].basis_;
│ │ │ │ -
185 }
│ │ │ │ -
│ │ │ │ -
186
│ │ │ │ -
187 // basis associated to edge e
│ │ │ │ -
│ │ │ │ -
188 TestEdgeBasis *testEdgeBasis ( unsigned int e ) const
│ │ │ │ -
189 {
│ │ │ │ -
190 assert( e < edgeSize() );
│ │ │ │ -
191 return edgeStructure_[ e ].basis_;
│ │ │ │ -
192 }
│ │ │ │ -
│ │ │ │ -
193
│ │ │ │ -
│ │ │ │ -
194 const Tangent& edgeTangent ( unsigned int e ) const
│ │ │ │ -
195 {
│ │ │ │ -
196 assert( e < edgeSize() );
│ │ │ │ -
197 return edgeStructure_[ e ].tangent_;
│ │ │ │ -
198 }
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
│ │ │ │ -
200 const FaceTangents& faceTangents ( unsigned int f ) const
│ │ │ │ -
201 {
│ │ │ │ -
202 assert( f < faceSize() );
│ │ │ │ -
203 return faceStructure_[ f ].faceTangents_;
│ │ │ │ -
204 }
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
│ │ │ │ -
206 const Normal &normal ( unsigned int f ) const
│ │ │ │ -
207 {
│ │ │ │ -
208 assert( f < faceSize() );
│ │ │ │ -
209 return faceStructure_[ f ].normal_;
│ │ │ │ -
210 }
│ │ │ │ -
│ │ │ │ -
211
│ │ │ │ -
212 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
213 void build ( std::size_t order )
│ │ │ │ -
214 {
│ │ │ │ -
215 constexpr GeometryType geometry = geometryId;
│ │ │ │ -
216 order_ = order;
│ │ │ │ -
217 geometry_ = geometry;
│ │ │ │ -
218
│ │ │ │ -
219 /*
│ │ │ │ -
220 * The Nedelec parameter begins at 1.
│ │ │ │ -
221 * This is the numbering used by J.C. Nedelec himself.
│ │ │ │ -
222 * See "Mixed Finite Elements in \R^3" published in 1980.
│ │ │ │ -
223 *
│ │ │ │ -
224 * This construction is based on the construction of Raviart-Thomas elements.
│ │ │ │ -
225 * There the numbering starts at 0.
│ │ │ │ -
226 * Because of this we reduce the order internally by 1.
│ │ │ │ -
227 */
│ │ │ │ -
228 order--;
│ │ │ │ -
229
│ │ │ │ -
230 // if dimension == 2: order-1 on element
│ │ │ │ -
231 // if dimension == 3: order-2 on element
│ │ │ │ -
232 int requiredOrder = static_cast<int>(dimension==3);
│ │ │ │ -
233 testBasis_ = (order > requiredOrder ? TestBasisFactory::template create< geometry >( order-1-requiredOrder ) : nullptr);
│ │ │ │ -
234
│ │ │ │ -
235 const auto &refElement = ReferenceElements< Field, dimension >::general( type() );
│ │ │ │ -
236
│ │ │ │ -
237 numberOfFaces_ = refElement.size( 1 );
│ │ │ │ -
238 faceStructure_.reserve( numberOfFaces_ );
│ │ │ │ -
239
│ │ │ │ -
240 // compute the basis, tangents and normals of each face
│ │ │ │ -
241 for (std::size_t i=0; i<numberOfFaces_; i++)
│ │ │ │ -
242 {
│ │ │ │ -
243 FieldVector<Field,dimension> zero(0);
│ │ │ │ - │ │ │ │ -
245 faceTangents.fill(zero);
│ │ │ │ -
246
│ │ │ │ -
247 // use the first dim-1 vertices of a face to compute the tangents
│ │ │ │ -
248 auto vertices = refElement.subEntities(i,1,dim).begin();
│ │ │ │ -
249 auto vertex1 = *vertices;
│ │ │ │ -
250 for(int j=1; j<dim;j++)
│ │ │ │ -
251 {
│ │ │ │ -
252 auto vertex2 = vertices[j];
│ │ │ │ -
253
│ │ │ │ -
254 faceTangents[j-1] = refElement.position(vertex2,dim) - refElement.position(vertex1,dim);
│ │ │ │ -
255
│ │ │ │ -
256 // By default, edges point from the vertex with the smaller index
│ │ │ │ -
257 // to the vertex with the larger index.
│ │ │ │ -
258 if (vertex1>vertex2)
│ │ │ │ -
259 faceTangents[j-1] *=-1;
│ │ │ │ -
260
│ │ │ │ -
261 vertex1 = vertex2;
│ │ │ │ -
262 }
│ │ │ │ -
263
│ │ │ │ -
264 /* For simplices or cubes of arbitrary dimension you could just use
│ │ │ │ -
265 *
│ │ │ │ -
266 * ```
│ │ │ │ -
267 * GeometryType faceGeometry = Impl::getBase(geometry_);
│ │ │ │ -
268 * TestFaceBasis *faceBasis = ( dim == 3 && order > 0 ? TestFaceBasisFactory::template create< faceGeometry >( order-1 ) : nullptr);
│ │ │ │ -
269 * ```
│ │ │ │ -
270 *
│ │ │ │ -
271 * For i.e. Prisms and Pyramids in 3d this does not work because they contain squares and triangles as faces.
│ │ │ │ -
272 * And depending on the dynamic face index a different face geometry is needed.
│ │ │ │ -
273 *
│ │ │ │ -
274 */
│ │ │ │ -
275 TestFaceBasis *faceBasis = ( dim == 3 && order > 0 ? Impl::IfGeometryType< CreateFaceBasis, dimension-1 >::apply( refElement.type( i, 1 ), order-1 ) : nullptr);
│ │ │ │ -
276 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal(i), faceTangents );
│ │ │ │ -
277 }
│ │ │ │ -
278 assert( faceStructure_.size() == numberOfFaces_ );
│ │ │ │ -
279
│ │ │ │ -
280 numberOfEdges_ = refElement.size( dim-1 );
│ │ │ │ -
281 edgeStructure_.reserve( numberOfEdges_ );
│ │ │ │ -
282
│ │ │ │ -
283 // compute the basis and tangent of each edge
│ │ │ │ -
284 for (std::size_t i=0; i<numberOfEdges_; i++)
│ │ │ │ -
285 {
│ │ │ │ -
286 auto vertexIterator = refElement.subEntities(i,dim-1,dim).begin();
│ │ │ │ -
287 auto v0 = *vertexIterator;
│ │ │ │ -
288 auto v1 = *(++vertexIterator);
│ │ │ │ -
289
│ │ │ │ -
290 // By default, edges point from the vertex with the smaller index
│ │ │ │ -
291 // to the vertex with the larger index.
│ │ │ │ -
292 if (v0>v1)
│ │ │ │ -
293 std::swap(v0,v1);
│ │ │ │ -
294 auto tangent = std::move(refElement.position(v1,dim) - refElement.position(v0,dim));
│ │ │ │ -
295
│ │ │ │ -
296 TestEdgeBasis *edgeBasis = Impl::IfGeometryType< CreateEdgeBasis, 1 >::apply( refElement.type( i, dim-1 ), order );
│ │ │ │ -
297 edgeStructure_.emplace_back( edgeBasis, tangent );
│ │ │ │ -
298 }
│ │ │ │ -
299 assert( edgeStructure_.size() == numberOfEdges_ );
│ │ │ │ -
300 }
│ │ │ │ -
│ │ │ │ -
301
│ │ │ │ -
302 private:
│ │ │ │ -
303
│ │ │ │ -
304 // helper struct for edges
│ │ │ │ -
305 struct EdgeStructure
│ │ │ │ -
306 {
│ │ │ │ -
307 EdgeStructure( TestEdgeBasis *teb, const Tangent &t )
│ │ │ │ -
308 : basis_( teb ), tangent_( t )
│ │ │ │ -
309 {}
│ │ │ │ -
310
│ │ │ │ -
311 TestEdgeBasis *basis_;
│ │ │ │ -
312 const Dune::FieldVector< Field, dimension > tangent_;
│ │ │ │ -
313 };
│ │ │ │ -
314
│ │ │ │ -
315 template< GeometryType::Id edgeGeometryId >
│ │ │ │ -
316 struct CreateEdgeBasis
│ │ │ │ -
317 {
│ │ │ │ -
318 static TestEdgeBasis *apply ( std::size_t order ) { return TestEdgeBasisFactory::template create< edgeGeometryId >( order ); }
│ │ │ │ -
319 };
│ │ │ │ -
320
│ │ │ │ -
321 // helper struct for faces
│ │ │ │ -
322 struct FaceStructure
│ │ │ │ -
323 {
│ │ │ │ -
324 FaceStructure( TestFaceBasis *tfb, const Normal& normal, const FaceTangents& faceTangents )
│ │ │ │ -
325 : basis_( tfb ), normal_(normal), faceTangents_( faceTangents )
│ │ │ │ -
326 {}
│ │ │ │ -
327
│ │ │ │ -
328 TestFaceBasis *basis_;
│ │ │ │ -
329 const Dune::FieldVector< Field, dimension > normal_;
│ │ │ │ -
330 const FaceTangents faceTangents_;
│ │ │ │ -
331 };
│ │ │ │ -
332
│ │ │ │ -
333 template< GeometryType::Id faceGeometryId >
│ │ │ │ -
334 struct CreateFaceBasis
│ │ │ │ -
335 {
│ │ │ │ -
336 static TestFaceBasis *apply ( std::size_t order ) { return TestFaceBasisFactory::template create< faceGeometryId >( order ); }
│ │ │ │ -
337 };
│ │ │ │ -
338
│ │ │ │ -
339 TestBasis *testBasis_ = nullptr;
│ │ │ │ -
340 std::vector< FaceStructure > faceStructure_;
│ │ │ │ -
341 unsigned int numberOfFaces_;
│ │ │ │ -
342 std::vector< EdgeStructure > edgeStructure_;
│ │ │ │ -
343 unsigned int numberOfEdges_;
│ │ │ │ -
344 GeometryType geometry_;
│ │ │ │ -
345 std::size_t order_;
│ │ │ │ -
346 };
│ │ │ │ -
│ │ │ │ -
347
│ │ │ │ -
348
│ │ │ │ -
349
│ │ │ │ -
350 // NedelecL2Interpolation
│ │ │ │ -
351 // ----------------------------
│ │ │ │ -
352
│ │ │ │ -
358 template< unsigned int dimension, class F>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
360 : public InterpolationHelper< F ,dimension >
│ │ │ │ -
361 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
364
│ │ │ │ -
365 public:
│ │ │ │ -
366 typedef F Field;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
369
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
371 : order_(0),
│ │ │ │ -
372 size_(0)
│ │ │ │ -
373 {}
│ │ │ │ -
│ │ │ │ -
374
│ │ │ │ -
375 template< class Function, class Vector >
│ │ │ │ -
│ │ │ │ -
376 auto interpolate ( const Function &function, Vector &coefficients ) const
│ │ │ │ -
377 -> std::enable_if_t< std::is_same< decltype(std::declval<Vector>().resize(1) ),void >::value,void>
│ │ │ │ -
378 {
│ │ │ │ -
379 coefficients.resize(size());
│ │ │ │ -
380 typename Base::template Helper<Function,Vector,true> func( function,coefficients );
│ │ │ │ -
381 interpolate(func);
│ │ │ │ -
382 }
│ │ │ │ -
│ │ │ │ -
383
│ │ │ │ -
384 template< class Basis, class Matrix >
│ │ │ │ -
│ │ │ │ -
385 auto interpolate ( const Basis &basis, Matrix &matrix ) const
│ │ │ │ -
386 -> std::enable_if_t< std::is_same<
│ │ │ │ -
387 decltype(std::declval<Matrix>().rowPtr(0)), typename Matrix::Field* >::value,void>
│ │ │ │ -
388 {
│ │ │ │ -
389 matrix.resize( size(), basis.size() );
│ │ │ │ -
390 typename Base::template Helper<Basis,Matrix,false> func( basis,matrix );
│ │ │ │ -
391 interpolate(func);
│ │ │ │ -
392 }
│ │ │ │ -
│ │ │ │ -
393
│ │ │ │ -
│ │ │ │ -
394 std::size_t order() const
│ │ │ │ -
395 {
│ │ │ │ -
396 return order_;
│ │ │ │ -
397 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
398 std::size_t size() const
│ │ │ │ -
399 {
│ │ │ │ -
400 return size_;
│ │ │ │ -
401 }
│ │ │ │ -
│ │ │ │ -
402
│ │ │ │ -
403 template <GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
404 void build( std::size_t order )
│ │ │ │ -
405 {
│ │ │ │ -
406 size_ = 0;
│ │ │ │ -
407 order_ = order;
│ │ │ │ -
408 builder_.template build<geometryId>(order_);
│ │ │ │ -
409 if (builder_.testBasis())
│ │ │ │ -
410 size_ += dimension*builder_.testBasis()->size();
│ │ │ │ -
411
│ │ │ │ -
412 for ( unsigned int f=0; f<builder_.faceSize(); ++f )
│ │ │ │ -
413 if (builder_.testFaceBasis(f))
│ │ │ │ -
414 size_ += (dimension-1)*builder_.testFaceBasis(f)->size();
│ │ │ │ -
415
│ │ │ │ -
416 for ( unsigned int e=0; e<builder_.edgeSize(); ++e )
│ │ │ │ -
417 if (builder_.testEdgeBasis(e))
│ │ │ │ - │ │ │ │ -
419 }
│ │ │ │ -
│ │ │ │ -
420
│ │ │ │ -
│ │ │ │ -
421 void setLocalKeys(std::vector< LocalKey > &keys) const
│ │ │ │ -
422 {
│ │ │ │ -
423 keys.resize(size());
│ │ │ │ -
424 unsigned int row = 0;
│ │ │ │ -
425 for (unsigned int e=0; e<builder_.edgeSize(); ++e)
│ │ │ │ -
426 {
│ │ │ │ -
427 if (builder_.edgeSize())
│ │ │ │ -
428 for (unsigned int i=0; i<builder_.testEdgeBasis(e)->size(); ++i,++row)
│ │ │ │ -
429 keys[row] = LocalKey(e,dimension-1,i);
│ │ │ │ -
430 }
│ │ │ │ -
431 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ -
432 {
│ │ │ │ -
433 if (builder_.faceSize())
│ │ │ │ -
434 for (unsigned int i=0; i<builder_.testFaceBasis(f)->size()*(dimension-1); ++i,++row)
│ │ │ │ -
435 keys[row] = LocalKey(f,1,i);
│ │ │ │ -
436 }
│ │ │ │ -
437
│ │ │ │ -
438 if (builder_.testBasis())
│ │ │ │ -
439 for (unsigned int i=0; i<builder_.testBasis()->size()*dimension; ++i,++row)
│ │ │ │ -
440 keys[row] = LocalKey(0,0,i);
│ │ │ │ -
441 assert( row == size() );
│ │ │ │ -
442 }
│ │ │ │ -
│ │ │ │ -
443
│ │ │ │ -
444 protected:
│ │ │ │ -
445 template< class Func, class Container, bool type >
│ │ │ │ -
│ │ │ │ -
446 void interpolate ( typename Base::template Helper<Func,Container,type> &func ) const
│ │ │ │ -
447 {
│ │ │ │ -
448 const Dune::GeometryType geoType( builder_.topologyId(), dimension );
│ │ │ │ -
449
│ │ │ │ -
450 std::vector<Field> testBasisVal;
│ │ │ │ -
451
│ │ │ │ -
452 for (unsigned int i=0; i<size(); ++i)
│ │ │ │ -
453 for (unsigned int j=0; j<func.size(); ++j)
│ │ │ │ -
454 func.set(i,j,0);
│ │ │ │ -
455
│ │ │ │ -
456 unsigned int row = 0;
│ │ │ │ -
457
│ │ │ │ -
458 // edge dofs:
│ │ │ │ -
459 typedef Dune::QuadratureRule<Field, 1> EdgeQuadrature;
│ │ │ │ -
460 typedef Dune::QuadratureRules<Field, 1> EdgeQuadratureRules;
│ │ │ │ -
461
│ │ │ │ -
462 const auto &refElement = Dune::ReferenceElements< Field, dimension >::general( geoType );
│ │ │ │ -
463
│ │ │ │ -
464 for (unsigned int e=0; e<builder_.edgeSize(); ++e)
│ │ │ │ -
465 {
│ │ │ │ -
466 if (!builder_.testEdgeBasis(e))
│ │ │ │ -
467 continue;
│ │ │ │ -
468 testBasisVal.resize(builder_.testEdgeBasis(e)->size());
│ │ │ │ -
469
│ │ │ │ -
470 const auto &geometry = refElement.template geometry< dimension-1 >( e );
│ │ │ │ -
471 const Dune::GeometryType subGeoType( geometry.type().id(), 1 );
│ │ │ │ -
472 const EdgeQuadrature &edgeQuad = EdgeQuadratureRules::rule( subGeoType, 2*order_+2 );
│ │ │ │ -
473
│ │ │ │ -
474 const unsigned int quadratureSize = edgeQuad.size();
│ │ │ │ -
475 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ -
476 {
│ │ │ │ -
477 if (dimension>1)
│ │ │ │ -
478 builder_.testEdgeBasis(e)->template evaluate<0>(edgeQuad[qi].position(),testBasisVal);
│ │ │ │ -
479 else
│ │ │ │ -
480 testBasisVal[0] = 1.;
│ │ │ │ -
481 computeEdgeDofs(row,
│ │ │ │ -
482 testBasisVal,
│ │ │ │ -
483 func.evaluate( geometry.global( edgeQuad[qi].position() ) ),
│ │ │ │ - │ │ │ │ -
485 edgeQuad[qi].weight(),
│ │ │ │ -
486 func);
│ │ │ │ -
487 }
│ │ │ │ -
488
│ │ │ │ -
489 row += builder_.testEdgeBasis(e)->size();
│ │ │ │ -
490 }
│ │ │ │ -
491
│ │ │ │ -
492 // face dofs:
│ │ │ │ -
493 typedef Dune::QuadratureRule<Field, dimension-1> FaceQuadrature;
│ │ │ │ -
494 typedef Dune::QuadratureRules<Field, dimension-1> FaceQuadratureRules;
│ │ │ │ -
495
│ │ │ │ -
496 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ -
497 {
│ │ │ │ -
498 if (builder_.testFaceBasis(f))
│ │ │ │ -
499 {
│ │ │ │ -
500 testBasisVal.resize(builder_.testFaceBasis(f)->size());
│ │ │ │ -
501
│ │ │ │ -
502 const auto &geometry = refElement.template geometry< 1 >( f );
│ │ │ │ -
503 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 );
│ │ │ │ -
504 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, 2*order_+2 );
│ │ │ │ -
505
│ │ │ │ -
506 const unsigned int quadratureSize = faceQuad.size();
│ │ │ │ -
507 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ -
508 {
│ │ │ │ -
509 if (dimension>1)
│ │ │ │ -
510 builder_.testFaceBasis(f)->template evaluate<0>(faceQuad[qi].position(),testBasisVal);
│ │ │ │ -
511 else
│ │ │ │ -
512 testBasisVal[0] = 1.;
│ │ │ │ -
513
│ │ │ │ -
514 computeFaceDofs( row,
│ │ │ │ -
515 testBasisVal,
│ │ │ │ -
516 func.evaluate( geometry.global( faceQuad[qi].position() ) ),
│ │ │ │ - │ │ │ │ -
518 builder_.normal(f),
│ │ │ │ -
519 faceQuad[qi].weight(),
│ │ │ │ -
520 func);
│ │ │ │ -
521 }
│ │ │ │ -
522
│ │ │ │ -
523 row += builder_.testFaceBasis(f)->size()*(dimension-1);
│ │ │ │ -
524 }
│ │ │ │ -
525 }
│ │ │ │ -
526
│ │ │ │ -
527 // element dofs
│ │ │ │ -
528 if (builder_.testBasis())
│ │ │ │ -
529 {
│ │ │ │ -
530 testBasisVal.resize(builder_.testBasis()->size());
│ │ │ │ -
531
│ │ │ │ -
532 typedef Dune::QuadratureRule<Field, dimension> Quadrature;
│ │ │ │ -
533 typedef Dune::QuadratureRules<Field, dimension> QuadratureRules;
│ │ │ │ -
534 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*order_+1 );
│ │ │ │ -
535
│ │ │ │ -
536 const unsigned int quadratureSize = elemQuad.size();
│ │ │ │ -
537 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ -
538 {
│ │ │ │ -
539 builder_.testBasis()->template evaluate<0>(elemQuad[qi].position(),testBasisVal);
│ │ │ │ -
540 computeInteriorDofs(row,
│ │ │ │ -
541 testBasisVal,
│ │ │ │ -
542 func.evaluate(elemQuad[qi].position()),
│ │ │ │ -
543 elemQuad[qi].weight(),
│ │ │ │ -
544 func );
│ │ │ │ -
545 }
│ │ │ │ -
546
│ │ │ │ -
547 row += builder_.testBasis()->size()*dimension;
│ │ │ │ -
548 }
│ │ │ │ -
549 assert(row==size());
│ │ │ │ -
550 }
│ │ │ │ -
│ │ │ │ -
551
│ │ │ │ -
552 private:
│ │ │ │ -
562 template <class MVal, class NedVal,class Matrix>
│ │ │ │ -
563 void computeEdgeDofs (unsigned int startRow,
│ │ │ │ -
564 const MVal &mVal,
│ │ │ │ -
565 const NedVal &nedVal,
│ │ │ │ -
566 const FieldVector<Field,dimension> &tangent,
│ │ │ │ -
567 const Field &weight,
│ │ │ │ -
568 Matrix &matrix) const
│ │ │ │ -
569 {
│ │ │ │ -
570 const unsigned int endRow = startRow+mVal.size();
│ │ │ │ -
571 typename NedVal::const_iterator nedIter = nedVal.begin();
│ │ │ │ -
572 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col)
│ │ │ │ -
573 {
│ │ │ │ -
574 Field cFactor = (*nedIter)*tangent;
│ │ │ │ -
575 typename MVal::const_iterator mIter = mVal.begin();
│ │ │ │ -
576 for (unsigned int row = startRow; row!=endRow; ++mIter, ++row )
│ │ │ │ -
577 matrix.add(row,col, (weight*cFactor)*(*mIter) );
│ │ │ │ -
578
│ │ │ │ -
579 assert( mIter == mVal.end() );
│ │ │ │ -
580 }
│ │ │ │ -
581 }
│ │ │ │ -
582
│ │ │ │ -
593 template <class MVal, class NedVal,class Matrix>
│ │ │ │ -
594 void computeFaceDofs (unsigned int startRow,
│ │ │ │ -
595 const MVal &mVal,
│ │ │ │ -
596 const NedVal &nedVal,
│ │ │ │ -
597 const FaceTangents& faceTangents,
│ │ │ │ -
598 const FieldVector<Field,dimension> &normal,
│ │ │ │ -
599 const Field &weight,
│ │ │ │ -
600 Matrix &matrix) const
│ │ │ │ -
601 {
│ │ │ │ -
602 const unsigned int endRow = startRow+mVal.size()*(dimension-1);
│ │ │ │ -
603 typename NedVal::const_iterator nedIter = nedVal.begin();
│ │ │ │ -
604 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col)
│ │ │ │ -
605 {
│ │ │ │ -
606 auto const& u=*nedIter;
│ │ │ │ -
607 auto const& n=normal;
│ │ │ │ -
608 FieldVector<Field,dimension> nedTimesNormal = { u[1]*n[2]-u[2]*n[1],
│ │ │ │ -
609 u[2]*n[0]-u[0]*n[2],
│ │ │ │ -
610 u[0]*n[1]-u[1]*n[0]};
│ │ │ │ -
611 typename MVal::const_iterator mIter = mVal.begin();
│ │ │ │ -
612 for (unsigned int row = startRow; row!=endRow; ++mIter)
│ │ │ │ -
613 {
│ │ │ │ -
614 for(int i=0; i<dimension-1;i++)
│ │ │ │ -
615 {
│ │ │ │ -
616 auto test = *mIter*faceTangents[i];
│ │ │ │ -
617 matrix.add(row+i,col, weight*(nedTimesNormal*test) );
│ │ │ │ -
618 }
│ │ │ │ -
619 row += dimension-1;
│ │ │ │ -
620 }
│ │ │ │ -
621
│ │ │ │ -
622 assert( mIter == mVal.end() );
│ │ │ │ -
623 }
│ │ │ │ -
624 }
│ │ │ │ -
625
│ │ │ │ -
634 template <class MVal, class NedVal,class Matrix>
│ │ │ │ -
635 void computeInteriorDofs (unsigned int startRow,
│ │ │ │ -
636 const MVal &mVal,
│ │ │ │ -
637 const NedVal &nedVal,
│ │ │ │ -
638 Field weight,
│ │ │ │ -
639 Matrix &matrix) const
│ │ │ │ -
640 {
│ │ │ │ -
641 const unsigned int endRow = startRow+mVal.size()*dimension;
│ │ │ │ -
642 typename NedVal::const_iterator nedIter = nedVal.begin();
│ │ │ │ -
643 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col)
│ │ │ │ -
644 {
│ │ │ │ -
645 typename MVal::const_iterator mIter = mVal.begin();
│ │ │ │ -
646 for (unsigned int row = startRow; row!=endRow; ++mIter,row+=dimension )
│ │ │ │ -
647 for (unsigned int i=0; i<dimension; ++i)
│ │ │ │ -
648 matrix.add(row+i,col, (weight*(*mIter))*(*nedIter)[i] );
│ │ │ │ -
649
│ │ │ │ -
650 assert( mIter == mVal.end() );
│ │ │ │ -
651 }
│ │ │ │ -
652 }
│ │ │ │ -
653
│ │ │ │ -
654 public:
│ │ │ │ - │ │ │ │ -
656 std::size_t order_;
│ │ │ │ -
657 std::size_t size_;
│ │ │ │ -
658 };
│ │ │ │ -
│ │ │ │ -
659
│ │ │ │ -
660 template < unsigned int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
662 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
665 typedef std::size_t Key;
│ │ │ │ -
666 typedef typename std::remove_const<Object>::type NonConstObject;
│ │ │ │ -
667
│ │ │ │ -
668 template <GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
669 static Object *create( const Key &key )
│ │ │ │ -
670 {
│ │ │ │ -
671 if ( !supports<geometryId>(key) )
│ │ │ │ -
672 return 0;
│ │ │ │ -
673 NonConstObject *interpol = new NonConstObject();
│ │ │ │ -
674 interpol->template build<geometryId>(key);
│ │ │ │ -
675 return interpol;
│ │ │ │ -
676 }
│ │ │ │ -
│ │ │ │ -
677
│ │ │ │ -
678 template <GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
679 static bool supports( const Key &key )
│ │ │ │ -
680 {
│ │ │ │ -
681 GeometryType gt = geometryId;
│ │ │ │ -
682 return gt.isTriangle() || gt.isTetrahedron() ;
│ │ │ │ -
683 }
│ │ │ │ -
│ │ │ │ -
684 static void release( Object *object ) { delete object; }
│ │ │ │ -
685 };
│ │ │ │ -
│ │ │ │ -
686
│ │ │ │ -
687} // namespace Dune
│ │ │ │ -
688
│ │ │ │ -
689#endif // #ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
75 unsigned int size() const
│ │ │ │ +
76 {
│ │ │ │ +
77 return 1;
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79 const Func &func_;
│ │ │ │ +
80 Vector &vec_;
│ │ │ │ +
81 mutable Result tmp_;
│ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83 template <class F,unsigned int d>
│ │ │ │ +
84 template <class Basis,class Matrix>
│ │ │ │ +
│ │ │ │ +
85 struct InterpolationHelper<F,d>::Helper<Basis,Matrix,false>
│ │ │ │ +
86 // Func is of Basis type
│ │ │ │ +
87 {
│ │ │ │ +
88 typedef std::vector< Dune::FieldVector<F,d> > Result;
│ │ │ │ +
│ │ │ │ +
89 Helper(const Basis & basis, Matrix &matrix)
│ │ │ │ +
90 : basis_(basis),
│ │ │ │ +
91 matrix_(matrix),
│ │ │ │ +
92 tmp_(basis.size()) {}
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
93 const F &operator()(unsigned int row,unsigned int col) const
│ │ │ │ +
94 {
│ │ │ │ +
95 return matrix_(row,col);
│ │ │ │ +
96 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
97 F &operator()(unsigned int row,unsigned int col)
│ │ │ │ +
98 {
│ │ │ │ +
99 return matrix_(row,col);
│ │ │ │ +
100 }
│ │ │ │ +
│ │ │ │ +
101 template <class Fy>
│ │ │ │ +
│ │ │ │ +
102 void set(unsigned int row,unsigned int col,
│ │ │ │ +
103 const Fy &val)
│ │ │ │ +
104 {
│ │ │ │ +
105 assert(col<matrix_.cols());
│ │ │ │ +
106 assert(row<matrix_.rows());
│ │ │ │ +
107 field_cast(val,matrix_(row,col));
│ │ │ │ +
108 }
│ │ │ │ +
│ │ │ │ +
109 template <class Fy>
│ │ │ │ +
│ │ │ │ +
110 void add(unsigned int row,unsigned int col,
│ │ │ │ +
111 const Fy &val)
│ │ │ │ +
112 {
│ │ │ │ +
113 assert(col<matrix_.cols());
│ │ │ │ +
114 assert(row<matrix_.rows());
│ │ │ │ +
115 matrix_(row,col) += val;
│ │ │ │ +
116 }
│ │ │ │ +
│ │ │ │ +
117 template <class DomainVector>
│ │ │ │ +
│ │ │ │ +
118 const Result &evaluate(const DomainVector &x) const
│ │ │ │ +
119 {
│ │ │ │ +
120 basis_.template evaluate<0>(x,tmp_);
│ │ │ │ +
121 return tmp_;
│ │ │ │ +
122 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
123 unsigned int size() const
│ │ │ │ +
124 {
│ │ │ │ +
125 return basis_.size();
│ │ │ │ +
126 }
│ │ │ │ +
│ │ │ │ +
127
│ │ │ │ +
128 const Basis &basis_;
│ │ │ │ +
129 Matrix &matrix_;
│ │ │ │ +
130 mutable Result tmp_;
│ │ │ │ +
131 };
│ │ │ │ +
│ │ │ │ +
132}
│ │ │ │ +
133#endif // GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Definition nedelecsimplexinterpolation.hh:662
│ │ │ │ -
static Object * create(const Key &key)
Definition nedelecsimplexinterpolation.hh:669
│ │ │ │ -
const NedelecL2Interpolation< dim, Field > Object
Definition nedelecsimplexinterpolation.hh:664
│ │ │ │ -
NedelecL2InterpolationBuilder< dim, Field > Builder
Definition nedelecsimplexinterpolation.hh:663
│ │ │ │ -
std::size_t Key
Definition nedelecsimplexinterpolation.hh:665
│ │ │ │ -
static bool supports(const Key &key)
Definition nedelecsimplexinterpolation.hh:679
│ │ │ │ -
std::remove_const< Object >::type NonConstObject
Definition nedelecsimplexinterpolation.hh:666
│ │ │ │ -
static void release(Object *object)
Definition nedelecsimplexinterpolation.hh:684
│ │ │ │ -
Definition nedelecsimplexinterpolation.hh:38
│ │ │ │ -
LocalCoefficientsContainer(const Setter &setter)
Definition nedelecsimplexinterpolation.hh:43
│ │ │ │ -
const LocalKey & localKey(const unsigned int i) const
Definition nedelecsimplexinterpolation.hh:48
│ │ │ │ -
std::size_t size() const
Definition nedelecsimplexinterpolation.hh:54
│ │ │ │ -
Definition nedelecsimplexinterpolation.hh:70
│ │ │ │ -
static Object * create(const Key &key)
Definition nedelecsimplexinterpolation.hh:75
│ │ │ │ -
static bool supports(const Key &key)
Definition nedelecsimplexinterpolation.hh:87
│ │ │ │ -
const LocalCoefficientsContainer Object
Definition nedelecsimplexinterpolation.hh:72
│ │ │ │ -
std::size_t Key
Definition nedelecsimplexinterpolation.hh:71
│ │ │ │ -
static void release(Object *object)
Definition nedelecsimplexinterpolation.hh:92
│ │ │ │ -
Definition nedelecsimplexinterpolation.hh:111
│ │ │ │ -
TestEdgeBasis * testEdgeBasis(unsigned int e) const
Definition nedelecsimplexinterpolation.hh:188
│ │ │ │ -
~NedelecL2InterpolationBuilder()
Definition nedelecsimplexinterpolation.hh:138
│ │ │ │ -
GeometryType type() const
Definition nedelecsimplexinterpolation.hh:152
│ │ │ │ -
TestBasisFactory::Object TestBasis
Definition nedelecsimplexinterpolation.hh:116
│ │ │ │ -
FieldVector< Field, dimension > Tangent
Definition nedelecsimplexinterpolation.hh:127
│ │ │ │ -
TestFaceBasisFactory::Object TestFaceBasis
Definition nedelecsimplexinterpolation.hh:120
│ │ │ │ -
TestFaceBasis * testFaceBasis(unsigned int f) const
Definition nedelecsimplexinterpolation.hh:181
│ │ │ │ -
TestEdgeBasisFactory::Object TestEdgeBasis
Definition nedelecsimplexinterpolation.hh:124
│ │ │ │ -
FieldVector< Field, dimension > Normal
Definition nedelecsimplexinterpolation.hh:130
│ │ │ │ -
void build(std::size_t order)
Definition nedelecsimplexinterpolation.hh:213
│ │ │ │ -
OrthonormalBasisFactory< dimension, Field > TestBasisFactory
Definition nedelecsimplexinterpolation.hh:115
│ │ │ │ -
OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory
Definition nedelecsimplexinterpolation.hh:119
│ │ │ │ -
const FaceTangents & faceTangents(unsigned int f) const
Definition nedelecsimplexinterpolation.hh:200
│ │ │ │ -
unsigned int faceSize() const
Definition nedelecsimplexinterpolation.hh:163
│ │ │ │ -
TestBasis * testBasis() const
Definition nedelecsimplexinterpolation.hh:175
│ │ │ │ -
std::array< FieldVector< Field, dimension >, dim-1 > FaceTangents
Definition nedelecsimplexinterpolation.hh:131
│ │ │ │ -
OrthonormalBasisFactory< 1, Field > TestEdgeBasisFactory
Definition nedelecsimplexinterpolation.hh:123
│ │ │ │ -
const Tangent & edgeTangent(unsigned int e) const
Definition nedelecsimplexinterpolation.hh:194
│ │ │ │ -
NedelecL2InterpolationBuilder(NedelecL2InterpolationBuilder &&)=delete
│ │ │ │ -
std::size_t order() const
Definition nedelecsimplexinterpolation.hh:157
│ │ │ │ -
unsigned int edgeSize() const
Definition nedelecsimplexinterpolation.hh:169
│ │ │ │ -
unsigned int topologyId() const
Definition nedelecsimplexinterpolation.hh:147
│ │ │ │ -
NedelecL2InterpolationBuilder(const NedelecL2InterpolationBuilder &)=delete
│ │ │ │ -
static const unsigned int dimension
Definition nedelecsimplexinterpolation.hh:112
│ │ │ │ - │ │ │ │ -
const Normal & normal(unsigned int f) const
Definition nedelecsimplexinterpolation.hh:206
│ │ │ │ -
An L2-based interpolation for Nedelec.
Definition nedelecsimplexinterpolation.hh:361
│ │ │ │ -
Builder::FaceTangents FaceTangents
Definition nedelecsimplexinterpolation.hh:368
│ │ │ │ -
F Field
Definition nedelecsimplexinterpolation.hh:366
│ │ │ │ -
auto interpolate(const Function &function, Vector &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void >
Definition nedelecsimplexinterpolation.hh:376
│ │ │ │ -
std::size_t size() const
Definition nedelecsimplexinterpolation.hh:398
│ │ │ │ -
void interpolate(typename Base::template Helper< Func, Container, type > &func) const
Definition nedelecsimplexinterpolation.hh:446
│ │ │ │ -
std::size_t order_
Definition nedelecsimplexinterpolation.hh:656
│ │ │ │ -
NedelecL2InterpolationBuilder< dimension, Field > Builder
Definition nedelecsimplexinterpolation.hh:367
│ │ │ │ -
auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix::Field * >::value, void >
Definition nedelecsimplexinterpolation.hh:385
│ │ │ │ -
std::size_t size_
Definition nedelecsimplexinterpolation.hh:657
│ │ │ │ -
NedelecL2Interpolation()
Definition nedelecsimplexinterpolation.hh:370
│ │ │ │ -
void build(std::size_t order)
Definition nedelecsimplexinterpolation.hh:404
│ │ │ │ -
std::size_t order() const
Definition nedelecsimplexinterpolation.hh:394
│ │ │ │ -
void setLocalKeys(std::vector< LocalKey > &keys) const
Definition nedelecsimplexinterpolation.hh:421
│ │ │ │ -
Builder builder_
Definition nedelecsimplexinterpolation.hh:655
│ │ │ │ -
Definition orthonormalbasis.hh:20
│ │ │ │ -
static void release(Object *object)
Definition orthonormalbasis.hh:57
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │
Definition interpolationhelper.hh:22
│ │ │ │
Definition interpolationhelper.hh:24
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ -
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │ +
void add(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:50
│ │ │ │ +
const Func & func_
Definition interpolationhelper.hh:79
│ │ │ │ +
Helper(const Func &func, Vector &vec)
Definition interpolationhelper.hh:32
│ │ │ │ +
const Result & evaluate(const DomainVector &x) const
Definition interpolationhelper.hh:59
│ │ │ │ +
std::vector< Dune::FieldVector< F, d > > Result
Definition interpolationhelper.hh:31
│ │ │ │ +
unsigned int size() const
Definition interpolationhelper.hh:75
│ │ │ │ +
Vector & vec_
Definition interpolationhelper.hh:80
│ │ │ │ +
void set(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:42
│ │ │ │ +
Result tmp_
Definition interpolationhelper.hh:81
│ │ │ │ +
const Vector::value_type & operator()(unsigned int row, unsigned int col)
Definition interpolationhelper.hh:37
│ │ │ │ +
const Basis & basis_
Definition interpolationhelper.hh:128
│ │ │ │ +
const Result & evaluate(const DomainVector &x) const
Definition interpolationhelper.hh:118
│ │ │ │ +
F & operator()(unsigned int row, unsigned int col)
Definition interpolationhelper.hh:97
│ │ │ │ +
void set(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:102
│ │ │ │ +
Helper(const Basis &basis, Matrix &matrix)
Definition interpolationhelper.hh:89
│ │ │ │ +
unsigned int size() const
Definition interpolationhelper.hh:123
│ │ │ │ +
Result tmp_
Definition interpolationhelper.hh:130
│ │ │ │ +
void add(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:110
│ │ │ │ +
std::vector< Dune::FieldVector< F, d > > Result
Definition interpolationhelper.hh:88
│ │ │ │ +
Matrix & matrix_
Definition interpolationhelper.hh:129
│ │ │ │ +
const F & operator()(unsigned int row, unsigned int col) const
Definition interpolationhelper.hh:93
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,903 +1,223 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ - * _n_e_d_e_l_e_c_s_i_m_p_l_e_x │ │ │ │ │ -nedelecsimplexinterpolation.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +interpolationhelper.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ -6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ +5#ifndef GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ +6#define GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e │ │ │ │ │ -24{ │ │ │ │ │ -25 │ │ │ │ │ -26 // Internal Forward Declarations │ │ │ │ │ -27 // ----------------------------- │ │ │ │ │ -28 │ │ │ │ │ -29 template < unsigned int dim, class Field > │ │ │ │ │ -30 struct NedelecL2InterpolationFactory; │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33 │ │ │ │ │ -34 // LocalCoefficientsContainer │ │ │ │ │ -35 // -------------------------- │ │ │ │ │ -36 │ │ │ │ │ -_3_7 class _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 // A small helper class to avoid having to │ │ │ │ │ +18 // write the interpolation twice (once for function │ │ │ │ │ +19 // and once for a basis) │ │ │ │ │ +20 template< class F, unsigned int dimension > │ │ │ │ │ +_2_1 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ +22 { │ │ │ │ │ +23 template │ │ │ │ │ +_2_4 struct _H_e_l_p_e_r; │ │ │ │ │ +25 }; │ │ │ │ │ +26 template │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r::_H_e_l_p_e_r │ │ │ │ │ +29 // Func is of Function type │ │ │ │ │ +30 { │ │ │ │ │ +_3_1 typedef std::vector< Dune::FieldVector > _R_e_s_u_l_t; │ │ │ │ │ +_3_2 _H_e_l_p_e_r(const Func & func, Vector &vec) │ │ │ │ │ +33 : func_(func), │ │ │ │ │ +34 vec_(vec), │ │ │ │ │ +35 tmp_(1) │ │ │ │ │ +36 {} │ │ │ │ │ +_3_7 const typename Vector::value_type &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int │ │ │ │ │ +col) │ │ │ │ │ 38 { │ │ │ │ │ -39 typedef _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r _T_h_i_s; │ │ │ │ │ -40 │ │ │ │ │ -41 public: │ │ │ │ │ -42 template │ │ │ │ │ -_4_3 _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r ( const Setter &setter ) │ │ │ │ │ +39 return vec_[row]; │ │ │ │ │ +40 } │ │ │ │ │ +41 template │ │ │ │ │ +_4_2 void _s_e_t(unsigned int row,unsigned int col, │ │ │ │ │ +43 const Fy &val) │ │ │ │ │ 44 { │ │ │ │ │ -45 setter.setLocalKeys(localKey_); │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_4_8 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ -49 { │ │ │ │ │ -50 assert( i < _s_i_z_e() ); │ │ │ │ │ -51 return localKey_[ i ]; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_4 std::size_t _s_i_z_e () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return localKey_.size(); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -59 private: │ │ │ │ │ -60 std::vector< LocalKey > localKey_; │ │ │ │ │ -61 }; │ │ │ │ │ -62 │ │ │ │ │ -63 │ │ │ │ │ -64 │ │ │ │ │ -65 // NedelecCoefficientsFactory │ │ │ │ │ -66 // -------------------------------- │ │ │ │ │ -67 │ │ │ │ │ -68 template < unsigned int dim > │ │ │ │ │ -_6_9 struct _N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -70 { │ │ │ │ │ -_7_1 typedef std::size_t _K_e_y; │ │ │ │ │ -_7_2 typedef const _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r _O_b_j_e_c_t; │ │ │ │ │ -73 │ │ │ │ │ -74 template< GeometryType::Id geometryId > │ │ │ │ │ -_7_5 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ +45 assert(col==0); │ │ │ │ │ +46 assert(row │ │ │ │ │ +_5_0 void _a_d_d(unsigned int row,unsigned int col, │ │ │ │ │ +51 const Fy &val) │ │ │ │ │ +52 { │ │ │ │ │ +53 assert(col==0); │ │ │ │ │ +54 assert(row(val); │ │ │ │ │ +56 } │ │ │ │ │ +57 template , Func> │ │ │ │ │ +(), int> = 0> │ │ │ │ │ +_5_9 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ +60 { │ │ │ │ │ +61 _f_i_e_l_d___c_a_s_t(func_(x), tmp_[0] ); │ │ │ │ │ +62 return tmp_; │ │ │ │ │ +63 } │ │ │ │ │ +64 template , │ │ │ │ │ +Func>(), int> = 0> │ │ │ │ │ +_6_6 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ +67 { │ │ │ │ │ +68 typename Func::DomainType xx ; │ │ │ │ │ +69 typename Func::RangeType ff ; │ │ │ │ │ +70 _f_i_e_l_d___c_a_s_t(x,xx); │ │ │ │ │ +71 func_.evaluate(xx,ff); │ │ │ │ │ +72 _f_i_e_l_d___c_a_s_t(ff, tmp_[0] ); │ │ │ │ │ +73 return tmp_; │ │ │ │ │ +74 } │ │ │ │ │ +_7_5 unsigned int _s_i_z_e() const │ │ │ │ │ 76 { │ │ │ │ │ -77 typedef _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _d_o_u_b_l_e_ _> InterpolationFactory; │ │ │ │ │ -78 if( !supports< geometryId >( key ) ) │ │ │ │ │ -79 return nullptr; │ │ │ │ │ -80 typename InterpolationFactory::Object *interpolation = │ │ │ │ │ -InterpolationFactory::template create< geometryId >( key ); │ │ │ │ │ -81 _O_b_j_e_c_t *localKeys = new _O_b_j_e_c_t( *interpolation ); │ │ │ │ │ -82 InterpolationFactory::release( interpolation ); │ │ │ │ │ -83 return localKeys; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -86 template< GeometryType::Id geometryId > │ │ │ │ │ -_8_7 static bool _s_u_p_p_o_r_t_s ( const _K_e_y &key ) │ │ │ │ │ -88 { │ │ │ │ │ -89 GeometryType gt = geometryId; │ │ │ │ │ -90 return gt.isTriangle() || gt.isTetrahedron() ; │ │ │ │ │ -91 } │ │ │ │ │ -_9_2 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -93 }; │ │ │ │ │ -94 │ │ │ │ │ -95 │ │ │ │ │ -96 │ │ │ │ │ -97 // NedelecL2InterpolationBuilder │ │ │ │ │ -98 // ------------------------ │ │ │ │ │ -99 │ │ │ │ │ -100 // L2 Interpolation requires: │ │ │ │ │ -101 // - for element │ │ │ │ │ -102 // - test basis │ │ │ │ │ -103 // - for each face (dynamic) │ │ │ │ │ -104 // - test basis │ │ │ │ │ -105 // - tangents │ │ │ │ │ -106 // - for each edge (dynamic) │ │ │ │ │ -107 // - test basis │ │ │ │ │ -108 // - tangent │ │ │ │ │ -109 template< unsigned int dim, class Field > │ │ │ │ │ -_1_1_0 struct _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -111 { │ │ │ │ │ -_1_1_2 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -113 │ │ │ │ │ -114 // for the dofs associated to the element │ │ │ │ │ -_1_1_5 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_,_ _F_i_e_l_d_ _> _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_1_1_6 typedef typename _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_B_a_s_i_s; │ │ │ │ │ -117 │ │ │ │ │ -118 // for the dofs associated to the faces │ │ │ │ │ -_1_1_9 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y< _d_i_m_e_n_s_i_o_n-1, Field > _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_1_2_0 typedef typename _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_F_a_c_e_B_a_s_i_s; │ │ │ │ │ -121 │ │ │ │ │ -122 // for the dofs associated to the edges │ │ │ │ │ -_1_2_3 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _1_,_ _F_i_e_l_d_ _> _T_e_s_t_E_d_g_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_1_2_4 typedef typename _T_e_s_t_E_d_g_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_E_d_g_e_B_a_s_i_s; │ │ │ │ │ -125 │ │ │ │ │ -126 // the tangent of the edges │ │ │ │ │ -_1_2_7 typedef FieldVector< Field, dimension > _T_a_n_g_e_n_t; │ │ │ │ │ -128 │ │ │ │ │ -129 // the normal and the tangents of the faces │ │ │ │ │ -_1_3_0 typedef FieldVector< Field, dimension > _N_o_r_m_a_l; │ │ │ │ │ -_1_3_1 typedef std::array,dim-1> _F_a_c_e_T_a_n_g_e_n_t_s; │ │ │ │ │ -132 │ │ │ │ │ -_1_3_3 _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () = default; │ │ │ │ │ -134 │ │ │ │ │ -_1_3_5 _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( const _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r & ) = │ │ │ │ │ -delete; │ │ │ │ │ -_1_3_6 _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r && ) = │ │ │ │ │ -delete; │ │ │ │ │ -137 │ │ │ │ │ -_1_3_8 _~_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () │ │ │ │ │ -139 { │ │ │ │ │ -140 _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( testBasis_ ); │ │ │ │ │ -141 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ -142 _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( f.basis_ ); │ │ │ │ │ -143 for( EdgeStructure& e : edgeStructure_ ) │ │ │ │ │ -144 _T_e_s_t_E_d_g_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( e.basis_ ); │ │ │ │ │ -145 } │ │ │ │ │ -146 │ │ │ │ │ -_1_4_7 unsigned int _t_o_p_o_l_o_g_y_I_d () const │ │ │ │ │ -148 { │ │ │ │ │ -149 return geometry_.id(); │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 GeometryType _t_y_p_e () const │ │ │ │ │ -153 { │ │ │ │ │ -154 return geometry_; │ │ │ │ │ -155 } │ │ │ │ │ -156 │ │ │ │ │ -_1_5_7 std::size_t _o_r_d_e_r () const │ │ │ │ │ -158 { │ │ │ │ │ -159 return order_; │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -162 // number of faces │ │ │ │ │ -_1_6_3 unsigned int _f_a_c_e_S_i_z_e () const │ │ │ │ │ -164 { │ │ │ │ │ -165 return numberOfFaces_; │ │ │ │ │ -166 } │ │ │ │ │ -167 │ │ │ │ │ -168 // number of edges │ │ │ │ │ -_1_6_9 unsigned int _e_d_g_e_S_i_z_e () const │ │ │ │ │ -170 { │ │ │ │ │ -171 return numberOfEdges_; │ │ │ │ │ -172 } │ │ │ │ │ -173 │ │ │ │ │ -174 // basis associated to the element │ │ │ │ │ -_1_7_5 _T_e_s_t_B_a_s_i_s *_t_e_s_t_B_a_s_i_s () const │ │ │ │ │ -176 { │ │ │ │ │ -177 return testBasis_; │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 // basis associated to face f │ │ │ │ │ -_1_8_1 _T_e_s_t_F_a_c_e_B_a_s_i_s *_t_e_s_t_F_a_c_e_B_a_s_i_s ( unsigned int f ) const │ │ │ │ │ -182 { │ │ │ │ │ -183 assert( f < _f_a_c_e_S_i_z_e() ); │ │ │ │ │ -184 return faceStructure_[ f ].basis_; │ │ │ │ │ -185 } │ │ │ │ │ -186 │ │ │ │ │ -187 // basis associated to edge e │ │ │ │ │ -_1_8_8 _T_e_s_t_E_d_g_e_B_a_s_i_s *_t_e_s_t_E_d_g_e_B_a_s_i_s ( unsigned int e ) const │ │ │ │ │ -189 { │ │ │ │ │ -190 assert( e < _e_d_g_e_S_i_z_e() ); │ │ │ │ │ -191 return edgeStructure_[ e ].basis_; │ │ │ │ │ -192 } │ │ │ │ │ -193 │ │ │ │ │ -_1_9_4 const _T_a_n_g_e_n_t& _e_d_g_e_T_a_n_g_e_n_t ( unsigned int e ) const │ │ │ │ │ -195 { │ │ │ │ │ -196 assert( e < _e_d_g_e_S_i_z_e() ); │ │ │ │ │ -197 return edgeStructure_[ e ].tangent_; │ │ │ │ │ -198 } │ │ │ │ │ -199 │ │ │ │ │ -_2_0_0 const _F_a_c_e_T_a_n_g_e_n_t_s& _f_a_c_e_T_a_n_g_e_n_t_s ( unsigned int f ) const │ │ │ │ │ -201 { │ │ │ │ │ -202 assert( f < _f_a_c_e_S_i_z_e() ); │ │ │ │ │ -203 return faceStructure_[ f ].faceTangents_; │ │ │ │ │ -204 } │ │ │ │ │ -205 │ │ │ │ │ -_2_0_6 const _N_o_r_m_a_l &_n_o_r_m_a_l ( unsigned int f ) const │ │ │ │ │ -207 { │ │ │ │ │ -208 assert( f < _f_a_c_e_S_i_z_e() ); │ │ │ │ │ -209 return faceStructure_[ f ].normal_; │ │ │ │ │ -210 } │ │ │ │ │ -211 │ │ │ │ │ -212 template< GeometryType::Id geometryId > │ │ │ │ │ -_2_1_3 void _b_u_i_l_d ( std::size_t _o_r_d_e_r ) │ │ │ │ │ -214 { │ │ │ │ │ -215 constexpr GeometryType geometry = geometryId; │ │ │ │ │ -216 order_ = _o_r_d_e_r; │ │ │ │ │ -217 geometry_ = geometry; │ │ │ │ │ -218 │ │ │ │ │ -219 /* │ │ │ │ │ -220 * The Nedelec parameter begins at 1. │ │ │ │ │ -221 * This is the numbering used by J.C. Nedelec himself. │ │ │ │ │ -222 * See "Mixed Finite Elements in \R^3" published in 1980. │ │ │ │ │ -223 * │ │ │ │ │ -224 * This construction is based on the construction of Raviart-Thomas │ │ │ │ │ -elements. │ │ │ │ │ -225 * There the numbering starts at 0. │ │ │ │ │ -226 * Because of this we reduce the order internally by 1. │ │ │ │ │ -227 */ │ │ │ │ │ -228 _o_r_d_e_r--; │ │ │ │ │ -229 │ │ │ │ │ -230 // if dimension == 2: order-1 on element │ │ │ │ │ -231 // if dimension == 3: order-2 on element │ │ │ │ │ -232 int requiredOrder = static_cast(_d_i_m_e_n_s_i_o_n==3); │ │ │ │ │ -233 testBasis_ = (_o_r_d_e_r > requiredOrder ? TestBasisFactory::template create< │ │ │ │ │ -geometry >( _o_r_d_e_r-1-requiredOrder ) : nullptr); │ │ │ │ │ -234 │ │ │ │ │ -235 const auto &refElement = ReferenceElements< Field, dimension >::general │ │ │ │ │ -( _t_y_p_e() ); │ │ │ │ │ -236 │ │ │ │ │ -237 numberOfFaces_ = refElement.size( 1 ); │ │ │ │ │ -238 faceStructure_.reserve( numberOfFaces_ ); │ │ │ │ │ -239 │ │ │ │ │ -240 // compute the basis, tangents and normals of each face │ │ │ │ │ -241 for (std::size_t i=0; i zero(0); │ │ │ │ │ -244 _F_a_c_e_T_a_n_g_e_n_t_s _f_a_c_e_T_a_n_g_e_n_t_s; │ │ │ │ │ -245 _f_a_c_e_T_a_n_g_e_n_t_s.fill(zero); │ │ │ │ │ -246 │ │ │ │ │ -247 // use the first dim-1 vertices of a face to compute the tangents │ │ │ │ │ -248 auto vertices = refElement.subEntities(i,1,dim).begin(); │ │ │ │ │ -249 auto vertex1 = *vertices; │ │ │ │ │ -250 for(int j=1; jvertex2) │ │ │ │ │ -259 _f_a_c_e_T_a_n_g_e_n_t_s[j-1] *=-1; │ │ │ │ │ -260 │ │ │ │ │ -261 vertex1 = vertex2; │ │ │ │ │ -262 } │ │ │ │ │ -263 │ │ │ │ │ -264 /* For simplices or cubes of arbitrary dimension you could just use │ │ │ │ │ -265 * │ │ │ │ │ -266 * ``` │ │ │ │ │ -267 * GeometryType faceGeometry = Impl::getBase(geometry_); │ │ │ │ │ -268 * TestFaceBasis *faceBasis = ( dim == 3 && order > 0 ? │ │ │ │ │ -TestFaceBasisFactory::template create< faceGeometry >( order-1 ) : nullptr); │ │ │ │ │ -269 * ``` │ │ │ │ │ -270 * │ │ │ │ │ -271 * For i.e. Prisms and Pyramids in 3d this does not work because they │ │ │ │ │ -contain squares and triangles as faces. │ │ │ │ │ -272 * And depending on the dynamic face index a different face geometry is │ │ │ │ │ -needed. │ │ │ │ │ -273 * │ │ │ │ │ -274 */ │ │ │ │ │ -275 _T_e_s_t_F_a_c_e_B_a_s_i_s *faceBasis = ( dim == 3 && _o_r_d_e_r > 0 ? Impl::IfGeometryType< │ │ │ │ │ -CreateFaceBasis, dimension-1 >::apply( refElement.type( i, 1 ), _o_r_d_e_r-1 ) : │ │ │ │ │ -nullptr); │ │ │ │ │ -276 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal │ │ │ │ │ -(i), _f_a_c_e_T_a_n_g_e_n_t_s ); │ │ │ │ │ -277 } │ │ │ │ │ -278 assert( faceStructure_.size() == numberOfFaces_ ); │ │ │ │ │ -279 │ │ │ │ │ -280 numberOfEdges_ = refElement.size( dim-1 ); │ │ │ │ │ -281 edgeStructure_.reserve( numberOfEdges_ ); │ │ │ │ │ -282 │ │ │ │ │ -283 // compute the basis and tangent of each edge │ │ │ │ │ -284 for (std::size_t i=0; iv1) │ │ │ │ │ -293 std::swap(v0,v1); │ │ │ │ │ -294 auto tangent = std::move(refElement.position(v1,dim) - refElement.position │ │ │ │ │ -(v0,dim)); │ │ │ │ │ -295 │ │ │ │ │ -296 _T_e_s_t_E_d_g_e_B_a_s_i_s *edgeBasis = Impl::IfGeometryType< CreateEdgeBasis, 1 >:: │ │ │ │ │ -apply( refElement.type( i, dim-1 ), _o_r_d_e_r ); │ │ │ │ │ -297 edgeStructure_.emplace_back( edgeBasis, tangent ); │ │ │ │ │ -298 } │ │ │ │ │ -299 assert( edgeStructure_.size() == numberOfEdges_ ); │ │ │ │ │ -300 } │ │ │ │ │ -301 │ │ │ │ │ -302 private: │ │ │ │ │ -303 │ │ │ │ │ -304 // helper struct for edges │ │ │ │ │ -305 struct EdgeStructure │ │ │ │ │ -306 { │ │ │ │ │ -307 EdgeStructure( _T_e_s_t_E_d_g_e_B_a_s_i_s *teb, const _T_a_n_g_e_n_t &t ) │ │ │ │ │ -308 : basis_( teb ), tangent_( t ) │ │ │ │ │ -309 {} │ │ │ │ │ -310 │ │ │ │ │ -311 _T_e_s_t_E_d_g_e_B_a_s_i_s *basis_; │ │ │ │ │ -312 const Dune::FieldVector< Field, dimension > tangent_; │ │ │ │ │ -313 }; │ │ │ │ │ -314 │ │ │ │ │ -315 template< GeometryType::Id edgeGeometryId > │ │ │ │ │ -316 struct CreateEdgeBasis │ │ │ │ │ -317 { │ │ │ │ │ -318 static _T_e_s_t_E_d_g_e_B_a_s_i_s *apply ( std::size_t _o_r_d_e_r ) { return │ │ │ │ │ -TestEdgeBasisFactory::template create< edgeGeometryId >( _o_r_d_e_r ); } │ │ │ │ │ -319 }; │ │ │ │ │ -320 │ │ │ │ │ -321 // helper struct for faces │ │ │ │ │ -322 struct FaceStructure │ │ │ │ │ -323 { │ │ │ │ │ -324 FaceStructure( _T_e_s_t_F_a_c_e_B_a_s_i_s *tfb, const _N_o_r_m_a_l& _n_o_r_m_a_l, const │ │ │ │ │ -_F_a_c_e_T_a_n_g_e_n_t_s& _f_a_c_e_T_a_n_g_e_n_t_s ) │ │ │ │ │ -325 : basis_( tfb ), normal_(_n_o_r_m_a_l), faceTangents_( _f_a_c_e_T_a_n_g_e_n_t_s ) │ │ │ │ │ -326 {} │ │ │ │ │ -327 │ │ │ │ │ -328 _T_e_s_t_F_a_c_e_B_a_s_i_s *basis_; │ │ │ │ │ -329 const Dune::FieldVector< Field, dimension > normal_; │ │ │ │ │ -330 const _F_a_c_e_T_a_n_g_e_n_t_s faceTangents_; │ │ │ │ │ -331 }; │ │ │ │ │ -332 │ │ │ │ │ -333 template< GeometryType::Id faceGeometryId > │ │ │ │ │ -334 struct CreateFaceBasis │ │ │ │ │ -335 { │ │ │ │ │ -336 static _T_e_s_t_F_a_c_e_B_a_s_i_s *apply ( std::size_t _o_r_d_e_r ) { return │ │ │ │ │ -TestFaceBasisFactory::template create< faceGeometryId >( _o_r_d_e_r ); } │ │ │ │ │ -337 }; │ │ │ │ │ -338 │ │ │ │ │ -339 _T_e_s_t_B_a_s_i_s *testBasis_ = nullptr; │ │ │ │ │ -340 std::vector< FaceStructure > faceStructure_; │ │ │ │ │ -341 unsigned int numberOfFaces_; │ │ │ │ │ -342 std::vector< EdgeStructure > edgeStructure_; │ │ │ │ │ -343 unsigned int numberOfEdges_; │ │ │ │ │ -344 GeometryType geometry_; │ │ │ │ │ -345 std::size_t order_; │ │ │ │ │ -346 }; │ │ │ │ │ -347 │ │ │ │ │ -348 │ │ │ │ │ -349 │ │ │ │ │ -350 // NedelecL2Interpolation │ │ │ │ │ -351 // ---------------------------- │ │ │ │ │ -352 │ │ │ │ │ -358 template< unsigned int dimension, class F> │ │ │ │ │ -_3_5_9 class _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -360 : public _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r< F ,dimension > │ │ │ │ │ -361 { │ │ │ │ │ -362 typedef _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -363 typedef _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_F_,_d_i_m_e_n_s_i_o_n_> _B_a_s_e; │ │ │ │ │ -364 │ │ │ │ │ -365 public: │ │ │ │ │ -_3_6_6 typedef F _F_i_e_l_d; │ │ │ │ │ -_3_6_7 typedef _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_e_n_s_i_o_n_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ -_3_6_8 typedef typename _B_u_i_l_d_e_r_:_:_F_a_c_e_T_a_n_g_e_n_t_s _F_a_c_e_T_a_n_g_e_n_t_s; │ │ │ │ │ -369 │ │ │ │ │ -_3_7_0 _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n() │ │ │ │ │ -371 : _o_r_d_e_r__(0), │ │ │ │ │ -372 _s_i_z_e__(0) │ │ │ │ │ -373 {} │ │ │ │ │ -374 │ │ │ │ │ -375 template< class Function, class Vector > │ │ │ │ │ -_3_7_6 auto _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, Vector &coefficients ) const │ │ │ │ │ -377 -> std::enable_if_t< std::is_same< decltype(std::declval().resize │ │ │ │ │ -(1) ),void >::value,void> │ │ │ │ │ -378 { │ │ │ │ │ -379 coefficients.resize(_s_i_z_e()); │ │ │ │ │ -380 typename Base::template _H_e_l_p_e_r_<_F_u_n_c_t_i_o_n_,_V_e_c_t_o_r_,_t_r_u_e_> func │ │ │ │ │ -( function,coefficients ); │ │ │ │ │ -381 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ -382 } │ │ │ │ │ -383 │ │ │ │ │ -384 template< class Basis, class Matrix > │ │ │ │ │ -_3_8_5 auto _i_n_t_e_r_p_o_l_a_t_e ( const Basis &basis, Matrix &matrix ) const │ │ │ │ │ -386 -> std::enable_if_t< std::is_same< │ │ │ │ │ -387 decltype(std::declval().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ -value,void> │ │ │ │ │ -388 { │ │ │ │ │ -389 matrix.resize( _s_i_z_e(), basis.size() ); │ │ │ │ │ -390 typename Base::template _H_e_l_p_e_r_<_B_a_s_i_s_,_M_a_t_r_i_x_,_f_a_l_s_e_> func( basis,matrix ); │ │ │ │ │ -391 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ -392 } │ │ │ │ │ -393 │ │ │ │ │ -_3_9_4 std::size_t _o_r_d_e_r() const │ │ │ │ │ -395 { │ │ │ │ │ -396 return _o_r_d_e_r__; │ │ │ │ │ -397 } │ │ │ │ │ -_3_9_8 std::size_t _s_i_z_e() const │ │ │ │ │ -399 { │ │ │ │ │ -400 return _s_i_z_e__; │ │ │ │ │ -401 } │ │ │ │ │ -402 │ │ │ │ │ -403 template │ │ │ │ │ -_4_0_4 void _b_u_i_l_d( std::size_t _o_r_d_e_r ) │ │ │ │ │ -405 { │ │ │ │ │ -406 _s_i_z_e__ = 0; │ │ │ │ │ -407 _o_r_d_e_r__ = _o_r_d_e_r; │ │ │ │ │ -408 _b_u_i_l_d_e_r__.template build(_o_r_d_e_r__); │ │ │ │ │ -409 if (_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -410 _s_i_z_e__ += dimension*_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()->_s_i_z_e(); │ │ │ │ │ -411 │ │ │ │ │ -412 for ( unsigned int f=0; f<_b_u_i_l_d_e_r__._f_a_c_e_S_i_z_e(); ++f ) │ │ │ │ │ -413 if (_b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)) │ │ │ │ │ -414 _s_i_z_e__ += (dimension-1)*_b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e(); │ │ │ │ │ -415 │ │ │ │ │ -416 for ( unsigned int e=0; e<_b_u_i_l_d_e_r__._e_d_g_e_S_i_z_e(); ++e ) │ │ │ │ │ -417 if (_b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)) │ │ │ │ │ -418 _s_i_z_e__ += _b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)->_s_i_z_e(); │ │ │ │ │ -419 } │ │ │ │ │ -420 │ │ │ │ │ -_4_2_1 void _s_e_t_L_o_c_a_l_K_e_y_s(std::vector< LocalKey > &keys) const │ │ │ │ │ -422 { │ │ │ │ │ -423 keys.resize(_s_i_z_e()); │ │ │ │ │ -424 unsigned int row = 0; │ │ │ │ │ -425 for (unsigned int e=0; e<_b_u_i_l_d_e_r__._e_d_g_e_S_i_z_e(); ++e) │ │ │ │ │ -426 { │ │ │ │ │ -427 if (_b_u_i_l_d_e_r__._e_d_g_e_S_i_z_e()) │ │ │ │ │ -428 for (unsigned int i=0; i<_b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)->_s_i_z_e(); ++i,++row) │ │ │ │ │ -429 keys[row] = _L_o_c_a_l_K_e_y(e,dimension-1,i); │ │ │ │ │ -430 } │ │ │ │ │ -431 for (unsigned int f=0; f<_b_u_i_l_d_e_r__._f_a_c_e_S_i_z_e(); ++f) │ │ │ │ │ -432 { │ │ │ │ │ -433 if (_b_u_i_l_d_e_r__._f_a_c_e_S_i_z_e()) │ │ │ │ │ -434 for (unsigned int i=0; i<_b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e()*(dimension-1); │ │ │ │ │ -++i,++row) │ │ │ │ │ -435 keys[row] = _L_o_c_a_l_K_e_y(f,1,i); │ │ │ │ │ -436 } │ │ │ │ │ -437 │ │ │ │ │ -438 if (_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -439 for (unsigned int i=0; i<_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()->_s_i_z_e()*dimension; ++i,++row) │ │ │ │ │ -440 keys[row] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ -441 assert( row == _s_i_z_e() ); │ │ │ │ │ -442 } │ │ │ │ │ -443 │ │ │ │ │ -444 protected: │ │ │ │ │ -445 template< class Func, class Container, bool type > │ │ │ │ │ -_4_4_6 void _i_n_t_e_r_p_o_l_a_t_e ( typename Base::template _H_e_l_p_e_r_<_F_u_n_c_,_C_o_n_t_a_i_n_e_r_,_t_y_p_e_> │ │ │ │ │ -&func ) const │ │ │ │ │ -447 { │ │ │ │ │ -448 const Dune::GeometryType geoType( _b_u_i_l_d_e_r__._t_o_p_o_l_o_g_y_I_d(), dimension ); │ │ │ │ │ -449 │ │ │ │ │ -450 std::vector testBasisVal; │ │ │ │ │ -451 │ │ │ │ │ -452 for (unsigned int i=0; i<_s_i_z_e(); ++i) │ │ │ │ │ -453 for (unsigned int j=0; j EdgeQuadrature; │ │ │ │ │ -460 typedef Dune::QuadratureRules EdgeQuadratureRules; │ │ │ │ │ -461 │ │ │ │ │ -462 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ -general( geoType ); │ │ │ │ │ -463 │ │ │ │ │ -464 for (unsigned int e=0; e<_b_u_i_l_d_e_r__._e_d_g_e_S_i_z_e(); ++e) │ │ │ │ │ -465 { │ │ │ │ │ -466 if (!_b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)) │ │ │ │ │ -467 continue; │ │ │ │ │ -468 testBasisVal.resize(_b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)->_s_i_z_e()); │ │ │ │ │ -469 │ │ │ │ │ -470 const auto &geometry = refElement.template geometry< dimension-1 >( e ); │ │ │ │ │ -471 const Dune::GeometryType subGeoType( geometry.type().id(), 1 ); │ │ │ │ │ -472 const EdgeQuadrature &edgeQuad = EdgeQuadratureRules::rule( subGeoType, │ │ │ │ │ -2*_o_r_d_e_r__+2 ); │ │ │ │ │ -473 │ │ │ │ │ -474 const unsigned int quadratureSize = edgeQuad.size(); │ │ │ │ │ -475 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ -476 { │ │ │ │ │ -477 if (dimension>1) │ │ │ │ │ -478 _b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)->template evaluate<0>(edgeQuad[qi].position │ │ │ │ │ -(),testBasisVal); │ │ │ │ │ -479 else │ │ │ │ │ -480 testBasisVal[0] = 1.; │ │ │ │ │ -481 computeEdgeDofs(row, │ │ │ │ │ -482 testBasisVal, │ │ │ │ │ -483 func.evaluate( geometry.global( edgeQuad[qi].position() ) ), │ │ │ │ │ -484 _b_u_i_l_d_e_r__._e_d_g_e_T_a_n_g_e_n_t(e), │ │ │ │ │ -485 edgeQuad[qi].weight(), │ │ │ │ │ -486 func); │ │ │ │ │ -487 } │ │ │ │ │ -488 │ │ │ │ │ -489 row += _b_u_i_l_d_e_r__._t_e_s_t_E_d_g_e_B_a_s_i_s(e)->_s_i_z_e(); │ │ │ │ │ -490 } │ │ │ │ │ -491 │ │ │ │ │ -492 // face dofs: │ │ │ │ │ -493 typedef Dune::QuadratureRule<_F_i_e_l_d, dimension-1> FaceQuadrature; │ │ │ │ │ -494 typedef Dune::QuadratureRules<_F_i_e_l_d, dimension-1> FaceQuadratureRules; │ │ │ │ │ -495 │ │ │ │ │ -496 for (unsigned int f=0; f<_b_u_i_l_d_e_r__._f_a_c_e_S_i_z_e(); ++f) │ │ │ │ │ -497 { │ │ │ │ │ -498 if (_b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)) │ │ │ │ │ -499 { │ │ │ │ │ -500 testBasisVal.resize(_b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e()); │ │ │ │ │ -501 │ │ │ │ │ -502 const auto &geometry = refElement.template geometry< 1 >( f ); │ │ │ │ │ -503 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 ); │ │ │ │ │ -504 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, │ │ │ │ │ -2*_o_r_d_e_r__+2 ); │ │ │ │ │ -505 │ │ │ │ │ -506 const unsigned int quadratureSize = faceQuad.size(); │ │ │ │ │ -507 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ -508 { │ │ │ │ │ -509 if (dimension>1) │ │ │ │ │ -510 _b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->template evaluate<0>(faceQuad[qi].position │ │ │ │ │ -(),testBasisVal); │ │ │ │ │ -511 else │ │ │ │ │ -512 testBasisVal[0] = 1.; │ │ │ │ │ -513 │ │ │ │ │ -514 computeFaceDofs( row, │ │ │ │ │ -515 testBasisVal, │ │ │ │ │ -516 func.evaluate( geometry.global( faceQuad[qi].position() ) ), │ │ │ │ │ -517 _b_u_i_l_d_e_r__._f_a_c_e_T_a_n_g_e_n_t_s(f), │ │ │ │ │ -518 _b_u_i_l_d_e_r__._n_o_r_m_a_l(f), │ │ │ │ │ -519 faceQuad[qi].weight(), │ │ │ │ │ -520 func); │ │ │ │ │ -521 } │ │ │ │ │ -522 │ │ │ │ │ -523 row += _b_u_i_l_d_e_r__._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e()*(dimension-1); │ │ │ │ │ -524 } │ │ │ │ │ -525 } │ │ │ │ │ -526 │ │ │ │ │ -527 // element dofs │ │ │ │ │ -528 if (_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -529 { │ │ │ │ │ -530 testBasisVal.resize(_b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()->_s_i_z_e()); │ │ │ │ │ -531 │ │ │ │ │ -532 typedef Dune::QuadratureRule Quadrature; │ │ │ │ │ -533 typedef Dune::QuadratureRules QuadratureRules; │ │ │ │ │ -534 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*_o_r_d_e_r__+1 ); │ │ │ │ │ -535 │ │ │ │ │ -536 const unsigned int quadratureSize = elemQuad.size(); │ │ │ │ │ -537 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ -538 { │ │ │ │ │ -539 _b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()->template evaluate<0>(elemQuad[qi].position │ │ │ │ │ -(),testBasisVal); │ │ │ │ │ -540 computeInteriorDofs(row, │ │ │ │ │ -541 testBasisVal, │ │ │ │ │ -542 func.evaluate(elemQuad[qi].position()), │ │ │ │ │ -543 elemQuad[qi].weight(), │ │ │ │ │ -544 func ); │ │ │ │ │ -545 } │ │ │ │ │ -546 │ │ │ │ │ -547 row += _b_u_i_l_d_e_r__._t_e_s_t_B_a_s_i_s()->_s_i_z_e()*dimension; │ │ │ │ │ -548 } │ │ │ │ │ -549 assert(row==_s_i_z_e()); │ │ │ │ │ -550 } │ │ │ │ │ -551 │ │ │ │ │ -552 private: │ │ │ │ │ -562 template │ │ │ │ │ -563 void computeEdgeDofs (unsigned int startRow, │ │ │ │ │ -564 const MVal &mVal, │ │ │ │ │ -565 const NedVal &nedVal, │ │ │ │ │ -566 const FieldVector &tangent, │ │ │ │ │ -567 const _F_i_e_l_d &weight, │ │ │ │ │ -568 Matrix &matrix) const │ │ │ │ │ -569 { │ │ │ │ │ -570 const unsigned int endRow = startRow+mVal.size(); │ │ │ │ │ -571 typename NedVal::const_iterator nedIter = nedVal.begin(); │ │ │ │ │ -572 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col) │ │ │ │ │ -573 { │ │ │ │ │ -574 _F_i_e_l_d cFactor = (*nedIter)*tangent; │ │ │ │ │ -575 typename MVal::const_iterator mIter = mVal.begin(); │ │ │ │ │ -576 for (unsigned int row = startRow; row!=endRow; ++mIter, ++row ) │ │ │ │ │ -577 matrix.add(row,col, (weight*cFactor)*(*mIter) ); │ │ │ │ │ -578 │ │ │ │ │ -579 assert( mIter == mVal.end() ); │ │ │ │ │ -580 } │ │ │ │ │ -581 } │ │ │ │ │ -582 │ │ │ │ │ -593 template │ │ │ │ │ -594 void computeFaceDofs (unsigned int startRow, │ │ │ │ │ -595 const MVal &mVal, │ │ │ │ │ -596 const NedVal &nedVal, │ │ │ │ │ -597 const _F_a_c_e_T_a_n_g_e_n_t_s& faceTangents, │ │ │ │ │ -598 const FieldVector &normal, │ │ │ │ │ -599 const _F_i_e_l_d &weight, │ │ │ │ │ -600 Matrix &matrix) const │ │ │ │ │ -601 { │ │ │ │ │ -602 const unsigned int endRow = startRow+mVal.size()*(dimension-1); │ │ │ │ │ -603 typename NedVal::const_iterator nedIter = nedVal.begin(); │ │ │ │ │ -604 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col) │ │ │ │ │ -605 { │ │ │ │ │ -606 auto const& u=*nedIter; │ │ │ │ │ -607 auto const& n=normal; │ │ │ │ │ -608 FieldVector nedTimesNormal = { u[1]*n[2]-u[2]*n[1], │ │ │ │ │ -609 u[2]*n[0]-u[0]*n[2], │ │ │ │ │ -610 u[0]*n[1]-u[1]*n[0]}; │ │ │ │ │ -611 typename MVal::const_iterator mIter = mVal.begin(); │ │ │ │ │ -612 for (unsigned int row = startRow; row!=endRow; ++mIter) │ │ │ │ │ -613 { │ │ │ │ │ -614 for(int i=0; i │ │ │ │ │ -635 void computeInteriorDofs (unsigned int startRow, │ │ │ │ │ -636 const MVal &mVal, │ │ │ │ │ -637 const NedVal &nedVal, │ │ │ │ │ -638 _F_i_e_l_d weight, │ │ │ │ │ -639 Matrix &matrix) const │ │ │ │ │ -640 { │ │ │ │ │ -641 const unsigned int endRow = startRow+mVal.size()*dimension; │ │ │ │ │ -642 typename NedVal::const_iterator nedIter = nedVal.begin(); │ │ │ │ │ -643 for ( unsigned int col = 0; col < nedVal.size() ; ++nedIter,++col) │ │ │ │ │ -644 { │ │ │ │ │ -645 typename MVal::const_iterator mIter = mVal.begin(); │ │ │ │ │ -646 for (unsigned int row = startRow; row!=endRow; ++mIter,row+=dimension ) │ │ │ │ │ -647 for (unsigned int i=0; i │ │ │ │ │ -_6_6_1 struct _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -662 { │ │ │ │ │ -_6_6_3 typedef _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ -_6_6_4 typedef const _N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_F_i_e_l_d_> _O_b_j_e_c_t; │ │ │ │ │ -_6_6_5 typedef std::size_t _K_e_y; │ │ │ │ │ -_6_6_6 typedef typename std::remove_const::type _N_o_n_C_o_n_s_t_O_b_j_e_c_t; │ │ │ │ │ -667 │ │ │ │ │ -668 template │ │ │ │ │ -_6_6_9 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ -670 { │ │ │ │ │ -671 if ( !supports(key) ) │ │ │ │ │ -672 return 0; │ │ │ │ │ -673 _N_o_n_C_o_n_s_t_O_b_j_e_c_t *interpol = new _N_o_n_C_o_n_s_t_O_b_j_e_c_t(); │ │ │ │ │ -674 interpol->template build(key); │ │ │ │ │ -675 return interpol; │ │ │ │ │ -676 } │ │ │ │ │ -677 │ │ │ │ │ -678 template │ │ │ │ │ -_6_7_9 static bool _s_u_p_p_o_r_t_s( const _K_e_y &key ) │ │ │ │ │ -680 { │ │ │ │ │ -681 GeometryType gt = geometryId; │ │ │ │ │ -682 return gt.isTriangle() || gt.isTetrahedron() ; │ │ │ │ │ -683 } │ │ │ │ │ -_6_8_4 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -685 }; │ │ │ │ │ -686 │ │ │ │ │ -687} // namespace Dune │ │ │ │ │ -688 │ │ │ │ │ -689#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_NEDELEC_NEDELECSIMPLEX_NEDELECSIMPLEXINTERPOLATION_HH │ │ │ │ │ -_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +77 return 1; │ │ │ │ │ +78 } │ │ │ │ │ +_7_9 const Func &_f_u_n_c__; │ │ │ │ │ +_8_0 Vector &_v_e_c__; │ │ │ │ │ +_8_1 mutable _R_e_s_u_l_t _t_m_p__; │ │ │ │ │ +82 }; │ │ │ │ │ +83 template │ │ │ │ │ +84 template │ │ │ │ │ +_8_5 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r::_H_e_l_p_e_r │ │ │ │ │ +86 // Func is of Basis type │ │ │ │ │ +87 { │ │ │ │ │ +_8_8 typedef std::vector< Dune::FieldVector > _R_e_s_u_l_t; │ │ │ │ │ +_8_9 _H_e_l_p_e_r(const Basis & basis, Matrix &matrix) │ │ │ │ │ +90 : basis_(basis), │ │ │ │ │ +91 matrix_(matrix), │ │ │ │ │ +92 tmp_(basis.size()) {} │ │ │ │ │ +_9_3 const F &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int col) const │ │ │ │ │ +94 { │ │ │ │ │ +95 return matrix_(row,col); │ │ │ │ │ +96 } │ │ │ │ │ +_9_7 F &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int col) │ │ │ │ │ +98 { │ │ │ │ │ +99 return matrix_(row,col); │ │ │ │ │ +100 } │ │ │ │ │ +101 template │ │ │ │ │ +_1_0_2 void _s_e_t(unsigned int row,unsigned int col, │ │ │ │ │ +103 const Fy &val) │ │ │ │ │ +104 { │ │ │ │ │ +105 assert(col │ │ │ │ │ +_1_1_0 void _a_d_d(unsigned int row,unsigned int col, │ │ │ │ │ +111 const Fy &val) │ │ │ │ │ +112 { │ │ │ │ │ +113 assert(col │ │ │ │ │ +_1_1_8 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ +119 { │ │ │ │ │ +120 basis_.template evaluate<0>(x,tmp_); │ │ │ │ │ +121 return tmp_; │ │ │ │ │ +122 } │ │ │ │ │ +_1_2_3 unsigned int _s_i_z_e() const │ │ │ │ │ +124 { │ │ │ │ │ +125 return basis_.size(); │ │ │ │ │ +126 } │ │ │ │ │ +127 │ │ │ │ │ +_1_2_8 const Basis &_b_a_s_i_s__; │ │ │ │ │ +_1_2_9 Matrix &_m_a_t_r_i_x__; │ │ │ │ │ +_1_3_0 mutable _R_e_s_u_l_t _t_m_p__; │ │ │ │ │ +131 }; │ │ │ │ │ +132} │ │ │ │ │ +133#endif // GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ +_f_i_e_l_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:662 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:669 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const NedelecL2Interpolation< dim, Field > Object │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:664 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_B_u_i_l_d_e_r │ │ │ │ │ -NedelecL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:663 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:665 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:679 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_N_o_n_C_o_n_s_t_O_b_j_e_c_t │ │ │ │ │ -std::remove_const< Object >::type NonConstObject │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:666 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:684 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ -LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const LocalCoefficientsContainer Object │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_E_d_g_e_B_a_s_i_s │ │ │ │ │ -TestEdgeBasis * testEdgeBasis(unsigned int e) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:188 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_~_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -~NedelecL2InterpolationBuilder() │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s │ │ │ │ │ -TestBasisFactory::Object TestBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_a_n_g_e_n_t │ │ │ │ │ -FieldVector< Field, dimension > Tangent │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ -TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:120 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ -TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_E_d_g_e_B_a_s_i_s │ │ │ │ │ -TestEdgeBasisFactory::Object TestEdgeBasis │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:124 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_o_r_m_a_l │ │ │ │ │ -FieldVector< Field, dimension > Normal │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_b_u_i_l_d │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:213 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_f_a_c_e_T_a_n_g_e_n_t_s │ │ │ │ │ -const FaceTangents & faceTangents(unsigned int f) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:200 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_f_a_c_e_S_i_z_e │ │ │ │ │ -unsigned int faceSize() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:163 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_B_a_s_i_s │ │ │ │ │ -TestBasis * testBasis() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:175 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_F_a_c_e_T_a_n_g_e_n_t_s │ │ │ │ │ -std::array< FieldVector< Field, dimension >, dim-1 > FaceTangents │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_E_d_g_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -OrthonormalBasisFactory< 1, Field > TestEdgeBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_e_d_g_e_T_a_n_g_e_n_t │ │ │ │ │ -const Tangent & edgeTangent(unsigned int e) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:194 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -NedelecL2InterpolationBuilder(NedelecL2InterpolationBuilder &&)=delete │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_e_d_g_e_S_i_z_e │ │ │ │ │ -unsigned int edgeSize() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:169 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ │ -unsigned int topologyId() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -NedelecL2InterpolationBuilder(const NedelecL2InterpolationBuilder &)=delete │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -NedelecL2InterpolationBuilder()=default │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_n_o_r_m_a_l │ │ │ │ │ -const Normal & normal(unsigned int f) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:206 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -An L2-based interpolation for Nedelec. │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:361 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_F_a_c_e_T_a_n_g_e_n_t_s │ │ │ │ │ -Builder::FaceTangents FaceTangents │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:368 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:366 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -auto interpolate(const Function &function, Vector &coefficients) const -> std:: │ │ │ │ │ -enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void │ │ │ │ │ ->::value, void > │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:376 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:398 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ -const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:446 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_o_r_d_e_r__ │ │ │ │ │ -std::size_t order_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:656 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_B_u_i_l_d_e_r │ │ │ │ │ -NedelecL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:367 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< │ │ │ │ │ -std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix:: │ │ │ │ │ -Field * >::value, void > │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:385 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_i_z_e__ │ │ │ │ │ -std::size_t size_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:657 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -NedelecL2Interpolation() │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:370 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_b_u_i_l_d │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:404 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:394 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_e_t_L_o_c_a_l_K_e_y_s │ │ │ │ │ -void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:421 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_b_u_i_l_d_e_r__ │ │ │ │ │ -Builder builder_ │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:655 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ +void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ +a helper class to cast from one field to another │ │ │ │ │ +DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ DDeeffiinniittiioonn interpolationhelper.hh:22 │ │ │ │ │ _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r │ │ │ │ │ DDeeffiinniittiioonn interpolationhelper.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_a_d_d │ │ │ │ │ +void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_f_u_n_c__ │ │ │ │ │ +const Func & func_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_H_e_l_p_e_r │ │ │ │ │ +Helper(const Func &func, Vector &vec) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +const Result & evaluate(const DomainVector &x) const │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_R_e_s_u_l_t │ │ │ │ │ +std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:31 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:113 │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_v_e_c__ │ │ │ │ │ +Vector & vec_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_s_e_t │ │ │ │ │ +void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_t_m_p__ │ │ │ │ │ +Result tmp_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:81 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const Vector::value_type & operator()(unsigned int row, unsigned int col) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_b_a_s_i_s__ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:128 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +const Result & evaluate(const DomainVector &x) const │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +F & operator()(unsigned int row, unsigned int col) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:97 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_s_e_t │ │ │ │ │ +void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_H_e_l_p_e_r │ │ │ │ │ +Helper(const Basis &basis, Matrix &matrix) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:89 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_t_m_p__ │ │ │ │ │ +Result tmp_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:130 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_a_d_d │ │ │ │ │ +void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_R_e_s_u_l_t │ │ │ │ │ +std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_m_a_t_r_i_x__ │ │ │ │ │ +Matrix & matrix_ │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:129 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ +const F & operator()(unsigned int row, unsigned int col) const │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:93 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindcube.hh File Reference │ │ │ │ +dune-localfunctions: l2interpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
nedelec1stkindcube.hh File Reference
│ │ │ │ +
l2interpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +
#include <dune/common/concept.hh>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ #include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Nedelec1stKindCubeLocalFiniteElement< D, R, dim, k >
 Nédélec elements of the first kind for cube elements. More...
class  Dune::LocalL2InterpolationBase< B, Q >
 
struct  Dune::LocalL2Interpolation< B, Q, true >
 
struct  Dune::LocalL2Interpolation< B, Q, false >
 
struct  Dune::LocalL2InterpolationFactory< BasisFactory, onb >
 A factory class for the local l2 interpolations taking a basis factory. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -nedelec1stkindcube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +l2interpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ -  Nédélec elements of the first kind for cube elements. _M_o_r_e_._._. │ │ │ │ │ + class   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_ _B_,_ _Q_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _t_r_u_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _> │ │ │ │ │ +  │ │ │ │ │ +struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _B_a_s_i_s_F_a_c_t_o_r_y_,_ _o_n_b_ _> │ │ │ │ │ +  A factory class for the local l2 interpolations taking a basis │ │ │ │ │ + factory. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00158_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindcube.hh Source File │ │ │ │ +dune-localfunctions: l2interpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,520 +70,279 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec1stkindcube.hh
│ │ │ │ +
l2interpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH
│ │ │ │ +
5#ifndef DUNE_L2INTERPOLATION_HH
│ │ │ │ +
6#define DUNE_L2INTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <dune/common/concept.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/math.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ -
19#include <dune/localfunctions/common/localinterpolation.hh> // For deprecated makeFunctionWithCallOperator
│ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune
│ │ │ │ -
23{
│ │ │ │ -
24namespace Impl
│ │ │ │ -
25{
│ │ │ │ -
36 template<class D, class R, int dim, int k>
│ │ │ │ -
37 class Nedelec1stKindCubeLocalBasis
│ │ │ │ -
38 {
│ │ │ │ -
39 // Number of edges of the reference cube
│ │ │ │ -
40 constexpr static std::size_t numberOfEdges = power(2,dim-1)*dim;
│ │ │ │ -
41
│ │ │ │ -
42 public:
│ │ │ │ -
43 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,
│ │ │ │ -
44 R,dim,FieldVector<R,dim>,
│ │ │ │ -
45 FieldMatrix<R,dim,dim> >;
│ │ │ │ -
46
│ │ │ │ -
53 Nedelec1stKindCubeLocalBasis()
│ │ │ │ -
54 {
│ │ │ │ -
55 std::fill(edgeOrientation_.begin(), edgeOrientation_.end(), 1.0);
│ │ │ │ -
56 }
│ │ │ │ -
57
│ │ │ │ -
60 Nedelec1stKindCubeLocalBasis(std::bitset<numberOfEdges> edgeOrientation)
│ │ │ │ -
61 : Nedelec1stKindCubeLocalBasis()
│ │ │ │ -
62 {
│ │ │ │ -
63 for (std::size_t i=0; i<edgeOrientation_.size(); i++)
│ │ │ │ -
64 edgeOrientation_[i] *= edgeOrientation[i] ? -1.0 : 1.0;
│ │ │ │ -
65 }
│ │ │ │ -
66
│ │ │ │ -
68 static constexpr unsigned int size()
│ │ │ │ -
69 {
│ │ │ │ -
70 static_assert(dim==2 || dim==3, "Nedelec shape functions are implemented only for 2d and 3d cubes.");
│ │ │ │ -
71 if (dim==2)
│ │ │ │ -
72 return 2*k * (k+1);
│ │ │ │ -
73 if (dim==3)
│ │ │ │ -
74 return 3*k * (k+1) * (k+1);
│ │ │ │ -
75 }
│ │ │ │ -
76
│ │ │ │ -
82 void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
83 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
84 {
│ │ │ │ -
85 static_assert(k==1, "Evaluating Nédélec shape functions is implemented only for first order.");
│ │ │ │ -
86 out.resize(size());
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
32 template< class B, class Q, bool onb >
│ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
35 template< class B, class Q >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {
│ │ │ │ + │ │ │ │ +
39
│ │ │ │ +
40 public:
│ │ │ │ +
41 typedef B Basis;
│ │ │ │ +
42 typedef Q Quadrature;
│ │ │ │ +
43
│ │ │ │ +
44 static const unsigned int dimension = Basis::dimension;
│ │ │ │ +
45
│ │ │ │ +
47 template< class Function, class DofField, std::enable_if_t<models<Impl::FunctionWithEvaluate<typename Function::DomainType, typename Function::RangeType>, Function>(), int> = 0 >
│ │ │ │ +
│ │ │ │ +
48 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ +
49 {
│ │ │ │ +
50 typedef typename Quadrature::iterator Iterator;
│ │ │ │ +
51 typedef FieldVector< DofField, Basis::dimRange > RangeVector;
│ │ │ │ +
52
│ │ │ │ +
53 const unsigned int size = basis().size();
│ │ │ │ +
54 static std::vector< RangeVector > basisValues( size );
│ │ │ │ +
55
│ │ │ │ +
56 coefficients.resize( size );
│ │ │ │ +
57 basisValues.resize( size );
│ │ │ │ +
58 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
59 coefficients[ i ] = Zero< DofField >();
│ │ │ │ +
60
│ │ │ │ +
61 const Iterator end = quadrature().end();
│ │ │ │ +
62 for( Iterator it = quadrature().begin(); it != end; ++it )
│ │ │ │ +
63 {
│ │ │ │ +
64 basis().evaluate( it->position(), basisValues );
│ │ │ │ +
65 typename Function::RangeType val;
│ │ │ │ +
66 function.evaluate( field_cast<typename Function::DomainType::field_type>(it->position()), val );
│ │ │ │ +
67 RangeVector factor = field_cast< DofField >( val );
│ │ │ │ +
68 factor *= field_cast< DofField >( it->weight() );
│ │ │ │ +
69 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
70 coefficients[ i ] += factor * basisValues[ i ];
│ │ │ │ +
71 }
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
75 template< class Function, class DofField, std::enable_if_t<models<Impl::FunctionWithCallOperator<typename Quadrature::value_type::Vector>, Function>(), int> = 0 >
│ │ │ │ +
│ │ │ │ +
76 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ +
77 {
│ │ │ │ +
78 typedef FieldVector< DofField, Basis::dimRange > RangeVector;
│ │ │ │ +
79
│ │ │ │ +
80 const unsigned int size = basis().size();
│ │ │ │ +
81 static std::vector< RangeVector > basisValues( size );
│ │ │ │ +
82
│ │ │ │ +
83 coefficients.resize( size );
│ │ │ │ +
84 basisValues.resize( size );
│ │ │ │ +
85 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
86 coefficients[ i ] = Zero< DofField >();
│ │ │ │
87
│ │ │ │ -
88 if (dim==2)
│ │ │ │ +
88 for (auto&& qp : quadrature())
│ │ │ │
89 {
│ │ │ │ -
90 // First-order Nédélec shape functions on a square are of the form
│ │ │ │ -
91 //
│ │ │ │ -
92 // (a, b)^T + (c y, d x)^T, a, b, c, d \in R
│ │ │ │ -
93 //
│ │ │ │ -
94 // The following coefficients create the four basis vectors
│ │ │ │ -
95 // that are dual to the edge degrees of freedom:
│ │ │ │ -
96 //
│ │ │ │ -
97 // a[0] = 0 b[0] = 1 c[0] = 0 d[0] = -1
│ │ │ │ -
98 // a[1] = 0 b[1] = 0 c[1] = 0 d[1] = 1
│ │ │ │ -
99 // a[2] = 1 b[2] = 0 c[2] = 0 d[2] = -1
│ │ │ │ -
100 // a[3] = 0 b[3] = 0 c[3] = 0 d[3] = 1
│ │ │ │ -
101
│ │ │ │ -
102 out[0] = { 0, D(1) - in[0]};
│ │ │ │ -
103 out[1] = { 0, in[0]};
│ │ │ │ -
104 out[2] = { D(1) - in[1], 0};
│ │ │ │ -
105 out[3] = { in[1], 0};
│ │ │ │ -
106 }
│ │ │ │ -
107
│ │ │ │ -
108 if constexpr (dim==3)
│ │ │ │ -
109 {
│ │ │ │ -
110 // First-order Nédélec shape functions on a cube are of the form
│ │ │ │ -
111 //
│ │ │ │ -
112 // (e1 yz)
│ │ │ │ -
113 // a + b x + c y + d z + (e2 xz) , a, b, c, d \in R^3 and b[0]=c[1]=d[2]=0
│ │ │ │ -
114 // (e3 xy)
│ │ │ │ -
115 //
│ │ │ │ -
116 // The following coefficients create the twelve basis vectors
│ │ │ │ -
117 // that are dual to the edge degrees of freedom:
│ │ │ │ -
118 //
│ │ │ │ -
119 // a[0] = { 0, 0, 1} b[0] = { 0, 0, -1} c[0] = { 0, 0, -1} d[0] = { 0, 0, 0} e[0] = { 0, 0, 1}
│ │ │ │ -
120 // a[1] = { 0, 0, 0} b[1] = { 0, 0, 1} c[1] = { 0, 0, 0} d[1] = { 0, 0, 0} e[1] = { 0, 0, -1}
│ │ │ │ -
121 // a[2] = { 0, 0, 0} b[2] = { 0, 0, 0} c[2] = { 0, 0, 1} d[2] = { 0, 0, 0} e[2] = { 0, 0, -1}
│ │ │ │ -
122 // a[3] = { 0, 0, 0} b[3] = { 0, 0, 0} c[3] = { 0, 0, 0} d[3] = { 0, 0, 0} e[3] = { 0, 0, 1}
│ │ │ │ -
123 //
│ │ │ │ -
124 // The following implementation uses these values, and simply
│ │ │ │ -
125 // skips all the zeros.
│ │ │ │ -
126
│ │ │ │ -
127 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
128 out[i] = {0,0,0};
│ │ │ │ -
129
│ │ │ │ -
130 out[0][2] = { 1 - in[0] - in[1] + in[0]*in[1]};
│ │ │ │ -
131 out[1][2] = { in[0] - in[0]*in[1]};
│ │ │ │ -
132 out[2][2] = { in[1] - in[0]*in[1]};
│ │ │ │ -
133 out[3][2] = { in[0]*in[1]};
│ │ │ │ -
134
│ │ │ │ -
135 out[4][1] = { 1 - in[0] - in[2] + in[0]*in[2]};
│ │ │ │ -
136 out[5][1] = { in[0] - in[0]*in[2]};
│ │ │ │ -
137 out[8][1] = { in[2] - in[0]*in[2]};
│ │ │ │ -
138 out[9][1] = { in[0]*in[2]};
│ │ │ │ -
139
│ │ │ │ -
140 out[6][0] = { 1 - in[1] - in[2] + in[1]*in[2]};
│ │ │ │ -
141 out[7][0] = { in[1] - in[1]*in[2]};
│ │ │ │ -
142 out[10][0] = { in[2] - in[1]*in[2]};
│ │ │ │ -
143 out[11][0] = { in[1]*in[2]};
│ │ │ │ -
144 }
│ │ │ │ -
145
│ │ │ │ -
146 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
147 out[i] *= edgeOrientation_[i];
│ │ │ │ -
148 }
│ │ │ │ -
149
│ │ │ │ -
155 void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
156 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
157 {
│ │ │ │ -
158 out.resize(size());
│ │ │ │ -
159 if (dim==2)
│ │ │ │ -
160 {
│ │ │ │ -
161 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
162 for (std::size_t j=0; j<dim; j++)
│ │ │ │ -
163 out[i][j] = { 0, 0};
│ │ │ │ -
164
│ │ │ │ -
165 out[0][1] = { -1, 0};
│ │ │ │ -
166 out[1][1] = { 1, 0};
│ │ │ │ +
90 basis().evaluate( qp.position(), basisValues );
│ │ │ │ +
91 auto val = function( qp.position() );
│ │ │ │ +
92 RangeVector factor = field_cast< DofField >( val );
│ │ │ │ +
93 factor *= field_cast< DofField >( qp.weight() );
│ │ │ │ +
94 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ +
95 coefficients[ i ] += factor * basisValues[ i ];
│ │ │ │ +
96 }
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │ +
98
│ │ │ │ +
│ │ │ │ +
99 const Basis &basis () const
│ │ │ │ +
100 {
│ │ │ │ +
101 return basis_;
│ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
104 const Quadrature &quadrature () const
│ │ │ │ +
105 {
│ │ │ │ +
106 return quadrature_;
│ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │ +
109 protected:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
111 : basis_( basis ),
│ │ │ │ + │ │ │ │ +
113 {}
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
115 const Basis &basis_;
│ │ │ │ + │ │ │ │ +
117 };
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
119 template< class B, class Q >
│ │ │ │ +
│ │ │ │ +
120 struct LocalL2Interpolation<B,Q,true>
│ │ │ │ +
121 : public LocalL2InterpolationBase<B,Q>
│ │ │ │ +
122 {
│ │ │ │ + │ │ │ │ +
124 template< class BasisFactory, bool onb >
│ │ │ │ + │ │ │ │ +
126 using typename Base::Basis;
│ │ │ │ +
127 using typename Base::Quadrature;
│ │ │ │ +
128 private:
│ │ │ │ +
129 LocalL2Interpolation ( const typename Base::Basis &basis, const typename Base::Quadrature &quadrature )
│ │ │ │ +
130 : Base(basis,quadrature)
│ │ │ │ +
131 {}
│ │ │ │ +
132 };
│ │ │ │ +
│ │ │ │ +
133 template< class B, class Q >
│ │ │ │ +
│ │ │ │ +
134 struct LocalL2Interpolation<B,Q,false>
│ │ │ │ +
135 : public LocalL2InterpolationBase<B,Q>
│ │ │ │ +
136 {
│ │ │ │ + │ │ │ │ +
138 template< class BasisFactory, bool onb >
│ │ │ │ + │ │ │ │ +
140 using typename Base::Basis;
│ │ │ │ +
141 using typename Base::Quadrature;
│ │ │ │ +
142 template< class Function, class DofField >
│ │ │ │ +
│ │ │ │ +
143 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ +
144 {
│ │ │ │ +
145 const unsigned size = Base::basis().size();
│ │ │ │ +
146 Base::interpolate(function,val_);
│ │ │ │ +
147 coefficients.resize( size );
│ │ │ │ +
148 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
149 {
│ │ │ │ +
150 coefficients[i] = 0;
│ │ │ │ +
151 for (unsigned int j=0; j<size; ++j)
│ │ │ │ +
152 {
│ │ │ │ +
153 coefficients[i] += field_cast<DofField>(massMatrix_(i,j)*val_[j]);
│ │ │ │ +
154 }
│ │ │ │ +
155 }
│ │ │ │ +
156 }
│ │ │ │ +
│ │ │ │ +
157 private:
│ │ │ │ +
158 LocalL2Interpolation ( const typename Base::Basis &basis, const typename Base::Quadrature &quadrature )
│ │ │ │ +
159 : Base(basis,quadrature),
│ │ │ │ +
160 val_(basis.size()),
│ │ │ │ +
161 massMatrix_()
│ │ │ │ +
162 {
│ │ │ │ +
163 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector;
│ │ │ │ +
164 typedef typename Base::Quadrature::iterator Iterator;
│ │ │ │ +
165 const unsigned size = basis.size();
│ │ │ │ +
166 std::vector< RangeVector > basisValues( size );
│ │ │ │
167
│ │ │ │ -
168 out[2][0] = { 0, -1};
│ │ │ │ -
169 out[3][0] = { 0, 1};
│ │ │ │ -
170 }
│ │ │ │ -
171 if (dim==3)
│ │ │ │ -
172 {
│ │ │ │ -
173 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
174 for(std::size_t j=0;j<dim; j++)
│ │ │ │ -
175 out[i][j] = {0,0,0};
│ │ │ │ -
176
│ │ │ │ -
177
│ │ │ │ -
178 out[0][2] = {-1 +in[1], -1 + in[0], 0};
│ │ │ │ -
179 out[1][2] = { 1 -in[1], - in[0], 0};
│ │ │ │ -
180 out[2][2] = { -in[1], 1 - in[0], 0};
│ │ │ │ -
181 out[3][2] = { in[1], in[0], 0};
│ │ │ │ -
182
│ │ │ │ -
183 out[4][1] = {-1 +in[2], 0, -1 + in[0]};
│ │ │ │ -
184 out[5][1] = { 1 -in[2], 0, - in[0]};
│ │ │ │ -
185 out[8][1] = { -in[2], 0, 1 - in[0]};
│ │ │ │ -
186 out[9][1] = { in[2], 0, in[0]};
│ │ │ │ -
187
│ │ │ │ -
188 out[6][0] = { 0, -1 + in[2], -1 + in[1]};
│ │ │ │ -
189 out[7][0] = { 0, 1 - in[2], - in[1]};
│ │ │ │ -
190 out[10][0] = { 0, - in[2], 1 - in[1]};
│ │ │ │ -
191 out[11][0] = { 0, in[2], in[1]};
│ │ │ │ +
168 massMatrix_.resize( size,size );
│ │ │ │ +
169 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
170 for (unsigned int j=0; j<size; ++j)
│ │ │ │ +
171 massMatrix_(i,j) = 0;
│ │ │ │ +
172 const Iterator end = Base::quadrature().end();
│ │ │ │ +
173 for( Iterator it = Base::quadrature().begin(); it != end; ++it )
│ │ │ │ +
174 {
│ │ │ │ +
175 Base::basis().evaluate( it->position(), basisValues );
│ │ │ │ +
176 for (unsigned int i=0; i<size; ++i)
│ │ │ │ +
177 for (unsigned int j=0; j<size; ++j)
│ │ │ │ +
178 massMatrix_(i,j) += (basisValues[i]*basisValues[j])*it->weight();
│ │ │ │ +
179 }
│ │ │ │ +
180 if ( !massMatrix_.invert() )
│ │ │ │ +
181 {
│ │ │ │ +
182 DUNE_THROW(MathError, "Mass matrix singular in LocalL2Interpolation");
│ │ │ │ +
183 }
│ │ │ │ +
184
│ │ │ │ +
185 }
│ │ │ │ +
186 typedef typename Base::Basis::StorageField Field;
│ │ │ │ +
187 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector;
│ │ │ │ +
188 typedef LFEMatrix<Field> MassMatrix;
│ │ │ │ +
189 mutable std::vector<Field> val_;
│ │ │ │ +
190 MassMatrix massMatrix_;
│ │ │ │ +
191 };
│ │ │ │ +
│ │ │ │
192
│ │ │ │ -
193 }
│ │ │ │ -
194
│ │ │ │ -
195 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
196 out[i] *= edgeOrientation_[i];
│ │ │ │ -
197
│ │ │ │ -
198 }
│ │ │ │ -
199
│ │ │ │ -
206 void partial(const std::array<unsigned int, dim>& order,
│ │ │ │ -
207 const typename Traits::DomainType& in,
│ │ │ │ -
208 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
209 {
│ │ │ │ -
210 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
211 if (totalOrder == 0) {
│ │ │ │ -
212 evaluateFunction(in, out);
│ │ │ │ -
213 } else if (totalOrder == 1) {
│ │ │ │ -
214 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
215 out.resize(size());
│ │ │ │ -
216
│ │ │ │ -
217 if (dim==2)
│ │ │ │ -
218 {
│ │ │ │ -
219 if (direction==0)
│ │ │ │ -
220 {
│ │ │ │ -
221 out[0] = { 0, -1};
│ │ │ │ -
222 out[1] = { 0, 1};
│ │ │ │ -
223 out[2] = { 0, 0};
│ │ │ │ -
224 out[3] = { 0, 0};
│ │ │ │ -
225 }
│ │ │ │ -
226 else
│ │ │ │ -
227 {
│ │ │ │ -
228 out[0] = { 0, 0};
│ │ │ │ -
229 out[1] = { 0, 0};
│ │ │ │ -
230 out[2] = { -1, 0};
│ │ │ │ -
231 out[3] = { 1, 0};
│ │ │ │ -
232 }
│ │ │ │ -
233 }
│ │ │ │ -
234
│ │ │ │ -
235 if (dim==3)
│ │ │ │ -
236 {
│ │ │ │ -
237 switch (direction)
│ │ │ │ -
238 {
│ │ │ │ -
239 case 0:
│ │ │ │ -
240 out[0] = { 0, 0, -1 +in[1]};
│ │ │ │ -
241 out[1] = { 0, 0, 1 -in[1]};
│ │ │ │ -
242 out[2] = { 0, 0, -in[1]};
│ │ │ │ -
243 out[3] = { 0, 0, in[1]};
│ │ │ │ -
244
│ │ │ │ -
245 out[4] = { 0, -1 +in[2], 0};
│ │ │ │ -
246 out[5] = { 0, 1 -in[2], 0};
│ │ │ │ -
247 out[8] = { 0, -in[2], 0};
│ │ │ │ -
248 out[9] = { 0, in[2], 0};
│ │ │ │ -
249
│ │ │ │ -
250 out[6] = {0,0,0};
│ │ │ │ -
251 out[7] = {0,0,0};
│ │ │ │ -
252 out[10] = {0,0,0};
│ │ │ │ -
253 out[11] = {0,0,0};
│ │ │ │ -
254 break;
│ │ │ │ -
255
│ │ │ │ -
256 case 1:
│ │ │ │ -
257 out[0] = { 0, 0, -1 + in[0]};
│ │ │ │ -
258 out[1] = { 0, 0, - in[0]};
│ │ │ │ -
259 out[2] = { 0, 0, 1 - in[0]};
│ │ │ │ -
260 out[3] = { 0, 0, in[0]};
│ │ │ │ -
261
│ │ │ │ -
262 out[4] = {0,0,0};
│ │ │ │ -
263 out[5] = {0,0,0};
│ │ │ │ -
264 out[8] = {0,0,0};
│ │ │ │ -
265 out[9] = {0,0,0};
│ │ │ │ -
266
│ │ │ │ -
267 out[6] = { -1 + in[2], 0, 0};
│ │ │ │ -
268 out[7] = { 1 - in[2], 0, 0};
│ │ │ │ -
269 out[10] = { - in[2], 0, 0};
│ │ │ │ -
270 out[11] = { in[2], 0, 0};
│ │ │ │ -
271 break;
│ │ │ │ -
272
│ │ │ │ -
273 case 2:
│ │ │ │ -
274 out[0] = {0,0,0};
│ │ │ │ -
275 out[1] = {0,0,0};
│ │ │ │ -
276 out[2] = {0,0,0};
│ │ │ │ -
277 out[3] = {0,0,0};
│ │ │ │ -
278
│ │ │ │ -
279 out[4] = { 0, -1 + in[0], 0};
│ │ │ │ -
280 out[5] = { 0, - in[0], 0};
│ │ │ │ -
281 out[8] = { 0, 1 - in[0], 0};
│ │ │ │ -
282 out[9] = { 0, in[0], 0};
│ │ │ │ -
283
│ │ │ │ -
284 out[6] = { -1 + in[1], 0, 0};
│ │ │ │ -
285 out[7] = { - in[1], 0, 0};
│ │ │ │ -
286 out[10] = { 1 - in[1], 0, 0};
│ │ │ │ -
287 out[11] = { in[1], 0, 0};
│ │ │ │ -
288 break;
│ │ │ │ -
289 }
│ │ │ │ -
290 }
│ │ │ │ -
291
│ │ │ │ -
292 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
293 out[i] *= edgeOrientation_[i];
│ │ │ │ -
294
│ │ │ │ -
295 } else if (totalOrder == 2) {
│ │ │ │ -
296 out.resize(size());
│ │ │ │ -
297
│ │ │ │ -
298 if (dim==2)
│ │ │ │ -
299 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
300 for (std::size_t j = 0; j < dim; ++j)
│ │ │ │ -
301 out[i][j] = 0;
│ │ │ │ -
302
│ │ │ │ -
303 if (dim==3)
│ │ │ │ -
304 {
│ │ │ │ -
305 for(size_t i=0; i<out.size(); i++)
│ │ │ │ -
306 out[i] = { 0, 0, 0};
│ │ │ │ -
307
│ │ │ │ -
308 //case (1,1,0):
│ │ │ │ -
309 if( order[0] == 1 and order[1]==1)
│ │ │ │ -
310 {
│ │ │ │ -
311 out[0] = { 0, 0, 1};
│ │ │ │ -
312 out[1] = { 0, 0, -1};
│ │ │ │ -
313 out[2] = { 0, 0, -1};
│ │ │ │ -
314 out[3] = { 0, 0, 1};
│ │ │ │ -
315 }
│ │ │ │ -
316
│ │ │ │ -
317 //case (1,0,1):
│ │ │ │ -
318 if( order[0] == 1 and order[2]==1)
│ │ │ │ -
319 {
│ │ │ │ -
320 out[4] = { 0, 1, 0};
│ │ │ │ -
321 out[5] = { 0, -1, 0};
│ │ │ │ -
322 out[8] = { 0, -1, 0};
│ │ │ │ -
323 out[9] = { 0, 1, 0};
│ │ │ │ -
324 }
│ │ │ │ -
325
│ │ │ │ -
326 //case (0,1,1):
│ │ │ │ -
327 if( order[1] == 1 and order[2]==1)
│ │ │ │ -
328 {
│ │ │ │ -
329 out[6] = { 1, 0, 0};
│ │ │ │ -
330 out[7] = { -1, 0, 0};
│ │ │ │ -
331 out[10] = { -1, 0, 0};
│ │ │ │ -
332 out[11] = { 1, 0, 0};
│ │ │ │ -
333 }
│ │ │ │ -
334
│ │ │ │ -
335 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
336 out[i] *= edgeOrientation_[i];
│ │ │ │ -
337 }
│ │ │ │ -
338
│ │ │ │ -
339
│ │ │ │ -
340 }else {
│ │ │ │ -
341 out.resize(size());
│ │ │ │ -
342 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
343 for (std::size_t j = 0; j < dim; ++j)
│ │ │ │ -
344 out[i][j] = 0;
│ │ │ │ -
345 }
│ │ │ │ -
346
│ │ │ │ -
347 }
│ │ │ │ -
348
│ │ │ │ -
350 unsigned int order() const
│ │ │ │ -
351 {
│ │ │ │ -
352 if (dim==2)
│ │ │ │ -
353 return 2*k-1;
│ │ │ │ -
354 if (dim==3)
│ │ │ │ -
355 return 3*k-1;
│ │ │ │ -
356 }
│ │ │ │ -
357
│ │ │ │ -
358 private:
│ │ │ │ -
359
│ │ │ │ -
360 // Orientations of the cube edges
│ │ │ │ -
361 std::array<R,numberOfEdges> edgeOrientation_;
│ │ │ │ -
362 };
│ │ │ │ -
363
│ │ │ │ -
364
│ │ │ │ -
369 template <int dim, int k>
│ │ │ │ -
370 class Nedelec1stKindCubeLocalCoefficients
│ │ │ │ -
371 {
│ │ │ │ -
372 public:
│ │ │ │ -
374 Nedelec1stKindCubeLocalCoefficients ()
│ │ │ │ -
375 : localKey_(size())
│ │ │ │ -
376 {
│ │ │ │ -
377 static_assert(k==1, "Only first-order Nédélec local coefficients are implemented.");
│ │ │ │ -
378 // Assign all degrees of freedom to edges
│ │ │ │ -
379 // TODO: This is correct only for first-order Nédélec elements
│ │ │ │ -
380 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
381 localKey_[i] = LocalKey(i,dim-1,0);
│ │ │ │ -
382 }
│ │ │ │ -
383
│ │ │ │ -
385 std::size_t size() const
│ │ │ │ -
386 {
│ │ │ │ -
387 static_assert(dim==2 || dim==3, "Nédélec shape functions are implemented only for 2d and 3d cubes.");
│ │ │ │ -
388 return (dim==2) ? 2*k * (k+1)
│ │ │ │ -
389 : 3*k * (k+1) * (k+1);
│ │ │ │ -
390 }
│ │ │ │ -
391
│ │ │ │ -
394 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
395 {
│ │ │ │ -
396 return localKey_[i];
│ │ │ │ -
397 }
│ │ │ │ -
398
│ │ │ │ -
399 private:
│ │ │ │ -
400 std::vector<LocalKey> localKey_;
│ │ │ │ -
401 };
│ │ │ │ -
402
│ │ │ │ -
407 template<class LB>
│ │ │ │ -
408 class Nedelec1stKindCubeLocalInterpolation
│ │ │ │ -
409 {
│ │ │ │ -
410 static constexpr auto dim = LB::Traits::dimDomain;
│ │ │ │ -
411 static constexpr auto size = LB::size();
│ │ │ │ -
412
│ │ │ │ -
413 // Number of edges of the reference cube
│ │ │ │ -
414 constexpr static std::size_t numberOfEdges = power(2,dim-1)*dim;
│ │ │ │ -
415
│ │ │ │ -
416 public:
│ │ │ │ -
417
│ │ │ │ -
419 Nedelec1stKindCubeLocalInterpolation (std::bitset<numberOfEdges> s = 0)
│ │ │ │ -
420 {
│ │ │ │ -
421 auto refElement = Dune::referenceElement<double,dim>(GeometryTypes::cube(dim));
│ │ │ │ -
422
│ │ │ │ -
423 for (std::size_t i=0; i<numberOfEdges; i++)
│ │ │ │ -
424 m_[i] = refElement.position(i,dim-1);
│ │ │ │ -
425
│ │ │ │ -
426 for (std::size_t i=0; i<numberOfEdges; i++)
│ │ │ │ -
427 {
│ │ │ │ -
428 auto vertexIterator = refElement.subEntities(i,dim-1,dim).begin();
│ │ │ │ -
429 auto v0 = *vertexIterator;
│ │ │ │ -
430 auto v1 = *(++vertexIterator);
│ │ │ │ -
431
│ │ │ │ -
432 // By default, edges point from the vertex with the smaller index
│ │ │ │ -
433 // to the vertex with the larger index.
│ │ │ │ -
434 if (v0>v1)
│ │ │ │ -
435 std::swap(v0,v1);
│ │ │ │ -
436 edge_[i] = refElement.position(v1,dim) - refElement.position(v0,dim);
│ │ │ │ -
437 edge_[i] *= (s[i]) ? -1.0 : 1.0;
│ │ │ │ -
438 }
│ │ │ │ -
439 }
│ │ │ │ -
440
│ │ │ │ -
446 template<typename F, typename C>
│ │ │ │ -
447 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
448 {
│ │ │ │ -
449 out.resize(size);
│ │ │ │ -
450 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
451
│ │ │ │ -
452 for (std::size_t i=0; i<size; i++)
│ │ │ │ -
453 {
│ │ │ │ -
454 auto y = f(m_[i]);
│ │ │ │ -
455 out[i] = 0.0;
│ │ │ │ -
456 for (int j=0; j<dim; j++)
│ │ │ │ -
457 out[i] += y[j]*edge_[i][j];
│ │ │ │ -
458 }
│ │ │ │ -
459 }
│ │ │ │ -
460
│ │ │ │ -
461 private:
│ │ │ │ -
462 // Edge midpoints of the reference cube
│ │ │ │ -
463 std::array<typename LB::Traits::DomainType, numberOfEdges> m_;
│ │ │ │ -
464 // Edges of the reference cube
│ │ │ │ -
465 std::array<typename LB::Traits::DomainType, numberOfEdges> edge_;
│ │ │ │ -
466 };
│ │ │ │ -
467
│ │ │ │ -
468}
│ │ │ │ -
469
│ │ │ │ -
470
│ │ │ │ -
494 template<class D, class R, int dim, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
496 {
│ │ │ │ -
497 public:
│ │ │ │ - │ │ │ │ -
499 Impl::Nedelec1stKindCubeLocalCoefficients<dim,k>,
│ │ │ │ -
500 Impl::Nedelec1stKindCubeLocalInterpolation<Impl::Nedelec1stKindCubeLocalBasis<D,R,dim,k> > >;
│ │ │ │ -
501
│ │ │ │ -
502 static_assert(dim==2 || dim==3, "Nedelec elements are only implemented for 2d and 3d elements.");
│ │ │ │ -
503 static_assert(k==1, "Nedelec elements of the first kind are currently only implemented for order k==1.");
│ │ │ │ -
504
│ │ │ │ - │ │ │ │ -
508
│ │ │ │ -
│ │ │ │ -
514 Nedelec1stKindCubeLocalFiniteElement (std::bitset<power(2,dim-1)*dim> s) :
│ │ │ │ -
515 basis_(s),
│ │ │ │ -
516 interpolation_(s)
│ │ │ │ -
517 {}
│ │ │ │ -
│ │ │ │ -
518
│ │ │ │ -
│ │ │ │ -
519 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
520 {
│ │ │ │ -
521 return basis_;
│ │ │ │ -
522 }
│ │ │ │ -
│ │ │ │ -
523
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
525 {
│ │ │ │ -
526 return coefficients_;
│ │ │ │ -
527 }
│ │ │ │ -
│ │ │ │ -
528
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
530 {
│ │ │ │ -
531 return interpolation_;
│ │ │ │ -
532 }
│ │ │ │ -
│ │ │ │ -
533
│ │ │ │ -
│ │ │ │ -
534 static constexpr unsigned int size ()
│ │ │ │ -
535 {
│ │ │ │ -
536 return Traits::LocalBasisType::size();
│ │ │ │ -
537 }
│ │ │ │ -
│ │ │ │ -
538
│ │ │ │ -
│ │ │ │ -
539 static constexpr GeometryType type ()
│ │ │ │ -
540 {
│ │ │ │ -
541 return GeometryTypes::cube(dim);
│ │ │ │ -
542 }
│ │ │ │ -
│ │ │ │ -
543
│ │ │ │ -
544 private:
│ │ │ │ -
545 typename Traits::LocalBasisType basis_;
│ │ │ │ -
546 typename Traits::LocalCoefficientsType coefficients_;
│ │ │ │ -
547 typename Traits::LocalInterpolationType interpolation_;
│ │ │ │ -
548 };
│ │ │ │ -
│ │ │ │ -
549
│ │ │ │ -
550}
│ │ │ │ -
551
│ │ │ │ -
552#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
197 template< class BasisFactory, bool onb >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
199 {
│ │ │ │ +
200 static const unsigned int dimension = BasisFactory::dimension;
│ │ │ │ +
201 typedef typename BasisFactory::Key Key;
│ │ │ │ +
202 typedef typename BasisFactory::Object Basis;
│ │ │ │ +
203 typedef double Field;
│ │ │ │ +
204 typedef QuadratureRule<Field,dimension> Quadrature;
│ │ │ │ +
205 typedef QuadratureRules<Field,dimension> QuadratureProvider;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
208
│ │ │ │ +
209 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
210 static Object *create ( const Key &key )
│ │ │ │ +
211 {
│ │ │ │ +
212 constexpr Dune::GeometryType geometry = geometryId;
│ │ │ │ +
213 const Basis *basis = BasisFactory::template create< geometry >( key );
│ │ │ │ +
214 const Quadrature & quadrature = QuadratureProvider::rule(geometry, 2*basis->order()+1);
│ │ │ │ +
215 return new Object( *basis, quadrature );
│ │ │ │ +
216 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
217 static void release ( Object *object )
│ │ │ │ +
218 {
│ │ │ │ +
219 const Basis &basis = object->basis();
│ │ │ │ +
220 BasisFactory::release( &basis );
│ │ │ │ +
221 delete object;
│ │ │ │ +
222 }
│ │ │ │ +
│ │ │ │ +
223 };
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225}
│ │ │ │ +
226
│ │ │ │ +
227#endif // #ifndef DUNE_L2INTERPOLATION_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Nédélec elements of the first kind for cube elements.
Definition nedelec1stkindcube.hh:496
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition nedelec1stkindcube.hh:529
│ │ │ │ -
static constexpr unsigned int size()
Definition nedelec1stkindcube.hh:534
│ │ │ │ -
Nedelec1stKindCubeLocalFiniteElement()=default
Default constructor.
│ │ │ │ -
static constexpr GeometryType type()
Definition nedelec1stkindcube.hh:539
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition nedelec1stkindcube.hh:524
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition nedelec1stkindcube.hh:519
│ │ │ │ -
Nedelec1stKindCubeLocalFiniteElement(std::bitset< power(2, dim-1) *dim > s)
Constructor with explicitly given edge orientations.
Definition nedelec1stkindcube.hh:514
│ │ │ │ - │ │ │ │ +
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ +
A local L2 interpolation taking a test basis and a quadrature rule.
Definition l2interpolation.hh:33
│ │ │ │ +
Definition l2interpolation.hh:37
│ │ │ │ +
LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature)
Definition l2interpolation.hh:110
│ │ │ │ +
void interpolate(const Function &function, std::vector< DofField > &coefficients) const
Interpolate a function that implements void evaluate(Domain, Range&)
Definition l2interpolation.hh:48
│ │ │ │ +
const Basis & basis() const
Definition l2interpolation.hh:99
│ │ │ │ +
const Quadrature & quadrature_
Definition l2interpolation.hh:116
│ │ │ │ +
const Basis & basis_
Definition l2interpolation.hh:115
│ │ │ │ +
static const unsigned int dimension
Definition l2interpolation.hh:44
│ │ │ │ +
const Quadrature & quadrature() const
Definition l2interpolation.hh:104
│ │ │ │ +
Q Quadrature
Definition l2interpolation.hh:42
│ │ │ │ +
B Basis
Definition l2interpolation.hh:41
│ │ │ │ +
LocalL2InterpolationBase< B, Q > Base
Definition l2interpolation.hh:123
│ │ │ │ +
void interpolate(const Function &function, std::vector< DofField > &coefficients) const
Definition l2interpolation.hh:143
│ │ │ │ +
LocalL2InterpolationBase< B, Q > Base
Definition l2interpolation.hh:137
│ │ │ │ +
A factory class for the local l2 interpolations taking a basis factory.
Definition l2interpolation.hh:199
│ │ │ │ +
static const unsigned int dimension
Definition l2interpolation.hh:200
│ │ │ │ +
static void release(Object *object)
Definition l2interpolation.hh:217
│ │ │ │ +
BasisFactory::Object Basis
Definition l2interpolation.hh:202
│ │ │ │ +
double Field
Definition l2interpolation.hh:203
│ │ │ │ +
QuadratureRules< Field, dimension > QuadratureProvider
Definition l2interpolation.hh:205
│ │ │ │ +
QuadratureRule< Field, dimension > Quadrature
Definition l2interpolation.hh:204
│ │ │ │ +
static Object * create(const Key &key)
Definition l2interpolation.hh:210
│ │ │ │ +
BasisFactory::Key Key
Definition l2interpolation.hh:201
│ │ │ │ +
const LocalInterpolation Object
Definition l2interpolation.hh:207
│ │ │ │ +
LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation
Definition l2interpolation.hh:206
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,545 +1,314 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ -nedelec1stkindcube.hh │ │ │ │ │ + * _u_t_i_l_i_t_y │ │ │ │ │ +l2interpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDCUBE_HH │ │ │ │ │ +5#ifndef DUNE_L2INTERPOLATION_HH │ │ │ │ │ +6#define DUNE_L2INTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> // For deprecated │ │ │ │ │ -makeFunctionWithCallOperator │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e │ │ │ │ │ -23{ │ │ │ │ │ -24namespace Impl │ │ │ │ │ -25{ │ │ │ │ │ -36 template │ │ │ │ │ -37 class Nedelec1stKindCubeLocalBasis │ │ │ │ │ -38 { │ │ │ │ │ -39 // Number of edges of the reference cube │ │ │ │ │ -40 constexpr static std::size_t numberOfEdges = power(2,dim-1)*dim; │ │ │ │ │ -41 │ │ │ │ │ -42 public: │ │ │ │ │ -43 using Traits = LocalBasisTraits, │ │ │ │ │ -44 R,dim,FieldVector, │ │ │ │ │ -45 FieldMatrix >; │ │ │ │ │ -46 │ │ │ │ │ -53 Nedelec1stKindCubeLocalBasis() │ │ │ │ │ -54 { │ │ │ │ │ -55 std::fill(edgeOrientation_.begin(), edgeOrientation_.end(), 1.0); │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -60 Nedelec1stKindCubeLocalBasis(std::bitset edgeOrientation) │ │ │ │ │ -61 : Nedelec1stKindCubeLocalBasis() │ │ │ │ │ -62 { │ │ │ │ │ -63 for (std::size_t i=0; i& out) const │ │ │ │ │ -84 { │ │ │ │ │ -85 static_assert(k==1, "Evaluating Nédélec shape functions is implemented │ │ │ │ │ -only for first order."); │ │ │ │ │ -86 out.resize(size()); │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +32 template< class B, class Q, bool onb > │ │ │ │ │ +_3_3 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +34 │ │ │ │ │ +35 template< class B, class Q > │ │ │ │ │ +_3_6 class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +37 { │ │ │ │ │ +38 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_ _B_,_ _Q_ _> _T_h_i_s; │ │ │ │ │ +39 │ │ │ │ │ +40 public: │ │ │ │ │ +_4_1 typedef B _B_a_s_i_s; │ │ │ │ │ +_4_2 typedef Q _Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ +43 │ │ │ │ │ +_4_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ +45 │ │ │ │ │ +47 template< class Function, class DofField, std::enable_if_t, Function>(), int> = 0 > │ │ │ │ │ +_4_8 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients ) const │ │ │ │ │ +49 { │ │ │ │ │ +50 typedef typename Quadrature::iterator Iterator; │ │ │ │ │ +51 typedef FieldVector< DofField, Basis::dimRange > RangeVector; │ │ │ │ │ +52 │ │ │ │ │ +53 const unsigned int size = _b_a_s_i_s().size(); │ │ │ │ │ +54 static std::vector< RangeVector > basisValues( size ); │ │ │ │ │ +55 │ │ │ │ │ +56 coefficients.resize( size ); │ │ │ │ │ +57 basisValues.resize( size ); │ │ │ │ │ +58 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ +59 coefficients[ i ] = _Z_e_r_o_<_ _D_o_f_F_i_e_l_d_ _>(); │ │ │ │ │ +60 │ │ │ │ │ +61 const Iterator end = _q_u_a_d_r_a_t_u_r_e().end(); │ │ │ │ │ +62 for( Iterator it = _q_u_a_d_r_a_t_u_r_e().begin(); it != end; ++it ) │ │ │ │ │ +63 { │ │ │ │ │ +64 _b_a_s_i_s().evaluate( it->position(), basisValues ); │ │ │ │ │ +65 typename Function::RangeType val; │ │ │ │ │ +66 function.evaluate( field_cast(it- │ │ │ │ │ +>position()), val ); │ │ │ │ │ +67 RangeVector factor = field_cast< DofField >( val ); │ │ │ │ │ +68 factor *= field_cast< DofField >( it->weight() ); │ │ │ │ │ +69 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ +70 coefficients[ i ] += factor * basisValues[ i ]; │ │ │ │ │ +71 } │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +75 template< class Function, class DofField, std::enable_if_t, Function>(), │ │ │ │ │ +int> = 0 > │ │ │ │ │ +_7_6 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients ) const │ │ │ │ │ +77 { │ │ │ │ │ +78 typedef FieldVector< DofField, Basis::dimRange > RangeVector; │ │ │ │ │ +79 │ │ │ │ │ +80 const unsigned int size = _b_a_s_i_s().size(); │ │ │ │ │ +81 static std::vector< RangeVector > basisValues( size ); │ │ │ │ │ +82 │ │ │ │ │ +83 coefficients.resize( size ); │ │ │ │ │ +84 basisValues.resize( size ); │ │ │ │ │ +85 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ +86 coefficients[ i ] = _Z_e_r_o_<_ _D_o_f_F_i_e_l_d_ _>(); │ │ │ │ │ 87 │ │ │ │ │ -88 if (dim==2) │ │ │ │ │ +88 for (auto&& qp : _q_u_a_d_r_a_t_u_r_e()) │ │ │ │ │ 89 { │ │ │ │ │ -90 // First-order Nédélec shape functions on a square are of the form │ │ │ │ │ -91 // │ │ │ │ │ -92 // (a, b)^T + (c y, d x)^T, a, b, c, d \in R │ │ │ │ │ -93 // │ │ │ │ │ -94 // The following coefficients create the four basis vectors │ │ │ │ │ -95 // that are dual to the edge degrees of freedom: │ │ │ │ │ -96 // │ │ │ │ │ -97 // a[0] = 0 b[0] = 1 c[0] = 0 d[0] = -1 │ │ │ │ │ -98 // a[1] = 0 b[1] = 0 c[1] = 0 d[1] = 1 │ │ │ │ │ -99 // a[2] = 1 b[2] = 0 c[2] = 0 d[2] = -1 │ │ │ │ │ -100 // a[3] = 0 b[3] = 0 c[3] = 0 d[3] = 1 │ │ │ │ │ -101 │ │ │ │ │ -102 out[0] = { 0, D(1) - in[0]}; │ │ │ │ │ -103 out[1] = { 0, in[0]}; │ │ │ │ │ -104 out[2] = { D(1) - in[1], 0}; │ │ │ │ │ -105 out[3] = { in[1], 0}; │ │ │ │ │ -106 } │ │ │ │ │ -107 │ │ │ │ │ -108 if constexpr (dim==3) │ │ │ │ │ -109 { │ │ │ │ │ -110 // First-order Nédélec shape functions on a cube are of the form │ │ │ │ │ -111 // │ │ │ │ │ -112 // (e1 yz) │ │ │ │ │ -113 // a + b x + c y + d z + (e2 xz) , a, b, c, d \in R^3 and b[0]=c[1]=d[2]=0 │ │ │ │ │ -114 // (e3 xy) │ │ │ │ │ -115 // │ │ │ │ │ -116 // The following coefficients create the twelve basis vectors │ │ │ │ │ -117 // that are dual to the edge degrees of freedom: │ │ │ │ │ -118 // │ │ │ │ │ -119 // a[0] = { 0, 0, 1} b[0] = { 0, 0, -1} c[0] = { 0, 0, -1} d[0] = { 0, 0, │ │ │ │ │ -0} e[0] = { 0, 0, 1} │ │ │ │ │ -120 // a[1] = { 0, 0, 0} b[1] = { 0, 0, 1} c[1] = { 0, 0, 0} d[1] = { 0, 0, 0} │ │ │ │ │ -e[1] = { 0, 0, -1} │ │ │ │ │ -121 // a[2] = { 0, 0, 0} b[2] = { 0, 0, 0} c[2] = { 0, 0, 1} d[2] = { 0, 0, 0} │ │ │ │ │ -e[2] = { 0, 0, -1} │ │ │ │ │ -122 // a[3] = { 0, 0, 0} b[3] = { 0, 0, 0} c[3] = { 0, 0, 0} d[3] = { 0, 0, 0} │ │ │ │ │ -e[3] = { 0, 0, 1} │ │ │ │ │ -123 // │ │ │ │ │ -124 // The following implementation uses these values, and simply │ │ │ │ │ -125 // skips all the zeros. │ │ │ │ │ -126 │ │ │ │ │ -127 for (std::size_t i=0; i& out) const │ │ │ │ │ -157 { │ │ │ │ │ -158 out.resize(size()); │ │ │ │ │ -159 if (dim==2) │ │ │ │ │ -160 { │ │ │ │ │ -161 for (std::size_t i=0; i( val ); │ │ │ │ │ +93 factor *= field_cast< DofField >( qp.weight() ); │ │ │ │ │ +94 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ +95 coefficients[ i ] += factor * basisValues[ i ]; │ │ │ │ │ +96 } │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +_9_9 const _B_a_s_i_s &_b_a_s_i_s () const │ │ │ │ │ +100 { │ │ │ │ │ +101 return _b_a_s_i_s__; │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +_1_0_4 const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e () const │ │ │ │ │ +105 { │ │ │ │ │ +106 return _q_u_a_d_r_a_t_u_r_e__; │ │ │ │ │ +107 } │ │ │ │ │ +108 │ │ │ │ │ +109 protected: │ │ │ │ │ +_1_1_0 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e ( const _B_a_s_i_s &_b_a_s_i_s, const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e │ │ │ │ │ +) │ │ │ │ │ +111 : _b_a_s_i_s__( _b_a_s_i_s ), │ │ │ │ │ +112 _q_u_a_d_r_a_t_u_r_e__( _q_u_a_d_r_a_t_u_r_e ) │ │ │ │ │ +113 {} │ │ │ │ │ +114 │ │ │ │ │ +_1_1_5 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ +_1_1_6 const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e__; │ │ │ │ │ +117 }; │ │ │ │ │ +118 │ │ │ │ │ +119 template< class B, class Q > │ │ │ │ │ +_1_2_0 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +121 : public _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +122 { │ │ │ │ │ +_1_2_3 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_B_,_Q_> _B_a_s_e; │ │ │ │ │ +124 template< class BasisFactory, bool onb > │ │ │ │ │ +_1_2_5 friend class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +126 using typename _B_a_s_e_:_:_B_a_s_i_s; │ │ │ │ │ +127 using typename _B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ +128 private: │ │ │ │ │ +129 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n ( const typename _B_a_s_e_:_:_B_a_s_i_s &basis, const typename │ │ │ │ │ +_B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e &quadrature ) │ │ │ │ │ +130 : _B_a_s_e(basis,quadrature) │ │ │ │ │ +131 {} │ │ │ │ │ +132 }; │ │ │ │ │ +133 template< class B, class Q > │ │ │ │ │ +_1_3_4 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +135 : public _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +136 { │ │ │ │ │ +_1_3_7 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_B_,_Q_> _B_a_s_e; │ │ │ │ │ +138 template< class BasisFactory, bool onb > │ │ │ │ │ +_1_3_9 friend class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ +140 using typename _B_a_s_e_:_:_B_a_s_i_s; │ │ │ │ │ +141 using typename _B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ +142 template< class Function, class DofField > │ │ │ │ │ +_1_4_3 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients ) const │ │ │ │ │ +144 { │ │ │ │ │ +145 const unsigned size = Base::basis().size(); │ │ │ │ │ +146 Base::interpolate(function,val_); │ │ │ │ │ +147 coefficients.resize( size ); │ │ │ │ │ +148 for (unsigned int i=0; i(massMatrix_(i,j)*val_[j]); │ │ │ │ │ +154 } │ │ │ │ │ +155 } │ │ │ │ │ +156 } │ │ │ │ │ +157 private: │ │ │ │ │ +158 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n ( const typename Base::Basis &basis, const typename │ │ │ │ │ +Base::Quadrature &quadrature ) │ │ │ │ │ +159 : Base(basis,quadrature), │ │ │ │ │ +160 val_(basis.size()), │ │ │ │ │ +161 massMatrix_() │ │ │ │ │ +162 { │ │ │ │ │ +163 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector; │ │ │ │ │ +164 typedef typename Base::Quadrature::iterator Iterator; │ │ │ │ │ +165 const unsigned size = basis.size(); │ │ │ │ │ +166 std::vector< RangeVector > basisValues( size ); │ │ │ │ │ 167 │ │ │ │ │ -168 out[2][0] = { 0, -1}; │ │ │ │ │ -169 out[3][0] = { 0, 1}; │ │ │ │ │ -170 } │ │ │ │ │ -171 if (dim==3) │ │ │ │ │ -172 { │ │ │ │ │ -173 for (std::size_t i=0; iposition(), basisValues ); │ │ │ │ │ +176 for (unsigned int i=0; iweight(); │ │ │ │ │ +179 } │ │ │ │ │ +180 if ( !massMatrix_.invert() ) │ │ │ │ │ +181 { │ │ │ │ │ +182 DUNE_THROW(MathError, "Mass matrix singular in LocalL2Interpolation"); │ │ │ │ │ +183 } │ │ │ │ │ +184 │ │ │ │ │ +185 } │ │ │ │ │ +186 typedef typename Base::Basis::StorageField Field; │ │ │ │ │ +187 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector; │ │ │ │ │ +188 typedef LFEMatrix MassMatrix; │ │ │ │ │ +189 mutable std::vector val_; │ │ │ │ │ +190 MassMatrix massMatrix_; │ │ │ │ │ +191 }; │ │ │ │ │ 192 │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -195 for (std::size_t i=0; i& order, │ │ │ │ │ -207 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -208 std::vector& out) const │ │ │ │ │ -209 { │ │ │ │ │ -210 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -211 if (totalOrder == 0) { │ │ │ │ │ -212 evaluateFunction(in, out); │ │ │ │ │ -213 } else if (totalOrder == 1) { │ │ │ │ │ -214 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -215 out.resize(size()); │ │ │ │ │ -216 │ │ │ │ │ -217 if (dim==2) │ │ │ │ │ +197 template< class BasisFactory, bool onb > │ │ │ │ │ +_1_9_8 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +199 { │ │ │ │ │ +_2_0_0 static const unsigned int _d_i_m_e_n_s_i_o_n = BasisFactory::dimension; │ │ │ │ │ +_2_0_1 typedef typename BasisFactory::Key _K_e_y; │ │ │ │ │ +_2_0_2 typedef typename BasisFactory::Object _B_a_s_i_s; │ │ │ │ │ +_2_0_3 typedef double _F_i_e_l_d; │ │ │ │ │ +_2_0_4 typedef QuadratureRule _Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ +_2_0_5 typedef QuadratureRules _Q_u_a_d_r_a_t_u_r_e_P_r_o_v_i_d_e_r; │ │ │ │ │ +_2_0_6 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_a_s_i_s_,_ _Q_u_a_d_r_a_t_u_r_e_,_ _o_n_b_ _> _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ +_2_0_7 typedef const _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n _O_b_j_e_c_t; │ │ │ │ │ +208 │ │ │ │ │ +209 template< GeometryType::Id geometryId > │ │ │ │ │ +_2_1_0 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ +211 { │ │ │ │ │ +212 constexpr Dune::GeometryType geometry = geometryId; │ │ │ │ │ +213 const _B_a_s_i_s *basis = BasisFactory::template create< geometry >( key ); │ │ │ │ │ +214 const _Q_u_a_d_r_a_t_u_r_e & quadrature = QuadratureProvider::rule(geometry, 2*basis- │ │ │ │ │ +>order()+1); │ │ │ │ │ +215 return new _O_b_j_e_c_t( *basis, quadrature ); │ │ │ │ │ +216 } │ │ │ │ │ +_2_1_7 static void _r_e_l_e_a_s_e ( _O_b_j_e_c_t *object ) │ │ │ │ │ 218 { │ │ │ │ │ -219 if (direction==0) │ │ │ │ │ -220 { │ │ │ │ │ -221 out[0] = { 0, -1}; │ │ │ │ │ -222 out[1] = { 0, 1}; │ │ │ │ │ -223 out[2] = { 0, 0}; │ │ │ │ │ -224 out[3] = { 0, 0}; │ │ │ │ │ -225 } │ │ │ │ │ -226 else │ │ │ │ │ -227 { │ │ │ │ │ -228 out[0] = { 0, 0}; │ │ │ │ │ -229 out[1] = { 0, 0}; │ │ │ │ │ -230 out[2] = { -1, 0}; │ │ │ │ │ -231 out[3] = { 1, 0}; │ │ │ │ │ -232 } │ │ │ │ │ -233 } │ │ │ │ │ -234 │ │ │ │ │ -235 if (dim==3) │ │ │ │ │ -236 { │ │ │ │ │ -237 switch (direction) │ │ │ │ │ -238 { │ │ │ │ │ -239 case 0: │ │ │ │ │ -240 out[0] = { 0, 0, -1 +in[1]}; │ │ │ │ │ -241 out[1] = { 0, 0, 1 -in[1]}; │ │ │ │ │ -242 out[2] = { 0, 0, -in[1]}; │ │ │ │ │ -243 out[3] = { 0, 0, in[1]}; │ │ │ │ │ -244 │ │ │ │ │ -245 out[4] = { 0, -1 +in[2], 0}; │ │ │ │ │ -246 out[5] = { 0, 1 -in[2], 0}; │ │ │ │ │ -247 out[8] = { 0, -in[2], 0}; │ │ │ │ │ -248 out[9] = { 0, in[2], 0}; │ │ │ │ │ -249 │ │ │ │ │ -250 out[6] = {0,0,0}; │ │ │ │ │ -251 out[7] = {0,0,0}; │ │ │ │ │ -252 out[10] = {0,0,0}; │ │ │ │ │ -253 out[11] = {0,0,0}; │ │ │ │ │ -254 break; │ │ │ │ │ -255 │ │ │ │ │ -256 case 1: │ │ │ │ │ -257 out[0] = { 0, 0, -1 + in[0]}; │ │ │ │ │ -258 out[1] = { 0, 0, - in[0]}; │ │ │ │ │ -259 out[2] = { 0, 0, 1 - in[0]}; │ │ │ │ │ -260 out[3] = { 0, 0, in[0]}; │ │ │ │ │ -261 │ │ │ │ │ -262 out[4] = {0,0,0}; │ │ │ │ │ -263 out[5] = {0,0,0}; │ │ │ │ │ -264 out[8] = {0,0,0}; │ │ │ │ │ -265 out[9] = {0,0,0}; │ │ │ │ │ -266 │ │ │ │ │ -267 out[6] = { -1 + in[2], 0, 0}; │ │ │ │ │ -268 out[7] = { 1 - in[2], 0, 0}; │ │ │ │ │ -269 out[10] = { - in[2], 0, 0}; │ │ │ │ │ -270 out[11] = { in[2], 0, 0}; │ │ │ │ │ -271 break; │ │ │ │ │ -272 │ │ │ │ │ -273 case 2: │ │ │ │ │ -274 out[0] = {0,0,0}; │ │ │ │ │ -275 out[1] = {0,0,0}; │ │ │ │ │ -276 out[2] = {0,0,0}; │ │ │ │ │ -277 out[3] = {0,0,0}; │ │ │ │ │ -278 │ │ │ │ │ -279 out[4] = { 0, -1 + in[0], 0}; │ │ │ │ │ -280 out[5] = { 0, - in[0], 0}; │ │ │ │ │ -281 out[8] = { 0, 1 - in[0], 0}; │ │ │ │ │ -282 out[9] = { 0, in[0], 0}; │ │ │ │ │ -283 │ │ │ │ │ -284 out[6] = { -1 + in[1], 0, 0}; │ │ │ │ │ -285 out[7] = { - in[1], 0, 0}; │ │ │ │ │ -286 out[10] = { 1 - in[1], 0, 0}; │ │ │ │ │ -287 out[11] = { in[1], 0, 0}; │ │ │ │ │ -288 break; │ │ │ │ │ -289 } │ │ │ │ │ -290 } │ │ │ │ │ -291 │ │ │ │ │ -292 for (std::size_t i=0; i edgeOrientation_; │ │ │ │ │ -362 }; │ │ │ │ │ -363 │ │ │ │ │ -364 │ │ │ │ │ -369 template │ │ │ │ │ -370 class Nedelec1stKindCubeLocalCoefficients │ │ │ │ │ -371 { │ │ │ │ │ -372 public: │ │ │ │ │ -374 Nedelec1stKindCubeLocalCoefficients () │ │ │ │ │ -375 : localKey_(size()) │ │ │ │ │ -376 { │ │ │ │ │ -377 static_assert(k==1, "Only first-order Nédélec local coefficients are │ │ │ │ │ -implemented."); │ │ │ │ │ -378 // Assign all degrees of freedom to edges │ │ │ │ │ -379 // TODO: This is correct only for first-order Nédélec elements │ │ │ │ │ -380 for (std::size_t i=0; i localKey_; │ │ │ │ │ -401 }; │ │ │ │ │ -402 │ │ │ │ │ -407 template │ │ │ │ │ -408 class Nedelec1stKindCubeLocalInterpolation │ │ │ │ │ -409 { │ │ │ │ │ -410 static constexpr auto dim = LB::Traits::dimDomain; │ │ │ │ │ -411 static constexpr auto size = LB::size(); │ │ │ │ │ -412 │ │ │ │ │ -413 // Number of edges of the reference cube │ │ │ │ │ -414 constexpr static std::size_t numberOfEdges = power(2,dim-1)*dim; │ │ │ │ │ -415 │ │ │ │ │ -416 public: │ │ │ │ │ -417 │ │ │ │ │ -419 Nedelec1stKindCubeLocalInterpolation (std::bitset s = 0) │ │ │ │ │ -420 { │ │ │ │ │ -421 auto refElement = Dune::referenceElement(GeometryTypes::cube │ │ │ │ │ -(dim)); │ │ │ │ │ -422 │ │ │ │ │ -423 for (std::size_t i=0; iv1) │ │ │ │ │ -435 std::swap(v0,v1); │ │ │ │ │ -436 edge_[i] = refElement.position(v1,dim) - refElement.position(v0,dim); │ │ │ │ │ -437 edge_[i] *= (s[i]) ? -1.0 : 1.0; │ │ │ │ │ -438 } │ │ │ │ │ -439 } │ │ │ │ │ -440 │ │ │ │ │ -446 template │ │ │ │ │ -447 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -448 { │ │ │ │ │ -449 out.resize(size); │ │ │ │ │ -450 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -451 │ │ │ │ │ -452 for (std::size_t i=0; i m_; │ │ │ │ │ -464 // Edges of the reference cube │ │ │ │ │ -465 std::array edge_; │ │ │ │ │ -466 }; │ │ │ │ │ -467 │ │ │ │ │ -468} │ │ │ │ │ -469 │ │ │ │ │ -470 │ │ │ │ │ -494 template │ │ │ │ │ -_4_9_5 class _N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -496 { │ │ │ │ │ -497 public: │ │ │ │ │ -_4_9_8 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_k_>, │ │ │ │ │ -499 Impl::Nedelec1stKindCubeLocalCoefficients, │ │ │ │ │ -500 Impl::Nedelec1stKindCubeLocalInterpolation > >; │ │ │ │ │ -501 │ │ │ │ │ -502 static_assert(dim==2 || dim==3, "Nedelec elements are only implemented for │ │ │ │ │ -2d and 3d elements."); │ │ │ │ │ -503 static_assert(k==1, "Nedelec elements of the first kind are currently only │ │ │ │ │ -implemented for order k==1."); │ │ │ │ │ -504 │ │ │ │ │ -_5_0_7 _N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() = default; │ │ │ │ │ -508 │ │ │ │ │ -_5_1_4 _N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset s) : │ │ │ │ │ -515 basis_(s), │ │ │ │ │ -516 interpolation_(s) │ │ │ │ │ -517 {} │ │ │ │ │ -518 │ │ │ │ │ -_5_1_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -520 { │ │ │ │ │ -521 return basis_; │ │ │ │ │ -522 } │ │ │ │ │ -523 │ │ │ │ │ -_5_2_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -525 { │ │ │ │ │ -526 return coefficients_; │ │ │ │ │ -527 } │ │ │ │ │ -528 │ │ │ │ │ -_5_2_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -530 { │ │ │ │ │ -531 return interpolation_; │ │ │ │ │ -532 } │ │ │ │ │ -533 │ │ │ │ │ -_5_3_4 static constexpr unsigned int _s_i_z_e () │ │ │ │ │ -535 { │ │ │ │ │ -536 return Traits::LocalBasisType::size(); │ │ │ │ │ -537 } │ │ │ │ │ -538 │ │ │ │ │ -_5_3_9 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -540 { │ │ │ │ │ -541 return GeometryTypes::cube(dim); │ │ │ │ │ -542 } │ │ │ │ │ -543 │ │ │ │ │ -544 private: │ │ │ │ │ -545 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e basis_; │ │ │ │ │ -546 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e coefficients_; │ │ │ │ │ -547 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e interpolation_; │ │ │ │ │ -548 }; │ │ │ │ │ -549 │ │ │ │ │ -550} │ │ │ │ │ -551 │ │ │ │ │ -552#endif │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +219 const _B_a_s_i_s &basis = object->basis(); │ │ │ │ │ +220 BasisFactory::release( &basis ); │ │ │ │ │ +221 delete object; │ │ │ │ │ +222 } │ │ │ │ │ +223 }; │ │ │ │ │ +224 │ │ │ │ │ +225} │ │ │ │ │ +226 │ │ │ │ │ +227#endif // #ifndef DUNE_L2INTERPOLATION_HH │ │ │ │ │ +_l_f_e_m_a_t_r_i_x_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nédélec elements of the first kind for cube elements. │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:496 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:529 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:534 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nedelec1stKindCubeLocalFiniteElement()=default │ │ │ │ │ -Default constructor. │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:539 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:524 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:519 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nedelec1stKindCubeLocalFiniteElement(std::bitset< power(2, dim-1) *dim > s) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindcube.hh:514 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ +A class representing the zero of a given Field. │ │ │ │ │ +DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +A local L2 interpolation taking a test basis and a quadrature rule. │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature) │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:110 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients) const │ │ │ │ │ +Interpolate a function that implements void evaluate(Domain, Range&) │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_b_a_s_i_s │ │ │ │ │ +const Basis & basis() const │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_q_u_a_d_r_a_t_u_r_e__ │ │ │ │ │ +const Quadrature & quadrature_ │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_b_a_s_i_s__ │ │ │ │ │ +const Basis & basis_ │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_q_u_a_d_r_a_t_u_r_e │ │ │ │ │ +const Quadrature & quadrature() const │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:104 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e │ │ │ │ │ +Q Quadrature │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_B_a_s_i_s │ │ │ │ │ +B Basis │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _t_r_u_e_ _>_:_:_B_a_s_e │ │ │ │ │ +LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _>_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ +&coefficients) const │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _>_:_:_B_a_s_e │ │ │ │ │ +LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:137 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:199 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:200 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ +BasisFactory::Object Basis │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:202 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_F_i_e_l_d │ │ │ │ │ +double Field │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_Q_u_a_d_r_a_t_u_r_e_P_r_o_v_i_d_e_r │ │ │ │ │ +QuadratureRules< Field, dimension > QuadratureProvider │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:205 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_Q_u_a_d_r_a_t_u_r_e │ │ │ │ │ +QuadratureRule< Field, dimension > Quadrature │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:204 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +BasisFactory::Key Key │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:201 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const LocalInterpolation Object │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:207 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation │ │ │ │ │ +DDeeffiinniittiioonn l2interpolation.hh:206 │ │ │ │ │ _l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindsimplex.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalprismp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
nedelec1stkindsimplex.hh File Reference
│ │ │ │ +
hierarchicalprismp2.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ +#include "hierarchicalprismp2/hierarchicalprismp2localbasis.hh"
│ │ │ │ +#include "hierarchicalprismp2/hierarchicalprismp2localinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Nedelec1stKindSimplexLocalFiniteElement< D, R, dim, k >
 Nédélec elements of the first kind for simplex elements. More...
class  Dune::HierarchicalPrismP2LocalFiniteElement< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -nedelec1stkindsimplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalprismp2.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ +#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ -  Nédélec elements of the first kind for simplex elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00161_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: nedelec1stkindsimplex.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalprismp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,426 +70,122 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
nedelec1stkindsimplex.hh
│ │ │ │ +
hierarchicalprismp2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │ -
13#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ - │ │ │ │ - │ │ │ │ -
18#include <dune/localfunctions/common/localinterpolation.hh> // For deprecated makeFunctionWithCallOperator
│ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21namespace Dune
│ │ │ │ -
22{
│ │ │ │ -
23namespace Impl
│ │ │ │ -
24{
│ │ │ │ -
35 template<class D, class R, int dim, int k>
│ │ │ │ -
36 class Nedelec1stKindSimplexLocalBasis
│ │ │ │ -
37 {
│ │ │ │ -
38 // Number of edges of the reference simplex
│ │ │ │ -
39 constexpr static std::size_t numberOfEdges = dim*(dim+1)/2;
│ │ │ │ -
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,
│ │ │ │ -
43 R,dim,FieldVector<R,dim>,
│ │ │ │ -
44 FieldMatrix<R,dim,dim> >;
│ │ │ │ +
16
│ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
19
│ │ │ │ +
22 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ + │ │ │ │ +
31 Impl::LagrangePrismLocalCoefficients<2>,
│ │ │ │ + │ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return basis;
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │
45
│ │ │ │ -
52 Nedelec1stKindSimplexLocalBasis()
│ │ │ │ -
53 {
│ │ │ │ -
54 std::fill(edgeOrientation_.begin(), edgeOrientation_.end(), 1.0);
│ │ │ │ -
55 }
│ │ │ │ -
56
│ │ │ │ -
59 Nedelec1stKindSimplexLocalBasis(std::bitset<numberOfEdges> edgeOrientation)
│ │ │ │ -
60 : Nedelec1stKindSimplexLocalBasis()
│ │ │ │ -
61 {
│ │ │ │ -
62 for (std::size_t i=0; i<edgeOrientation_.size(); i++)
│ │ │ │ -
63 edgeOrientation_[i] *= edgeOrientation[i] ? -1.0 : 1.0;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
49 {
│ │ │ │ +
50 return coefficients;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 return interpolation;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ +
61 unsigned int size () const
│ │ │ │ +
62 {
│ │ │ │ +
63 return basis.size();
│ │ │ │
64 }
│ │ │ │ +
│ │ │ │
65
│ │ │ │ -
67 static constexpr unsigned int size()
│ │ │ │ -
68 {
│ │ │ │ -
69 static_assert(dim==2 || dim==3, "Nedelec shape functions are implemented only for 2d and 3d simplices.");
│ │ │ │ -
70 if (dim==2)
│ │ │ │ -
71 return k * (k+2);
│ │ │ │ -
72 if (dim==3)
│ │ │ │ -
73 return k * (k+2) * (k+3) / 2;
│ │ │ │ -
74 }
│ │ │ │ +
│ │ │ │ +
68 static constexpr GeometryType type ()
│ │ │ │ +
69 {
│ │ │ │ +
70 return GeometryTypes::prism;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 private:
│ │ │ │ + │ │ │ │
75
│ │ │ │ -
81 void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
82 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
83 {
│ │ │ │ -
84 static_assert(k==1, "Evaluating Nédélec shape functions is implemented only for first order.");
│ │ │ │ -
85 out.resize(size());
│ │ │ │ -
86
│ │ │ │ -
87 if (dim==2)
│ │ │ │ -
88 {
│ │ │ │ -
89 // First-order Nédélec shape functions on a triangle are of the form
│ │ │ │ -
90 //
│ │ │ │ -
91 // (a1, a2) + b(-x2, x1)^T, a_1, a_2, b \in R
│ │ │ │ -
92 out[0] = {D(1) - in[1], in[0]};
│ │ │ │ -
93 out[1] = {in[1], -in[0]+D(1)};
│ │ │ │ -
94 out[2] = {-in[1], in[0]};
│ │ │ │ -
95 }
│ │ │ │ -
96
│ │ │ │ -
97 if constexpr (dim==3)
│ │ │ │ -
98 {
│ │ │ │ -
99 // First-order Nédélec shape functions on a tetrahedron are of the form
│ │ │ │ -
100 //
│ │ │ │ -
101 // a + b \times x, a, b \in R^3
│ │ │ │ -
102 //
│ │ │ │ -
103 // The following coefficients create the six basis vectors
│ │ │ │ -
104 // that are dual to the edge degrees of freedom:
│ │ │ │ -
105 //
│ │ │ │ -
106 // a[0] = { 1, 0, 0} b[0] = { 0, -1, 1}
│ │ │ │ -
107 // a[1] = { 0, 1, 0} b[1] = { 1, 0, -1}
│ │ │ │ -
108 // a[2] = { 0, 0, 0} b[2] = { 0, 0, 1}
│ │ │ │ -
109 // a[3] = { 0, 0, 1} b[3] = {-1, 1, 0}
│ │ │ │ -
110 // a[4] = { 0, 0, 0} b[4] = { 0, -1, 0}
│ │ │ │ -
111 // a[5] = { 0, 0, 0} b[5] = { 1, 0, 0}
│ │ │ │ -
112 //
│ │ │ │ -
113 // The following implementation uses these values, and simply
│ │ │ │ -
114 // skips all the zeros.
│ │ │ │ -
115
│ │ │ │ -
116 out[0] = { 1 - in[1] - in[2], in[0] , in[0] };
│ │ │ │ -
117 out[1] = { in[1] , 1 - in[0] - in[2], in[1]};
│ │ │ │ -
118 out[2] = { - in[1] , in[0] , 0 };
│ │ │ │ -
119 out[3] = { in[2], in[2], 1 - in[0] - in[1]};
│ │ │ │ -
120 out[4] = { -in[2], 0 , in[0] };
│ │ │ │ -
121 out[5] = { 0 , -in[2], in[1]};
│ │ │ │ -
122 }
│ │ │ │ -
123
│ │ │ │ -
124 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
125 out[i] *= edgeOrientation_[i];
│ │ │ │ -
126 }
│ │ │ │ -
127
│ │ │ │ -
133 void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
134 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
135 {
│ │ │ │ -
136 out.resize(size());
│ │ │ │ -
137 if (dim==2)
│ │ │ │ -
138 {
│ │ │ │ -
139 out[0][0] = { 0, -1};
│ │ │ │ -
140 out[0][1] = { 1, 0};
│ │ │ │ -
141
│ │ │ │ -
142 out[1][0] = { 0, 1};
│ │ │ │ -
143 out[1][1] = {-1, 0};
│ │ │ │ -
144
│ │ │ │ -
145 out[2][0] = { 0, -1};
│ │ │ │ -
146 out[2][1] = { 1, 0};
│ │ │ │ -
147 }
│ │ │ │ -
148 if (dim==3)
│ │ │ │ -
149 {
│ │ │ │ -
150 out[0][0] = { 0,-1,-1};
│ │ │ │ -
151 out[0][1] = { 1, 0, 0};
│ │ │ │ -
152 out[0][2] = { 1, 0, 0};
│ │ │ │ -
153
│ │ │ │ -
154 out[1][0] = { 0, 1, 0};
│ │ │ │ -
155 out[1][1] = {-1, 0, -1};
│ │ │ │ -
156 out[1][2] = { 0, 1, 0};
│ │ │ │ -
157
│ │ │ │ -
158 out[2][0] = { 0, -1, 0};
│ │ │ │ -
159 out[2][1] = { 1, 0, 0};
│ │ │ │ -
160 out[2][2] = { 0, 0, 0};
│ │ │ │ -
161
│ │ │ │ -
162 out[3][0] = { 0, 0, 1};
│ │ │ │ -
163 out[3][1] = { 0, 0, 1};
│ │ │ │ -
164 out[3][2] = {-1, -1, 0};
│ │ │ │ -
165
│ │ │ │ -
166 out[4][0] = { 0, 0, -1};
│ │ │ │ -
167 out[4][1] = { 0, 0, 0};
│ │ │ │ -
168 out[4][2] = { 1, 0, 0};
│ │ │ │ -
169
│ │ │ │ -
170 out[5][0] = { 0, 0, 0};
│ │ │ │ -
171 out[5][1] = { 0, 0, -1};
│ │ │ │ -
172 out[5][2] = { 0, 1, 0};
│ │ │ │ -
173 }
│ │ │ │ -
174
│ │ │ │ -
175 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
176 out[i] *= edgeOrientation_[i];
│ │ │ │ -
177
│ │ │ │ -
178 }
│ │ │ │ -
179
│ │ │ │ -
186 void partial(const std::array<unsigned int, dim>& order,
│ │ │ │ -
187 const typename Traits::DomainType& in,
│ │ │ │ -
188 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
189 {
│ │ │ │ -
190 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
191 if (totalOrder == 0) {
│ │ │ │ -
192 evaluateFunction(in, out);
│ │ │ │ -
193 } else if (totalOrder == 1) {
│ │ │ │ -
194 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
195 out.resize(size());
│ │ │ │ -
196
│ │ │ │ -
197 if (dim==2)
│ │ │ │ -
198 {
│ │ │ │ -
199 if (direction==0)
│ │ │ │ -
200 {
│ │ │ │ -
201 out[0] = {0, 1};
│ │ │ │ -
202 out[1] = {0, -1};
│ │ │ │ -
203 out[2] = {0, 1};
│ │ │ │ -
204 }
│ │ │ │ -
205 else
│ │ │ │ -
206 {
│ │ │ │ -
207 out[0] = {-1, 0};
│ │ │ │ -
208 out[1] = { 1, 0};
│ │ │ │ -
209 out[2] = {-1, 0};
│ │ │ │ -
210 }
│ │ │ │ -
211 }
│ │ │ │ -
212
│ │ │ │ -
213 if (dim==3)
│ │ │ │ -
214 {
│ │ │ │ -
215 switch (direction)
│ │ │ │ -
216 {
│ │ │ │ -
217 case 0:
│ │ │ │ -
218 out[0] = { 0, 1, 1};
│ │ │ │ -
219 out[1] = { 0,-1, 0};
│ │ │ │ -
220 out[2] = { 0, 1, 0};
│ │ │ │ -
221 out[3] = { 0, 0,-1};
│ │ │ │ -
222 out[4] = { 0, 0, 1};
│ │ │ │ -
223 out[5] = { 0, 0, 0};
│ │ │ │ -
224 break;
│ │ │ │ -
225
│ │ │ │ -
226 case 1:
│ │ │ │ -
227 out[0] = {-1, 0, 0};
│ │ │ │ -
228 out[1] = { 1, 0, 1};
│ │ │ │ -
229 out[2] = {-1, 0, 0};
│ │ │ │ -
230 out[3] = { 0, 0,-1};
│ │ │ │ -
231 out[4] = { 0, 0, 0};
│ │ │ │ -
232 out[5] = { 0, 0, 1};
│ │ │ │ -
233 break;
│ │ │ │ -
234
│ │ │ │ -
235 case 2:
│ │ │ │ -
236 out[0] = {-1, 0, 0};
│ │ │ │ -
237 out[1] = { 0,-1, 0};
│ │ │ │ -
238 out[2] = { 0, 0, 0};
│ │ │ │ -
239 out[3] = { 1, 1, 0};
│ │ │ │ -
240 out[4] = {-1, 0, 0};
│ │ │ │ -
241 out[5] = { 0,-1, 0};
│ │ │ │ -
242 break;
│ │ │ │ -
243 }
│ │ │ │ -
244 }
│ │ │ │ -
245
│ │ │ │ -
246 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ -
247 out[i] *= edgeOrientation_[i];
│ │ │ │ -
248
│ │ │ │ -
249 } else {
│ │ │ │ -
250 out.resize(size());
│ │ │ │ -
251 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
252 for (std::size_t j = 0; j < dim; ++j)
│ │ │ │ -
253 out[i][j] = 0;
│ │ │ │ -
254 }
│ │ │ │ -
255
│ │ │ │ -
256 }
│ │ │ │ -
257
│ │ │ │ -
259 unsigned int order() const
│ │ │ │ -
260 {
│ │ │ │ -
261 return k;
│ │ │ │ -
262 }
│ │ │ │ -
263
│ │ │ │ -
264 private:
│ │ │ │ -
265
│ │ │ │ -
266 // Orientations of the simplex edges
│ │ │ │ -
267 std::array<R,numberOfEdges> edgeOrientation_;
│ │ │ │ -
268 };
│ │ │ │ -
269
│ │ │ │ -
270
│ │ │ │ -
275 template <int dim, int k>
│ │ │ │ -
276 class Nedelec1stKindSimplexLocalCoefficients
│ │ │ │ -
277 {
│ │ │ │ -
278 public:
│ │ │ │ -
280 Nedelec1stKindSimplexLocalCoefficients ()
│ │ │ │ -
281 : localKey_(size())
│ │ │ │ -
282 {
│ │ │ │ -
283 static_assert(k==1, "Only first-order Nédélec local coefficients are implemented.");
│ │ │ │ -
284 // Assign all degrees of freedom to edges
│ │ │ │ -
285 // TODO: This is correct only for first-order Nédélec elements
│ │ │ │ -
286 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
287 localKey_[i] = LocalKey(i,dim-1,0);
│ │ │ │ -
288 }
│ │ │ │ -
289
│ │ │ │ -
291 std::size_t size() const
│ │ │ │ -
292 {
│ │ │ │ -
293 static_assert(dim==2 || dim==3, "Nédélec shape functions are implemented only for 2d and 3d simplices.");
│ │ │ │ -
294 return (dim==2) ? k * (k+2)
│ │ │ │ -
295 : k * (k+2) * (k+3) / 2;
│ │ │ │ -
296 }
│ │ │ │ -
297
│ │ │ │ -
300 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
301 {
│ │ │ │ -
302 return localKey_[i];
│ │ │ │ -
303 }
│ │ │ │ -
304
│ │ │ │ -
305 private:
│ │ │ │ -
306 std::vector<LocalKey> localKey_;
│ │ │ │ -
307 };
│ │ │ │ -
308
│ │ │ │ -
313 template<class LB>
│ │ │ │ -
314 class Nedelec1stKindSimplexLocalInterpolation
│ │ │ │ -
315 {
│ │ │ │ -
316 static constexpr auto dim = LB::Traits::dimDomain;
│ │ │ │ -
317 static constexpr auto size = LB::size();
│ │ │ │ -
318
│ │ │ │ -
319 // Number of edges of the reference simplex
│ │ │ │ -
320 constexpr static std::size_t numberOfEdges = dim*(dim+1)/2;
│ │ │ │ -
321
│ │ │ │ -
322 public:
│ │ │ │ -
323
│ │ │ │ -
325 Nedelec1stKindSimplexLocalInterpolation (std::bitset<numberOfEdges> s = 0)
│ │ │ │ -
326 {
│ │ │ │ -
327 auto refElement = Dune::referenceElement<double,dim>(GeometryTypes::simplex(dim));
│ │ │ │ -
328
│ │ │ │ -
329 for (std::size_t i=0; i<numberOfEdges; i++)
│ │ │ │ -
330 m_[i] = refElement.position(i,dim-1);
│ │ │ │ -
331
│ │ │ │ -
332 for (std::size_t i=0; i<numberOfEdges; i++)
│ │ │ │ -
333 {
│ │ │ │ -
334 auto vertexIterator = refElement.subEntities(i,dim-1,dim).begin();
│ │ │ │ -
335 auto v0 = *vertexIterator;
│ │ │ │ -
336 auto v1 = *(++vertexIterator);
│ │ │ │ -
337 // By default, edges point from the vertex with the smaller index
│ │ │ │ -
338 // to the vertex with the larger index.
│ │ │ │ -
339 if (v0>v1)
│ │ │ │ -
340 std::swap(v0,v1);
│ │ │ │ -
341 edge_[i] = refElement.position(v1,dim) - refElement.position(v0,dim);
│ │ │ │ -
342 edge_[i] *= (s[i]) ? -1.0 : 1.0;
│ │ │ │ -
343 }
│ │ │ │ -
344 }
│ │ │ │ -
345
│ │ │ │ -
351 template<typename F, typename C>
│ │ │ │ -
352 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
353 {
│ │ │ │ -
354 out.resize(size);
│ │ │ │ -
355 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
356
│ │ │ │ -
357 for (std::size_t i=0; i<size; i++)
│ │ │ │ -
358 {
│ │ │ │ -
359 auto y = f(m_[i]);
│ │ │ │ -
360 out[i] = 0.0;
│ │ │ │ -
361 for (int j=0; j<dim; j++)
│ │ │ │ -
362 out[i] += y[j]*edge_[i][j];
│ │ │ │ -
363 }
│ │ │ │ -
364 }
│ │ │ │ -
365
│ │ │ │ -
366 private:
│ │ │ │ -
367 // Edge midpoints of the reference simplex
│ │ │ │ -
368 std::array<typename LB::Traits::DomainType, numberOfEdges> m_;
│ │ │ │ -
369 // Edges of the reference simplex
│ │ │ │ -
370 std::array<typename LB::Traits::DomainType, numberOfEdges> edge_;
│ │ │ │ -
371 };
│ │ │ │ -
372
│ │ │ │ -
373}
│ │ │ │ -
374
│ │ │ │ -
375
│ │ │ │ -
401 template<class D, class R, int dim, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
403 {
│ │ │ │ -
404 public:
│ │ │ │ - │ │ │ │ -
406 Impl::Nedelec1stKindSimplexLocalCoefficients<dim,k>,
│ │ │ │ -
407 Impl::Nedelec1stKindSimplexLocalInterpolation<Impl::Nedelec1stKindSimplexLocalBasis<D,R,dim,k> > >;
│ │ │ │ -
408
│ │ │ │ -
409 static_assert(dim==2 || dim==3, "Nedelec elements are only implemented for 2d and 3d elements.");
│ │ │ │ -
410 static_assert(k==1, "Nedelec elements of the first kind are currently only implemented for order k==1.");
│ │ │ │ -
411
│ │ │ │ - │ │ │ │ -
415
│ │ │ │ -
│ │ │ │ -
421 Nedelec1stKindSimplexLocalFiniteElement (std::bitset<dim*(dim+1)/2> s) :
│ │ │ │ -
422 basis_(s),
│ │ │ │ -
423 interpolation_(s)
│ │ │ │ -
424 {}
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
│ │ │ │ -
426 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
427 {
│ │ │ │ -
428 return basis_;
│ │ │ │ -
429 }
│ │ │ │ -
│ │ │ │ -
430
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
432 {
│ │ │ │ -
433 return coefficients_;
│ │ │ │ -
434 }
│ │ │ │ -
│ │ │ │ -
435
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
437 {
│ │ │ │ -
438 return interpolation_;
│ │ │ │ -
439 }
│ │ │ │ -
│ │ │ │ -
440
│ │ │ │ -
│ │ │ │ -
441 static constexpr unsigned int size ()
│ │ │ │ -
442 {
│ │ │ │ -
443 return Traits::LocalBasisType::size();
│ │ │ │ -
444 }
│ │ │ │ -
│ │ │ │ -
445
│ │ │ │ -
│ │ │ │ -
446 static constexpr GeometryType type ()
│ │ │ │ -
447 {
│ │ │ │ -
448 return GeometryTypes::simplex(dim);
│ │ │ │ -
449 }
│ │ │ │ -
│ │ │ │ -
450
│ │ │ │ -
451 private:
│ │ │ │ -
452 typename Traits::LocalBasisType basis_;
│ │ │ │ -
453 typename Traits::LocalCoefficientsType coefficients_;
│ │ │ │ -
454 typename Traits::LocalInterpolationType interpolation_;
│ │ │ │ -
455 };
│ │ │ │ -
│ │ │ │ -
456
│ │ │ │ -
457}
│ │ │ │ -
458
│ │ │ │ -
459#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ +
77 Impl::LagrangePrismLocalCoefficients<2> coefficients;
│ │ │ │ +
78
│ │ │ │ + │ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
82}
│ │ │ │ +
83
│ │ │ │ +
84#endif
│ │ │ │ + │ │ │ │ +
Hierarchical prism p2 shape functions for the simplex.
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Nédélec elements of the first kind for simplex elements.
Definition nedelec1stkindsimplex.hh:403
│ │ │ │ -
static constexpr unsigned int size()
Definition nedelec1stkindsimplex.hh:441
│ │ │ │ -
Nedelec1stKindSimplexLocalFiniteElement()=default
Default constructor.
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition nedelec1stkindsimplex.hh:436
│ │ │ │ -
Nedelec1stKindSimplexLocalFiniteElement(std::bitset< dim *(dim+1)/2 > s)
Constructor with explicitly given edge orientations.
Definition nedelec1stkindsimplex.hh:421
│ │ │ │ -
static constexpr GeometryType type()
Definition nedelec1stkindsimplex.hh:446
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition nedelec1stkindsimplex.hh:426
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition nedelec1stkindsimplex.hh:431
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Definition hierarchicalprismp2.hh:24
│ │ │ │ +
static constexpr GeometryType type()
Definition hierarchicalprismp2.hh:68
│ │ │ │ +
HierarchicalPrismP2LocalFiniteElement()
Definition hierarchicalprismp2.hh:36
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalprismp2.hh:55
│ │ │ │ +
LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl::LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< HierarchicalPrismP2LocalBasis< D, R > > > Traits
Definition hierarchicalprismp2.hh:32
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalprismp2.hh:41
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalprismp2.hh:61
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalprismp2.hh:48
│ │ │ │ +
Definition hierarchicalprismp2localbasis.hh:23
│ │ │ │ +
Definition hierarchicalprismp2localinterpolation.hh:18
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,446 +1,132 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _n_e_d_e_l_e_c │ │ │ │ │ -nedelec1stkindsimplex.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ +hierarchicalprismp2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_NEDELEC_NEDELEC1STKINDSIMPLEX_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ 12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ +13#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +14#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 15 │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> // For deprecated │ │ │ │ │ -makeFunctionWithCallOperator │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21namespace _D_u_n_e │ │ │ │ │ -22{ │ │ │ │ │ -23namespace Impl │ │ │ │ │ -24{ │ │ │ │ │ -35 template │ │ │ │ │ -36 class Nedelec1stKindSimplexLocalBasis │ │ │ │ │ -37 { │ │ │ │ │ -38 // Number of edges of the reference simplex │ │ │ │ │ -39 constexpr static std::size_t numberOfEdges = dim*(dim+1)/2; │ │ │ │ │ -40 │ │ │ │ │ -41 public: │ │ │ │ │ -42 using Traits = LocalBasisTraits, │ │ │ │ │ -43 R,dim,FieldVector, │ │ │ │ │ -44 FieldMatrix >; │ │ │ │ │ +16 │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +19 │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +24 { │ │ │ │ │ +25 │ │ │ │ │ +26 │ │ │ │ │ +27 public: │ │ │ │ │ +30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +31 Impl::LagrangePrismLocalCoefficients<2>, │ │ │ │ │ +_3_2 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > │ │ │ │ │ +_T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_6 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +42 { │ │ │ │ │ +43 return basis; │ │ │ │ │ +44 } │ │ │ │ │ 45 │ │ │ │ │ -52 Nedelec1stKindSimplexLocalBasis() │ │ │ │ │ -53 { │ │ │ │ │ -54 std::fill(edgeOrientation_.begin(), edgeOrientation_.end(), 1.0); │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -59 Nedelec1stKindSimplexLocalBasis(std::bitset edgeOrientation) │ │ │ │ │ -60 : Nedelec1stKindSimplexLocalBasis() │ │ │ │ │ -61 { │ │ │ │ │ -62 for (std::size_t i=0; i basis; │ │ │ │ │ 75 │ │ │ │ │ -81 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -82 std::vector& out) const │ │ │ │ │ -83 { │ │ │ │ │ -84 static_assert(k==1, "Evaluating Nédélec shape functions is implemented │ │ │ │ │ -only for first order."); │ │ │ │ │ -85 out.resize(size()); │ │ │ │ │ -86 │ │ │ │ │ -87 if (dim==2) │ │ │ │ │ -88 { │ │ │ │ │ -89 // First-order Nédélec shape functions on a triangle are of the form │ │ │ │ │ -90 // │ │ │ │ │ -91 // (a1, a2) + b(-x2, x1)^T, a_1, a_2, b \in R │ │ │ │ │ -92 out[0] = {D(1) - in[1], in[0]}; │ │ │ │ │ -93 out[1] = {in[1], -in[0]+D(1)}; │ │ │ │ │ -94 out[2] = {-in[1], in[0]}; │ │ │ │ │ -95 } │ │ │ │ │ -96 │ │ │ │ │ -97 if constexpr (dim==3) │ │ │ │ │ -98 { │ │ │ │ │ -99 // First-order Nédélec shape functions on a tetrahedron are of the form │ │ │ │ │ -100 // │ │ │ │ │ -101 // a + b \times x, a, b \in R^3 │ │ │ │ │ -102 // │ │ │ │ │ -103 // The following coefficients create the six basis vectors │ │ │ │ │ -104 // that are dual to the edge degrees of freedom: │ │ │ │ │ -105 // │ │ │ │ │ -106 // a[0] = { 1, 0, 0} b[0] = { 0, -1, 1} │ │ │ │ │ -107 // a[1] = { 0, 1, 0} b[1] = { 1, 0, -1} │ │ │ │ │ -108 // a[2] = { 0, 0, 0} b[2] = { 0, 0, 1} │ │ │ │ │ -109 // a[3] = { 0, 0, 1} b[3] = {-1, 1, 0} │ │ │ │ │ -110 // a[4] = { 0, 0, 0} b[4] = { 0, -1, 0} │ │ │ │ │ -111 // a[5] = { 0, 0, 0} b[5] = { 1, 0, 0} │ │ │ │ │ -112 // │ │ │ │ │ -113 // The following implementation uses these values, and simply │ │ │ │ │ -114 // skips all the zeros. │ │ │ │ │ -115 │ │ │ │ │ -116 out[0] = { 1 - in[1] - in[2], in[0] , in[0] }; │ │ │ │ │ -117 out[1] = { in[1] , 1 - in[0] - in[2], in[1]}; │ │ │ │ │ -118 out[2] = { - in[1] , in[0] , 0 }; │ │ │ │ │ -119 out[3] = { in[2], in[2], 1 - in[0] - in[1]}; │ │ │ │ │ -120 out[4] = { -in[2], 0 , in[0] }; │ │ │ │ │ -121 out[5] = { 0 , -in[2], in[1]}; │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -124 for (std::size_t i=0; i& out) const │ │ │ │ │ -135 { │ │ │ │ │ -136 out.resize(size()); │ │ │ │ │ -137 if (dim==2) │ │ │ │ │ -138 { │ │ │ │ │ -139 out[0][0] = { 0, -1}; │ │ │ │ │ -140 out[0][1] = { 1, 0}; │ │ │ │ │ -141 │ │ │ │ │ -142 out[1][0] = { 0, 1}; │ │ │ │ │ -143 out[1][1] = {-1, 0}; │ │ │ │ │ -144 │ │ │ │ │ -145 out[2][0] = { 0, -1}; │ │ │ │ │ -146 out[2][1] = { 1, 0}; │ │ │ │ │ -147 } │ │ │ │ │ -148 if (dim==3) │ │ │ │ │ -149 { │ │ │ │ │ -150 out[0][0] = { 0,-1,-1}; │ │ │ │ │ -151 out[0][1] = { 1, 0, 0}; │ │ │ │ │ -152 out[0][2] = { 1, 0, 0}; │ │ │ │ │ -153 │ │ │ │ │ -154 out[1][0] = { 0, 1, 0}; │ │ │ │ │ -155 out[1][1] = {-1, 0, -1}; │ │ │ │ │ -156 out[1][2] = { 0, 1, 0}; │ │ │ │ │ -157 │ │ │ │ │ -158 out[2][0] = { 0, -1, 0}; │ │ │ │ │ -159 out[2][1] = { 1, 0, 0}; │ │ │ │ │ -160 out[2][2] = { 0, 0, 0}; │ │ │ │ │ -161 │ │ │ │ │ -162 out[3][0] = { 0, 0, 1}; │ │ │ │ │ -163 out[3][1] = { 0, 0, 1}; │ │ │ │ │ -164 out[3][2] = {-1, -1, 0}; │ │ │ │ │ -165 │ │ │ │ │ -166 out[4][0] = { 0, 0, -1}; │ │ │ │ │ -167 out[4][1] = { 0, 0, 0}; │ │ │ │ │ -168 out[4][2] = { 1, 0, 0}; │ │ │ │ │ -169 │ │ │ │ │ -170 out[5][0] = { 0, 0, 0}; │ │ │ │ │ -171 out[5][1] = { 0, 0, -1}; │ │ │ │ │ -172 out[5][2] = { 0, 1, 0}; │ │ │ │ │ -173 } │ │ │ │ │ -174 │ │ │ │ │ -175 for (std::size_t i=0; i& order, │ │ │ │ │ -187 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -188 std::vector& out) const │ │ │ │ │ -189 { │ │ │ │ │ -190 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -191 if (totalOrder == 0) { │ │ │ │ │ -192 evaluateFunction(in, out); │ │ │ │ │ -193 } else if (totalOrder == 1) { │ │ │ │ │ -194 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -195 out.resize(size()); │ │ │ │ │ -196 │ │ │ │ │ -197 if (dim==2) │ │ │ │ │ -198 { │ │ │ │ │ -199 if (direction==0) │ │ │ │ │ -200 { │ │ │ │ │ -201 out[0] = {0, 1}; │ │ │ │ │ -202 out[1] = {0, -1}; │ │ │ │ │ -203 out[2] = {0, 1}; │ │ │ │ │ -204 } │ │ │ │ │ -205 else │ │ │ │ │ -206 { │ │ │ │ │ -207 out[0] = {-1, 0}; │ │ │ │ │ -208 out[1] = { 1, 0}; │ │ │ │ │ -209 out[2] = {-1, 0}; │ │ │ │ │ -210 } │ │ │ │ │ -211 } │ │ │ │ │ -212 │ │ │ │ │ -213 if (dim==3) │ │ │ │ │ -214 { │ │ │ │ │ -215 switch (direction) │ │ │ │ │ -216 { │ │ │ │ │ -217 case 0: │ │ │ │ │ -218 out[0] = { 0, 1, 1}; │ │ │ │ │ -219 out[1] = { 0,-1, 0}; │ │ │ │ │ -220 out[2] = { 0, 1, 0}; │ │ │ │ │ -221 out[3] = { 0, 0,-1}; │ │ │ │ │ -222 out[4] = { 0, 0, 1}; │ │ │ │ │ -223 out[5] = { 0, 0, 0}; │ │ │ │ │ -224 break; │ │ │ │ │ -225 │ │ │ │ │ -226 case 1: │ │ │ │ │ -227 out[0] = {-1, 0, 0}; │ │ │ │ │ -228 out[1] = { 1, 0, 1}; │ │ │ │ │ -229 out[2] = {-1, 0, 0}; │ │ │ │ │ -230 out[3] = { 0, 0,-1}; │ │ │ │ │ -231 out[4] = { 0, 0, 0}; │ │ │ │ │ -232 out[5] = { 0, 0, 1}; │ │ │ │ │ -233 break; │ │ │ │ │ -234 │ │ │ │ │ -235 case 2: │ │ │ │ │ -236 out[0] = {-1, 0, 0}; │ │ │ │ │ -237 out[1] = { 0,-1, 0}; │ │ │ │ │ -238 out[2] = { 0, 0, 0}; │ │ │ │ │ -239 out[3] = { 1, 1, 0}; │ │ │ │ │ -240 out[4] = {-1, 0, 0}; │ │ │ │ │ -241 out[5] = { 0,-1, 0}; │ │ │ │ │ -242 break; │ │ │ │ │ -243 } │ │ │ │ │ -244 } │ │ │ │ │ -245 │ │ │ │ │ -246 for (std::size_t i=0; i edgeOrientation_; │ │ │ │ │ -268 }; │ │ │ │ │ -269 │ │ │ │ │ -270 │ │ │ │ │ -275 template │ │ │ │ │ -276 class Nedelec1stKindSimplexLocalCoefficients │ │ │ │ │ -277 { │ │ │ │ │ -278 public: │ │ │ │ │ -280 Nedelec1stKindSimplexLocalCoefficients () │ │ │ │ │ -281 : localKey_(size()) │ │ │ │ │ -282 { │ │ │ │ │ -283 static_assert(k==1, "Only first-order Nédélec local coefficients are │ │ │ │ │ -implemented."); │ │ │ │ │ -284 // Assign all degrees of freedom to edges │ │ │ │ │ -285 // TODO: This is correct only for first-order Nédélec elements │ │ │ │ │ -286 for (std::size_t i=0; i localKey_; │ │ │ │ │ -307 }; │ │ │ │ │ -308 │ │ │ │ │ -313 template │ │ │ │ │ -314 class Nedelec1stKindSimplexLocalInterpolation │ │ │ │ │ -315 { │ │ │ │ │ -316 static constexpr auto dim = LB::Traits::dimDomain; │ │ │ │ │ -317 static constexpr auto size = LB::size(); │ │ │ │ │ -318 │ │ │ │ │ -319 // Number of edges of the reference simplex │ │ │ │ │ -320 constexpr static std::size_t numberOfEdges = dim*(dim+1)/2; │ │ │ │ │ -321 │ │ │ │ │ -322 public: │ │ │ │ │ -323 │ │ │ │ │ -325 Nedelec1stKindSimplexLocalInterpolation (std::bitset s = 0) │ │ │ │ │ -326 { │ │ │ │ │ -327 auto refElement = Dune::referenceElement(GeometryTypes::simplex │ │ │ │ │ -(dim)); │ │ │ │ │ -328 │ │ │ │ │ -329 for (std::size_t i=0; iv1) │ │ │ │ │ -340 std::swap(v0,v1); │ │ │ │ │ -341 edge_[i] = refElement.position(v1,dim) - refElement.position(v0,dim); │ │ │ │ │ -342 edge_[i] *= (s[i]) ? -1.0 : 1.0; │ │ │ │ │ -343 } │ │ │ │ │ -344 } │ │ │ │ │ -345 │ │ │ │ │ -351 template │ │ │ │ │ -352 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -353 { │ │ │ │ │ -354 out.resize(size); │ │ │ │ │ -355 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -356 │ │ │ │ │ -357 for (std::size_t i=0; i m_; │ │ │ │ │ -369 // Edges of the reference simplex │ │ │ │ │ -370 std::array edge_; │ │ │ │ │ -371 }; │ │ │ │ │ -372 │ │ │ │ │ -373} │ │ │ │ │ -374 │ │ │ │ │ -375 │ │ │ │ │ -401 template │ │ │ │ │ -_4_0_2 class _N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -403 { │ │ │ │ │ -404 public: │ │ │ │ │ -_4_0_5 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_k_>, │ │ │ │ │ -406 Impl::Nedelec1stKindSimplexLocalCoefficients, │ │ │ │ │ -407 Impl::Nedelec1stKindSimplexLocalInterpolation > >; │ │ │ │ │ -408 │ │ │ │ │ -409 static_assert(dim==2 || dim==3, "Nedelec elements are only implemented for │ │ │ │ │ -2d and 3d elements."); │ │ │ │ │ -410 static_assert(k==1, "Nedelec elements of the first kind are currently only │ │ │ │ │ -implemented for order k==1."); │ │ │ │ │ -411 │ │ │ │ │ -_4_1_4 _N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() = default; │ │ │ │ │ -415 │ │ │ │ │ -_4_2_1 _N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset s) : │ │ │ │ │ -422 basis_(s), │ │ │ │ │ -423 interpolation_(s) │ │ │ │ │ -424 {} │ │ │ │ │ -425 │ │ │ │ │ -_4_2_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -427 { │ │ │ │ │ -428 return basis_; │ │ │ │ │ -429 } │ │ │ │ │ -430 │ │ │ │ │ -_4_3_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -432 { │ │ │ │ │ -433 return coefficients_; │ │ │ │ │ -434 } │ │ │ │ │ -435 │ │ │ │ │ -_4_3_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -437 { │ │ │ │ │ -438 return interpolation_; │ │ │ │ │ -439 } │ │ │ │ │ -440 │ │ │ │ │ -_4_4_1 static constexpr unsigned int _s_i_z_e () │ │ │ │ │ -442 { │ │ │ │ │ -443 return Traits::LocalBasisType::size(); │ │ │ │ │ -444 } │ │ │ │ │ -445 │ │ │ │ │ -_4_4_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -447 { │ │ │ │ │ -448 return GeometryTypes::simplex(dim); │ │ │ │ │ -449 } │ │ │ │ │ -450 │ │ │ │ │ -451 private: │ │ │ │ │ -452 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e basis_; │ │ │ │ │ -453 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e coefficients_; │ │ │ │ │ -454 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e interpolation_; │ │ │ │ │ -455 }; │ │ │ │ │ -456 │ │ │ │ │ -457} │ │ │ │ │ -458 │ │ │ │ │ -459#endif │ │ │ │ │ +77 Impl::LagrangePrismLocalCoefficients<2> coefficients; │ │ │ │ │ +78 │ │ │ │ │ +79 _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > │ │ │ │ │ +interpolation; │ │ │ │ │ +80 }; │ │ │ │ │ +81 │ │ │ │ │ +82} │ │ │ │ │ +83 │ │ │ │ │ +84#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ _l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ traits helper struct │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ LB LocalBasisType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nédélec elements of the first kind for simplex elements. │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:403 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr unsigned int size() │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:441 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement()=default │ │ │ │ │ -Default constructor. │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:436 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ -_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Nedelec1stKindSimplexLocalFiniteElement(std::bitset< dim *(dim+1)/2 > s) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:421 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:446 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +HierarchicalPrismP2LocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalPrismP2LocalBasis< D, R >, Impl:: │ │ │ │ │ +LagrangePrismLocalCoefficients< 2 >, HierarchicalPrismP2LocalInterpolation< │ │ │ │ │ +HierarchicalPrismP2LocalBasis< D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:426 │ │ │ │ │ -_D_u_n_e_:_:_N_e_d_e_l_e_c_1_s_t_K_i_n_d_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn nedelec1stkindsimplex.hh:431 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: polynomialbasis.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,51 +65,63 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
polynomialbasis.hh File Reference
│ │ │ │ +
hierarchicalsimplexp2withelementbubble.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <numeric>
│ │ │ │ + │ │ │ │ +

Hierarchical p2 shape functions for the simplex. │ │ │ │ +More...

│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ #include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/utility/coeffmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ -#include <dune/localfunctions/utility/basisevaluator.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::PolynomialBasis< Eval, CM, D, R >
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim >
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
 
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 2 >
 Hierarchical P2 basis in 1d. More...
 
struct  Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DVector >
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, 3 >
 Hierarchical P2 basis in 1d. More...
 
struct  Dune::PolynomialBasis< Eval, CM, D, R >::Convert< dummy, DomainVector >
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >
 The local finite element needed for the Zou-Kornhuber estimator for Signorini problems. More...
 
class  Dune::PolynomialBasisWithMatrix< Eval, CM, D, R >
class  Dune::HierarchicalSimplexP2WithElementBubbleLocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Hierarchical p2 shape functions for the simplex.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,33 +1,44 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -polynomialbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalsimplexp2withelementbubble.hh File Reference │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_c_o_e_f_f_m_a_t_r_i_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_V_e_c_t_o_r_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ +  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ - _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ +  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ - class   _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ +  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_ _d_i_m_ _> │ │ │ │ │ +  The local finite element needed for the Zou-Kornhuber estimator for │ │ │ │ │ + Signorini problems. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00164_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: polynomialbasis.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2withelementbubble.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,481 +70,496 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
polynomialbasis.hh
│ │ │ │ +
hierarchicalsimplexp2withelementbubble.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_POLYNOMIALBASIS_HH
│ │ │ │ -
6#define DUNE_POLYNOMIALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12
│ │ │ │ - │ │ │ │ +
12#include <numeric>
│ │ │ │ +
13#include <vector>
│ │ │ │
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22
│ │ │ │ -
23 // PolynomialBasis
│ │ │ │ -
24 // ---------------
│ │ │ │ -
25
│ │ │ │ -
63 template< class Eval, class CM, class D=double, class R=double >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
65 {
│ │ │ │ - │ │ │ │ -
67 typedef Eval Evaluator;
│ │ │ │ -
68
│ │ │ │ -
69 public:
│ │ │ │ - │ │ │ │ -
71
│ │ │ │ -
72 typedef typename CoefficientMatrix::Field StorageField;
│ │ │ │ -
73
│ │ │ │ -
74 static const unsigned int dimension = Evaluator::dimension;
│ │ │ │ -
75 static const unsigned int dimRange = Evaluator::dimRange*CoefficientMatrix::blockSize;
│ │ │ │ - │ │ │ │ -
77 R,dimRange,FieldVector<R,dimRange>,
│ │ │ │ -
78 FieldMatrix<R,dimRange,dimension> > Traits;
│ │ │ │ -
79 typedef typename Evaluator::Basis Basis;
│ │ │ │ -
80 typedef typename Evaluator::DomainVector DomainVector;
│ │ │ │ -
81 template <class Fy>
│ │ │ │ -
82 using HessianFyType = FieldVector<FieldMatrix<Fy,dimension,dimension>,dimRange>;
│ │ │ │ - │ │ │ │ +
15#include <dune/common/fvector.hh>
│ │ │ │ +
16#include <dune/common/fmatrix.hh>
│ │ │ │ +
17
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
21
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
24 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not implemented for dim > 3.");
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32 };
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
48 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50 {
│ │ │ │ +
51 public:
│ │ │ │ +
53 typedef LocalBasisTraits<D,1,Dune::FieldVector<D,1>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
54 Dune::FieldMatrix<R,1,1> > Traits;
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ +
57 unsigned int size () const
│ │ │ │ +
58 {
│ │ │ │ +
59 return 3;
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
63 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
64 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
65 {
│ │ │ │ +
66 out.resize(3);
│ │ │ │ +
67
│ │ │ │ +
68 out[0] = 1-in[0];
│ │ │ │ +
69 out[1] = in[0];
│ │ │ │ +
70 out[2] = 1-4*(in[0]-0.5)*(in[0]-0.5);
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
74 inline void
│ │ │ │ +
│ │ │ │ +
75 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
76 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
77 {
│ │ │ │ +
78 out.resize(3);
│ │ │ │ +
79
│ │ │ │ +
80 out[0][0][0] = -1;
│ │ │ │ +
81 out[1][0][0] = 1;
│ │ │ │ +
82 out[2][0][0] = 4-8*in[0];
│ │ │ │ +
83 }
│ │ │ │ +
│ │ │ │
84
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
86 const CoefficientMatrix &coeffMatrix,
│ │ │ │ -
87 unsigned int size)
│ │ │ │ -
88 : basis_(basis),
│ │ │ │ -
89 coeffMatrix_(&coeffMatrix),
│ │ │ │ -
90 eval_(basis),
│ │ │ │ - │ │ │ │ -
92 size_(size)
│ │ │ │ -
93 {
│ │ │ │ -
94 // assert(coeffMatrix_);
│ │ │ │ -
95 // assert(size_ <= coeffMatrix.size()); // !!!
│ │ │ │ -
96 }
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
│ │ │ │ -
98 const Basis &basis () const
│ │ │ │ -
99 {
│ │ │ │ -
100 return basis_;
│ │ │ │ -
101 }
│ │ │ │ -
│ │ │ │ -
102
│ │ │ │ -
│ │ │ │ -
103 const CoefficientMatrix &matrix () const
│ │ │ │ -
104 {
│ │ │ │ -
105 return *coeffMatrix_;
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107
│ │ │ │ -
│ │ │ │ -
108 unsigned int order () const
│ │ │ │ -
109 {
│ │ │ │ -
110 return order_;
│ │ │ │ -
111 }
│ │ │ │ -
│ │ │ │ -
112
│ │ │ │ -
│ │ │ │ -
113 unsigned int size () const
│ │ │ │ -
114 {
│ │ │ │ -
115 return size_;
│ │ │ │ -
116 }
│ │ │ │ +
│ │ │ │ +
86 void partial (const std::array<unsigned int, 1>& order,
│ │ │ │ +
87 const typename Traits::DomainType& in, // position
│ │ │ │ +
88 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
89 {
│ │ │ │ +
90 auto totalOrder = order[0];
│ │ │ │ +
91 if (totalOrder == 0) {
│ │ │ │ +
92 evaluateFunction(in, out);
│ │ │ │ +
93 } else if (totalOrder == 1) {
│ │ │ │ +
94 out.resize(size());
│ │ │ │ +
95 out[0] = -1;
│ │ │ │ +
96 out[1] = 1;
│ │ │ │ +
97 out[2] = 4-8*in[0];
│ │ │ │ +
98 } else if (totalOrder == 2) {
│ │ │ │ +
99 out.resize(size());
│ │ │ │ +
100 out[0] = 0;
│ │ │ │ +
101 out[1] = 0;
│ │ │ │ +
102 out[2] =-8;
│ │ │ │ +
103 } else {
│ │ │ │ +
104 out.resize(size());
│ │ │ │ +
105 out[0] = out[1] = out[2] = 0;
│ │ │ │ +
106 }
│ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │ +
│ │ │ │ +
111 unsigned int order () const
│ │ │ │ +
112 {
│ │ │ │ +
113 return 2;
│ │ │ │ +
114 }
│ │ │ │ +
│ │ │ │ +
115
│ │ │ │ +
116 };
│ │ │ │
│ │ │ │
117
│ │ │ │ -
│ │ │ │ -
119 void evaluateFunction (const typename Traits::DomainType& x,
│ │ │ │ -
120 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
121 {
│ │ │ │ -
122 out.resize(size());
│ │ │ │ -
123 evaluate(x,out);
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ -
127 void evaluateJacobian (const typename Traits::DomainType& x, // position
│ │ │ │ -
128 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
129 {
│ │ │ │ -
130 out.resize(size());
│ │ │ │ -
131 jacobian(x,out);
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ -
│ │ │ │ -
135 void evaluateHessian (const typename Traits::DomainType& x, // position
│ │ │ │ -
136 std::vector<HessianType>& out) const // return value
│ │ │ │ -
137 {
│ │ │ │ -
138 out.resize(size());
│ │ │ │ -
139 hessian(x,out);
│ │ │ │ -
140 }
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
│ │ │ │ -
143 void partial (const std::array<unsigned int, dimension>& order,
│ │ │ │ -
144 const typename Traits::DomainType& in, // position
│ │ │ │ -
145 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
146 {
│ │ │ │ -
147 out.resize(size());
│ │ │ │ -
148 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
149 if (totalOrder == 0) {
│ │ │ │ -
150 evaluateFunction(in, out);
│ │ │ │ -
151 }
│ │ │ │ -
152 else if (totalOrder == 1) {
│ │ │ │ -
153 std::vector<typename Traits::JacobianType> jacs(out.size());
│ │ │ │ -
154 unsigned int k;
│ │ │ │ -
155 for (unsigned int i=0;i<order.size();++i)
│ │ │ │ -
156 if (order[i]==1) k=i;
│ │ │ │ -
157 evaluateJacobian(in, jacs);
│ │ │ │ -
158 for (unsigned int i=0;i<out.size();++i)
│ │ │ │ -
159 for (unsigned int r=0;r<Traits::RangeType::dimension;++r)
│ │ │ │ -
160 out[i][r] = jacs[i][r][k];
│ │ │ │ -
161 }
│ │ │ │ -
162 else if (totalOrder == 2) {
│ │ │ │ -
163 std::vector<HessianType> hesss(out.size());
│ │ │ │ -
164 int k=-1,l=-1;
│ │ │ │ -
165 for (unsigned int i=0;i<order.size();++i) {
│ │ │ │ -
166 if (order[i] >= 1 && k == -1)
│ │ │ │ -
167 k = i;
│ │ │ │ -
168 else if (order[i]==1) l=i;
│ │ │ │ -
169 }
│ │ │ │ -
170 if (l==-1) l=k;
│ │ │ │ -
171 evaluateHessian(in, hesss);
│ │ │ │ -
172 for (unsigned int i=0;i<out.size();++i)
│ │ │ │ -
173 for (unsigned int r=0;r<Traits::RangeType::dimension;++r)
│ │ │ │ -
174 out[i][r] = hesss[i][r][k][l];
│ │ │ │ -
175 }
│ │ │ │ -
176 else {
│ │ │ │ -
177 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
178 }
│ │ │ │ -
179 }
│ │ │ │ -
│ │ │ │ -
180
│ │ │ │ -
181 template< unsigned int deriv, class F >
│ │ │ │ -
│ │ │ │ -
182 void evaluate ( const DomainVector &x, F *values ) const
│ │ │ │ -
183 {
│ │ │ │ -
184 coeffMatrix_->mult( eval_.template evaluate<deriv>( x ), size(), values);
│ │ │ │ -
185 }
│ │ │ │ -
│ │ │ │ -
186 template< unsigned int deriv, class DVector, class F >
│ │ │ │ -
│ │ │ │ -
187 void evaluate ( const DVector &x, F *values ) const
│ │ │ │ -
188 {
│ │ │ │ -
189 assert( DVector::dimension == dimension);
│ │ │ │ -
190 DomainVector bx;
│ │ │ │ -
191 for( int d = 0; d < dimension; ++d )
│ │ │ │ -
192 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
193 evaluate<deriv>( bx, values );
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
196 template <bool dummy,class DVector>
│ │ │ │ -
│ │ │ │ -
197 struct Convert
│ │ │ │ -
198 {
│ │ │ │ -
│ │ │ │ -
199 static DomainVector apply( const DVector &x )
│ │ │ │ -
200 {
│ │ │ │ -
201 assert( DVector::dimension == dimension);
│ │ │ │ -
202 DomainVector bx;
│ │ │ │ -
203 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ -
204 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
205 return bx;
│ │ │ │ -
206 }
│ │ │ │ -
│ │ │ │ -
207 };
│ │ │ │ -
│ │ │ │ -
208 template <bool dummy>
│ │ │ │ -
│ │ │ │ -
209 struct Convert<dummy,DomainVector>
│ │ │ │ -
210 {
│ │ │ │ -
│ │ │ │ -
211 static const DomainVector &apply( const DomainVector &x )
│ │ │ │ -
212 {
│ │ │ │ -
213 return x;
│ │ │ │ -
214 }
│ │ │ │ -
│ │ │ │ -
215 };
│ │ │ │ -
│ │ │ │ -
216 template< unsigned int deriv, class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
217 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ -
218 {
│ │ │ │ -
219 assert(values.size()>=size());
│ │ │ │ - │ │ │ │ -
221 coeffMatrix_->mult( eval_.template evaluate<deriv>( bx ), values );
│ │ │ │ -
222 }
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
224 template <class Fy>
│ │ │ │ -
│ │ │ │ -
225 void evaluate ( const DomainVector &x, std::vector<FieldVector<Fy,dimRange> > &values ) const
│ │ │ │ -
226 {
│ │ │ │ -
227 evaluate<0>(x,values);
│ │ │ │ -
228 }
│ │ │ │ -
│ │ │ │ -
229 template< class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
230 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ -
231 {
│ │ │ │ -
232 assert( DVector::dimension == dimension);
│ │ │ │ -
233 DomainVector bx;
│ │ │ │ -
234 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ -
235 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
236 evaluate<0>( bx, values );
│ │ │ │ -
237 }
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
239 template< unsigned int deriv, class Vector >
│ │ │ │ -
│ │ │ │ -
240 void evaluateSingle ( const DomainVector &x, Vector &values ) const
│ │ │ │ -
241 {
│ │ │ │ -
242 assert(values.size()>=size());
│ │ │ │ -
243 coeffMatrix_->template mult<deriv>( eval_.template evaluate<deriv>( x ), values );
│ │ │ │ -
244 }
│ │ │ │ -
│ │ │ │ -
245 template< unsigned int deriv, class Fy >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
247 std::vector< FieldVector<FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size>,dimRange> > &values) const
│ │ │ │ -
248 {
│ │ │ │ -
249 evaluateSingle<deriv>(x,reinterpret_cast<std::vector< FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size*dimRange> >&>(values));
│ │ │ │ -
250 }
│ │ │ │ -
│ │ │ │ -
251 template< unsigned int deriv, class Fy >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
253 std::vector< FieldVector<LFETensor<Fy,dimension,deriv>,dimRange> > &values) const
│ │ │ │ -
254 {
│ │ │ │ -
255 evaluateSingle<deriv>(x,reinterpret_cast<std::vector< FieldVector<Fy,LFETensor<Fy,dimension,deriv>::size*dimRange> >&>(values));
│ │ │ │ -
256 }
│ │ │ │ -
│ │ │ │ -
257
│ │ │ │ -
258 template <class Fy>
│ │ │ │ -
│ │ │ │ -
259 void jacobian ( const DomainVector &x,
│ │ │ │ -
260 std::vector<FieldMatrix<Fy,dimRange,dimension> > &values ) const
│ │ │ │ -
261 {
│ │ │ │ -
262 assert(values.size()>=size());
│ │ │ │ -
263 evaluateSingle<1>(x,reinterpret_cast<std::vector<FieldVector<Fy,dimRange*dimension> >&>(values));
│ │ │ │ -
264 }
│ │ │ │ -
│ │ │ │ -
265 template< class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
266 void jacobian ( const DVector &x, RVector &values ) const
│ │ │ │ -
267 {
│ │ │ │ -
268 assert( DVector::dimension == dimension);
│ │ │ │ -
269 DomainVector bx;
│ │ │ │ -
270 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ -
271 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
272 jacobian( bx, values );
│ │ │ │ -
273 }
│ │ │ │ +
138 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
140 {
│ │ │ │ +
141 public:
│ │ │ │ +
143 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
144 Dune::FieldMatrix<R,1,2> > Traits;
│ │ │ │ +
145
│ │ │ │ +
│ │ │ │ +
147 unsigned int size () const
│ │ │ │ +
148 {
│ │ │ │ +
149 return 7;
│ │ │ │ +
150 }
│ │ │ │ +
│ │ │ │ +
151
│ │ │ │ +
│ │ │ │ +
153 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
154 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
155 {
│ │ │ │ +
156 out.resize(7);
│ │ │ │ +
157
│ │ │ │ +
158 out[0] = 1 - in[0] - in[1];
│ │ │ │ +
159 out[1] = 4*in[0]*(1-in[0]-in[1]);
│ │ │ │ +
160 out[2] = in[0];
│ │ │ │ +
161 out[3] = 4*in[1]*(1-in[0]-in[1]);
│ │ │ │ +
162 out[4] = 4*in[0]*in[1];
│ │ │ │ +
163 out[5] = in[1];
│ │ │ │ +
164 out[6] = 27*in[0]*in[1]*(1-in[0]-in[1]);
│ │ │ │ +
165
│ │ │ │ +
166 }
│ │ │ │ +
│ │ │ │ +
167
│ │ │ │ +
169 inline void
│ │ │ │ +
│ │ │ │ +
170 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
171 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
172 {
│ │ │ │ +
173 out.resize(7);
│ │ │ │ +
174
│ │ │ │ +
175 out[0][0][0] = -1; out[0][0][1] = -1;
│ │ │ │ +
176 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0];
│ │ │ │ +
177 out[2][0][0] = 1; out[2][0][1] = 0;
│ │ │ │ +
178 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1];
│ │ │ │ +
179 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0];
│ │ │ │ +
180 out[5][0][0] = 0; out[5][0][1] = 1;
│ │ │ │ +
181
│ │ │ │ +
182 // Cubic bubble
│ │ │ │ +
183 out[6][0][0] = 27 * in[1] * (1 - 2*in[0] - in[1]);
│ │ │ │ +
184 out[6][0][1] = 27 * in[0] * (1 - 2*in[1] - in[0]);
│ │ │ │ +
185
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
│ │ │ │ +
189 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
190 const typename Traits::DomainType& in, // position
│ │ │ │ +
191 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
192 {
│ │ │ │ +
193 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
194 if (totalOrder == 0) {
│ │ │ │ +
195 evaluateFunction(in, out);
│ │ │ │ +
196 } else if (totalOrder == 1) {
│ │ │ │ +
197 out.resize(size());
│ │ │ │ +
198 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
199
│ │ │ │ +
200 switch (direction) {
│ │ │ │ +
201 case 0:
│ │ │ │ +
202 out[0] = -1;
│ │ │ │ +
203 out[1] = 4-8*in[0]-4*in[1];
│ │ │ │ +
204 out[2] = 1;
│ │ │ │ +
205 out[3] = -4*in[1];
│ │ │ │ +
206 out[4] = 4*in[1];
│ │ │ │ +
207 out[5] = 0;
│ │ │ │ +
208 out[6] = 27 * in[1] * (1 - 2*in[0] - in[1]);
│ │ │ │ +
209 break;
│ │ │ │ +
210 case 1:
│ │ │ │ +
211 out[0] = -1;
│ │ │ │ +
212 out[1] = -4*in[0];
│ │ │ │ +
213 out[2] = 0;
│ │ │ │ +
214 out[3] = 4-4*in[0]-8*in[1];
│ │ │ │ +
215 out[4] = 4*in[0];
│ │ │ │ +
216 out[5] = 1;
│ │ │ │ +
217 out[6] = 27 * in[0] * (1 - 2*in[1] - in[0]);
│ │ │ │ +
218 break;
│ │ │ │ +
219 default:
│ │ │ │ +
220 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
221 }
│ │ │ │ +
222 } else {
│ │ │ │ +
223 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
224 }
│ │ │ │ +
225 }
│ │ │ │ +
│ │ │ │ +
226
│ │ │ │ +
│ │ │ │ +
229 unsigned int order () const
│ │ │ │ +
230 {
│ │ │ │ +
231 return 3;
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
234 };
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
260 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
262 {
│ │ │ │ +
263 public:
│ │ │ │ +
265 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
266 Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ +
267
│ │ │ │ +
│ │ │ │ +
269 unsigned int size () const
│ │ │ │ +
270 {
│ │ │ │ +
271 return 11;
│ │ │ │ +
272 }
│ │ │ │
│ │ │ │ -
274 template <class Fy>
│ │ │ │ +
273
│ │ │ │
│ │ │ │ -
275 void hessian ( const DomainVector &x,
│ │ │ │ -
276 std::vector<HessianFyType<Fy>> &values ) const
│ │ │ │ +
275 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
276 std::vector<typename Traits::RangeType>& out) const
│ │ │ │
277 {
│ │ │ │ -
278 assert(values.size()>=size());
│ │ │ │ -
279 // only upper part of hessians matrix is computed - so we have
│ │ │ │ -
280 // y[0] = FV< FV<Fy,d*(d+1)/2>, dimRange>
│ │ │ │ -
281 const unsigned int hsize = LFETensor<Fy,dimension,2>::size;
│ │ │ │ -
282 std::vector< FieldVector< FieldVector<Fy,hsize>, dimRange> > y( size() );
│ │ │ │ -
283 evaluateSingle<2>(x, y);
│ │ │ │ -
284 unsigned int q = 0;
│ │ │ │ -
285 for (unsigned int i = 0; i < size(); ++i)
│ │ │ │ -
286 for (unsigned int r = 0; r < dimRange; ++r)
│ │ │ │ -
287 {
│ │ │ │ -
288 q = 0;
│ │ │ │ -
289 // tensor-based things follow unintuitive index sceme
│ │ │ │ -
290 // e.g. for dim = 3, the k-l index of y is 00,01,11,02,12,22, i.e. partial derivatives
│ │ │ │ -
291 // are ordered: xx,xy,yy,xz,yz,zz
│ │ │ │ -
292
│ │ │ │ -
293 // Fill values 'directionwise'
│ │ │ │ -
294 for (unsigned int k = 0; k < dimension; ++k)
│ │ │ │ -
295 for (unsigned int l = 0; l <= k; ++l)
│ │ │ │ -
296 {
│ │ │ │ -
297
│ │ │ │ -
298 values[i][r][k][l] = y[i][r][q];
│ │ │ │ -
299 values[i][r][l][k] = y[i][r][q];
│ │ │ │ -
300 assert(q < hsize);
│ │ │ │ -
301 ++q;
│ │ │ │ -
302 }
│ │ │ │ -
303 }
│ │ │ │ -
304 // evaluateSingle<2>(x,reinterpret_cast<std::vector<FieldVector<Fy,dimRange*dimension*dimension> >&>(values));
│ │ │ │ -
305 }
│ │ │ │ -
│ │ │ │ -
306 template< class DVector, class HVector >
│ │ │ │ -
│ │ │ │ -
307 void hessian ( const DVector &x, HVector &values ) const
│ │ │ │ -
308 {
│ │ │ │ -
309 assert( DVector::dimension == dimension);
│ │ │ │ -
310 DomainVector bx;
│ │ │ │ -
311 for( unsigned int d = 0; d < dimension; ++d )
│ │ │ │ -
312 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
313 hessian( bx, values );
│ │ │ │ -
314 }
│ │ │ │ -
│ │ │ │ -
315
│ │ │ │ -
316 template <class Fy>
│ │ │ │ -
│ │ │ │ -
317 void integrate ( std::vector<Fy> &values ) const
│ │ │ │ -
318 {
│ │ │ │ -
319 assert(values.size()>=size());
│ │ │ │ -
320 coeffMatrix_->mult( eval_.template integrate(), values );
│ │ │ │ -
321 }
│ │ │ │ -
│ │ │ │ -
322
│ │ │ │ -
323 protected:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
325 : basis_(other.basis_),
│ │ │ │ - │ │ │ │ -
327 eval_(basis_),
│ │ │ │ - │ │ │ │ -
329 size_(other.size_)
│ │ │ │ -
330 {}
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
332 const Basis &basis_;
│ │ │ │ - │ │ │ │ -
334 mutable Evaluator eval_;
│ │ │ │ -
335 unsigned int order_,size_;
│ │ │ │ -
336 };
│ │ │ │ -
│ │ │ │ -
337
│ │ │ │ -
344 template< class Eval, class CM = SparseCoeffMatrix<typename Eval::Field,Eval::dimRange>,
│ │ │ │ -
345 class D=double, class R=double>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
347 : public PolynomialBasis< Eval, CM, D, R >
│ │ │ │ -
348 {
│ │ │ │ -
349 public:
│ │ │ │ - │ │ │ │ -
351
│ │ │ │ -
352 private:
│ │ │ │ -
353 typedef Eval Evaluator;
│ │ │ │ -
354
│ │ │ │ - │ │ │ │ - │ │ │ │ -
357
│ │ │ │ -
358 public:
│ │ │ │ -
359 typedef typename Base::Basis Basis;
│ │ │ │ -
360
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
362 : Base(basis,coeffMatrix_,0)
│ │ │ │ -
363 {}
│ │ │ │ -
│ │ │ │ -
364
│ │ │ │ -
365 template <class Matrix>
│ │ │ │ -
│ │ │ │ -
366 void fill(const Matrix& matrix)
│ │ │ │ -
367 {
│ │ │ │ -
368 coeffMatrix_.fill(matrix);
│ │ │ │ -
369 this->size_ = coeffMatrix_.size();
│ │ │ │ -
370 }
│ │ │ │ -
│ │ │ │ -
371 template <class Matrix>
│ │ │ │ -
│ │ │ │ -
372 void fill(const Matrix& matrix,int size)
│ │ │ │ -
373 {
│ │ │ │ -
374 coeffMatrix_.fill(matrix);
│ │ │ │ -
375 assert(size<=coeffMatrix_.size());
│ │ │ │ -
376 this->size_ = size;
│ │ │ │ -
377 }
│ │ │ │ -
│ │ │ │ -
378
│ │ │ │ -
379 private:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
382 CoefficientMatrix coeffMatrix_;
│ │ │ │ -
383 };
│ │ │ │ -
│ │ │ │ -
384}
│ │ │ │ -
385#endif // DUNE_POLYNOMIALBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
278 out.resize(10);
│ │ │ │ +
279
│ │ │ │ +
280 out[0] = 1 - in[0] - in[1] - in[2];
│ │ │ │ +
281 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
282 out[2] = in[0];
│ │ │ │ +
283 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
284 out[4] = 4 * in[0] * in[1];
│ │ │ │ +
285 out[5] = in[1];
│ │ │ │ +
286 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
287 out[7] = 4 * in[0] * in[2];
│ │ │ │ +
288 out[8] = 4 * in[1] * in[2];
│ │ │ │ +
289 out[9] = in[2];
│ │ │ │ +
290
│ │ │ │ +
291 // quartic element bubble
│ │ │ │ +
292 out[10] = 81*in[0]*in[1]*in[2]*(1-in[0]-in[1]-in[2]);
│ │ │ │ +
293 }
│ │ │ │ +
│ │ │ │ +
294
│ │ │ │ +
│ │ │ │ +
296 void evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
297 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
298 {
│ │ │ │ +
299 out.resize(10);
│ │ │ │ +
300
│ │ │ │ +
301 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1;
│ │ │ │ +
302 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1][0][2] = -4*in[0];
│ │ │ │ +
303 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ +
304 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3][0][2] = -4*in[1];
│ │ │ │ +
305 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0;
│ │ │ │ +
306 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0;
│ │ │ │ +
307 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ +
308 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0];
│ │ │ │ +
309 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1];
│ │ │ │ +
310 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1;
│ │ │ │ +
311
│ │ │ │ +
312 out[10][0][0] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]);
│ │ │ │ +
313 out[10][0][1] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]);
│ │ │ │ +
314 out[10][0][2] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]);
│ │ │ │ +
315 }
│ │ │ │ +
│ │ │ │ +
316
│ │ │ │ +
│ │ │ │ +
318 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
319 const typename Traits::DomainType& in, // position
│ │ │ │ +
320 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
321 {
│ │ │ │ +
322 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
323 if (totalOrder == 0) {
│ │ │ │ +
324 evaluateFunction(in, out);
│ │ │ │ +
325 } else if (totalOrder == 1) {
│ │ │ │ +
326 out.resize(size());
│ │ │ │ +
327 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
328
│ │ │ │ +
329 switch (direction) {
│ │ │ │ +
330 case 0:
│ │ │ │ +
331 out[0] = -1;
│ │ │ │ +
332 out[1] = 4-8*in[0]-4*in[1]-4*in[2];
│ │ │ │ +
333 out[2] = 1;
│ │ │ │ +
334 out[3] = -4*in[1];
│ │ │ │ +
335 out[4] = 4*in[1];
│ │ │ │ +
336 out[5] = 0;
│ │ │ │ +
337 out[6] = -4*in[2];
│ │ │ │ +
338 out[7] = 4*in[2];
│ │ │ │ +
339 out[8] = 0;
│ │ │ │ +
340 out[9] = 0;
│ │ │ │ +
341 out[10] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]);
│ │ │ │ +
342 break;
│ │ │ │ +
343 case 1:
│ │ │ │ +
344 out[0] = -1;
│ │ │ │ +
345 out[1] = -4*in[0];
│ │ │ │ +
346 out[2] = 0;
│ │ │ │ +
347 out[3] = 4-4*in[0]-8*in[1]-4*in[2];
│ │ │ │ +
348 out[4] = 4*in[0];
│ │ │ │ +
349 out[5] = 1;
│ │ │ │ +
350 out[6] = -4*in[2];
│ │ │ │ +
351 out[7] = 0;
│ │ │ │ +
352 out[8] = 4*in[2];
│ │ │ │ +
353 out[9] = 0;
│ │ │ │ +
354 out[10] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]);
│ │ │ │ +
355 break;
│ │ │ │ +
356 case 2:
│ │ │ │ +
357 out[0] = -1;
│ │ │ │ +
358 out[1] = -4*in[0];
│ │ │ │ +
359 out[2] = 0;
│ │ │ │ +
360 out[3] = -4*in[1];
│ │ │ │ +
361 out[4] = 0;
│ │ │ │ +
362 out[5] = 0;
│ │ │ │ +
363 out[6] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ +
364 out[7] = 4*in[0];
│ │ │ │ +
365 out[8] = 4*in[1];
│ │ │ │ +
366 out[9] = 1;
│ │ │ │ +
367 out[10] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]);
│ │ │ │ +
368 break;
│ │ │ │ +
369 default:
│ │ │ │ +
370 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
371 }
│ │ │ │ +
372 } else {
│ │ │ │ +
373 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
374 }
│ │ │ │ +
375 }
│ │ │ │ +
│ │ │ │ +
376
│ │ │ │ +
│ │ │ │ +
379 unsigned int order () const
│ │ │ │ +
380 {
│ │ │ │ +
381 return 4;
│ │ │ │ +
382 }
│ │ │ │ +
│ │ │ │ +
383
│ │ │ │ +
384 };
│ │ │ │ +
│ │ │ │ +
385
│ │ │ │ +
386
│ │ │ │ +
412 template <int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
414 {
│ │ │ │ +
415 // The binomial coefficient: dim+1 over 1
│ │ │ │ +
416 static const int numVertices = dim+1;
│ │ │ │ +
417
│ │ │ │ +
418 // The binomial coefficient: dim+1 over 2
│ │ │ │ +
419 static const int numEdges = (dim+1)*dim / 2;
│ │ │ │ +
420
│ │ │ │ +
421 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
424 : li(numVertices+numEdges + 1)
│ │ │ │ +
425 {
│ │ │ │ +
426 if (dim!=2)
│ │ │ │ +
427 DUNE_THROW(NotImplemented, "only for 2d");
│ │ │ │ +
428
│ │ │ │ +
429 li[0] = Dune::LocalKey(0,2,0); // Vertex (0,0)
│ │ │ │ +
430 li[1] = Dune::LocalKey(0,1,0); // Edge (0.5, 0)
│ │ │ │ +
431 li[2] = Dune::LocalKey(1,2,0); // Vertex (1,0)
│ │ │ │ +
432 li[3] = Dune::LocalKey(1,1,0); // Edge (0, 0.5)
│ │ │ │ +
433 li[4] = Dune::LocalKey(2,1,0); // Edge (0.5, 0.5)
│ │ │ │ +
434 li[5] = Dune::LocalKey(2,2,0); // Vertex (0,1)
│ │ │ │ +
435 li[6] = Dune::LocalKey(0,0,0); // Element (1/3, 1/3)
│ │ │ │ +
436 }
│ │ │ │ +
│ │ │ │ +
437
│ │ │ │ +
│ │ │ │ +
439 size_t size () const
│ │ │ │ +
440 {
│ │ │ │ +
441 return numVertices+numEdges + 1;
│ │ │ │ +
442 }
│ │ │ │ +
│ │ │ │ +
443
│ │ │ │ +
│ │ │ │ +
445 const Dune::LocalKey& localKey (size_t i) const
│ │ │ │ +
446 {
│ │ │ │ +
447 return li[i];
│ │ │ │ +
448 }
│ │ │ │ +
│ │ │ │ +
449
│ │ │ │ +
450 private:
│ │ │ │ +
451 std::vector<Dune::LocalKey> li;
│ │ │ │ +
452 };
│ │ │ │ +
│ │ │ │ +
453
│ │ │ │ +
454 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
456 {
│ │ │ │ +
457 public:
│ │ │ │ +
458
│ │ │ │ +
460 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
461 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
462 {
│ │ │ │ +
463 typename LB::Traits::DomainType x;
│ │ │ │ +
464 typename LB::Traits::RangeType y;
│ │ │ │ +
465
│ │ │ │ +
466 out.resize(7);
│ │ │ │ +
467
│ │ │ │ +
468 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ +
469
│ │ │ │ +
470 // vertices
│ │ │ │ +
471 x[0] = 0.0; x[1] = 0.0; out[0] = f(x);
│ │ │ │ +
472 x[0] = 1.0; x[1] = 0.0; out[2] = f(x);
│ │ │ │ +
473 x[0] = 0.0; x[1] = 1.0; out[5] = f(x);
│ │ │ │ +
474
│ │ │ │ +
475 // edge bubbles
│ │ │ │ +
476 x[0] = 0.5; x[1] = 0.0; y = f(x);
│ │ │ │ +
477 out[1] = y - out[0]*(1-x[0]) - out[2]*x[0];
│ │ │ │ +
478
│ │ │ │ +
479 x[0] = 0.0; x[1] = 0.5; y = f(x);
│ │ │ │ +
480 out[3] = y - out[0]*(1-x[1]) - out[5]*x[1];
│ │ │ │ +
481
│ │ │ │ +
482 x[0] = 0.5; x[1] = 0.5; y = f(x);
│ │ │ │ +
483 out[4] = y - out[2]*x[0] - out[5]*x[1];
│ │ │ │ +
484
│ │ │ │ +
485 // element bubble
│ │ │ │ +
486 x[0] = 1.0/3; x[1] = 1.0/3; y = f(x);
│ │ │ │ +
487
│ │ │ │ + │ │ │ │ +
490 std::vector<typename LB::Traits::RangeType> sfValues;
│ │ │ │ +
491 shapeFunctions.evaluateFunction(x, sfValues);
│ │ │ │ +
492
│ │ │ │ +
493 out[6] = y;
│ │ │ │ +
494 for (int i=0; i<6; i++)
│ │ │ │ +
495 out[6] -= out[i]*sfValues[i];
│ │ │ │ +
496
│ │ │ │ +
497 }
│ │ │ │ +
│ │ │ │ +
498
│ │ │ │ +
499 };
│ │ │ │ +
│ │ │ │ +
500
│ │ │ │ +
501
│ │ │ │ +
502}
│ │ │ │ +
503#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ -
void evaluate(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:230
│ │ │ │ -
void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > &values) const
Definition polynomialbasis.hh:225
│ │ │ │ -
PolynomialBasis(const PolynomialBasis &other)
Definition polynomialbasis.hh:324
│ │ │ │ -
void evaluate(const DVector &x, F *values) const
Definition polynomialbasis.hh:187
│ │ │ │ -
void evaluateHessian(const typename Traits::DomainType &x, std::vector< HessianType > &out) const
Evaluate Jacobian of all shape functions.
Definition polynomialbasis.hh:135
│ │ │ │ -
CoefficientMatrix::Field StorageField
Definition polynomialbasis.hh:72
│ │ │ │ -
static const unsigned int dimRange
Definition polynomialbasis.hh:75
│ │ │ │ -
void jacobian(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:266
│ │ │ │ -
Evaluator::DomainVector DomainVector
Definition polynomialbasis.hh:80
│ │ │ │ -
Evaluator::Basis Basis
Definition polynomialbasis.hh:79
│ │ │ │ -
void evaluateSingle(const DomainVector &x, Vector &values) const
Definition polynomialbasis.hh:240
│ │ │ │ -
void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< Fy, dimension, deriv >, dimRange > > &values) const
Definition polynomialbasis.hh:252
│ │ │ │ -
void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, dimension > > &values) const
Definition polynomialbasis.hh:259
│ │ │ │ -
const CoefficientMatrix & matrix() const
Definition polynomialbasis.hh:103
│ │ │ │ -
const Basis & basis_
Definition polynomialbasis.hh:332
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &x, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition polynomialbasis.hh:119
│ │ │ │ -
static const unsigned int dimension
Definition polynomialbasis.hh:74
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &x, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition polynomialbasis.hh:127
│ │ │ │ -
PolynomialBasis & operator=(const PolynomialBasis &)
│ │ │ │ -
const CoefficientMatrix * coeffMatrix_
Definition polynomialbasis.hh:333
│ │ │ │ -
void integrate(std::vector< Fy > &values) const
Definition polynomialbasis.hh:317
│ │ │ │ -
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │ -
void evaluate(const DomainVector &x, F *values) const
Definition polynomialbasis.hh:182
│ │ │ │ -
void hessian(const DVector &x, HVector &values) const
Definition polynomialbasis.hh:307
│ │ │ │ -
CM CoefficientMatrix
Definition polynomialbasis.hh:70
│ │ │ │ -
HessianFyType< R > HessianType
Definition polynomialbasis.hh:83
│ │ │ │ -
LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits
Definition polynomialbasis.hh:78
│ │ │ │ -
unsigned int order_
Definition polynomialbasis.hh:335
│ │ │ │ -
void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) const
Definition polynomialbasis.hh:275
│ │ │ │ -
void evaluate(const DVector &x, RVector &values) const
Definition polynomialbasis.hh:217
│ │ │ │ -
PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, unsigned int size)
Definition polynomialbasis.hh:85
│ │ │ │ -
FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType
Definition polynomialbasis.hh:82
│ │ │ │ -
unsigned int order() const
Definition polynomialbasis.hh:108
│ │ │ │ -
void evaluateSingle(const DomainVector &x, std::vector< FieldVector< FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > &values) const
Definition polynomialbasis.hh:246
│ │ │ │ -
const Basis & basis() const
Definition polynomialbasis.hh:98
│ │ │ │ -
void partial(const std::array< unsigned int, dimension > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition polynomialbasis.hh:143
│ │ │ │ -
unsigned int size_
Definition polynomialbasis.hh:335
│ │ │ │ -
Evaluator eval_
Definition polynomialbasis.hh:334
│ │ │ │ -
Definition polynomialbasis.hh:198
│ │ │ │ -
static DomainVector apply(const DVector &x)
Definition polynomialbasis.hh:199
│ │ │ │ -
static const DomainVector & apply(const DomainVector &x)
Definition polynomialbasis.hh:211
│ │ │ │ -
Definition polynomialbasis.hh:348
│ │ │ │ -
PolynomialBasisWithMatrix(const Basis &basis)
Definition polynomialbasis.hh:361
│ │ │ │ -
CM CoefficientMatrix
Definition polynomialbasis.hh:350
│ │ │ │ -
void fill(const Matrix &matrix, int size)
Definition polynomialbasis.hh:372
│ │ │ │ -
Base::Basis Basis
Definition polynomialbasis.hh:359
│ │ │ │ -
void fill(const Matrix &matrix)
Definition polynomialbasis.hh:366
│ │ │ │ -
Definition tensor.hh:33
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Definition hierarchicalsimplexp2withelementbubble.hh:26
│ │ │ │ +
HierarchicalSimplexP2WithElementBubbleLocalBasis()
Definition hierarchicalsimplexp2withelementbubble.hh:28
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:75
│ │ │ │ +
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:54
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:63
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (2, in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:111
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:57
│ │ │ │ +
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:86
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:147
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (3 in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:229
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:153
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:170
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:189
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:144
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2withelementbubble.hh:269
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:275
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (4 in this case)
Definition hierarchicalsimplexp2withelementbubble.hh:379
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:296
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2withelementbubble.hh:318
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2withelementbubble.hh:266
│ │ │ │ +
The local finite element needed for the Zou-Kornhuber estimator for Signorini problems.
Definition hierarchicalsimplexp2withelementbubble.hh:414
│ │ │ │ +
size_t size() const
number of coefficients
Definition hierarchicalsimplexp2withelementbubble.hh:439
│ │ │ │ +
const Dune::LocalKey & localKey(size_t i) const
get i'th index
Definition hierarchicalsimplexp2withelementbubble.hh:445
│ │ │ │ +
HierarchicalSimplexP2WithElementBubbleLocalCoefficients()
Standard constructor.
Definition hierarchicalsimplexp2withelementbubble.hh:423
│ │ │ │ +
Definition hierarchicalsimplexp2withelementbubble.hh:456
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Local interpolation of a function.
Definition hierarchicalsimplexp2withelementbubble.hh:461
│ │ │ │ │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,538 +1,547 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -polynomialbasis.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e │ │ │ │ │ +hierarchicalsimplexp2withelementbubble.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ -6#define DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_SIMPLEX_P2_WITH_ELEMENT_BUBBLE_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +12#include │ │ │ │ │ +13#include │ │ │ │ │ 14 │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_c_o_e_f_f_m_a_t_r_i_x_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20namespace _D_u_n_e │ │ │ │ │ -21{ │ │ │ │ │ -22 │ │ │ │ │ -23 // PolynomialBasis │ │ │ │ │ -24 // --------------- │ │ │ │ │ -25 │ │ │ │ │ -63 template< class Eval, class CM, class D=double, class R=double > │ │ │ │ │ -_6_4 class _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +21 │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +26 { │ │ │ │ │ +27 public: │ │ │ │ │ +_2_8 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ +29 { │ │ │ │ │ +30 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ +implemented for dim > 3."); │ │ │ │ │ +31 } │ │ │ │ │ +32 }; │ │ │ │ │ +33 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +50 { │ │ │ │ │ +51 public: │ │ │ │ │ +53 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_1_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_1_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_5_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +55 │ │ │ │ │ +_5_7 unsigned int _s_i_z_e () const │ │ │ │ │ +58 { │ │ │ │ │ +59 return 3; │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +64 std::vector& out) const │ │ │ │ │ 65 { │ │ │ │ │ -66 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_ _> _T_h_i_s; │ │ │ │ │ -67 typedef Eval Evaluator; │ │ │ │ │ -68 │ │ │ │ │ -69 public: │ │ │ │ │ -_7_0 typedef CM _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x; │ │ │ │ │ -71 │ │ │ │ │ -_7_2 typedef typename CoefficientMatrix::Field _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -73 │ │ │ │ │ -_7_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Evaluator::dimension; │ │ │ │ │ -_7_5 static const unsigned int _d_i_m_R_a_n_g_e = Evaluator::dimRange*CoefficientMatrix:: │ │ │ │ │ -blockSize; │ │ │ │ │ -76 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_e_n_s_i_o_n_,_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_e_n_s_i_o_n_>, │ │ │ │ │ -77 R,_d_i_m_R_a_n_g_e,FieldVector, │ │ │ │ │ -_7_8 FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -_7_9 typedef typename Evaluator::Basis _B_a_s_i_s; │ │ │ │ │ -_8_0 typedef typename Evaluator::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -81 template │ │ │ │ │ -_8_2 using _H_e_s_s_i_a_n_F_y_T_y_p_e = │ │ │ │ │ -FieldVector,_d_i_m_R_a_n_g_e>; │ │ │ │ │ -_8_3 using _H_e_s_s_i_a_n_T_y_p_e = _H_e_s_s_i_a_n_F_y_T_y_p_e_<_R_>; │ │ │ │ │ +66 out.resize(3); │ │ │ │ │ +67 │ │ │ │ │ +68 out[0] = 1-in[0]; │ │ │ │ │ +69 out[1] = in[0]; │ │ │ │ │ +70 out[2] = 1-4*(in[0]-0.5)*(in[0]-0.5); │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +74 inline void │ │ │ │ │ +_7_5 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +76 std::vector& out) const // return value │ │ │ │ │ +77 { │ │ │ │ │ +78 out.resize(3); │ │ │ │ │ +79 │ │ │ │ │ +80 out[0][0][0] = -1; │ │ │ │ │ +81 out[1][0][0] = 1; │ │ │ │ │ +82 out[2][0][0] = 4-8*in[0]; │ │ │ │ │ +83 } │ │ │ │ │ 84 │ │ │ │ │ -_8_5 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s (const _B_a_s_i_s &_b_a_s_i_s, │ │ │ │ │ -86 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x &coeffMatrix, │ │ │ │ │ -87 unsigned int _s_i_z_e) │ │ │ │ │ -88 : _b_a_s_i_s__(_b_a_s_i_s), │ │ │ │ │ -89 _c_o_e_f_f_M_a_t_r_i_x__(&coeffMatrix), │ │ │ │ │ -90 _e_v_a_l__(_b_a_s_i_s), │ │ │ │ │ -91 _o_r_d_e_r__(_b_a_s_i_s._o_r_d_e_r()), │ │ │ │ │ -92 _s_i_z_e__(_s_i_z_e) │ │ │ │ │ -93 { │ │ │ │ │ -94 // assert(coeffMatrix_); │ │ │ │ │ -95 // assert(size_ <= coeffMatrix.size()); // !!! │ │ │ │ │ -96 } │ │ │ │ │ -97 │ │ │ │ │ -_9_8 const _B_a_s_i_s &_b_a_s_i_s () const │ │ │ │ │ -99 { │ │ │ │ │ -100 return _b_a_s_i_s__; │ │ │ │ │ -101 } │ │ │ │ │ -102 │ │ │ │ │ -_1_0_3 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x &_m_a_t_r_i_x () const │ │ │ │ │ -104 { │ │ │ │ │ -105 return *_c_o_e_f_f_M_a_t_r_i_x__; │ │ │ │ │ +_8_6 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +87 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +88 std::vector& out) const // return value │ │ │ │ │ +89 { │ │ │ │ │ +90 auto totalOrder = order[0]; │ │ │ │ │ +91 if (totalOrder == 0) { │ │ │ │ │ +92 evaluateFunction(in, out); │ │ │ │ │ +93 } else if (totalOrder == 1) { │ │ │ │ │ +94 out.resize(size()); │ │ │ │ │ +95 out[0] = -1; │ │ │ │ │ +96 out[1] = 1; │ │ │ │ │ +97 out[2] = 4-8*in[0]; │ │ │ │ │ +98 } else if (totalOrder == 2) { │ │ │ │ │ +99 out.resize(size()); │ │ │ │ │ +100 out[0] = 0; │ │ │ │ │ +101 out[1] = 0; │ │ │ │ │ +102 out[2] =-8; │ │ │ │ │ +103 } else { │ │ │ │ │ +104 out.resize(size()); │ │ │ │ │ +105 out[0] = out[1] = out[2] = 0; │ │ │ │ │ 106 } │ │ │ │ │ -107 │ │ │ │ │ -_1_0_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ -109 { │ │ │ │ │ -110 return _o_r_d_e_r__; │ │ │ │ │ -111 } │ │ │ │ │ -112 │ │ │ │ │ -_1_1_3 unsigned int _s_i_z_e () const │ │ │ │ │ -114 { │ │ │ │ │ -115 return _s_i_z_e__; │ │ │ │ │ -116 } │ │ │ │ │ +107 } │ │ │ │ │ +108 │ │ │ │ │ +_1_1_1 unsigned int _o_r_d_e_r () const │ │ │ │ │ +112 { │ │ │ │ │ +113 return 2; │ │ │ │ │ +114 } │ │ │ │ │ +115 │ │ │ │ │ +116 }; │ │ │ │ │ 117 │ │ │ │ │ -_1_1_9 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ -120 std::vector& out) const │ │ │ │ │ -121 { │ │ │ │ │ -122 out.resize(_s_i_z_e()); │ │ │ │ │ -123 _e_v_a_l_u_a_t_e(x,out); │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_7 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, // position │ │ │ │ │ -128 std::vector& out) const // return value │ │ │ │ │ -129 { │ │ │ │ │ -130 out.resize(_s_i_z_e()); │ │ │ │ │ -131 _j_a_c_o_b_i_a_n(x,out); │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -_1_3_5 void _e_v_a_l_u_a_t_e_H_e_s_s_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, // position │ │ │ │ │ -136 std::vector& out) const // return value │ │ │ │ │ -137 { │ │ │ │ │ -138 out.resize(_s_i_z_e()); │ │ │ │ │ -139 _h_e_s_s_i_a_n(x,out); │ │ │ │ │ -140 } │ │ │ │ │ -141 │ │ │ │ │ -_1_4_3 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -144 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -145 std::vector& out) const // return value │ │ │ │ │ -146 { │ │ │ │ │ -147 out.resize(_s_i_z_e()); │ │ │ │ │ -148 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -149 if (totalOrder == 0) { │ │ │ │ │ -150 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -151 } │ │ │ │ │ -152 else if (totalOrder == 1) { │ │ │ │ │ -153 std::vector jacs(out.size()); │ │ │ │ │ -154 unsigned int k; │ │ │ │ │ -155 for (unsigned int i=0;i<_o_r_d_e_r.size();++i) │ │ │ │ │ -156 if (_o_r_d_e_r[i]==1) k=i; │ │ │ │ │ -157 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n(in, jacs); │ │ │ │ │ -158 for (unsigned int i=0;i hesss(out.size()); │ │ │ │ │ -164 int k=-1,l=-1; │ │ │ │ │ -165 for (unsigned int i=0;i<_o_r_d_e_r.size();++i) { │ │ │ │ │ -166 if (_o_r_d_e_r[i] >= 1 && k == -1) │ │ │ │ │ -167 k = i; │ │ │ │ │ -168 else if (_o_r_d_e_r[i]==1) l=i; │ │ │ │ │ -169 } │ │ │ │ │ -170 if (l==-1) l=k; │ │ │ │ │ -171 _e_v_a_l_u_a_t_e_H_e_s_s_i_a_n(in, hesss); │ │ │ │ │ -172 for (unsigned int i=0;i │ │ │ │ │ -_1_8_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, F *values ) const │ │ │ │ │ -183 { │ │ │ │ │ -184 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template evaluate( x ), _s_i_z_e(), values); │ │ │ │ │ -185 } │ │ │ │ │ -186 template< unsigned int deriv, class DVector, class F > │ │ │ │ │ -_1_8_7 void _e_v_a_l_u_a_t_e ( const DVector &x, F *values ) const │ │ │ │ │ -188 { │ │ │ │ │ -189 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -190 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -191 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -192 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -193 evaluate( bx, values ); │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -196 template │ │ │ │ │ -_1_9_7 struct _C_o_n_v_e_r_t │ │ │ │ │ -198 { │ │ │ │ │ -_1_9_9 static _D_o_m_a_i_n_V_e_c_t_o_r _a_p_p_l_y( const DVector &x ) │ │ │ │ │ -200 { │ │ │ │ │ -201 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -202 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -203 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -204 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -205 return bx; │ │ │ │ │ -206 } │ │ │ │ │ -207 }; │ │ │ │ │ -208 template │ │ │ │ │ -_2_0_9 struct _C_o_n_v_e_r_t │ │ │ │ │ -210 { │ │ │ │ │ -_2_1_1 static const _D_o_m_a_i_n_V_e_c_t_o_r &_a_p_p_l_y( const _D_o_m_a_i_n_V_e_c_t_o_r &x ) │ │ │ │ │ -212 { │ │ │ │ │ -213 return x; │ │ │ │ │ -214 } │ │ │ │ │ -215 }; │ │ │ │ │ -216 template< unsigned int deriv, class DVector, class RVector > │ │ │ │ │ -_2_1_7 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ -218 { │ │ │ │ │ -219 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ -220 const _D_o_m_a_i_n_V_e_c_t_o_r &bx = _C_o_n_v_e_r_t_<_t_r_u_e_,_D_V_e_c_t_o_r_>_:_:_a_p_p_l_y(x); │ │ │ │ │ -221 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template evaluate( bx ), values ); │ │ │ │ │ -222 } │ │ │ │ │ -223 │ │ │ │ │ -224 template │ │ │ │ │ -_2_2_5 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, std::vector │ │ │ │ │ -> &values ) const │ │ │ │ │ -226 { │ │ │ │ │ -227 evaluate<0>(x,values); │ │ │ │ │ -228 } │ │ │ │ │ -229 template< class DVector, class RVector > │ │ │ │ │ -_2_3_0 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ -231 { │ │ │ │ │ -232 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -233 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -234 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -235 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -236 evaluate<0>( bx, values ); │ │ │ │ │ -237 } │ │ │ │ │ -238 │ │ │ │ │ -239 template< unsigned int deriv, class Vector > │ │ │ │ │ -_2_4_0 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, Vector &values ) const │ │ │ │ │ -241 { │ │ │ │ │ -242 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ -243 _c_o_e_f_f_M_a_t_r_i_x__->template mult( _e_v_a_l__.template evaluate( x ), │ │ │ │ │ -values ); │ │ │ │ │ -244 } │ │ │ │ │ -245 template< unsigned int deriv, class Fy > │ │ │ │ │ -_2_4_6 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -247 std::vector< FieldVector_:_: │ │ │ │ │ -_s_i_z_e>,_d_i_m_R_a_n_g_e> > &values) const │ │ │ │ │ -248 { │ │ │ │ │ -249 evaluateSingle(x,reinterpret_cast::size*_d_i_m_R_a_n_g_e> >&>(values)); │ │ │ │ │ -250 } │ │ │ │ │ -251 template< unsigned int deriv, class Fy > │ │ │ │ │ -_2_5_2 void _e_v_a_l_u_a_t_e_S_i_n_g_l_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -253 std::vector< FieldVector<_L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_e_n_s_i_o_n_,_d_e_r_i_v_>,_d_i_m_R_a_n_g_e> > &values) │ │ │ │ │ -const │ │ │ │ │ -254 { │ │ │ │ │ -255 evaluateSingle(x,reinterpret_cast::size*_d_i_m_R_a_n_g_e> >&>(values)); │ │ │ │ │ -256 } │ │ │ │ │ -257 │ │ │ │ │ -258 template │ │ │ │ │ -_2_5_9 void _j_a_c_o_b_i_a_n ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -260 std::vector > &values ) const │ │ │ │ │ -261 { │ │ │ │ │ -262 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ -263 evaluateSingle<1>(x,reinterpret_cast >&>(values)); │ │ │ │ │ -264 } │ │ │ │ │ -265 template< class DVector, class RVector > │ │ │ │ │ -_2_6_6 void _j_a_c_o_b_i_a_n ( const DVector &x, RVector &values ) const │ │ │ │ │ -267 { │ │ │ │ │ -268 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -269 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -270 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -271 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -272 _j_a_c_o_b_i_a_n( bx, values ); │ │ │ │ │ -273 } │ │ │ │ │ -274 template │ │ │ │ │ -_2_7_5 void _h_e_s_s_i_a_n ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -276 std::vector<_H_e_s_s_i_a_n_F_y_T_y_p_e_<_F_y_>> &values ) const │ │ │ │ │ +138 template │ │ │ │ │ +_1_3_9 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +140 { │ │ │ │ │ +141 public: │ │ │ │ │ +143 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_1_4_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +145 │ │ │ │ │ +_1_4_7 unsigned int _s_i_z_e () const │ │ │ │ │ +148 { │ │ │ │ │ +149 return 7; │ │ │ │ │ +150 } │ │ │ │ │ +151 │ │ │ │ │ +_1_5_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +154 std::vector& out) const │ │ │ │ │ +155 { │ │ │ │ │ +156 out.resize(7); │ │ │ │ │ +157 │ │ │ │ │ +158 out[0] = 1 - in[0] - in[1]; │ │ │ │ │ +159 out[1] = 4*in[0]*(1-in[0]-in[1]); │ │ │ │ │ +160 out[2] = in[0]; │ │ │ │ │ +161 out[3] = 4*in[1]*(1-in[0]-in[1]); │ │ │ │ │ +162 out[4] = 4*in[0]*in[1]; │ │ │ │ │ +163 out[5] = in[1]; │ │ │ │ │ +164 out[6] = 27*in[0]*in[1]*(1-in[0]-in[1]); │ │ │ │ │ +165 │ │ │ │ │ +166 } │ │ │ │ │ +167 │ │ │ │ │ +169 inline void │ │ │ │ │ +_1_7_0 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +171 std::vector& out) const // return value │ │ │ │ │ +172 { │ │ │ │ │ +173 out.resize(7); │ │ │ │ │ +174 │ │ │ │ │ +175 out[0][0][0] = -1; out[0][0][1] = -1; │ │ │ │ │ +176 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0]; │ │ │ │ │ +177 out[2][0][0] = 1; out[2][0][1] = 0; │ │ │ │ │ +178 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]; │ │ │ │ │ +179 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; │ │ │ │ │ +180 out[5][0][0] = 0; out[5][0][1] = 1; │ │ │ │ │ +181 │ │ │ │ │ +182 // Cubic bubble │ │ │ │ │ +183 out[6][0][0] = 27 * in[1] * (1 - 2*in[0] - in[1]); │ │ │ │ │ +184 out[6][0][1] = 27 * in[0] * (1 - 2*in[1] - in[0]); │ │ │ │ │ +185 │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +_1_8_9 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +190 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +191 std::vector& out) const // return value │ │ │ │ │ +192 { │ │ │ │ │ +193 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +194 if (totalOrder == 0) { │ │ │ │ │ +195 evaluateFunction(in, out); │ │ │ │ │ +196 } else if (totalOrder == 1) { │ │ │ │ │ +197 out.resize(size()); │ │ │ │ │ +198 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +199 │ │ │ │ │ +200 switch (direction) { │ │ │ │ │ +201 case 0: │ │ │ │ │ +202 out[0] = -1; │ │ │ │ │ +203 out[1] = 4-8*in[0]-4*in[1]; │ │ │ │ │ +204 out[2] = 1; │ │ │ │ │ +205 out[3] = -4*in[1]; │ │ │ │ │ +206 out[4] = 4*in[1]; │ │ │ │ │ +207 out[5] = 0; │ │ │ │ │ +208 out[6] = 27 * in[1] * (1 - 2*in[0] - in[1]); │ │ │ │ │ +209 break; │ │ │ │ │ +210 case 1: │ │ │ │ │ +211 out[0] = -1; │ │ │ │ │ +212 out[1] = -4*in[0]; │ │ │ │ │ +213 out[2] = 0; │ │ │ │ │ +214 out[3] = 4-4*in[0]-8*in[1]; │ │ │ │ │ +215 out[4] = 4*in[0]; │ │ │ │ │ +216 out[5] = 1; │ │ │ │ │ +217 out[6] = 27 * in[0] * (1 - 2*in[1] - in[0]); │ │ │ │ │ +218 break; │ │ │ │ │ +219 default: │ │ │ │ │ +220 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +221 } │ │ │ │ │ +222 } else { │ │ │ │ │ +223 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +224 } │ │ │ │ │ +225 } │ │ │ │ │ +226 │ │ │ │ │ +_2_2_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +230 { │ │ │ │ │ +231 return 3; │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +234 }; │ │ │ │ │ +235 │ │ │ │ │ +260 template │ │ │ │ │ +_2_6_1 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +262 { │ │ │ │ │ +263 public: │ │ │ │ │ +265 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_2_6_6 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +267 │ │ │ │ │ +_2_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ +270 { │ │ │ │ │ +271 return 11; │ │ │ │ │ +272 } │ │ │ │ │ +273 │ │ │ │ │ +_2_7_5 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +276 std::vector& out) const │ │ │ │ │ 277 { │ │ │ │ │ -278 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ -279 // only upper part of hessians matrix is computed - so we have │ │ │ │ │ -280 // y[0] = FV< FV, dimRange> │ │ │ │ │ -281 const unsigned int hsize = _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_e_n_s_i_o_n_,_2_>_:_:_s_i_z_e; │ │ │ │ │ -282 std::vector< FieldVector< FieldVector, _d_i_m_R_a_n_g_e> > y( _s_i_z_e() ); │ │ │ │ │ -283 evaluateSingle<2>(x, y); │ │ │ │ │ -284 unsigned int q = 0; │ │ │ │ │ -285 for (unsigned int i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -286 for (unsigned int r = 0; r < _d_i_m_R_a_n_g_e; ++r) │ │ │ │ │ -287 { │ │ │ │ │ -288 q = 0; │ │ │ │ │ -289 // tensor-based things follow unintuitive index sceme │ │ │ │ │ -290 // e.g. for dim = 3, the k-l index of y is 00,01,11,02,12,22, i.e. partial │ │ │ │ │ -derivatives │ │ │ │ │ -291 // are ordered: xx,xy,yy,xz,yz,zz │ │ │ │ │ -292 │ │ │ │ │ -293 // Fill values 'directionwise' │ │ │ │ │ -294 for (unsigned int k = 0; k < _d_i_m_e_n_s_i_o_n; ++k) │ │ │ │ │ -295 for (unsigned int l = 0; l <= k; ++l) │ │ │ │ │ -296 { │ │ │ │ │ -297 │ │ │ │ │ -298 values[i][r][k][l] = y[i][r][q]; │ │ │ │ │ -299 values[i][r][l][k] = y[i][r][q]; │ │ │ │ │ -300 assert(q < hsize); │ │ │ │ │ -301 ++q; │ │ │ │ │ -302 } │ │ │ │ │ -303 } │ │ │ │ │ -304 // evaluateSingle<2>(x,reinterpret_cast >&>(values)); │ │ │ │ │ -305 } │ │ │ │ │ -306 template< class DVector, class HVector > │ │ │ │ │ -_3_0_7 void _h_e_s_s_i_a_n ( const DVector &x, HVector &values ) const │ │ │ │ │ -308 { │ │ │ │ │ -309 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -310 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -311 for( unsigned int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -312 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -313 _h_e_s_s_i_a_n( bx, values ); │ │ │ │ │ -314 } │ │ │ │ │ -315 │ │ │ │ │ -316 template │ │ │ │ │ -_3_1_7 void _i_n_t_e_g_r_a_t_e ( std::vector &values ) const │ │ │ │ │ -318 { │ │ │ │ │ -319 assert(values.size()>=_s_i_z_e()); │ │ │ │ │ -320 _c_o_e_f_f_M_a_t_r_i_x__->mult( _e_v_a_l__.template _i_n_t_e_g_r_a_t_e(), values ); │ │ │ │ │ -321 } │ │ │ │ │ -322 │ │ │ │ │ -323 protected: │ │ │ │ │ -_3_2_4 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s &other) │ │ │ │ │ -325 : _b_a_s_i_s__(other._b_a_s_i_s__), │ │ │ │ │ -326 _c_o_e_f_f_M_a_t_r_i_x__(other._c_o_e_f_f_M_a_t_r_i_x__), │ │ │ │ │ -327 _e_v_a_l__(_b_a_s_i_s__), │ │ │ │ │ -328 _o_r_d_e_r__(_b_a_s_i_s__._o_r_d_e_r()), │ │ │ │ │ -329 _s_i_z_e__(other._s_i_z_e__) │ │ │ │ │ -330 {} │ │ │ │ │ -_3_3_1 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s &_o_p_e_r_a_t_o_r_=(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s&); │ │ │ │ │ -_3_3_2 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ -_3_3_3 const _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x* _c_o_e_f_f_M_a_t_r_i_x__; │ │ │ │ │ -_3_3_4 mutable Evaluator _e_v_a_l__; │ │ │ │ │ -_3_3_5 unsigned int _o_r_d_e_r__,_s_i_z_e__; │ │ │ │ │ -336 }; │ │ │ │ │ -337 │ │ │ │ │ -344 template< class Eval, class CM = SparseCoeffMatrix, │ │ │ │ │ -345 class D=double, class R=double> │ │ │ │ │ -_3_4_6 class _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -347 : public _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s< Eval, CM, D, R > │ │ │ │ │ -348 { │ │ │ │ │ -349 public: │ │ │ │ │ -_3_5_0 typedef CM _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x; │ │ │ │ │ -351 │ │ │ │ │ -352 private: │ │ │ │ │ -353 typedef Eval Evaluator; │ │ │ │ │ -354 │ │ │ │ │ -355 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_u_a_t_o_r_,_ _C_M_ _> _T_h_i_s; │ │ │ │ │ -356 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_E_v_a_l_u_a_t_o_r_,_ _C_M_,_ _D_,_ _R_> _B_a_s_e; │ │ │ │ │ -357 │ │ │ │ │ -358 public: │ │ │ │ │ -_3_5_9 typedef typename _B_a_s_e_:_:_B_a_s_i_s _B_a_s_i_s; │ │ │ │ │ -360 │ │ │ │ │ -_3_6_1 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x (const _B_a_s_i_s &_b_a_s_i_s) │ │ │ │ │ -362 : _B_a_s_e(_b_a_s_i_s,coeffMatrix_,0) │ │ │ │ │ -363 {} │ │ │ │ │ -364 │ │ │ │ │ -365 template │ │ │ │ │ -_3_6_6 void _f_i_l_l(const Matrix& _m_a_t_r_i_x) │ │ │ │ │ -367 { │ │ │ │ │ -368 coeffMatrix_.fill(_m_a_t_r_i_x); │ │ │ │ │ -369 this->_s_i_z_e__ = coeffMatrix_.size(); │ │ │ │ │ -370 } │ │ │ │ │ -371 template │ │ │ │ │ -_3_7_2 void _f_i_l_l(const Matrix& _m_a_t_r_i_x,int _s_i_z_e) │ │ │ │ │ -373 { │ │ │ │ │ -374 coeffMatrix_.fill(_m_a_t_r_i_x); │ │ │ │ │ -375 assert(_s_i_z_e<=coeffMatrix_.size()); │ │ │ │ │ -376 this->_s_i_z_e__ = _s_i_z_e; │ │ │ │ │ -377 } │ │ │ │ │ -378 │ │ │ │ │ -379 private: │ │ │ │ │ -380 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &); │ │ │ │ │ -381 _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &operator=(const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x &); │ │ │ │ │ -382 _C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x coeffMatrix_; │ │ │ │ │ -383 }; │ │ │ │ │ -384} │ │ │ │ │ -385#endif // DUNE_POLYNOMIALBASIS_HH │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ -_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_b_a_s_i_s_e_v_a_l_u_a_t_o_r_._h_h │ │ │ │ │ -_c_o_e_f_f_m_a_t_r_i_x_._h_h │ │ │ │ │ +278 out.resize(10); │ │ │ │ │ +279 │ │ │ │ │ +280 out[0] = 1 - in[0] - in[1] - in[2]; │ │ │ │ │ +281 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +282 out[2] = in[0]; │ │ │ │ │ +283 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +284 out[4] = 4 * in[0] * in[1]; │ │ │ │ │ +285 out[5] = in[1]; │ │ │ │ │ +286 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +287 out[7] = 4 * in[0] * in[2]; │ │ │ │ │ +288 out[8] = 4 * in[1] * in[2]; │ │ │ │ │ +289 out[9] = in[2]; │ │ │ │ │ +290 │ │ │ │ │ +291 // quartic element bubble │ │ │ │ │ +292 out[10] = 81*in[0]*in[1]*in[2]*(1-in[0]-in[1]-in[2]); │ │ │ │ │ +293 } │ │ │ │ │ +294 │ │ │ │ │ +_2_9_6 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +297 std::vector& out) const // return value │ │ │ │ │ +298 { │ │ │ │ │ +299 out.resize(10); │ │ │ │ │ +300 │ │ │ │ │ +301 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1; │ │ │ │ │ +302 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1] │ │ │ │ │ +[0][2] = -4*in[0]; │ │ │ │ │ +303 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ +304 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3] │ │ │ │ │ +[0][2] = -4*in[1]; │ │ │ │ │ +305 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0; │ │ │ │ │ +306 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0; │ │ │ │ │ +307 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]- │ │ │ │ │ +4*in[1]-8*in[2]; │ │ │ │ │ +308 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0]; │ │ │ │ │ +309 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1]; │ │ │ │ │ +310 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1; │ │ │ │ │ +311 │ │ │ │ │ +312 out[10][0][0] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]); │ │ │ │ │ +313 out[10][0][1] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]); │ │ │ │ │ +314 out[10][0][2] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]); │ │ │ │ │ +315 } │ │ │ │ │ +316 │ │ │ │ │ +_3_1_8 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +319 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +320 std::vector& out) const // return value │ │ │ │ │ +321 { │ │ │ │ │ +322 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +323 if (totalOrder == 0) { │ │ │ │ │ +324 evaluateFunction(in, out); │ │ │ │ │ +325 } else if (totalOrder == 1) { │ │ │ │ │ +326 out.resize(size()); │ │ │ │ │ +327 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +328 │ │ │ │ │ +329 switch (direction) { │ │ │ │ │ +330 case 0: │ │ │ │ │ +331 out[0] = -1; │ │ │ │ │ +332 out[1] = 4-8*in[0]-4*in[1]-4*in[2]; │ │ │ │ │ +333 out[2] = 1; │ │ │ │ │ +334 out[3] = -4*in[1]; │ │ │ │ │ +335 out[4] = 4*in[1]; │ │ │ │ │ +336 out[5] = 0; │ │ │ │ │ +337 out[6] = -4*in[2]; │ │ │ │ │ +338 out[7] = 4*in[2]; │ │ │ │ │ +339 out[8] = 0; │ │ │ │ │ +340 out[9] = 0; │ │ │ │ │ +341 out[10] = 81 * in[1] * in[2] * (1 - 2*in[0] - in[1] - in[2]); │ │ │ │ │ +342 break; │ │ │ │ │ +343 case 1: │ │ │ │ │ +344 out[0] = -1; │ │ │ │ │ +345 out[1] = -4*in[0]; │ │ │ │ │ +346 out[2] = 0; │ │ │ │ │ +347 out[3] = 4-4*in[0]-8*in[1]-4*in[2]; │ │ │ │ │ +348 out[4] = 4*in[0]; │ │ │ │ │ +349 out[5] = 1; │ │ │ │ │ +350 out[6] = -4*in[2]; │ │ │ │ │ +351 out[7] = 0; │ │ │ │ │ +352 out[8] = 4*in[2]; │ │ │ │ │ +353 out[9] = 0; │ │ │ │ │ +354 out[10] = 81 * in[0] * in[2] * (1 - in[0] - 2*in[1] - in[2]); │ │ │ │ │ +355 break; │ │ │ │ │ +356 case 2: │ │ │ │ │ +357 out[0] = -1; │ │ │ │ │ +358 out[1] = -4*in[0]; │ │ │ │ │ +359 out[2] = 0; │ │ │ │ │ +360 out[3] = -4*in[1]; │ │ │ │ │ +361 out[4] = 0; │ │ │ │ │ +362 out[5] = 0; │ │ │ │ │ +363 out[6] = 4-4*in[0]-4*in[1]-8*in[2]; │ │ │ │ │ +364 out[7] = 4*in[0]; │ │ │ │ │ +365 out[8] = 4*in[1]; │ │ │ │ │ +366 out[9] = 1; │ │ │ │ │ +367 out[10] = 81 * in[0] * in[1] * (1 - in[0] - in[1] - 2*in[2]); │ │ │ │ │ +368 break; │ │ │ │ │ +369 default: │ │ │ │ │ +370 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +371 } │ │ │ │ │ +372 } else { │ │ │ │ │ +373 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +374 } │ │ │ │ │ +375 } │ │ │ │ │ +376 │ │ │ │ │ +_3_7_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +380 { │ │ │ │ │ +381 return 4; │ │ │ │ │ +382 } │ │ │ │ │ +383 │ │ │ │ │ +384 }; │ │ │ │ │ +385 │ │ │ │ │ +386 │ │ │ │ │ +412 template │ │ │ │ │ +_4_1_3 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +414 { │ │ │ │ │ +415 // The binomial coefficient: dim+1 over 1 │ │ │ │ │ +416 static const int numVertices = dim+1; │ │ │ │ │ +417 │ │ │ │ │ +418 // The binomial coefficient: dim+1 over 2 │ │ │ │ │ +419 static const int numEdges = (dim+1)*dim / 2; │ │ │ │ │ +420 │ │ │ │ │ +421 public: │ │ │ │ │ +_4_2_3 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () │ │ │ │ │ +424 : li(numVertices+numEdges + 1) │ │ │ │ │ +425 { │ │ │ │ │ +426 if (dim!=2) │ │ │ │ │ +427 DUNE_THROW(NotImplemented, "only for 2d"); │ │ │ │ │ +428 │ │ │ │ │ +429 li[0] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,2,0); // Vertex (0,0) │ │ │ │ │ +430 li[1] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,1,0); // Edge (0.5, 0) │ │ │ │ │ +431 li[2] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(1,2,0); // Vertex (1,0) │ │ │ │ │ +432 li[3] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(1,1,0); // Edge (0, 0.5) │ │ │ │ │ +433 li[4] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(2,1,0); // Edge (0.5, 0.5) │ │ │ │ │ +434 li[5] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(2,2,0); // Vertex (0,1) │ │ │ │ │ +435 li[6] = _D_u_n_e_:_:_L_o_c_a_l_K_e_y(0,0,0); // Element (1/3, 1/3) │ │ │ │ │ +436 } │ │ │ │ │ +437 │ │ │ │ │ +_4_3_9 size_t _s_i_z_e () const │ │ │ │ │ +440 { │ │ │ │ │ +441 return numVertices+numEdges + 1; │ │ │ │ │ +442 } │ │ │ │ │ +443 │ │ │ │ │ +_4_4_5 const _D_u_n_e_:_:_L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (size_t i) const │ │ │ │ │ +446 { │ │ │ │ │ +447 return li[i]; │ │ │ │ │ +448 } │ │ │ │ │ +449 │ │ │ │ │ +450 private: │ │ │ │ │ +451 std::vector li; │ │ │ │ │ +452 }; │ │ │ │ │ +453 │ │ │ │ │ +454 template │ │ │ │ │ +_4_5_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +456 { │ │ │ │ │ +457 public: │ │ │ │ │ +458 │ │ │ │ │ +460 template │ │ │ │ │ +_4_6_1 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +462 { │ │ │ │ │ +463 typename LB::Traits::DomainType x; │ │ │ │ │ +464 typename LB::Traits::RangeType y; │ │ │ │ │ +465 │ │ │ │ │ +466 out.resize(7); │ │ │ │ │ +467 │ │ │ │ │ +468 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +469 │ │ │ │ │ +470 // vertices │ │ │ │ │ +471 x[0] = 0.0; x[1] = 0.0; out[0] = f(x); │ │ │ │ │ +472 x[0] = 1.0; x[1] = 0.0; out[2] = f(x); │ │ │ │ │ +473 x[0] = 0.0; x[1] = 1.0; out[5] = f(x); │ │ │ │ │ +474 │ │ │ │ │ +475 // edge bubbles │ │ │ │ │ +476 x[0] = 0.5; x[1] = 0.0; y = f(x); │ │ │ │ │ +477 out[1] = y - out[0]*(1-x[0]) - out[2]*x[0]; │ │ │ │ │ +478 │ │ │ │ │ +479 x[0] = 0.0; x[1] = 0.5; y = f(x); │ │ │ │ │ +480 out[3] = y - out[0]*(1-x[1]) - out[5]*x[1]; │ │ │ │ │ +481 │ │ │ │ │ +482 x[0] = 0.5; x[1] = 0.5; y = f(x); │ │ │ │ │ +483 out[4] = y - out[2]*x[0] - out[5]*x[1]; │ │ │ │ │ +484 │ │ │ │ │ +485 // element bubble │ │ │ │ │ +486 x[0] = 1.0/3; x[1] = 1.0/3; y = f(x); │ │ │ │ │ +487 │ │ │ │ │ +489 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_d_o_u_b_l_e_,_d_o_u_b_l_e_,_2_> │ │ │ │ │ +shapeFunctions; │ │ │ │ │ +490 std::vector sfValues; │ │ │ │ │ +491 shapeFunctions.evaluateFunction(x, sfValues); │ │ │ │ │ +492 │ │ │ │ │ +493 out[6] = y; │ │ │ │ │ +494 for (int i=0; i<6; i++) │ │ │ │ │ +495 out[6] -= out[i]*sfValues[i]; │ │ │ │ │ +496 │ │ │ │ │ +497 } │ │ │ │ │ +498 │ │ │ │ │ +499 }; │ │ │ │ │ +500 │ │ │ │ │ +501 │ │ │ │ │ +502} │ │ │ │ │ +503#endif │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:230 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, std::vector< FieldVector< Fy, dimRange > > │ │ │ │ │ -&values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:225 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -PolynomialBasis(const PolynomialBasis &other) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:324 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, F *values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_H_e_s_s_i_a_n │ │ │ │ │ -void evaluateHessian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ -HessianType > &out) const │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_:_: │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalBasis() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ -CoefficientMatrix::Field StorageField │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ -void jacobian(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:266 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Evaluator::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_B_a_s_i_s │ │ │ │ │ -Evaluator::Basis Basis │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ -void evaluateSingle(const DomainVector &x, Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ -void evaluateSingle(const DomainVector &x, std::vector< FieldVector< LFETensor< │ │ │ │ │ -Fy, dimension, deriv >, dimRange > > &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_j_a_c_o_b_i_a_n │ │ │ │ │ -void jacobian(const DomainVector &x, std::vector< FieldMatrix< Fy, dimRange, │ │ │ │ │ -dimension > > &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:259 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_m_a_t_r_i_x │ │ │ │ │ -const CoefficientMatrix & matrix() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:103 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_b_a_s_i_s__ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:332 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 1 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &x, std::vector< │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2, in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 1 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:86 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (3 in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:229 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:153 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:127 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -PolynomialBasis & operator=(const PolynomialBasis &) │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_c_o_e_f_f_M_a_t_r_i_x__ │ │ │ │ │ -const CoefficientMatrix * coeffMatrix_ │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:333 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -void integrate(std::vector< Fy > &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:317 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:170 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, F *values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:182 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_h_e_s_s_i_a_n │ │ │ │ │ -void hessian(const DVector &x, HVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:307 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x │ │ │ │ │ -CM CoefficientMatrix │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_H_e_s_s_i_a_n_T_y_p_e │ │ │ │ │ -HessianFyType< R > HessianType │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, dimension, FieldVector< D, dimension >, R, dimRange, │ │ │ │ │ -FieldVector< R, dimRange >, FieldMatrix< R, dimRange, dimension > > Traits │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r__ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_h_e_s_s_i_a_n │ │ │ │ │ -void hessian(const DomainVector &x, std::vector< HessianFyType< Fy > > &values) │ │ │ │ │ -const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:275 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:217 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -PolynomialBasis(const Basis &basis, const CoefficientMatrix &coeffMatrix, │ │ │ │ │ -unsigned int size) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_H_e_s_s_i_a_n_F_y_T_y_p_e │ │ │ │ │ -FieldVector< FieldMatrix< Fy, dimension, dimension >, dimRange > HessianFyType │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:269 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:275 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_o_r_d_e_r │ │ │ │ │ unsigned int order() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_S_i_n_g_l_e │ │ │ │ │ -void evaluateSingle(const DomainVector &x, std::vector< FieldVector< │ │ │ │ │ -FieldVector< Fy, LFETensor< Fy, dimension, deriv >::size >, dimRange > > │ │ │ │ │ -&values) const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_b_a_s_i_s │ │ │ │ │ -const Basis & basis() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, dimension > &order, const typename │ │ │ │ │ +Polynomial order of the shape functions (4 in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:379 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_: │ │ │ │ │ +_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:296 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e__ │ │ │ │ │ -unsigned int size_ │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:335 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l__ │ │ │ │ │ -Evaluator eval_ │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:334 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:198 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t_:_:_a_p_p_l_y │ │ │ │ │ -static DomainVector apply(const DVector &x) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_C_o_n_v_e_r_t_<_ _d_u_m_m_y_,_ _D_o_m_a_i_n_V_e_c_t_o_r_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static const DomainVector & apply(const DomainVector &x) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:211 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -PolynomialBasisWithMatrix(const Basis &basis) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:361 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_C_o_e_f_f_i_c_i_e_n_t_M_a_t_r_i_x │ │ │ │ │ -CM CoefficientMatrix │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:350 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ -void fill(const Matrix &matrix, int size) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:372 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_B_a_s_i_s │ │ │ │ │ -Base::Basis Basis │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ -void fill(const Matrix &matrix) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:366 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:33 │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:318 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:266 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ +problems. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:439 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const Dune::LocalKey & localKey(size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:445 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_: │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:423 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:461 │ │ │ │ │ _l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: multiindex.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,75 +65,39 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
multiindex.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
hierarchicalp2withelementbubble.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <ostream>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/hierarchicalsimplexp2withelementbubble.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::MultiIndex< dim, Field >
 
struct  Dune::Unity< MultiIndex< dim, F > >
 
struct  Dune::Zero< MultiIndex< dim, F > >
class  Dune::HierarchicalP2WithElementBubbleLocalFiniteElement< D, R, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<int dim, class Field >
std::ostream & Dune::operator<< (std::ostream &, const MultiIndex< dim, Field > &)
 
template<int dim, class Field , class F >
MultiIndex< dim, Field > Dune::operator* (const F &f, const MultiIndex< dim, Field > &m)
 
template<int dim, class Field , class F >
MultiIndex< dim, Field > Dune::operator/ (const F &f, const MultiIndex< dim, Field > &m)
 
template<int d, class F >
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< MultiIndex< d, F > > &y)
 
template<int d, class F , int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Dune::FieldVector< MultiIndex< d, F >, dimR > > &y)
 
template<int d, class F , int dimR1, int dimR2>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Dune::FieldMatrix< MultiIndex< d, F >, dimR1, dimR2 > > &y)
 
template<int d, class F >
std::ostream & Dune::operator<< (std::ostream &out, const MultiIndex< d, F > &val)
 
template<int dim, class Field >
bool Dune::operator< (const Zero< MultiIndex< dim, Field > > &, const MultiIndex< dim, Field > &)
 
template<int dim, class Field >
bool Dune::operator< (const MultiIndex< dim, Field > &f, const Zero< MultiIndex< dim, Field > > &)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,65 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -multiindex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +hierarchicalp2withelementbubble.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_h_i_e_r_a_r_c_h_i_c_a_l_/_h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_/ │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_U_n_i_t_y_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_Z_e_r_o_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &, const _M_u_l_t_i_I_n_d_e_x< │ │ │ │ │ - dim, Field > &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -_M_u_l_t_i_I_n_d_e_x< dim, Field >  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_* (const F &f, const _M_u_l_t_i_I_n_d_e_x< dim, │ │ │ │ │ - Field > &m) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -_M_u_l_t_i_I_n_d_e_x< dim, Field >  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ (const F &f, const _M_u_l_t_i_I_n_d_e_x< dim, │ │ │ │ │ - Field > &m) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ - vector< _M_u_l_t_i_I_n_d_e_x< d, F > > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ - vector< Dune::FieldVector< _M_u_l_t_i_I_n_d_e_x< d, F >, dimR > │ │ │ │ │ - > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std:: │ │ │ │ │ - vector< Dune::FieldMatrix< _M_u_l_t_i_I_n_d_e_x< d, F >, dimR1, │ │ │ │ │ - dimR2 > > &y) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const │ │ │ │ │ - _M_u_l_t_i_I_n_d_e_x< d, F > &val) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim, Field > │ │ │ │ │ - > &, const _M_u_l_t_i_I_n_d_e_x< dim, Field > &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _M_u_l_t_i_I_n_d_e_x< dim, Field > &f, │ │ │ │ │ - const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim, Field > > &) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00167_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: multiindex.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalp2withelementbubble.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,644 +70,119 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
multiindex.hh
│ │ │ │ +
hierarchicalp2withelementbubble.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_MULTIINDEX_HH
│ │ │ │ -
6#define DUNE_MULTIINDEX_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 /****************************************************************
│ │ │ │ -
18 * Provide a Field class which can be used in evaluation methods
│ │ │ │ -
19 * to produce MultiIndex presentation of polynomials.
│ │ │ │ -
20 ****************************************************************/
│ │ │ │ -
21 // Internal Forward Declarations
│ │ │ │ -
22 // -----------------------------
│ │ │ │ -
23
│ │ │ │ -
24 template< int dim, class Field >
│ │ │ │ -
25 class MultiIndex;
│ │ │ │ -
26
│ │ │ │ -
27 template< int dim, class Field >
│ │ │ │ -
28 std::ostream &operator<< ( std::ostream &, const MultiIndex< dim,Field > & );
│ │ │ │ -
29
│ │ │ │ -
30
│ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
19 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
21 {
│ │ │ │ +
22
│ │ │ │ +
23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement only implemented for dim==2.");
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
31
│ │ │ │ -
32 // MultiIndex
│ │ │ │ -
33 // ----------
│ │ │ │ -
34
│ │ │ │ -
35 template< int dim,class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {
│ │ │ │ - │ │ │ │ -
39
│ │ │ │ -
40 friend std::ostream &operator<<<> ( std::ostream &, const This & );
│ │ │ │ -
41
│ │ │ │ -
42 public:
│ │ │ │ -
43 static const int dimension = dim;
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 : vecZ_( 0 ),
│ │ │ │ -
47 vecOMZ_( 0 ),
│ │ │ │ -
48 factor_( 1. ),
│ │ │ │ -
49 next_( 0 )
│ │ │ │ -
50 {}
│ │ │ │ -
│ │ │ │ -
51 template <class F>
│ │ │ │ -
│ │ │ │ -
52 explicit MultiIndex (const F &f)
│ │ │ │ -
53 : vecZ_( 0 ),
│ │ │ │ -
54 vecOMZ_( 0 ),
│ │ │ │ -
55 factor_( field_cast<Field>(f) ),
│ │ │ │ -
56 next_( 0 )
│ │ │ │ -
57 {}
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 {}
│ │ │ │ +
│ │ │ │ +
36
│ │ │ │ +
│ │ │ │ +
39 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
40 {
│ │ │ │ +
41 return basis_;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 return coefficients_;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 return interpolation_;
│ │ │ │ +
56 }
│ │ │ │
│ │ │ │ -
58
│ │ │ │ +
57
│ │ │ │
│ │ │ │ -
59 MultiIndex ( int, const This &other )
│ │ │ │ -
60 : vecZ_( other.vecOMZ_ ),
│ │ │ │ -
61 vecOMZ_( other.vecZ_ ),
│ │ │ │ -
62 factor_( other.factor_ )
│ │ │ │ -
63 {
│ │ │ │ -
64 assert(!other.next_);
│ │ │ │ -
65 if (other.next_)
│ │ │ │ -
66 {
│ │ │ │ -
67 next_ = new This( *(other.next_) );
│ │ │ │ -
68 }
│ │ │ │ -
69 else
│ │ │ │ -
70 next_ = 0;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
│ │ │ │ -
73 MultiIndex ( const This &other )
│ │ │ │ -
74 : vecZ_( other.vecZ_ ),
│ │ │ │ -
75 vecOMZ_( other.vecOMZ_ ),
│ │ │ │ -
76 factor_( other.factor_ )
│ │ │ │ -
77 {
│ │ │ │ -
78 if (other.next_)
│ │ │ │ -
79 {
│ │ │ │ -
80 next_ = new This( *(other.next_) );
│ │ │ │ -
81 }
│ │ │ │ -
82 else
│ │ │ │ -
83 next_ = 0;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
87 {
│ │ │ │ -
88 remove();
│ │ │ │ -
89 }
│ │ │ │ -
│ │ │ │ -
90
│ │ │ │ -
│ │ │ │ -
91 int z(int i) const
│ │ │ │ -
92 {
│ │ │ │ -
93 return vecZ_[i];
│ │ │ │ -
94 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
95 int omz(int i) const
│ │ │ │ -
96 {
│ │ │ │ -
97 return vecOMZ_[i];
│ │ │ │ -
98 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
99 const Field &factor() const
│ │ │ │ -
100 {
│ │ │ │ -
101 return factor_;
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 This &operator= ( const This &other )
│ │ │ │ -
105 {
│ │ │ │ -
106 remove();
│ │ │ │ -
107 vecZ_ = other.vecZ_;
│ │ │ │ -
108 vecOMZ_ = other.vecOMZ_;
│ │ │ │ -
109 factor_ = other.factor_;
│ │ │ │ -
110 if (other.next_)
│ │ │ │ -
111 next_ = new This(*(other.next_));
│ │ │ │ -
112 return *this;
│ │ │ │ -
113 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
115 {
│ │ │ │ -
116 remove();
│ │ │ │ -
117 vecZ_ = 0;
│ │ │ │ -
118 vecOMZ_ = 0;
│ │ │ │ -
119 factor_ = 0.;
│ │ │ │ -
120 return *this;
│ │ │ │ -
121 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
123 {
│ │ │ │ -
124 remove();
│ │ │ │ -
125 vecZ_ = 0;
│ │ │ │ -
126 vecOMZ_ = 0;
│ │ │ │ -
127 factor_ = 1.;
│ │ │ │ -
128 return *this;
│ │ │ │ -
129 }
│ │ │ │ -
│ │ │ │ -
130 template <class F>
│ │ │ │ -
│ │ │ │ -
131 This &operator= ( const F &f )
│ │ │ │ -
132 {
│ │ │ │ -
133 remove();
│ │ │ │ -
134 vecZ_ = 0;
│ │ │ │ -
135 vecOMZ_ = 0;
│ │ │ │ -
136 factor_ = field_cast<Field>(f);
│ │ │ │ -
137 return *this;
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139
│ │ │ │ -
│ │ │ │ -
140 bool operator== (const This &other) const
│ │ │ │ -
141 {
│ │ │ │ -
142 assert(!next_ && !other.next_);
│ │ │ │ -
143 return (vecZ_==other.vecZ_ && vecOMZ_==other.vecOMZ_ && factor_==other.factor_);
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146 template <class F>
│ │ │ │ -
│ │ │ │ -
147 This &operator*= ( const F &f )
│ │ │ │ -
148 {
│ │ │ │ -
149 factor_ *= field_cast<Field>(f);
│ │ │ │ -
150 if (next_)
│ │ │ │ -
151 (*next_) *= f;
│ │ │ │ -
152 return *this;
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
154 template <class F>
│ │ │ │ -
│ │ │ │ -
155 This &operator/= ( const F &f )
│ │ │ │ -
156 {
│ │ │ │ -
157 factor_ /= field_cast<Field>(f);
│ │ │ │ -
158 if (next_)
│ │ │ │ -
159 (*next_) /= f;
│ │ │ │ -
160 return *this;
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
│ │ │ │ -
163 This &operator*= ( const This &other )
│ │ │ │ -
164 {
│ │ │ │ -
165 assert(!other.next_);
│ │ │ │ -
166 vecZ_ += other.vecZ_;
│ │ │ │ -
167 vecOMZ_ += other.vecOMZ_;
│ │ │ │ -
168 factor_ *= other.factor_;
│ │ │ │ -
169 if (next_)
│ │ │ │ -
170 (*next_) *= other;
│ │ │ │ -
171 return *this;
│ │ │ │ -
172 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
173 This &operator/= ( const This &other )
│ │ │ │ -
174 {
│ │ │ │ -
175 assert(!other.next_);
│ │ │ │ -
176 vecZ_ -= other.vecZ_;
│ │ │ │ -
177 vecOMZ_ -= other.vecOMZ_;
│ │ │ │ -
178 factor_ /= other.factor_;
│ │ │ │ -
179 if (next_)
│ │ │ │ -
180 (*next_) /= other;
│ │ │ │ -
181 return *this;
│ │ │ │ -
182 }
│ │ │ │ -
│ │ │ │ -
183
│ │ │ │ -
│ │ │ │ -
184 This &operator+= ( const This &other )
│ │ │ │ -
185 {
│ │ │ │ -
186 assert(!other.next_);
│ │ │ │ -
187 if (std::abs(other.factor_)<1e-10)
│ │ │ │ -
188 return *this;
│ │ │ │ -
189 if (std::abs(factor_)<1e-10)
│ │ │ │ -
190 {
│ │ │ │ -
191 *this = other;
│ │ │ │ -
192 return *this;
│ │ │ │ -
193 }
│ │ │ │ -
194 if (!sameMultiIndex(other))
│ │ │ │ -
195 {
│ │ │ │ -
196 if (next_)
│ │ │ │ -
197 (*next_)+=other;
│ │ │ │ -
198 else
│ │ │ │ -
199 {
│ │ │ │ -
200 next_ = new This(other);
│ │ │ │ -
201 }
│ │ │ │ -
202 }
│ │ │ │ -
203 else
│ │ │ │ -
204 factor_ += other.factor_;
│ │ │ │ -
205 return *this;
│ │ │ │ -
206 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
207 This &operator-= ( const This &other )
│ │ │ │ -
208 {
│ │ │ │ -
209 assert(!other.next_);
│ │ │ │ -
210 if (!sameMultiIndex(other))
│ │ │ │ -
211 {
│ │ │ │ -
212 if (next_)
│ │ │ │ -
213 next_-=other;
│ │ │ │ -
214 else
│ │ │ │ -
215 {
│ │ │ │ -
216 next_ = new This(other);
│ │ │ │ -
217 }
│ │ │ │ -
218 }
│ │ │ │ -
219 else
│ │ │ │ -
220 factor_ -= other.factor_;
│ │ │ │ -
221 return *this;
│ │ │ │ -
222 }
│ │ │ │ -
│ │ │ │ -
223
│ │ │ │ -
224 template <class F>
│ │ │ │ -
│ │ │ │ -
225 This operator* ( const F &f ) const
│ │ │ │ -
226 {
│ │ │ │ -
227 This z = *this;
│ │ │ │ -
228 return (z *= f);
│ │ │ │ -
229 }
│ │ │ │ -
│ │ │ │ -
230 template <class F>
│ │ │ │ -
│ │ │ │ -
231 This operator/ ( const F &f ) const
│ │ │ │ -
232 {
│ │ │ │ -
233 This z = *this;
│ │ │ │ -
234 return (z /= f);
│ │ │ │ -
235 }
│ │ │ │ -
│ │ │ │ -
236
│ │ │ │ -
│ │ │ │ -
237 This operator* ( const This &other ) const
│ │ │ │ -
238 {
│ │ │ │ -
239 This z = *this;
│ │ │ │ -
240 return (z *= other);
│ │ │ │ -
241 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
242 This operator/ ( const This &other ) const
│ │ │ │ -
243 {
│ │ │ │ -
244 This z = *this;
│ │ │ │ -
245 return (z /= other);
│ │ │ │ -
246 }
│ │ │ │ -
│ │ │ │ -
247
│ │ │ │ -
│ │ │ │ -
248 This operator+ ( const This &other ) const
│ │ │ │ -
249 {
│ │ │ │ -
250 This z = *this;
│ │ │ │ -
251 return (z += other);
│ │ │ │ -
252 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
253 This operator- ( const This &other ) const
│ │ │ │ -
254 {
│ │ │ │ -
255 This z = *this;
│ │ │ │ -
256 return (z -= other);
│ │ │ │ -
257 }
│ │ │ │ -
│ │ │ │ -
258
│ │ │ │ -
│ │ │ │ -
259 void set ( int d, int power = 1 )
│ │ │ │ -
260 {
│ │ │ │ -
261 vecZ_[ d ] = power;
│ │ │ │ -
262 }
│ │ │ │ -
│ │ │ │ -
263
│ │ │ │ -
│ │ │ │ -
264 int absZ () const
│ │ │ │ -
265 {
│ │ │ │ -
266 int ret = 0;
│ │ │ │ -
267 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
268 ret += std::abs( vecZ_[ i ] );
│ │ │ │ -
269 return ret;
│ │ │ │ -
270 }
│ │ │ │ -
│ │ │ │ -
271
│ │ │ │ -
│ │ │ │ -
272 int absOMZ() const
│ │ │ │ -
273 {
│ │ │ │ -
274 int ret = 0;
│ │ │ │ -
275 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
276 ret += std::abs( vecOMZ_[ i ] );
│ │ │ │ -
277 return ret;
│ │ │ │ -
278 }
│ │ │ │ -
│ │ │ │ -
279
│ │ │ │ -
│ │ │ │ -
280 bool sameMultiIndex(const This &ind)
│ │ │ │ -
281 {
│ │ │ │ -
282 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
283 {
│ │ │ │ -
284 if ( vecZ_[i] != ind.vecZ_[i] ||
│ │ │ │ -
285 vecOMZ_[i] != vecOMZ_[i] )
│ │ │ │ -
286 return false;
│ │ │ │ -
287 }
│ │ │ │ -
288 return true;
│ │ │ │ -
289 }
│ │ │ │ -
│ │ │ │ -
290
│ │ │ │ -
291 private:
│ │ │ │ -
292 void remove()
│ │ │ │ -
293 {
│ │ │ │ -
294 if (next_)
│ │ │ │ -
295 {
│ │ │ │ -
296 next_->remove();
│ │ │ │ -
297 delete next_;
│ │ │ │ -
298 next_ = 0;
│ │ │ │ -
299 }
│ │ │ │ -
300 }
│ │ │ │ -
301
│ │ │ │ -
302 typedef Dune::FieldVector< int, dimension > Vector;
│ │ │ │ -
303
│ │ │ │ -
304 Vector vecZ_;
│ │ │ │ -
305 Vector vecOMZ_;
│ │ │ │ -
306 Field factor_;
│ │ │ │ -
307
│ │ │ │ -
308 This *next_;
│ │ │ │ -
309 };
│ │ │ │ -
│ │ │ │ -
310
│ │ │ │ -
311 template <int dim, class Field, class F>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
313 const MultiIndex<dim,Field> &m)
│ │ │ │ -
314 {
│ │ │ │ - │ │ │ │ -
316 return (z *= f);
│ │ │ │ -
317 }
│ │ │ │ -
│ │ │ │ -
318 template <int dim, class Field, class F>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
320 const MultiIndex<dim,Field> &m)
│ │ │ │ -
321 {
│ │ │ │ - │ │ │ │ -
323 return (z /= f);
│ │ │ │ -
324 }
│ │ │ │ -
│ │ │ │ -
325
│ │ │ │ -
326 template <int d, class F>
│ │ │ │ -
│ │ │ │ -
327 std::ostream &operator<<(std::ostream& out,const std::vector<MultiIndex<d,F> >& y) {
│ │ │ │ -
328 for (unsigned int r=0; r<y.size(); ++r) {
│ │ │ │ -
329 out << "f_{" << r << "}(" << char('a');
│ │ │ │ -
330 for (int i=1; i<d; ++i)
│ │ │ │ -
331 out << "," << char('a'+i);
│ │ │ │ -
332 out << ")=";
│ │ │ │ -
333 out << y[r] << std::endl;
│ │ │ │ -
334 }
│ │ │ │ -
335 return out;
│ │ │ │ -
336 }
│ │ │ │ -
│ │ │ │ -
337 template <int d,class F,int dimR>
│ │ │ │ -
│ │ │ │ -
338 std::ostream &operator<<(std::ostream& out,
│ │ │ │ -
339 const std::vector<Dune::FieldVector<MultiIndex<d,F>,dimR> >& y) {
│ │ │ │ -
340 out << "\\begin{eqnarray*}" << std::endl;
│ │ │ │ -
341 for (unsigned int k=0; k<y.size(); ++k) {
│ │ │ │ -
342 out << "f_{" << k << "}(" << char('a');
│ │ │ │ -
343 for (int i=1; i<d; ++i)
│ │ │ │ -
344 out << "," << char('a'+i);
│ │ │ │ -
345 out << ") &=& ( ";
│ │ │ │ -
346 out << y[k][0] ;
│ │ │ │ -
347 for (unsigned int r=1; r<dimR; ++r) {
│ │ │ │ -
348 out << " , " << y[k][r] ;
│ │ │ │ -
349 }
│ │ │ │ -
350 out << " ) \\\\" << std::endl;
│ │ │ │ -
351 }
│ │ │ │ -
352 out << "\\end{eqnarray*}" << std::endl;
│ │ │ │ -
353 return out;
│ │ │ │ -
354 }
│ │ │ │ -
│ │ │ │ -
355 template <int d,class F,int dimR1,int dimR2>
│ │ │ │ -
│ │ │ │ -
356 std::ostream &operator<<(std::ostream& out,
│ │ │ │ -
357 const std::vector<Dune::FieldMatrix<MultiIndex<d,F>,dimR1,dimR2> >& y) {
│ │ │ │ -
358 out << "\\begin{eqnarray*}" << std::endl;
│ │ │ │ -
359 for (unsigned int k=0; k<y.size(); ++k) {
│ │ │ │ -
360 for (int q=0; q<dimR2; q++) {
│ │ │ │ -
361 out << "d_{" << char('a'+q) << "}f_{" << k << "}(" << char('a');
│ │ │ │ -
362 for (int i=1; i<d; ++i)
│ │ │ │ -
363 out << "," << char('a'+i);
│ │ │ │ -
364 out << ") &=& ( ";
│ │ │ │ -
365 out << y[k][0][q] ;
│ │ │ │ -
366 for (unsigned int r=1; r<dimR1; ++r) {
│ │ │ │ -
367 out << " , " << y[k][r][q] ;
│ │ │ │ -
368 }
│ │ │ │ -
369 out << " ) \\\\" << std::endl;
│ │ │ │ -
370 }
│ │ │ │ -
371 }
│ │ │ │ -
372 out << "\\end{eqnarray*}" << std::endl;
│ │ │ │ -
373 return out;
│ │ │ │ -
374 }
│ │ │ │ -
│ │ │ │ -
375 template <int d, class F>
│ │ │ │ -
│ │ │ │ -
376 std::ostream &operator<<(std::ostream& out,const MultiIndex<d,F>& val)
│ │ │ │ -
377 {
│ │ │ │ -
378 bool first = true;
│ │ │ │ -
379 const MultiIndex<d,F> *m = &val;
│ │ │ │ -
380 do {
│ │ │ │ -
381 if (m->absZ()==0 && std::abs(m->factor())<1e-10)
│ │ │ │ -
382 {
│ │ │ │ -
383 if (!m->next_ || !first)
│ │ │ │ -
384 {
│ │ │ │ -
385 out << "0";
│ │ │ │ -
386 break;
│ │ │ │ -
387 }
│ │ │ │ -
388 else {
│ │ │ │ -
389 m = m->next_;
│ │ │ │ -
390 continue;
│ │ │ │ -
391 }
│ │ │ │ -
392 }
│ │ │ │ -
393 if (m->factor()>0 && !first)
│ │ │ │ -
394 out << " + ";
│ │ │ │ -
395 else if (m->factor()<0)
│ │ │ │ -
396 if (!first)
│ │ │ │ -
397 out << " - ";
│ │ │ │ -
398 else
│ │ │ │ -
399 out << "- ";
│ │ │ │ -
400 else
│ │ │ │ -
401 out << " ";
│ │ │ │ -
402 first = false;
│ │ │ │ -
403 F f = std::abs(m->factor());
│ │ │ │ -
404 if (m->absZ()==0)
│ │ │ │ -
405 out << f;
│ │ │ │ -
406 else {
│ │ │ │ -
407 if ( std::abs(f)<1e-10)
│ │ │ │ -
408 out << 0;
│ │ │ │ -
409 else
│ │ │ │ -
410 {
│ │ │ │ -
411 F f_1(f);
│ │ │ │ -
412 f_1 -= 1.; // better Unity<F>();
│ │ │ │ -
413 if ( std::abs(f_1)>1e-10)
│ │ │ │ -
414 out << f;
│ │ │ │ -
415 int absVal = 0;
│ │ │ │ -
416 for (int i=0; i<d; ++i) {
│ │ │ │ -
417 if (m->vecZ_[i]==0)
│ │ │ │ -
418 continue;
│ │ │ │ -
419 else if (m->vecZ_[i]==1)
│ │ │ │ -
420 out << char('a'+i);
│ │ │ │ -
421 else if (m->vecZ_[i]>0)
│ │ │ │ -
422 out << char('a'+i) << "^" << m->vecZ_[i] << "";
│ │ │ │ -
423 else if (m->vecZ_[i]<0)
│ │ │ │ -
424 out << char('a'+i) << "^" << m->vecZ_[i] << "";
│ │ │ │ -
425 absVal += m->vecZ_[i];
│ │ │ │ -
426 if (absVal<m->absZ()) out << "";
│ │ │ │ -
427 }
│ │ │ │ -
428 }
│ │ │ │ -
429 }
│ │ │ │ -
430 /*
│ │ │ │ -
431 if (mi.absOMZ()>0) {
│ │ │ │ -
432 for (int i=0;i<=mi.absZ();++i) {
│ │ │ │ -
433 if (mi.vecOMZ_[i]==0)
│ │ │ │ -
434 continue;
│ │ │ │ -
435 else if (mi.vecOMZ_[i]==1)
│ │ │ │ -
436 out << (1-char('a'+i));
│ │ │ │ -
437 else if (mi.vecOMZ_[i]>0)
│ │ │ │ -
438 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i];
│ │ │ │ -
439 else if (mi.vecOMZ_[i]<0)
│ │ │ │ -
440 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i];
│ │ │ │ -
441 if (i==mi.absZ()+1) out << "*";
│ │ │ │ -
442 }
│ │ │ │ -
443 }
│ │ │ │ -
444 */
│ │ │ │ -
445 m = m->next_;
│ │ │ │ -
446 } while (m);
│ │ │ │ -
447 return out;
│ │ │ │ -
448 }
│ │ │ │ -
│ │ │ │ -
449
│ │ │ │ -
450 template< int dim, class F>
│ │ │ │ -
│ │ │ │ -
451 struct Unity< MultiIndex< dim, F > >
│ │ │ │ -
452 {
│ │ │ │ - │ │ │ │ -
454
│ │ │ │ -
│ │ │ │ -
455 operator Field () const
│ │ │ │ -
456 {
│ │ │ │ -
457 return Field();
│ │ │ │ -
458 }
│ │ │ │ -
│ │ │ │ -
459
│ │ │ │ -
│ │ │ │ -
460 Field operator- ( const Field &other ) const
│ │ │ │ -
461 {
│ │ │ │ -
462 return Field( 1, other );
│ │ │ │ -
463 }
│ │ │ │ -
│ │ │ │ -
464
│ │ │ │ -
│ │ │ │ -
465 Field operator/ ( const Field &other ) const
│ │ │ │ -
466 {
│ │ │ │ -
467 return Field() / other;
│ │ │ │ -
468 }
│ │ │ │ -
│ │ │ │ -
469 };
│ │ │ │ -
│ │ │ │ -
470
│ │ │ │ -
471
│ │ │ │ -
472
│ │ │ │ -
473 template< int dim, class F >
│ │ │ │ -
│ │ │ │ -
474 struct Zero< MultiIndex< dim,F > >
│ │ │ │ -
475 {
│ │ │ │ - │ │ │ │ -
477
│ │ │ │ -
478 // zero does not acutally exist
│ │ │ │ -
│ │ │ │ -
479 operator Field ()
│ │ │ │ -
480 {
│ │ │ │ -
481 return Field(0);
│ │ │ │ -
482 }
│ │ │ │ -
│ │ │ │ -
483 };
│ │ │ │ -
│ │ │ │ -
484
│ │ │ │ -
485 template< int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
487 {
│ │ │ │ -
488 return true;
│ │ │ │ -
489 }
│ │ │ │ -
│ │ │ │ -
490
│ │ │ │ -
491 template< int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
493 {
│ │ │ │ -
494 return true;
│ │ │ │ -
495 }
│ │ │ │ -
│ │ │ │ -
496
│ │ │ │ -
497}
│ │ │ │ -
498
│ │ │ │ -
499#endif // #ifndef DUNE_MULTIINDEX_HH
│ │ │ │ - │ │ │ │ +
59 unsigned int size () const
│ │ │ │ +
60 {
│ │ │ │ +
61 return basis_.size();
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
66 static constexpr GeometryType type ()
│ │ │ │ +
67 {
│ │ │ │ +
68 return GeometryTypes::triangle;
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
71 private:
│ │ │ │ + │ │ │ │ +
73
│ │ │ │ + │ │ │ │ +
75
│ │ │ │ + │ │ │ │ +
77 };
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79}
│ │ │ │ +
80
│ │ │ │ +
81#endif
│ │ │ │ +
Hierarchical p2 shape functions for the simplex.
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Field operator-(const Unity< Field > &u, const Field &f)
Definition field.hh:44
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
bool operator<(const Zero< Field > &, const Field &f)
Definition field.hh:119
│ │ │ │ -
Field operator/(const Unity< Field > &u, const Field &f)
Definition field.hh:56
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ -
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ -
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
This operator+(const This &other) const
Definition multiindex.hh:248
│ │ │ │ -
int absOMZ() const
Definition multiindex.hh:272
│ │ │ │ -
~MultiIndex()
Definition multiindex.hh:86
│ │ │ │ -
This & operator-=(const This &other)
Definition multiindex.hh:207
│ │ │ │ -
MultiIndex(int, const This &other)
Definition multiindex.hh:59
│ │ │ │ -
static const int dimension
Definition multiindex.hh:43
│ │ │ │ -
int absZ() const
Definition multiindex.hh:264
│ │ │ │ -
int omz(int i) const
Definition multiindex.hh:95
│ │ │ │ -
This & operator+=(const This &other)
Definition multiindex.hh:184
│ │ │ │ -
bool operator==(const This &other) const
Definition multiindex.hh:140
│ │ │ │ -
bool sameMultiIndex(const This &ind)
Definition multiindex.hh:280
│ │ │ │ -
This & operator=(const This &other)
Definition multiindex.hh:104
│ │ │ │ -
MultiIndex(const This &other)
Definition multiindex.hh:73
│ │ │ │ -
This & operator*=(const F &f)
Definition multiindex.hh:147
│ │ │ │ -
const Field & factor() const
Definition multiindex.hh:99
│ │ │ │ -
This operator/(const F &f) const
Definition multiindex.hh:231
│ │ │ │ -
MultiIndex(const F &f)
Definition multiindex.hh:52
│ │ │ │ -
This & operator/=(const F &f)
Definition multiindex.hh:155
│ │ │ │ -
This operator*(const F &f) const
Definition multiindex.hh:225
│ │ │ │ -
void set(int d, int power=1)
Definition multiindex.hh:259
│ │ │ │ -
This operator-(const This &other) const
Definition multiindex.hh:253
│ │ │ │ -
int z(int i) const
Definition multiindex.hh:91
│ │ │ │ -
MultiIndex()
Definition multiindex.hh:45
│ │ │ │ -
MultiIndex< dim, F > Field
Definition multiindex.hh:453
│ │ │ │ -
MultiIndex< dim, F > Field
Definition multiindex.hh:476
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Definition hierarchicalp2withelementbubble.hh:21
│ │ │ │ +
LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, HierarchicalSimplexP2WithElementBubbleLocalInterpolation< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits
Definition hierarchicalp2withelementbubble.hh:30
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalp2withelementbubble.hh:59
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalp2withelementbubble.hh:39
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalp2withelementbubble.hh:46
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalp2withelementbubble.hh:53
│ │ │ │ +
static constexpr GeometryType type()
Definition hierarchicalp2withelementbubble.hh:66
│ │ │ │ +
HierarchicalP2WithElementBubbleLocalFiniteElement()
Definition hierarchicalp2withelementbubble.hh:34
│ │ │ │ +
Definition hierarchicalsimplexp2withelementbubble.hh:26
│ │ │ │ +
The local finite element needed for the Zou-Kornhuber estimator for Signorini problems.
Definition hierarchicalsimplexp2withelementbubble.hh:414
│ │ │ │ +
Definition hierarchicalsimplexp2withelementbubble.hh:456
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,621 +1,138 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -multiindex.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ +hierarchicalp2withelementbubble.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ -6#define DUNE_MULTIINDEX_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_P2_WITH_ELEMENTBUBBLE_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_h_i_e_r_a_r_c_h_i_c_a_l_/_h_i_e_r_a_r_c_h_i_c_a_l_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_/ │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h> │ │ │ │ │ 12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 /**************************************************************** │ │ │ │ │ -18 * Provide a Field class which can be used in evaluation methods │ │ │ │ │ -19 * to produce MultiIndex presentation of polynomials. │ │ │ │ │ -20 ****************************************************************/ │ │ │ │ │ -21 // Internal Forward Declarations │ │ │ │ │ -22 // ----------------------------- │ │ │ │ │ -23 │ │ │ │ │ -24 template< int dim, class Field > │ │ │ │ │ -25 class MultiIndex; │ │ │ │ │ -26 │ │ │ │ │ -27 template< int dim, class Field > │ │ │ │ │ -_2_8 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &, const _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_i_e_l_d_ _> & │ │ │ │ │ -); │ │ │ │ │ -29 │ │ │ │ │ -30 │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +19 template │ │ │ │ │ +_2_0 class _H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +21 { │ │ │ │ │ +22 │ │ │ │ │ +23 static_assert(dim==2, "HierarchicalP2WithElementBubbleLocalFiniteElement │ │ │ │ │ +only implemented for dim==2."); │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +28 typedef │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ +29 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_>, │ │ │ │ │ +_3_0 │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ +> > _T_r_a_i_t_s; │ │ │ │ │ 31 │ │ │ │ │ -32 // MultiIndex │ │ │ │ │ -33 // ---------- │ │ │ │ │ -34 │ │ │ │ │ -35 template< int dim,class Field > │ │ │ │ │ -_3_6 class _M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -37 { │ │ │ │ │ -38 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> _T_h_i_s; │ │ │ │ │ -39 │ │ │ │ │ -_4_0 friend std::ostream &operator<<<> ( std::ostream &, const _T_h_i_s & ); │ │ │ │ │ -41 │ │ │ │ │ -42 public: │ │ │ │ │ -_4_3 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -44 │ │ │ │ │ -_4_5 _M_u_l_t_i_I_n_d_e_x () │ │ │ │ │ -46 : vecZ_( 0 ), │ │ │ │ │ -47 vecOMZ_( 0 ), │ │ │ │ │ -48 factor_( 1. ), │ │ │ │ │ -49 next_( 0 ) │ │ │ │ │ -50 {} │ │ │ │ │ -51 template │ │ │ │ │ -_5_2 explicit _M_u_l_t_i_I_n_d_e_x (const F &f) │ │ │ │ │ -53 : vecZ_( 0 ), │ │ │ │ │ -54 vecOMZ_( 0 ), │ │ │ │ │ -55 factor_( _f_i_e_l_d___c_a_s_t(f) ), │ │ │ │ │ -56 next_( 0 ) │ │ │ │ │ -57 {} │ │ │ │ │ -58 │ │ │ │ │ -_5_9 _M_u_l_t_i_I_n_d_e_x ( int, const _T_h_i_s &other ) │ │ │ │ │ -60 : vecZ_( other.vecOMZ_ ), │ │ │ │ │ -61 vecOMZ_( other.vecZ_ ), │ │ │ │ │ -62 factor_( other.factor_ ) │ │ │ │ │ -63 { │ │ │ │ │ -64 assert(!other.next_); │ │ │ │ │ -65 if (other.next_) │ │ │ │ │ -66 { │ │ │ │ │ -67 next_ = new _T_h_i_s( *(other.next_) ); │ │ │ │ │ -68 } │ │ │ │ │ -69 else │ │ │ │ │ -70 next_ = 0; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -_7_3 _M_u_l_t_i_I_n_d_e_x ( const _T_h_i_s &other ) │ │ │ │ │ -74 : vecZ_( other.vecZ_ ), │ │ │ │ │ -75 vecOMZ_( other.vecOMZ_ ), │ │ │ │ │ -76 factor_( other.factor_ ) │ │ │ │ │ -77 { │ │ │ │ │ -78 if (other.next_) │ │ │ │ │ -79 { │ │ │ │ │ -80 next_ = new _T_h_i_s( *(other.next_) ); │ │ │ │ │ -81 } │ │ │ │ │ -82 else │ │ │ │ │ -83 next_ = 0; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -_8_6 _~_M_u_l_t_i_I_n_d_e_x() │ │ │ │ │ -87 { │ │ │ │ │ -88 remove(); │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -_9_1 int _z(int i) const │ │ │ │ │ -92 { │ │ │ │ │ -93 return vecZ_[i]; │ │ │ │ │ -94 } │ │ │ │ │ -_9_5 int _o_m_z(int i) const │ │ │ │ │ -96 { │ │ │ │ │ -97 return vecOMZ_[i]; │ │ │ │ │ -98 } │ │ │ │ │ -_9_9 const Field &_f_a_c_t_o_r() const │ │ │ │ │ -100 { │ │ │ │ │ -101 return factor_; │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -105 { │ │ │ │ │ -106 remove(); │ │ │ │ │ -107 vecZ_ = other.vecZ_; │ │ │ │ │ -108 vecOMZ_ = other.vecOMZ_; │ │ │ │ │ -109 factor_ = other.factor_; │ │ │ │ │ -110 if (other.next_) │ │ │ │ │ -111 next_ = new _T_h_i_s(*(other.next_)); │ │ │ │ │ -112 return *this; │ │ │ │ │ -113 } │ │ │ │ │ -_1_1_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _Z_e_r_o_<_T_h_i_s_> &f ) │ │ │ │ │ -115 { │ │ │ │ │ -116 remove(); │ │ │ │ │ -117 vecZ_ = 0; │ │ │ │ │ -118 vecOMZ_ = 0; │ │ │ │ │ -119 factor_ = 0.; │ │ │ │ │ -120 return *this; │ │ │ │ │ -121 } │ │ │ │ │ -_1_2_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _U_n_i_t_y_<_T_h_i_s_> &f ) │ │ │ │ │ -123 { │ │ │ │ │ -124 remove(); │ │ │ │ │ -125 vecZ_ = 0; │ │ │ │ │ -126 vecOMZ_ = 0; │ │ │ │ │ -127 factor_ = 1.; │ │ │ │ │ -128 return *this; │ │ │ │ │ -129 } │ │ │ │ │ -130 template │ │ │ │ │ -_1_3_1 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const F &f ) │ │ │ │ │ -132 { │ │ │ │ │ -133 remove(); │ │ │ │ │ -134 vecZ_ = 0; │ │ │ │ │ -135 vecOMZ_ = 0; │ │ │ │ │ -136 factor_ = field_cast(f); │ │ │ │ │ -137 return *this; │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -_1_4_0 bool _o_p_e_r_a_t_o_r_=_=_ (const _T_h_i_s &other) const │ │ │ │ │ -141 { │ │ │ │ │ -142 assert(!next_ && !other.next_); │ │ │ │ │ -143 return (vecZ_==other.vecZ_ && vecOMZ_==other.vecOMZ_ && │ │ │ │ │ -factor_==other.factor_); │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 template │ │ │ │ │ -_1_4_7 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const F &f ) │ │ │ │ │ -148 { │ │ │ │ │ -149 factor_ *= field_cast(f); │ │ │ │ │ -150 if (next_) │ │ │ │ │ -151 (*next_) *= f; │ │ │ │ │ -152 return *this; │ │ │ │ │ -153 } │ │ │ │ │ -154 template │ │ │ │ │ -_1_5_5 _T_h_i_s &_o_p_e_r_a_t_o_r_/_=_ ( const F &f ) │ │ │ │ │ -156 { │ │ │ │ │ -157 factor_ /= field_cast(f); │ │ │ │ │ -158 if (next_) │ │ │ │ │ -159 (*next_) /= f; │ │ │ │ │ -160 return *this; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -_1_6_3 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -164 { │ │ │ │ │ -165 assert(!other.next_); │ │ │ │ │ -166 vecZ_ += other.vecZ_; │ │ │ │ │ -167 vecOMZ_ += other.vecOMZ_; │ │ │ │ │ -168 factor_ *= other.factor_; │ │ │ │ │ -169 if (next_) │ │ │ │ │ -170 (*next_) *= other; │ │ │ │ │ -171 return *this; │ │ │ │ │ -172 } │ │ │ │ │ -_1_7_3 _T_h_i_s &_o_p_e_r_a_t_o_r_/_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -174 { │ │ │ │ │ -175 assert(!other.next_); │ │ │ │ │ -176 vecZ_ -= other.vecZ_; │ │ │ │ │ -177 vecOMZ_ -= other.vecOMZ_; │ │ │ │ │ -178 factor_ /= other.factor_; │ │ │ │ │ -179 if (next_) │ │ │ │ │ -180 (*next_) /= other; │ │ │ │ │ -181 return *this; │ │ │ │ │ -182 } │ │ │ │ │ -183 │ │ │ │ │ -_1_8_4 _T_h_i_s &_o_p_e_r_a_t_o_r_+_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -185 { │ │ │ │ │ -186 assert(!other.next_); │ │ │ │ │ -187 if (std::abs(other.factor_)<1e-10) │ │ │ │ │ -188 return *this; │ │ │ │ │ -189 if (std::abs(factor_)<1e-10) │ │ │ │ │ -190 { │ │ │ │ │ -191 *this = other; │ │ │ │ │ -192 return *this; │ │ │ │ │ -193 } │ │ │ │ │ -194 if (!_s_a_m_e_M_u_l_t_i_I_n_d_e_x(other)) │ │ │ │ │ -195 { │ │ │ │ │ -196 if (next_) │ │ │ │ │ -197 (*next_)+=other; │ │ │ │ │ -198 else │ │ │ │ │ -199 { │ │ │ │ │ -200 next_ = new _T_h_i_s(other); │ │ │ │ │ -201 } │ │ │ │ │ -202 } │ │ │ │ │ -203 else │ │ │ │ │ -204 factor_ += other.factor_; │ │ │ │ │ -205 return *this; │ │ │ │ │ -206 } │ │ │ │ │ -_2_0_7 _T_h_i_s &_o_p_e_r_a_t_o_r_-_=_ ( const _T_h_i_s &other ) │ │ │ │ │ -208 { │ │ │ │ │ -209 assert(!other.next_); │ │ │ │ │ -210 if (!_s_a_m_e_M_u_l_t_i_I_n_d_e_x(other)) │ │ │ │ │ -211 { │ │ │ │ │ -212 if (next_) │ │ │ │ │ -213 next_-=other; │ │ │ │ │ -214 else │ │ │ │ │ -215 { │ │ │ │ │ -216 next_ = new _T_h_i_s(other); │ │ │ │ │ -217 } │ │ │ │ │ -218 } │ │ │ │ │ -219 else │ │ │ │ │ -220 factor_ -= other.factor_; │ │ │ │ │ -221 return *this; │ │ │ │ │ -222 } │ │ │ │ │ -223 │ │ │ │ │ -224 template │ │ │ │ │ -_2_2_5 _T_h_i_s _o_p_e_r_a_t_o_r_*_ ( const F &f ) const │ │ │ │ │ -226 { │ │ │ │ │ -227 _T_h_i_s _z = *this; │ │ │ │ │ -228 return (_z *= f); │ │ │ │ │ -229 } │ │ │ │ │ -230 template │ │ │ │ │ -_2_3_1 _T_h_i_s _o_p_e_r_a_t_o_r_/_ ( const F &f ) const │ │ │ │ │ -232 { │ │ │ │ │ -233 _T_h_i_s _z = *this; │ │ │ │ │ -234 return (_z /= f); │ │ │ │ │ -235 } │ │ │ │ │ -236 │ │ │ │ │ -_2_3_7 _T_h_i_s _o_p_e_r_a_t_o_r_*_ ( const _T_h_i_s &other ) const │ │ │ │ │ -238 { │ │ │ │ │ -239 _T_h_i_s _z = *this; │ │ │ │ │ -240 return (_z *= other); │ │ │ │ │ -241 } │ │ │ │ │ -_2_4_2 _T_h_i_s _o_p_e_r_a_t_o_r_/_ ( const _T_h_i_s &other ) const │ │ │ │ │ -243 { │ │ │ │ │ -244 _T_h_i_s _z = *this; │ │ │ │ │ -245 return (_z /= other); │ │ │ │ │ -246 } │ │ │ │ │ -247 │ │ │ │ │ -_2_4_8 _T_h_i_s _o_p_e_r_a_t_o_r_+_ ( const _T_h_i_s &other ) const │ │ │ │ │ -249 { │ │ │ │ │ -250 _T_h_i_s _z = *this; │ │ │ │ │ -251 return (_z += other); │ │ │ │ │ -252 } │ │ │ │ │ -_2_5_3 _T_h_i_s _o_p_e_r_a_t_o_r_-_ ( const _T_h_i_s &other ) const │ │ │ │ │ -254 { │ │ │ │ │ -255 _T_h_i_s _z = *this; │ │ │ │ │ -256 return (_z -= other); │ │ │ │ │ -257 } │ │ │ │ │ -258 │ │ │ │ │ -_2_5_9 void _s_e_t ( int d, int power = 1 ) │ │ │ │ │ -260 { │ │ │ │ │ -261 vecZ_[ d ] = power; │ │ │ │ │ -262 } │ │ │ │ │ -263 │ │ │ │ │ -_2_6_4 int _a_b_s_Z () const │ │ │ │ │ -265 { │ │ │ │ │ -266 int ret = 0; │ │ │ │ │ -267 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -268 ret += std::abs( vecZ_[ i ] ); │ │ │ │ │ -269 return ret; │ │ │ │ │ -270 } │ │ │ │ │ -271 │ │ │ │ │ -_2_7_2 int _a_b_s_O_M_Z() const │ │ │ │ │ -273 { │ │ │ │ │ -274 int ret = 0; │ │ │ │ │ -275 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -276 ret += std::abs( vecOMZ_[ i ] ); │ │ │ │ │ -277 return ret; │ │ │ │ │ -278 } │ │ │ │ │ -279 │ │ │ │ │ -_2_8_0 bool _s_a_m_e_M_u_l_t_i_I_n_d_e_x(const _T_h_i_s &ind) │ │ │ │ │ -281 { │ │ │ │ │ -282 for( int i = 0; i < _d_i_m_e_n_s_i_o_n; ++i ) │ │ │ │ │ -283 { │ │ │ │ │ -284 if ( vecZ_[i] != ind.vecZ_[i] || │ │ │ │ │ -285 vecOMZ_[i] != vecOMZ_[i] ) │ │ │ │ │ -286 return false; │ │ │ │ │ -287 } │ │ │ │ │ -288 return true; │ │ │ │ │ -289 } │ │ │ │ │ -290 │ │ │ │ │ -291 private: │ │ │ │ │ -292 void remove() │ │ │ │ │ -293 { │ │ │ │ │ -294 if (next_) │ │ │ │ │ -295 { │ │ │ │ │ -296 next_->remove(); │ │ │ │ │ -297 delete next_; │ │ │ │ │ -298 next_ = 0; │ │ │ │ │ -299 } │ │ │ │ │ -300 } │ │ │ │ │ -301 │ │ │ │ │ -302 typedef Dune::FieldVector< int, dimension > Vector; │ │ │ │ │ -303 │ │ │ │ │ -304 Vector vecZ_; │ │ │ │ │ -305 Vector vecOMZ_; │ │ │ │ │ -306 Field factor_; │ │ │ │ │ -307 │ │ │ │ │ -308 This *next_; │ │ │ │ │ -309 }; │ │ │ │ │ -310 │ │ │ │ │ -311 template │ │ │ │ │ -_3_1_2 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _o_p_e_r_a_t_o_r_*_ ( const F &f, │ │ │ │ │ -313 const _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> &m) │ │ │ │ │ -314 { │ │ │ │ │ -315 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> z = m; │ │ │ │ │ -316 return (z *= f); │ │ │ │ │ -317 } │ │ │ │ │ -318 template │ │ │ │ │ -_3_1_9 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _o_p_e_r_a_t_o_r_/_ ( const F &f, │ │ │ │ │ -320 const _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> &m) │ │ │ │ │ -321 { │ │ │ │ │ -322 _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> z = m; │ │ │ │ │ -323 return (z /= f); │ │ │ │ │ -324 } │ │ │ │ │ -325 │ │ │ │ │ -326 template │ │ │ │ │ -_3_2_7 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out,const std:: │ │ │ │ │ -vector<_M_u_l_t_i_I_n_d_e_x_<_d_,_F_> >& y) { │ │ │ │ │ -328 for (unsigned int r=0; r │ │ │ │ │ -_3_5_6 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out, │ │ │ │ │ -357 const std::vector,dimR1,dimR2> >& y) { │ │ │ │ │ -358 out << "\\begin{eqnarray*}" << std::endl; │ │ │ │ │ -359 for (unsigned int k=0; k │ │ │ │ │ -_3_7_6 std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream& out,const _M_u_l_t_i_I_n_d_e_x_<_d_,_F_>& val) │ │ │ │ │ -377 { │ │ │ │ │ -378 bool first = true; │ │ │ │ │ -379 const _M_u_l_t_i_I_n_d_e_x_<_d_,_F_> *m = &val; │ │ │ │ │ -380 do { │ │ │ │ │ -381 if (m->_a_b_s_Z()==0 && std::abs(m->_f_a_c_t_o_r())<1e-10) │ │ │ │ │ -382 { │ │ │ │ │ -383 if (!m->next_ || !first) │ │ │ │ │ -384 { │ │ │ │ │ -385 out << "0"; │ │ │ │ │ -386 break; │ │ │ │ │ -387 } │ │ │ │ │ -388 else { │ │ │ │ │ -389 m = m->next_; │ │ │ │ │ -390 continue; │ │ │ │ │ -391 } │ │ │ │ │ -392 } │ │ │ │ │ -393 if (m->_f_a_c_t_o_r()>0 && !first) │ │ │ │ │ -394 out << " + "; │ │ │ │ │ -395 else if (m->_f_a_c_t_o_r()<0) │ │ │ │ │ -396 if (!first) │ │ │ │ │ -397 out << " - "; │ │ │ │ │ -398 else │ │ │ │ │ -399 out << "- "; │ │ │ │ │ -400 else │ │ │ │ │ -401 out << " "; │ │ │ │ │ -402 first = false; │ │ │ │ │ -403 F f = std::abs(m->_f_a_c_t_o_r()); │ │ │ │ │ -404 if (m->_a_b_s_Z()==0) │ │ │ │ │ -405 out << f; │ │ │ │ │ -406 else { │ │ │ │ │ -407 if ( std::abs(f)<1e-10) │ │ │ │ │ -408 out << 0; │ │ │ │ │ -409 else │ │ │ │ │ -410 { │ │ │ │ │ -411 F f_1(f); │ │ │ │ │ -412 f_1 -= 1.; // better Unity(); │ │ │ │ │ -413 if ( std::abs(f_1)>1e-10) │ │ │ │ │ -414 out << f; │ │ │ │ │ -415 int absVal = 0; │ │ │ │ │ -416 for (int i=0; ivecZ_[i]==0) │ │ │ │ │ -418 continue; │ │ │ │ │ -419 else if (m->vecZ_[i]==1) │ │ │ │ │ -420 out << char('a'+i); │ │ │ │ │ -421 else if (m->vecZ_[i]>0) │ │ │ │ │ -422 out << char('a'+i) << "^" << m->vecZ_[i] << ""; │ │ │ │ │ -423 else if (m->vecZ_[i]<0) │ │ │ │ │ -424 out << char('a'+i) << "^" << m->vecZ_[i] << ""; │ │ │ │ │ -425 absVal += m->vecZ_[i]; │ │ │ │ │ -426 if (absValabsZ()) out << ""; │ │ │ │ │ -427 } │ │ │ │ │ -428 } │ │ │ │ │ -429 } │ │ │ │ │ -430 /* │ │ │ │ │ -431 if (mi.absOMZ()>0) { │ │ │ │ │ -432 for (int i=0;i<=mi.absZ();++i) { │ │ │ │ │ -433 if (mi.vecOMZ_[i]==0) │ │ │ │ │ -434 continue; │ │ │ │ │ -435 else if (mi.vecOMZ_[i]==1) │ │ │ │ │ -436 out << (1-char('a'+i)); │ │ │ │ │ -437 else if (mi.vecOMZ_[i]>0) │ │ │ │ │ -438 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i]; │ │ │ │ │ -439 else if (mi.vecOMZ_[i]<0) │ │ │ │ │ -440 out << (1-char('a'+i)) << "^" << mi.vecOMZ_[i]; │ │ │ │ │ -441 if (i==mi.absZ()+1) out << "*"; │ │ │ │ │ -442 } │ │ │ │ │ -443 } │ │ │ │ │ -444 */ │ │ │ │ │ -445 m = m->next_; │ │ │ │ │ -446 } while (m); │ │ │ │ │ -447 return out; │ │ │ │ │ -448 } │ │ │ │ │ -449 │ │ │ │ │ -450 template< int dim, class F> │ │ │ │ │ -_4_5_1 struct _U_n_i_t_y< _M_u_l_t_i_I_n_d_e_x< dim, F > > │ │ │ │ │ -452 { │ │ │ │ │ -_4_5_3 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _> _F_i_e_l_d; │ │ │ │ │ -454 │ │ │ │ │ -_4_5_5 operator _F_i_e_l_d () const │ │ │ │ │ -456 { │ │ │ │ │ -457 return _F_i_e_l_d(); │ │ │ │ │ -458 } │ │ │ │ │ -459 │ │ │ │ │ -_4_6_0 _F_i_e_l_d _o_p_e_r_a_t_o_r_-_ ( const _F_i_e_l_d &other ) const │ │ │ │ │ -461 { │ │ │ │ │ -462 return _F_i_e_l_d( 1, other ); │ │ │ │ │ -463 } │ │ │ │ │ -464 │ │ │ │ │ -_4_6_5 _F_i_e_l_d _o_p_e_r_a_t_o_r_/_ ( const _F_i_e_l_d &other ) const │ │ │ │ │ -466 { │ │ │ │ │ -467 return _F_i_e_l_d() / other; │ │ │ │ │ -468 } │ │ │ │ │ -469 }; │ │ │ │ │ -470 │ │ │ │ │ -471 │ │ │ │ │ -472 │ │ │ │ │ -473 template< int dim, class F > │ │ │ │ │ -_4_7_4 struct _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x< dim,F > > │ │ │ │ │ -475 { │ │ │ │ │ -_4_7_6 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_ _> _F_i_e_l_d; │ │ │ │ │ -477 │ │ │ │ │ -478 // zero does not acutally exist │ │ │ │ │ -_4_7_9 operator _F_i_e_l_d () │ │ │ │ │ -480 { │ │ │ │ │ -481 return _F_i_e_l_d(0); │ │ │ │ │ -482 } │ │ │ │ │ -483 }; │ │ │ │ │ -484 │ │ │ │ │ -485 template< int dim, class Field > │ │ │ │ │ -_4_8_6 bool _o_p_e_r_a_t_o_r_<_ ( const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_F_i_e_l_d_ _> > &, const _M_u_l_t_i_I_n_d_e_x_< │ │ │ │ │ -_d_i_m_,_F_i_e_l_d_ _> & ) │ │ │ │ │ -487 { │ │ │ │ │ -488 return true; │ │ │ │ │ -489 } │ │ │ │ │ -490 │ │ │ │ │ -491 template< int dim, class Field > │ │ │ │ │ -_4_9_2 bool _o_p_e_r_a_t_o_r_<_ ( const _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_i_e_l_d_ _> &f, const _Z_e_r_o< _M_u_l_t_i_I_n_d_e_x_< │ │ │ │ │ -_d_i_m_,_F_i_e_l_d_ _> > & ) │ │ │ │ │ -493 { │ │ │ │ │ -494 return true; │ │ │ │ │ -495 } │ │ │ │ │ -496 │ │ │ │ │ -497} │ │ │ │ │ -498 │ │ │ │ │ -499#endif // #ifndef DUNE_MULTIINDEX_HH │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +_3_4 _H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +35 {} │ │ │ │ │ +36 │ │ │ │ │ +_3_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +40 { │ │ │ │ │ +41 return basis_; │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +47 { │ │ │ │ │ +48 return coefficients_; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +54 { │ │ │ │ │ +55 return interpolation_; │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +_5_9 unsigned int _s_i_z_e () const │ │ │ │ │ +60 { │ │ │ │ │ +61 return basis_.size(); │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +67 { │ │ │ │ │ +68 return GeometryTypes::triangle; │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +71 private: │ │ │ │ │ +72 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis_; │ │ │ │ │ +73 │ │ │ │ │ +74 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_<_d_i_m_> coefficients_; │ │ │ │ │ +75 │ │ │ │ │ +76 │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ +> interpolation_; │ │ │ │ │ +77 }; │ │ │ │ │ +78 │ │ │ │ │ +79} │ │ │ │ │ +80 │ │ │ │ │ +81#endif │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_w_i_t_h_e_l_e_m_e_n_t_b_u_b_b_l_e_._h_h │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ -Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ -bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ -Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ -Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ │ -This operator+(const This &other) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:248 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_a_b_s_O_M_Z │ │ │ │ │ -int absOMZ() const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:272 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_~_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -~MultiIndex() │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:86 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_-_= │ │ │ │ │ -This & operator-=(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -MultiIndex(int, const This &other) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_a_b_s_Z │ │ │ │ │ -int absZ() const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_m_z │ │ │ │ │ -int omz(int i) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_+_= │ │ │ │ │ -This & operator+=(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:184 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const This &other) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:140 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_s_a_m_e_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -bool sameMultiIndex(const This &ind) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -MultiIndex(const This &other) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ │ -This & operator*=(const F &f) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_f_a_c_t_o_r │ │ │ │ │ -const Field & factor() const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ -This operator/(const F &f) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:231 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -MultiIndex(const F &f) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_/_= │ │ │ │ │ -This & operator/=(const F &f) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ -This operator*(const F &f) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:225 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_s_e_t │ │ │ │ │ -void set(int d, int power=1) │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:259 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ -This operator-(const This &other) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_z │ │ │ │ │ -int z(int i) const │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -MultiIndex() │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_U_n_i_t_y_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _>_:_:_F_i_e_l_d │ │ │ │ │ -MultiIndex< dim, F > Field │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:453 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o_<_ _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_,_ _F_ _>_ _>_:_:_F_i_e_l_d │ │ │ │ │ -MultiIndex< dim, F > Field │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:476 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:21 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalSimplexP2WithElementBubbleLocalBasis< D, │ │ │ │ │ +R, dim >, HierarchicalSimplexP2WithElementBubbleLocalCoefficients< dim >, │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalInterpolation< │ │ │ │ │ +HierarchicalSimplexP2WithElementBubbleLocalBasis< D, R, dim > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +HierarchicalP2WithElementBubbleLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2withelementbubble.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +The local finite element needed for the Zou-Kornhuber estimator for Signorini │ │ │ │ │ +problems. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:414 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_W_i_t_h_E_l_e_m_e_n_t_B_u_b_b_l_e_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2withelementbubble.hh:456 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lfematrix.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalp2.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
lfematrix.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
hierarchicalp2.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include "field.hh"
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +#include "hierarchicalp2/hierarchicalsimplexp2localbasis.hh"
│ │ │ │ +#include "hierarchicalp2/hierarchicalsimplexp2localinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LFEMatrix< F >
class  Dune::HierarchicalP2LocalFiniteElement< D, R, dim >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<class Field >
std::ostream & Dune::operator<< (std::ostream &out, const LFEMatrix< Field > &mat)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -lfematrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include "_f_i_e_l_d_._h_h" │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +hierarchicalp2.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _L_F_E_M_a_t_r_i_x< Field > │ │ │ │ │ - &mat) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00170_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lfematrix.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalp2.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,230 +70,124 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lfematrix.hh
│ │ │ │ +
hierarchicalp2.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10
│ │ │ │ -
11#include "field.hh"
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
16 template< class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
19 typedef LFEMatrix< F > This;
│ │ │ │ -
20 typedef std::vector< F > Row;
│ │ │ │ -
21 typedef std::vector<Row> RealMatrix;
│ │ │ │ -
22
│ │ │ │ -
23 public:
│ │ │ │ -
24 typedef F Field;
│ │ │ │ -
25
│ │ │ │ -
│ │ │ │ -
26 operator const RealMatrix & () const
│ │ │ │ -
27 {
│ │ │ │ -
28 return matrix_;
│ │ │ │ -
29 }
│ │ │ │ -
│ │ │ │ -
30
│ │ │ │ -
│ │ │ │ -
31 operator RealMatrix & ()
│ │ │ │ -
32 {
│ │ │ │ -
33 return matrix_;
│ │ │ │ -
34 }
│ │ │ │ -
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
18
│ │ │ │ +
21 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
25 static_assert(1 <= dim && dim <= 3,
│ │ │ │ +
26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3.");
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
35
│ │ │ │ -
36 template <class Vector>
│ │ │ │ -
│ │ │ │ -
37 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
38 {
│ │ │ │ -
39 assert(row<rows());
│ │ │ │ -
40 for (int i=0; i<cols(); ++i)
│ │ │ │ -
41 field_cast(matrix_[row][i], vec[i]);
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
44 const Field &operator() ( const unsigned int row, const unsigned int col ) const
│ │ │ │ -
45 {
│ │ │ │ -
46 assert(row<rows());
│ │ │ │ -
47 assert(col<cols());
│ │ │ │ -
48 return matrix_[ row ][ col ];
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 Field &operator() ( const unsigned int row, const unsigned int col )
│ │ │ │ -
52 {
│ │ │ │ -
53 assert(row<rows());
│ │ │ │ -
54 assert(col<cols());
│ │ │ │ -
55 return matrix_[ row ][ col ];
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ -
58 unsigned int rows () const
│ │ │ │ -
59 {
│ │ │ │ -
60 return rows_;
│ │ │ │ -
61 }
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │ +
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ +
43 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return basis;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ +
52 return coefficients;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
58 {
│ │ │ │ +
59 return interpolation;
│ │ │ │ +
60 }
│ │ │ │
│ │ │ │ -
62
│ │ │ │ +
61
│ │ │ │
│ │ │ │ -
63 unsigned int cols () const
│ │ │ │ +
63 unsigned int size () const
│ │ │ │
64 {
│ │ │ │ -
65 return cols_;
│ │ │ │ +
65 return basis.size();
│ │ │ │
66 }
│ │ │ │
│ │ │ │
67
│ │ │ │ -
│ │ │ │ -
68 const Field *rowPtr ( const unsigned int row ) const
│ │ │ │ -
69 {
│ │ │ │ -
70 assert(row<rows());
│ │ │ │ -
71 return &(matrix_[row][0]);
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
│ │ │ │ -
74 Field *rowPtr ( const unsigned int row )
│ │ │ │ -
75 {
│ │ │ │ -
76 assert(row<rows());
│ │ │ │ -
77 return &(matrix_[row][0]);
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::simplex(dim);
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77
│ │ │ │ +
78 typename Traits::LocalCoefficientsType coefficients;
│ │ │ │
79
│ │ │ │ -
│ │ │ │ -
80 void resize ( const unsigned int rows, const unsigned int cols )
│ │ │ │ -
81 {
│ │ │ │ -
82 matrix_.resize(rows);
│ │ │ │ -
83 for (unsigned int i=0; i<rows; ++i)
│ │ │ │ -
84 matrix_[i].resize(cols);
│ │ │ │ -
85 rows_ = rows;
│ │ │ │ -
86 cols_ = cols;
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
│ │ │ │ -
89 bool invert ()
│ │ │ │ -
90 {
│ │ │ │ -
91 using std::abs;
│ │ │ │ -
92 assert( rows() == cols() );
│ │ │ │ -
93 std::vector<unsigned int> p(rows());
│ │ │ │ -
94 for (unsigned int j=0; j<rows(); ++j)
│ │ │ │ -
95 p[j] = j;
│ │ │ │ -
96 for (unsigned int j=0; j<rows(); ++j)
│ │ │ │ -
97 {
│ │ │ │ -
98 // pivot search
│ │ │ │ -
99 unsigned int r = j;
│ │ │ │ -
100 Field max = abs( (*this)(j,j) );
│ │ │ │ -
101 for (unsigned int i=j+1; i<rows(); ++i)
│ │ │ │ -
102 {
│ │ │ │ -
103 if ( abs( (*this)(i,j) ) > max )
│ │ │ │ -
104 {
│ │ │ │ -
105 max = abs( (*this)(i,j) );
│ │ │ │ -
106 r = i;
│ │ │ │ -
107 }
│ │ │ │ -
108 }
│ │ │ │ -
109 if (max == Zero<Field>())
│ │ │ │ -
110 return false;
│ │ │ │ -
111 // row swap
│ │ │ │ -
112 if (r > j)
│ │ │ │ -
113 {
│ │ │ │ -
114 for (unsigned int k=0; k<cols(); ++k)
│ │ │ │ -
115 std::swap( (*this)(j,k), (*this)(r,k) );
│ │ │ │ -
116 std::swap( p[j], p[r] );
│ │ │ │ -
117 }
│ │ │ │ -
118 // transformation
│ │ │ │ -
119 Field hr = Unity<Field>()/(*this)(j,j);
│ │ │ │ -
120 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ -
121 (*this)(i,j) *= hr;
│ │ │ │ -
122 (*this)(j,j) = hr;
│ │ │ │ -
123 for (unsigned int k=0; k<cols(); ++k)
│ │ │ │ -
124 {
│ │ │ │ -
125 if (k==j) continue;
│ │ │ │ -
126 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ -
127 {
│ │ │ │ -
128 if (i==j) continue;
│ │ │ │ -
129 (*this)(i,k) -= (*this)(i,j)*(*this)(j,k);
│ │ │ │ -
130 }
│ │ │ │ -
131 (*this)(j,k) *= -hr;
│ │ │ │ -
132 }
│ │ │ │ -
133 }
│ │ │ │ -
134 // column exchange
│ │ │ │ -
135 Row hv(rows());
│ │ │ │ -
136 for (unsigned int i=0; i<rows(); ++i)
│ │ │ │ -
137 {
│ │ │ │ -
138 for (unsigned int k=0; k<rows(); ++k)
│ │ │ │ -
139 hv[ p[k] ] = (*this)(i,k);
│ │ │ │ -
140 for (unsigned int k=0; k<rows(); ++k)
│ │ │ │ -
141 (*this)(i,k) = hv[k];
│ │ │ │ -
142 }
│ │ │ │ -
143 return true;
│ │ │ │ -
144 }
│ │ │ │ -
│ │ │ │ -
145
│ │ │ │ -
146 private:
│ │ │ │ -
147 RealMatrix matrix_;
│ │ │ │ -
148 unsigned int cols_,rows_;
│ │ │ │ -
149 };
│ │ │ │ -
│ │ │ │ -
150
│ │ │ │ -
151 template< class Field >
│ │ │ │ -
│ │ │ │ -
152 inline std::ostream &operator<<(std::ostream &out, const LFEMatrix<Field> &mat)
│ │ │ │ -
153 {
│ │ │ │ -
154 for (unsigned int r=0; r<mat.rows(); ++r)
│ │ │ │ -
155 {
│ │ │ │ -
156 out << field_cast<double>(mat(r,0));
│ │ │ │ -
157 for (unsigned int c=1; c<mat.cols(); ++c)
│ │ │ │ -
158 {
│ │ │ │ -
159 out << " , " << field_cast<double>(mat(r,c));
│ │ │ │ -
160 }
│ │ │ │ -
161 out << std::endl;
│ │ │ │ -
162 }
│ │ │ │ -
163 return out;
│ │ │ │ -
164 }
│ │ │ │ -
│ │ │ │ -
165}
│ │ │ │ -
166
│ │ │ │ -
167#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH
│ │ │ │ - │ │ │ │ + │ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
82
│ │ │ │ +
83}
│ │ │ │ +
84
│ │ │ │ +
85#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ +
Hierarchical p2 shape functions for the simplex.
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ -
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
Definition lfematrix.hh:18
│ │ │ │ -
Field * rowPtr(const unsigned int row)
Definition lfematrix.hh:74
│ │ │ │ -
unsigned int cols() const
Definition lfematrix.hh:63
│ │ │ │ -
const Field * rowPtr(const unsigned int row) const
Definition lfematrix.hh:68
│ │ │ │ -
void resize(const unsigned int rows, const unsigned int cols)
Definition lfematrix.hh:80
│ │ │ │ -
const Field & operator()(const unsigned int row, const unsigned int col) const
Definition lfematrix.hh:44
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition lfematrix.hh:37
│ │ │ │ -
unsigned int rows() const
Definition lfematrix.hh:58
│ │ │ │ -
bool invert()
Definition lfematrix.hh:89
│ │ │ │ -
F Field
Definition lfematrix.hh:24
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Definition hierarchicalp2.hh:23
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition hierarchicalp2.hh:43
│ │ │ │ +
HierarchicalP2LocalFiniteElement()
Definition hierarchicalp2.hh:38
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition hierarchicalp2.hh:63
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition hierarchicalp2.hh:50
│ │ │ │ +
LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits::LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits
Definition hierarchicalp2.hh:34
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition hierarchicalp2.hh:57
│ │ │ │ +
static constexpr GeometryType type()
Definition hierarchicalp2.hh:70
│ │ │ │ +
Definition hierarchicalsimplexp2localbasis.hh:23
│ │ │ │ +
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,226 +1,137 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -lfematrix.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ +hierarchicalp2.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include "_f_i_e_l_d_._h_h" │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ 12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ +13#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +14#include "_h_i_e_r_a_r_c_h_i_c_a_l_p_2_/_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 15 │ │ │ │ │ -16 template< class F > │ │ │ │ │ -_1_7 class _L_F_E_M_a_t_r_i_x │ │ │ │ │ -18 { │ │ │ │ │ -19 typedef _L_F_E_M_a_t_r_i_x_<_ _F_ _> _T_h_i_s; │ │ │ │ │ -20 typedef std::vector< F > Row; │ │ │ │ │ -21 typedef std::vector RealMatrix; │ │ │ │ │ -22 │ │ │ │ │ -23 public: │ │ │ │ │ -_2_4 typedef F _F_i_e_l_d; │ │ │ │ │ -25 │ │ │ │ │ -_2_6 operator const RealMatrix & () const │ │ │ │ │ -27 { │ │ │ │ │ -28 return matrix_; │ │ │ │ │ -29 } │ │ │ │ │ -30 │ │ │ │ │ -_3_1 operator RealMatrix & () │ │ │ │ │ -32 { │ │ │ │ │ -33 return matrix_; │ │ │ │ │ -34 } │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +18 │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +23 { │ │ │ │ │ +24 │ │ │ │ │ +25 static_assert(1 <= dim && dim <= 3, │ │ │ │ │ +26 "HierarchicalP2LocalFiniteElement only implemented for dim==1, 2, 3."); │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +32 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ +33 typename _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_2_>_:_:_T_r_a_i_t_s_:_: │ │ │ │ │ +_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e, │ │ │ │ │ +_3_4 │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ +> > _T_r_a_i_t_s; │ │ │ │ │ 35 │ │ │ │ │ -36 template │ │ │ │ │ -_3_7 void _r_o_w( const unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ -38 { │ │ │ │ │ -39 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ -40 for (int i=0; i<_c_o_l_s(); ++i) │ │ │ │ │ -41 _f_i_e_l_d___c_a_s_t(matrix_[_r_o_w][i], vec[i]); │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_4 const _F_i_e_l_d &_o_p_e_r_a_t_o_r_(_)_ ( const unsigned int _r_o_w, const unsigned int col ) │ │ │ │ │ -const │ │ │ │ │ -45 { │ │ │ │ │ -46 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ -47 assert(col<_c_o_l_s()); │ │ │ │ │ -48 return matrix_[ _r_o_w ][ col ]; │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_1 _F_i_e_l_d &_o_p_e_r_a_t_o_r_(_)_ ( const unsigned int _r_o_w, const unsigned int col ) │ │ │ │ │ -52 { │ │ │ │ │ -53 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ -54 assert(col<_c_o_l_s()); │ │ │ │ │ -55 return matrix_[ _r_o_w ][ col ]; │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -_5_8 unsigned int _r_o_w_s () const │ │ │ │ │ -59 { │ │ │ │ │ -60 return rows_; │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -_6_3 unsigned int _c_o_l_s () const │ │ │ │ │ +_3_8 _H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +39 {} │ │ │ │ │ +40 │ │ │ │ │ +_4_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +44 { │ │ │ │ │ +45 return basis; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return coefficients; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +58 { │ │ │ │ │ +59 return interpolation; │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_3 unsigned int _s_i_z_e () const │ │ │ │ │ 64 { │ │ │ │ │ -65 return cols_; │ │ │ │ │ +65 return basis.size(); │ │ │ │ │ 66 } │ │ │ │ │ 67 │ │ │ │ │ -_6_8 const _F_i_e_l_d *_r_o_w_P_t_r ( const unsigned int _r_o_w ) const │ │ │ │ │ -69 { │ │ │ │ │ -70 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ -71 return &(matrix_[_r_o_w][0]); │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -_7_4 _F_i_e_l_d *_r_o_w_P_t_r ( const unsigned int _r_o_w ) │ │ │ │ │ -75 { │ │ │ │ │ -76 assert(_r_o_w<_r_o_w_s()); │ │ │ │ │ -77 return &(matrix_[_r_o_w][0]); │ │ │ │ │ -78 } │ │ │ │ │ +_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +71 { │ │ │ │ │ +72 return GeometryTypes::simplex(dim); │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 private: │ │ │ │ │ +76 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> basis; │ │ │ │ │ +77 │ │ │ │ │ +78 typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e coefficients; │ │ │ │ │ 79 │ │ │ │ │ -_8_0 void _r_e_s_i_z_e ( const unsigned int _r_o_w_s, const unsigned int _c_o_l_s ) │ │ │ │ │ -81 { │ │ │ │ │ -82 matrix_.resize(_r_o_w_s); │ │ │ │ │ -83 for (unsigned int i=0; i<_r_o_w_s; ++i) │ │ │ │ │ -84 matrix_[i]._r_e_s_i_z_e(_c_o_l_s); │ │ │ │ │ -85 rows_ = _r_o_w_s; │ │ │ │ │ -86 cols_ = _c_o_l_s; │ │ │ │ │ -87 } │ │ │ │ │ -88 │ │ │ │ │ -_8_9 bool _i_n_v_e_r_t () │ │ │ │ │ -90 { │ │ │ │ │ -91 using std::abs; │ │ │ │ │ -92 assert( _r_o_w_s() == _c_o_l_s() ); │ │ │ │ │ -93 std::vector p(_r_o_w_s()); │ │ │ │ │ -94 for (unsigned int j=0; j<_r_o_w_s(); ++j) │ │ │ │ │ -95 p[j] = j; │ │ │ │ │ -96 for (unsigned int j=0; j<_r_o_w_s(); ++j) │ │ │ │ │ -97 { │ │ │ │ │ -98 // pivot search │ │ │ │ │ -99 unsigned int r = j; │ │ │ │ │ -100 _F_i_e_l_d max = abs( (*this)(j,j) ); │ │ │ │ │ -101 for (unsigned int i=j+1; i<_r_o_w_s(); ++i) │ │ │ │ │ -102 { │ │ │ │ │ -103 if ( abs( (*this)(i,j) ) > max ) │ │ │ │ │ -104 { │ │ │ │ │ -105 max = abs( (*this)(i,j) ); │ │ │ │ │ -106 r = i; │ │ │ │ │ -107 } │ │ │ │ │ -108 } │ │ │ │ │ -109 if (max == _Z_e_r_o_<_F_i_e_l_d_>()) │ │ │ │ │ -110 return false; │ │ │ │ │ -111 // row swap │ │ │ │ │ -112 if (r > j) │ │ │ │ │ -113 { │ │ │ │ │ -114 for (unsigned int k=0; k<_c_o_l_s(); ++k) │ │ │ │ │ -115 std::swap( (*this)(j,k), (*this)(r,k) ); │ │ │ │ │ -116 std::swap( p[j], p[r] ); │ │ │ │ │ -117 } │ │ │ │ │ -118 // transformation │ │ │ │ │ -119 _F_i_e_l_d hr = _U_n_i_t_y_<_F_i_e_l_d_>()/(*this)(j,j); │ │ │ │ │ -120 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ -121 (*this)(i,j) *= hr; │ │ │ │ │ -122 (*this)(j,j) = hr; │ │ │ │ │ -123 for (unsigned int k=0; k<_c_o_l_s(); ++k) │ │ │ │ │ -124 { │ │ │ │ │ -125 if (k==j) continue; │ │ │ │ │ -126 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ -127 { │ │ │ │ │ -128 if (i==j) continue; │ │ │ │ │ -129 (*this)(i,k) -= (*this)(i,j)*(*this)(j,k); │ │ │ │ │ -130 } │ │ │ │ │ -131 (*this)(j,k) *= -hr; │ │ │ │ │ -132 } │ │ │ │ │ -133 } │ │ │ │ │ -134 // column exchange │ │ │ │ │ -135 Row hv(_r_o_w_s()); │ │ │ │ │ -136 for (unsigned int i=0; i<_r_o_w_s(); ++i) │ │ │ │ │ -137 { │ │ │ │ │ -138 for (unsigned int k=0; k<_r_o_w_s(); ++k) │ │ │ │ │ -139 hv[ p[k] ] = (*this)(i,k); │ │ │ │ │ -140 for (unsigned int k=0; k<_r_o_w_s(); ++k) │ │ │ │ │ -141 (*this)(i,k) = hv[k]; │ │ │ │ │ -142 } │ │ │ │ │ -143 return true; │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -146 private: │ │ │ │ │ -147 RealMatrix matrix_; │ │ │ │ │ -148 unsigned int cols_,rows_; │ │ │ │ │ -149 }; │ │ │ │ │ -150 │ │ │ │ │ -151 template< class Field > │ │ │ │ │ -_1_5_2 inline std::ostream &_o_p_e_r_a_t_o_r_<_<(std::ostream &out, const _L_F_E_M_a_t_r_i_x_<_F_i_e_l_d_> │ │ │ │ │ -&mat) │ │ │ │ │ -153 { │ │ │ │ │ -154 for (unsigned int r=0; r(mat(r,0)); │ │ │ │ │ -157 for (unsigned int c=1; c(mat(r,c)); │ │ │ │ │ -160 } │ │ │ │ │ -161 out << std::endl; │ │ │ │ │ -162 } │ │ │ │ │ -163 return out; │ │ │ │ │ -164 } │ │ │ │ │ -165} │ │ │ │ │ -166 │ │ │ │ │ -167#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_LFEMATRIX_HH │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +80 │ │ │ │ │ +_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_> │ │ │ │ │ +> interpolation; │ │ │ │ │ +81 }; │ │ │ │ │ +82 │ │ │ │ │ +83} │ │ │ │ │ +84 │ │ │ │ │ +85#endif │ │ │ │ │ +_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_h_i_e_r_a_r_c_h_i_c_a_l_s_i_m_p_l_e_x_p_2_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< │ │ │ │ │ -std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_P_t_r │ │ │ │ │ -Field * rowPtr(const unsigned int row) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_P_t_r │ │ │ │ │ -const Field * rowPtr(const unsigned int row) const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize(const unsigned int rows, const unsigned int cols) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Field & operator()(const unsigned int row, const unsigned int col) const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_i_n_v_e_r_t │ │ │ │ │ -bool invert() │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +HierarchicalP2LocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< HierarchicalSimplexP2LocalBasis< D, R, dim >, │ │ │ │ │ +typename LagrangeSimplexLocalFiniteElement< D, R, dim, 2 >::Traits:: │ │ │ │ │ +LocalCoefficientsType, HierarchicalSimplexP2LocalInterpolation< │ │ │ │ │ +HierarchicalSimplexP2LocalBasis< D, R, dim > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalp2.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: l2interpolation.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,46 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
l2interpolation.hh File Reference
│ │ │ │ +
hierarchicalprismp2localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/concept.hh>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │ + │ │ │ │ +

Hierarchical prism p2 shape functions for the simplex. │ │ │ │ +More...

│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LocalL2InterpolationBase< B, Q >
 
struct  Dune::LocalL2Interpolation< B, Q, true >
 
struct  Dune::LocalL2Interpolation< B, Q, false >
 
struct  Dune::LocalL2InterpolationFactory< BasisFactory, onb >
 A factory class for the local l2 interpolations taking a basis factory. More...
class  Dune::HierarchicalPrismP2LocalBasis< D, R >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Hierarchical prism p2 shape functions for the simplex.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -l2interpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ +hierarchicalprismp2localbasis.hh File Reference │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_ _B_,_ _Q_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _t_r_u_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _B_a_s_i_s_F_a_c_t_o_r_y_,_ _o_n_b_ _> │ │ │ │ │ -  A factory class for the local l2 interpolations taking a basis │ │ │ │ │ - factory. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Hierarchical prism p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00173_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: l2interpolation.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalprismp2localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,280 +70,271 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
l2interpolation.hh
│ │ │ │ +
hierarchicalprismp2localbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_L2INTERPOLATION_HH
│ │ │ │ -
6#define DUNE_L2INTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/concept.hh>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
32 template< class B, class Q, bool onb >
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
35 template< class B, class Q >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {
│ │ │ │ - │ │ │ │ +
12#include <numeric>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/common/fvector.hh>
│ │ │ │ +
15#include <dune/common/fmatrix.hh>
│ │ │ │ +
16
│ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24 public:
│ │ │ │ +
26 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
29 unsigned int size () const
│ │ │ │ +
30 {
│ │ │ │ +
31 return 18;
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
36 std::vector<typename Traits::RangeType> & out) const
│ │ │ │ +
37 {
│ │ │ │ +
38 out.resize(18);
│ │ │ │
39
│ │ │ │ -
40 public:
│ │ │ │ -
41 typedef B Basis;
│ │ │ │ -
42 typedef Q Quadrature;
│ │ │ │ -
43
│ │ │ │ -
44 static const unsigned int dimension = Basis::dimension;
│ │ │ │ -
45
│ │ │ │ -
47 template< class Function, class DofField, std::enable_if_t<models<Impl::FunctionWithEvaluate<typename Function::DomainType, typename Function::RangeType>, Function>(), int> = 0 >
│ │ │ │ -
│ │ │ │ -
48 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ -
49 {
│ │ │ │ -
50 typedef typename Quadrature::iterator Iterator;
│ │ │ │ -
51 typedef FieldVector< DofField, Basis::dimRange > RangeVector;
│ │ │ │ -
52
│ │ │ │ -
53 const unsigned int size = basis().size();
│ │ │ │ -
54 static std::vector< RangeVector > basisValues( size );
│ │ │ │ -
55
│ │ │ │ -
56 coefficients.resize( size );
│ │ │ │ -
57 basisValues.resize( size );
│ │ │ │ -
58 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
59 coefficients[ i ] = Zero< DofField >();
│ │ │ │ -
60
│ │ │ │ -
61 const Iterator end = quadrature().end();
│ │ │ │ -
62 for( Iterator it = quadrature().begin(); it != end; ++it )
│ │ │ │ -
63 {
│ │ │ │ -
64 basis().evaluate( it->position(), basisValues );
│ │ │ │ -
65 typename Function::RangeType val;
│ │ │ │ -
66 function.evaluate( field_cast<typename Function::DomainType::field_type>(it->position()), val );
│ │ │ │ -
67 RangeVector factor = field_cast< DofField >( val );
│ │ │ │ -
68 factor *= field_cast< DofField >( it->weight() );
│ │ │ │ -
69 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
70 coefficients[ i ] += factor * basisValues[ i ];
│ │ │ │ -
71 }
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73
│ │ │ │ -
75 template< class Function, class DofField, std::enable_if_t<models<Impl::FunctionWithCallOperator<typename Quadrature::value_type::Vector>, Function>(), int> = 0 >
│ │ │ │ -
│ │ │ │ -
76 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ -
77 {
│ │ │ │ -
78 typedef FieldVector< DofField, Basis::dimRange > RangeVector;
│ │ │ │ -
79
│ │ │ │ -
80 const unsigned int size = basis().size();
│ │ │ │ -
81 static std::vector< RangeVector > basisValues( size );
│ │ │ │ -
82
│ │ │ │ -
83 coefficients.resize( size );
│ │ │ │ -
84 basisValues.resize( size );
│ │ │ │ -
85 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
86 coefficients[ i ] = Zero< DofField >();
│ │ │ │ -
87
│ │ │ │ -
88 for (auto&& qp : quadrature())
│ │ │ │ -
89 {
│ │ │ │ -
90 basis().evaluate( qp.position(), basisValues );
│ │ │ │ -
91 auto val = function( qp.position() );
│ │ │ │ -
92 RangeVector factor = field_cast< DofField >( val );
│ │ │ │ -
93 factor *= field_cast< DofField >( qp.weight() );
│ │ │ │ -
94 for( unsigned int i = 0; i < size; ++i )
│ │ │ │ -
95 coefficients[ i ] += factor * basisValues[ i ];
│ │ │ │ -
96 }
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
│ │ │ │ -
99 const Basis &basis () const
│ │ │ │ -
100 {
│ │ │ │ -
101 return basis_;
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
│ │ │ │ -
104 const Quadrature &quadrature () const
│ │ │ │ -
105 {
│ │ │ │ -
106 return quadrature_;
│ │ │ │ -
107 }
│ │ │ │ -
│ │ │ │ -
108
│ │ │ │ -
109 protected:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 : basis_( basis ),
│ │ │ │ - │ │ │ │ -
113 {}
│ │ │ │ -
│ │ │ │ -
114
│ │ │ │ -
115 const Basis &basis_;
│ │ │ │ - │ │ │ │ -
117 };
│ │ │ │ -
│ │ │ │ -
118
│ │ │ │ -
119 template< class B, class Q >
│ │ │ │ -
│ │ │ │ -
120 struct LocalL2Interpolation<B,Q,true>
│ │ │ │ -
121 : public LocalL2InterpolationBase<B,Q>
│ │ │ │ -
122 {
│ │ │ │ - │ │ │ │ -
124 template< class BasisFactory, bool onb >
│ │ │ │ - │ │ │ │ -
126 using typename Base::Basis;
│ │ │ │ -
127 using typename Base::Quadrature;
│ │ │ │ -
128 private:
│ │ │ │ -
129 LocalL2Interpolation ( const typename Base::Basis &basis, const typename Base::Quadrature &quadrature )
│ │ │ │ -
130 : Base(basis,quadrature)
│ │ │ │ -
131 {}
│ │ │ │ -
132 };
│ │ │ │ -
│ │ │ │ -
133 template< class B, class Q >
│ │ │ │ -
│ │ │ │ -
134 struct LocalL2Interpolation<B,Q,false>
│ │ │ │ -
135 : public LocalL2InterpolationBase<B,Q>
│ │ │ │ -
136 {
│ │ │ │ - │ │ │ │ -
138 template< class BasisFactory, bool onb >
│ │ │ │ - │ │ │ │ -
140 using typename Base::Basis;
│ │ │ │ -
141 using typename Base::Quadrature;
│ │ │ │ -
142 template< class Function, class DofField >
│ │ │ │ -
│ │ │ │ -
143 void interpolate ( const Function &function, std::vector< DofField > &coefficients ) const
│ │ │ │ -
144 {
│ │ │ │ -
145 const unsigned size = Base::basis().size();
│ │ │ │ -
146 Base::interpolate(function,val_);
│ │ │ │ -
147 coefficients.resize( size );
│ │ │ │ -
148 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
149 {
│ │ │ │ -
150 coefficients[i] = 0;
│ │ │ │ -
151 for (unsigned int j=0; j<size; ++j)
│ │ │ │ -
152 {
│ │ │ │ -
153 coefficients[i] += field_cast<DofField>(massMatrix_(i,j)*val_[j]);
│ │ │ │ -
154 }
│ │ │ │ -
155 }
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157 private:
│ │ │ │ -
158 LocalL2Interpolation ( const typename Base::Basis &basis, const typename Base::Quadrature &quadrature )
│ │ │ │ -
159 : Base(basis,quadrature),
│ │ │ │ -
160 val_(basis.size()),
│ │ │ │ -
161 massMatrix_()
│ │ │ │ -
162 {
│ │ │ │ -
163 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector;
│ │ │ │ -
164 typedef typename Base::Quadrature::iterator Iterator;
│ │ │ │ -
165 const unsigned size = basis.size();
│ │ │ │ -
166 std::vector< RangeVector > basisValues( size );
│ │ │ │ -
167
│ │ │ │ -
168 massMatrix_.resize( size,size );
│ │ │ │ -
169 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
170 for (unsigned int j=0; j<size; ++j)
│ │ │ │ -
171 massMatrix_(i,j) = 0;
│ │ │ │ -
172 const Iterator end = Base::quadrature().end();
│ │ │ │ -
173 for( Iterator it = Base::quadrature().begin(); it != end; ++it )
│ │ │ │ -
174 {
│ │ │ │ -
175 Base::basis().evaluate( it->position(), basisValues );
│ │ │ │ -
176 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
177 for (unsigned int j=0; j<size; ++j)
│ │ │ │ -
178 massMatrix_(i,j) += (basisValues[i]*basisValues[j])*it->weight();
│ │ │ │ -
179 }
│ │ │ │ -
180 if ( !massMatrix_.invert() )
│ │ │ │ -
181 {
│ │ │ │ -
182 DUNE_THROW(MathError, "Mass matrix singular in LocalL2Interpolation");
│ │ │ │ -
183 }
│ │ │ │ -
184
│ │ │ │ -
185 }
│ │ │ │ -
186 typedef typename Base::Basis::StorageField Field;
│ │ │ │ -
187 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector;
│ │ │ │ -
188 typedef LFEMatrix<Field> MassMatrix;
│ │ │ │ -
189 mutable std::vector<Field> val_;
│ │ │ │ -
190 MassMatrix massMatrix_;
│ │ │ │ -
191 };
│ │ │ │ -
│ │ │ │ -
192
│ │ │ │ -
197 template< class BasisFactory, bool onb >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
199 {
│ │ │ │ -
200 static const unsigned int dimension = BasisFactory::dimension;
│ │ │ │ -
201 typedef typename BasisFactory::Key Key;
│ │ │ │ -
202 typedef typename BasisFactory::Object Basis;
│ │ │ │ -
203 typedef double Field;
│ │ │ │ -
204 typedef QuadratureRule<Field,dimension> Quadrature;
│ │ │ │ -
205 typedef QuadratureRules<Field,dimension> QuadratureProvider;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
208
│ │ │ │ -
209 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
210 static Object *create ( const Key &key )
│ │ │ │ -
211 {
│ │ │ │ -
212 constexpr Dune::GeometryType geometry = geometryId;
│ │ │ │ -
213 const Basis *basis = BasisFactory::template create< geometry >( key );
│ │ │ │ -
214 const Quadrature & quadrature = QuadratureProvider::rule(geometry, 2*basis->order()+1);
│ │ │ │ -
215 return new Object( *basis, quadrature );
│ │ │ │ -
216 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
217 static void release ( Object *object )
│ │ │ │ -
218 {
│ │ │ │ -
219 const Basis &basis = object->basis();
│ │ │ │ -
220 BasisFactory::release( &basis );
│ │ │ │ -
221 delete object;
│ │ │ │ -
222 }
│ │ │ │ -
│ │ │ │ -
223 };
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225}
│ │ │ │ -
226
│ │ │ │ -
227#endif // #ifndef DUNE_L2INTERPOLATION_HH
│ │ │ │ - │ │ │ │ +
40 out[0]=(1.0-in[0]-in[1])*(1.0-in[2]);
│ │ │ │ +
41 out[1]= in[0]*(1-in[2]);
│ │ │ │ +
42 out[2]=in[1]*(1-in[2]);
│ │ │ │ +
43 out[3]=in[2]*(1.0-in[0]-in[1]);
│ │ │ │ +
44 out[4]=in[0]*in[2];
│ │ │ │ +
45 out[5]=in[1]*in[2];
│ │ │ │ +
46
│ │ │ │ +
47 //edges
│ │ │ │ +
48 out[6]=2*(1.0-in[0]-in[1])*(0.5-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
49 out[7]=2*in[0]*(-0.5+in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
50 out[8]=2*in[1]*(-0.5+in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
51 out[9]=4*in[0]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
52 out[10]=4*in[1]*(1-in[0]-in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
53 out[11]=4*in[0]*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
54 out[12]=4*in[0]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
55 out[13]=4*in[1]*(1-in[0]-in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
56 out[14]=4*in[0]*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
57
│ │ │ │ +
58 //faces
│ │ │ │ +
59 out[15]=4*in[0]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
60 out[16]=4*in[1]*(1-in[0]-in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
61 out[17]=4*in[0]*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
67 void evaluateJacobian (const typename Traits::DomainType& in, //position
│ │ │ │ +
68 std::vector<typename Traits::JacobianType>& out) const //return value
│ │ │ │ +
69 {
│ │ │ │ +
70 out.resize(18);
│ │ │ │ +
71
│ │ │ │ +
72 //vertices
│ │ │ │ +
73 out[0][0][0] = in[2]-1;
│ │ │ │ +
74 out[0][0][1] = in[2]-1;
│ │ │ │ +
75 out[0][0][2] = in[0]+in[1]-1;
│ │ │ │ +
76
│ │ │ │ +
77 out[1][0][0] = 1-in[2];
│ │ │ │ +
78 out[1][0][1] = 0;
│ │ │ │ +
79 out[1][0][2] =-in[0];
│ │ │ │ +
80
│ │ │ │ +
81 out[2][0][0] = 0;
│ │ │ │ +
82 out[2][0][1] = 1-in[2];
│ │ │ │ +
83 out[2][0][2] = -in[1];
│ │ │ │ +
84
│ │ │ │ +
85 out[3][0][0] = -in[2];
│ │ │ │ +
86 out[3][0][1] = -in[2];
│ │ │ │ +
87 out[3][0][2] = 1-in[0]-in[1];
│ │ │ │ +
88
│ │ │ │ +
89 out[4][0][0] = in[2];
│ │ │ │ +
90 out[4][0][1] = 0;
│ │ │ │ +
91 out[4][0][2] = in[0];
│ │ │ │ +
92
│ │ │ │ +
93 out[5][0][0] = 0;
│ │ │ │ +
94 out[5][0][1] = in[2];
│ │ │ │ +
95 out[5][0][2] = in[1];
│ │ │ │ +
96
│ │ │ │ +
97 //edges
│ │ │ │ +
98 out[6][0][0] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
99 out[6][0][1] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
100 out[6][0][2] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
101
│ │ │ │ +
102 out[7][0][0] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
103 out[7][0][1] = 0;
│ │ │ │ +
104 out[7][0][2] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]);
│ │ │ │ +
105
│ │ │ │ +
106 out[8][0][0] = 0;
│ │ │ │ +
107 out[8][0][1] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
108 out[8][0][2] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]);
│ │ │ │ +
109
│ │ │ │ +
110 out[9][0][0] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
111 out[9][0][1] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
112 out[9][0][2] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ +
113
│ │ │ │ +
114 out[10][0][0] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
115 out[10][0][1] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
116 out[10][0][2] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ +
117
│ │ │ │ +
118 out[11][0][0] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
119 out[11][0][1] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
120 out[11][0][2] = 4*in[0]*in[1]*(-3+4*in[2]);
│ │ │ │ +
121
│ │ │ │ +
122 out[12][0][0] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
123 out[12][0][1] = (-4*in[0])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
124 out[12][0][2] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ +
125
│ │ │ │ +
126 out[13][0][0] = -4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
127 out[13][0][1] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
128 out[13][0][2] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ +
129
│ │ │ │ +
130 out[14][0][0] = 4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
131 out[14][0][1] = 4*in[0]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
132 out[14][0][2] = 4*in[0]*in[1]*(-1+4*in[2]);
│ │ │ │ +
133
│ │ │ │ +
134 //faces
│ │ │ │ +
135 out[15][0][0] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
136 out[15][0][1] = -4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
137 out[15][0][2] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
138
│ │ │ │ +
139 out[16][0][0] = -4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
140 out[16][0][1] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
141 out[16][0][2] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
142
│ │ │ │ +
143 out[17][0][0] = 4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
144 out[17][0][1] = 4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
145 out[17][0][2] = 4*in[0]*in[1]*(4-8*in[2]);
│ │ │ │ +
146 }
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
149 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
150 const typename Traits::DomainType& in, // position
│ │ │ │ +
151 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
152 {
│ │ │ │ +
153 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
154 if (totalOrder == 0) {
│ │ │ │ +
155 evaluateFunction(in, out);
│ │ │ │ +
156 } else if (totalOrder == 1) {
│ │ │ │ +
157 out.resize(size());
│ │ │ │ +
158 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
159
│ │ │ │ +
160 switch (direction) {
│ │ │ │ +
161 case 0:
│ │ │ │ +
162 out[0] = in[2]-1;
│ │ │ │ +
163 out[1] = 1-in[2];
│ │ │ │ +
164 out[2] = 0;
│ │ │ │ +
165 out[3] = -in[2];
│ │ │ │ +
166 out[4] = in[2];
│ │ │ │ +
167 out[5] = 0;
│ │ │ │ +
168 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
169 out[7] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
170 out[8] = 0;
│ │ │ │ +
171 out[9] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
172 out[10] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
173 out[11] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
174 out[12] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
175 out[13] = -4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
176 out[14] = 4*in[1]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
177 out[15] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
178 out[16] = -4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
179 out[17] = 4*in[1]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
180 break;
│ │ │ │ +
181 case 1:
│ │ │ │ +
182 out[0] = in[2]-1;
│ │ │ │ +
183 out[1] = 0;
│ │ │ │ +
184 out[2] = 1-in[2];
│ │ │ │ +
185 out[3] = -in[2];
│ │ │ │ +
186 out[4] = 0;
│ │ │ │ +
187 out[5] = in[2];
│ │ │ │ +
188 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
189 out[7] = 0;
│ │ │ │ +
190 out[8] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
191 out[9] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
192 out[10] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
193 out[11] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]);
│ │ │ │ +
194 out[12] = (-4*in[0])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
195 out[13] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
196 out[14] = 4*in[0]*(-in[2]+2*in[2]*in[2]);
│ │ │ │ +
197 out[15] = -4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
198 out[16] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
199 out[17] = 4*in[0]*(4*in[2]-4*in[2]*in[2]);
│ │ │ │ +
200 break;
│ │ │ │ +
201 case 2:
│ │ │ │ +
202 out[0] = in[0]+in[1]-1;
│ │ │ │ +
203 out[1] =-in[0];
│ │ │ │ +
204 out[2] = -in[1];
│ │ │ │ +
205 out[3] = 1-in[0]-in[1];
│ │ │ │ +
206 out[4] = in[0];
│ │ │ │ +
207 out[5] = in[1];
│ │ │ │ +
208 out[6] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
209 out[7] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]);
│ │ │ │ +
210 out[8] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]);
│ │ │ │ +
211 out[9] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ +
212 out[10] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]);
│ │ │ │ +
213 out[11] = 4*in[0]*in[1]*(-3+4*in[2]);
│ │ │ │ +
214 out[12] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ +
215 out[13] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]);
│ │ │ │ +
216 out[14] = 4*in[0]*in[1]*(-1+4*in[2]);
│ │ │ │ +
217 out[15] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
218 out[16] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]);
│ │ │ │ +
219 out[17] = 4*in[0]*in[1]*(4-8*in[2]);
│ │ │ │ +
220 break;
│ │ │ │ +
221 default:
│ │ │ │ +
222 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
223 }
│ │ │ │ +
224 } else {
│ │ │ │ +
225 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
226 }
│ │ │ │ +
227 }
│ │ │ │ +
│ │ │ │ +
228
│ │ │ │ +
│ │ │ │ +
231 unsigned int order() const
│ │ │ │ +
232 {
│ │ │ │ +
233 return 2;
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
236 };
│ │ │ │ +
│ │ │ │ +
237}
│ │ │ │ +
238#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
A local L2 interpolation taking a test basis and a quadrature rule.
Definition l2interpolation.hh:33
│ │ │ │ -
Definition l2interpolation.hh:37
│ │ │ │ -
LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature)
Definition l2interpolation.hh:110
│ │ │ │ -
void interpolate(const Function &function, std::vector< DofField > &coefficients) const
Interpolate a function that implements void evaluate(Domain, Range&)
Definition l2interpolation.hh:48
│ │ │ │ -
const Basis & basis() const
Definition l2interpolation.hh:99
│ │ │ │ -
const Quadrature & quadrature_
Definition l2interpolation.hh:116
│ │ │ │ -
const Basis & basis_
Definition l2interpolation.hh:115
│ │ │ │ -
static const unsigned int dimension
Definition l2interpolation.hh:44
│ │ │ │ -
const Quadrature & quadrature() const
Definition l2interpolation.hh:104
│ │ │ │ -
Q Quadrature
Definition l2interpolation.hh:42
│ │ │ │ -
B Basis
Definition l2interpolation.hh:41
│ │ │ │ -
LocalL2InterpolationBase< B, Q > Base
Definition l2interpolation.hh:123
│ │ │ │ -
void interpolate(const Function &function, std::vector< DofField > &coefficients) const
Definition l2interpolation.hh:143
│ │ │ │ -
LocalL2InterpolationBase< B, Q > Base
Definition l2interpolation.hh:137
│ │ │ │ -
A factory class for the local l2 interpolations taking a basis factory.
Definition l2interpolation.hh:199
│ │ │ │ -
static const unsigned int dimension
Definition l2interpolation.hh:200
│ │ │ │ -
static void release(Object *object)
Definition l2interpolation.hh:217
│ │ │ │ -
BasisFactory::Object Basis
Definition l2interpolation.hh:202
│ │ │ │ -
double Field
Definition l2interpolation.hh:203
│ │ │ │ -
QuadratureRules< Field, dimension > QuadratureProvider
Definition l2interpolation.hh:205
│ │ │ │ -
QuadratureRule< Field, dimension > Quadrature
Definition l2interpolation.hh:204
│ │ │ │ -
static Object * create(const Key &key)
Definition l2interpolation.hh:210
│ │ │ │ -
BasisFactory::Key Key
Definition l2interpolation.hh:201
│ │ │ │ -
const LocalInterpolation Object
Definition l2interpolation.hh:207
│ │ │ │ -
LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation
Definition l2interpolation.hh:206
│ │ │ │ - │ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Definition hierarchicalprismp2localbasis.hh:23
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalprismp2localbasis.hh:26
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalprismp2localbasis.hh:29
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition hierarchicalprismp2localbasis.hh:231
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalprismp2localbasis.hh:149
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalprismp2localbasis.hh:35
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalprismp2localbasis.hh:67
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,314 +1,282 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -l2interpolation.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ +hierarchicalprismp2localbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_L2INTERPOLATION_HH │ │ │ │ │ -6#define DUNE_L2INTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -32 template< class B, class Q, bool onb > │ │ │ │ │ -_3_3 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -34 │ │ │ │ │ -35 template< class B, class Q > │ │ │ │ │ -_3_6 class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +23 { │ │ │ │ │ +24 public: │ │ │ │ │ +_2_6 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ +FieldVector, Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +27 │ │ │ │ │ +_2_9 unsigned int _s_i_z_e () const │ │ │ │ │ +30 { │ │ │ │ │ +31 return 18; │ │ │ │ │ +32 } │ │ │ │ │ +33 │ │ │ │ │ +_3_5 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +36 std::vector & out) const │ │ │ │ │ 37 { │ │ │ │ │ -38 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_ _B_,_ _Q_ _> _T_h_i_s; │ │ │ │ │ +38 out.resize(18); │ │ │ │ │ 39 │ │ │ │ │ -40 public: │ │ │ │ │ -_4_1 typedef B _B_a_s_i_s; │ │ │ │ │ -_4_2 typedef Q _Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ -43 │ │ │ │ │ -_4_4 static const unsigned int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ -45 │ │ │ │ │ -47 template< class Function, class DofField, std::enable_if_t, Function>(), int> = 0 > │ │ │ │ │ -_4_8 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients ) const │ │ │ │ │ -49 { │ │ │ │ │ -50 typedef typename Quadrature::iterator Iterator; │ │ │ │ │ -51 typedef FieldVector< DofField, Basis::dimRange > RangeVector; │ │ │ │ │ -52 │ │ │ │ │ -53 const unsigned int size = _b_a_s_i_s().size(); │ │ │ │ │ -54 static std::vector< RangeVector > basisValues( size ); │ │ │ │ │ -55 │ │ │ │ │ -56 coefficients.resize( size ); │ │ │ │ │ -57 basisValues.resize( size ); │ │ │ │ │ -58 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ -59 coefficients[ i ] = _Z_e_r_o_<_ _D_o_f_F_i_e_l_d_ _>(); │ │ │ │ │ -60 │ │ │ │ │ -61 const Iterator end = _q_u_a_d_r_a_t_u_r_e().end(); │ │ │ │ │ -62 for( Iterator it = _q_u_a_d_r_a_t_u_r_e().begin(); it != end; ++it ) │ │ │ │ │ -63 { │ │ │ │ │ -64 _b_a_s_i_s().evaluate( it->position(), basisValues ); │ │ │ │ │ -65 typename Function::RangeType val; │ │ │ │ │ -66 function.evaluate( field_cast(it- │ │ │ │ │ ->position()), val ); │ │ │ │ │ -67 RangeVector factor = field_cast< DofField >( val ); │ │ │ │ │ -68 factor *= field_cast< DofField >( it->weight() ); │ │ │ │ │ -69 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ -70 coefficients[ i ] += factor * basisValues[ i ]; │ │ │ │ │ -71 } │ │ │ │ │ -72 } │ │ │ │ │ -73 │ │ │ │ │ -75 template< class Function, class DofField, std::enable_if_t, Function>(), │ │ │ │ │ -int> = 0 > │ │ │ │ │ -_7_6 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients ) const │ │ │ │ │ -77 { │ │ │ │ │ -78 typedef FieldVector< DofField, Basis::dimRange > RangeVector; │ │ │ │ │ -79 │ │ │ │ │ -80 const unsigned int size = _b_a_s_i_s().size(); │ │ │ │ │ -81 static std::vector< RangeVector > basisValues( size ); │ │ │ │ │ -82 │ │ │ │ │ -83 coefficients.resize( size ); │ │ │ │ │ -84 basisValues.resize( size ); │ │ │ │ │ -85 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ -86 coefficients[ i ] = _Z_e_r_o_<_ _D_o_f_F_i_e_l_d_ _>(); │ │ │ │ │ -87 │ │ │ │ │ -88 for (auto&& qp : _q_u_a_d_r_a_t_u_r_e()) │ │ │ │ │ -89 { │ │ │ │ │ -90 _b_a_s_i_s().evaluate( qp.position(), basisValues ); │ │ │ │ │ -91 auto val = function( qp.position() ); │ │ │ │ │ -92 RangeVector factor = field_cast< DofField >( val ); │ │ │ │ │ -93 factor *= field_cast< DofField >( qp.weight() ); │ │ │ │ │ -94 for( unsigned int i = 0; i < size; ++i ) │ │ │ │ │ -95 coefficients[ i ] += factor * basisValues[ i ]; │ │ │ │ │ -96 } │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -_9_9 const _B_a_s_i_s &_b_a_s_i_s () const │ │ │ │ │ -100 { │ │ │ │ │ -101 return _b_a_s_i_s__; │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -_1_0_4 const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e () const │ │ │ │ │ -105 { │ │ │ │ │ -106 return _q_u_a_d_r_a_t_u_r_e__; │ │ │ │ │ -107 } │ │ │ │ │ -108 │ │ │ │ │ -109 protected: │ │ │ │ │ -_1_1_0 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e ( const _B_a_s_i_s &_b_a_s_i_s, const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e │ │ │ │ │ -) │ │ │ │ │ -111 : _b_a_s_i_s__( _b_a_s_i_s ), │ │ │ │ │ -112 _q_u_a_d_r_a_t_u_r_e__( _q_u_a_d_r_a_t_u_r_e ) │ │ │ │ │ -113 {} │ │ │ │ │ -114 │ │ │ │ │ -_1_1_5 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ -_1_1_6 const _Q_u_a_d_r_a_t_u_r_e &_q_u_a_d_r_a_t_u_r_e__; │ │ │ │ │ -117 }; │ │ │ │ │ -118 │ │ │ │ │ -119 template< class B, class Q > │ │ │ │ │ -_1_2_0 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -121 : public _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ -122 { │ │ │ │ │ -_1_2_3 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_B_,_Q_> _B_a_s_e; │ │ │ │ │ -124 template< class BasisFactory, bool onb > │ │ │ │ │ -_1_2_5 friend class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ -126 using typename _B_a_s_e_:_:_B_a_s_i_s; │ │ │ │ │ -127 using typename _B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ -128 private: │ │ │ │ │ -129 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n ( const typename _B_a_s_e_:_:_B_a_s_i_s &basis, const typename │ │ │ │ │ -_B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e &quadrature ) │ │ │ │ │ -130 : _B_a_s_e(basis,quadrature) │ │ │ │ │ -131 {} │ │ │ │ │ -132 }; │ │ │ │ │ -133 template< class B, class Q > │ │ │ │ │ -_1_3_4 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -135 : public _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ -136 { │ │ │ │ │ -_1_3_7 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_<_B_,_Q_> _B_a_s_e; │ │ │ │ │ -138 template< class BasisFactory, bool onb > │ │ │ │ │ -_1_3_9 friend class _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ -140 using typename _B_a_s_e_:_:_B_a_s_i_s; │ │ │ │ │ -141 using typename _B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ -142 template< class Function, class DofField > │ │ │ │ │ -_1_4_3 void _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients ) const │ │ │ │ │ -144 { │ │ │ │ │ -145 const unsigned size = Base::basis().size(); │ │ │ │ │ -146 Base::interpolate(function,val_); │ │ │ │ │ -147 coefficients.resize( size ); │ │ │ │ │ -148 for (unsigned int i=0; i& out) const //return value │ │ │ │ │ +69 { │ │ │ │ │ +70 out.resize(18); │ │ │ │ │ +71 │ │ │ │ │ +72 //vertices │ │ │ │ │ +73 out[0][0][0] = in[2]-1; │ │ │ │ │ +74 out[0][0][1] = in[2]-1; │ │ │ │ │ +75 out[0][0][2] = in[0]+in[1]-1; │ │ │ │ │ +76 │ │ │ │ │ +77 out[1][0][0] = 1-in[2]; │ │ │ │ │ +78 out[1][0][1] = 0; │ │ │ │ │ +79 out[1][0][2] =-in[0]; │ │ │ │ │ +80 │ │ │ │ │ +81 out[2][0][0] = 0; │ │ │ │ │ +82 out[2][0][1] = 1-in[2]; │ │ │ │ │ +83 out[2][0][2] = -in[1]; │ │ │ │ │ +84 │ │ │ │ │ +85 out[3][0][0] = -in[2]; │ │ │ │ │ +86 out[3][0][1] = -in[2]; │ │ │ │ │ +87 out[3][0][2] = 1-in[0]-in[1]; │ │ │ │ │ +88 │ │ │ │ │ +89 out[4][0][0] = in[2]; │ │ │ │ │ +90 out[4][0][1] = 0; │ │ │ │ │ +91 out[4][0][2] = in[0]; │ │ │ │ │ +92 │ │ │ │ │ +93 out[5][0][0] = 0; │ │ │ │ │ +94 out[5][0][1] = in[2]; │ │ │ │ │ +95 out[5][0][2] = in[1]; │ │ │ │ │ +96 │ │ │ │ │ +97 //edges │ │ │ │ │ +98 out[6][0][0] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +99 out[6][0][1] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +100 out[6][0][2] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +101 │ │ │ │ │ +102 out[7][0][0] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +103 out[7][0][1] = 0; │ │ │ │ │ +104 out[7][0][2] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]); │ │ │ │ │ +105 │ │ │ │ │ +106 out[8][0][0] = 0; │ │ │ │ │ +107 out[8][0][1] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +108 out[8][0][2] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]); │ │ │ │ │ +109 │ │ │ │ │ +110 out[9][0][0] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +111 out[9][0][1] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +112 out[9][0][2] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ +113 │ │ │ │ │ +114 out[10][0][0] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +115 out[10][0][1] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +116 out[10][0][2] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ +117 │ │ │ │ │ +118 out[11][0][0] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +119 out[11][0][1] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +120 out[11][0][2] = 4*in[0]*in[1]*(-3+4*in[2]); │ │ │ │ │ +121 │ │ │ │ │ +122 out[12][0][0] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +123 out[12][0][1] = (-4*in[0])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +124 out[12][0][2] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ +125 │ │ │ │ │ +126 out[13][0][0] = -4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +127 out[13][0][1] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +128 out[13][0][2] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ +129 │ │ │ │ │ +130 out[14][0][0] = 4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +131 out[14][0][1] = 4*in[0]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +132 out[14][0][2] = 4*in[0]*in[1]*(-1+4*in[2]); │ │ │ │ │ +133 │ │ │ │ │ +134 //faces │ │ │ │ │ +135 out[15][0][0] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +136 out[15][0][1] = -4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +137 out[15][0][2] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +138 │ │ │ │ │ +139 out[16][0][0] = -4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +140 out[16][0][1] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +141 out[16][0][2] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +142 │ │ │ │ │ +143 out[17][0][0] = 4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +144 out[17][0][1] = 4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +145 out[17][0][2] = 4*in[0]*in[1]*(4-8*in[2]); │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +150 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +151 std::vector& out) const // return value │ │ │ │ │ 152 { │ │ │ │ │ -153 coefficients[i] += field_cast(massMatrix_(i,j)*val_[j]); │ │ │ │ │ -154 } │ │ │ │ │ -155 } │ │ │ │ │ -156 } │ │ │ │ │ -157 private: │ │ │ │ │ -158 _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n ( const typename Base::Basis &basis, const typename │ │ │ │ │ -Base::Quadrature &quadrature ) │ │ │ │ │ -159 : Base(basis,quadrature), │ │ │ │ │ -160 val_(basis.size()), │ │ │ │ │ -161 massMatrix_() │ │ │ │ │ -162 { │ │ │ │ │ -163 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector; │ │ │ │ │ -164 typedef typename Base::Quadrature::iterator Iterator; │ │ │ │ │ -165 const unsigned size = basis.size(); │ │ │ │ │ -166 std::vector< RangeVector > basisValues( size ); │ │ │ │ │ -167 │ │ │ │ │ -168 massMatrix_.resize( size,size ); │ │ │ │ │ -169 for (unsigned int i=0; iposition(), basisValues ); │ │ │ │ │ -176 for (unsigned int i=0; iweight(); │ │ │ │ │ -179 } │ │ │ │ │ -180 if ( !massMatrix_.invert() ) │ │ │ │ │ -181 { │ │ │ │ │ -182 DUNE_THROW(MathError, "Mass matrix singular in LocalL2Interpolation"); │ │ │ │ │ -183 } │ │ │ │ │ -184 │ │ │ │ │ -185 } │ │ │ │ │ -186 typedef typename Base::Basis::StorageField Field; │ │ │ │ │ -187 typedef FieldVector< Field, Base::Basis::dimRange > RangeVector; │ │ │ │ │ -188 typedef LFEMatrix MassMatrix; │ │ │ │ │ -189 mutable std::vector val_; │ │ │ │ │ -190 MassMatrix massMatrix_; │ │ │ │ │ -191 }; │ │ │ │ │ -192 │ │ │ │ │ -197 template< class BasisFactory, bool onb > │ │ │ │ │ -_1_9_8 struct _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -199 { │ │ │ │ │ -_2_0_0 static const unsigned int _d_i_m_e_n_s_i_o_n = BasisFactory::dimension; │ │ │ │ │ -_2_0_1 typedef typename BasisFactory::Key _K_e_y; │ │ │ │ │ -_2_0_2 typedef typename BasisFactory::Object _B_a_s_i_s; │ │ │ │ │ -_2_0_3 typedef double _F_i_e_l_d; │ │ │ │ │ -_2_0_4 typedef QuadratureRule _Q_u_a_d_r_a_t_u_r_e; │ │ │ │ │ -_2_0_5 typedef QuadratureRules _Q_u_a_d_r_a_t_u_r_e_P_r_o_v_i_d_e_r; │ │ │ │ │ -_2_0_6 typedef _L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_a_s_i_s_,_ _Q_u_a_d_r_a_t_u_r_e_,_ _o_n_b_ _> _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -_2_0_7 typedef const _L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n _O_b_j_e_c_t; │ │ │ │ │ -208 │ │ │ │ │ -209 template< GeometryType::Id geometryId > │ │ │ │ │ -_2_1_0 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ -211 { │ │ │ │ │ -212 constexpr Dune::GeometryType geometry = geometryId; │ │ │ │ │ -213 const _B_a_s_i_s *basis = BasisFactory::template create< geometry >( key ); │ │ │ │ │ -214 const _Q_u_a_d_r_a_t_u_r_e & quadrature = QuadratureProvider::rule(geometry, 2*basis- │ │ │ │ │ ->order()+1); │ │ │ │ │ -215 return new _O_b_j_e_c_t( *basis, quadrature ); │ │ │ │ │ -216 } │ │ │ │ │ -_2_1_7 static void _r_e_l_e_a_s_e ( _O_b_j_e_c_t *object ) │ │ │ │ │ -218 { │ │ │ │ │ -219 const _B_a_s_i_s &basis = object->basis(); │ │ │ │ │ -220 BasisFactory::release( &basis ); │ │ │ │ │ -221 delete object; │ │ │ │ │ -222 } │ │ │ │ │ -223 }; │ │ │ │ │ -224 │ │ │ │ │ -225} │ │ │ │ │ -226 │ │ │ │ │ -227#endif // #ifndef DUNE_L2INTERPOLATION_HH │ │ │ │ │ -_l_f_e_m_a_t_r_i_x_._h_h │ │ │ │ │ +153 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +154 if (totalOrder == 0) { │ │ │ │ │ +155 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +156 } else if (totalOrder == 1) { │ │ │ │ │ +157 out.resize(_s_i_z_e()); │ │ │ │ │ +158 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ +(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ +159 │ │ │ │ │ +160 switch (direction) { │ │ │ │ │ +161 case 0: │ │ │ │ │ +162 out[0] = in[2]-1; │ │ │ │ │ +163 out[1] = 1-in[2]; │ │ │ │ │ +164 out[2] = 0; │ │ │ │ │ +165 out[3] = -in[2]; │ │ │ │ │ +166 out[4] = in[2]; │ │ │ │ │ +167 out[5] = 0; │ │ │ │ │ +168 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +169 out[7] = (-1+4*in[0])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +170 out[8] = 0; │ │ │ │ │ +171 out[9] = (4-8*in[0]-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +172 out[10] = (-4*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +173 out[11] = 4*in[1]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +174 out[12] = (4-8*in[0]-4*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +175 out[13] = -4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +176 out[14] = 4*in[1]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +177 out[15] = (4-8*in[0]-4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +178 out[16] = -4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +179 out[17] = 4*in[1]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +180 break; │ │ │ │ │ +181 case 1: │ │ │ │ │ +182 out[0] = in[2]-1; │ │ │ │ │ +183 out[1] = 0; │ │ │ │ │ +184 out[2] = 1-in[2]; │ │ │ │ │ +185 out[3] = -in[2]; │ │ │ │ │ +186 out[4] = 0; │ │ │ │ │ +187 out[5] = in[2]; │ │ │ │ │ +188 out[6] = (-3+4*in[0]+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +189 out[7] = 0; │ │ │ │ │ +190 out[8] = (-1+4*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +191 out[9] = -4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +192 out[10] = (4-4*in[0]-8*in[1])*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +193 out[11] = 4*in[0]*(1-3*in[2]+2*in[2]*in[2]); │ │ │ │ │ +194 out[12] = (-4*in[0])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +195 out[13] = (4-4*in[0]-8*in[1])*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +196 out[14] = 4*in[0]*(-in[2]+2*in[2]*in[2]); │ │ │ │ │ +197 out[15] = -4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +198 out[16] = (4-4*in[0]-8*in[1])*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +199 out[17] = 4*in[0]*(4*in[2]-4*in[2]*in[2]); │ │ │ │ │ +200 break; │ │ │ │ │ +201 case 2: │ │ │ │ │ +202 out[0] = in[0]+in[1]-1; │ │ │ │ │ +203 out[1] =-in[0]; │ │ │ │ │ +204 out[2] = -in[1]; │ │ │ │ │ +205 out[3] = 1-in[0]-in[1]; │ │ │ │ │ +206 out[4] = in[0]; │ │ │ │ │ +207 out[5] = in[1]; │ │ │ │ │ +208 out[6] = 2*(1-in[0]-in[1])*(0.5-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +209 out[7] = 2*in[0]*(-0.5+in[0])*(4-8*in[2]); │ │ │ │ │ +210 out[8] = 2*in[1]*(-0.5+in[1])*(4-8*in[2]); │ │ │ │ │ +211 out[9] = 4*in[0]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ +212 out[10] = 4*in[1]*(1-in[0]-in[1])*(-3+4*in[2]); │ │ │ │ │ +213 out[11] = 4*in[0]*in[1]*(-3+4*in[2]); │ │ │ │ │ +214 out[12] = 4*in[0]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ +215 out[13] = 4*in[1]*(1-in[0]-in[1])*(-1+4*in[2]); │ │ │ │ │ +216 out[14] = 4*in[0]*in[1]*(-1+4*in[2]); │ │ │ │ │ +217 out[15] = 4*in[0]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +218 out[16] = 4*in[1]*(1-in[0]-in[1])*(4-8*in[2]); │ │ │ │ │ +219 out[17] = 4*in[0]*in[1]*(4-8*in[2]); │ │ │ │ │ +220 break; │ │ │ │ │ +221 default: │ │ │ │ │ +222 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +223 } │ │ │ │ │ +224 } else { │ │ │ │ │ +225 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +226 } │ │ │ │ │ +227 } │ │ │ │ │ +228 │ │ │ │ │ +_2_3_1 unsigned int _o_r_d_e_r() const │ │ │ │ │ +232 { │ │ │ │ │ +233 return 2; │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 }; │ │ │ │ │ +237} │ │ │ │ │ +238#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -A local L2 interpolation taking a test basis and a quadrature rule. │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e │ │ │ │ │ -LocalL2InterpolationBase(const Basis &basis, const Quadrature &quadrature) │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients) const │ │ │ │ │ -Interpolate a function that implements void evaluate(Domain, Range&) │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_b_a_s_i_s │ │ │ │ │ -const Basis & basis() const │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_q_u_a_d_r_a_t_u_r_e__ │ │ │ │ │ -const Quadrature & quadrature_ │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_b_a_s_i_s__ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_q_u_a_d_r_a_t_u_r_e │ │ │ │ │ -const Quadrature & quadrature() const │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:104 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_Q_u_a_d_r_a_t_u_r_e │ │ │ │ │ -Q Quadrature │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_a_s_e_:_:_B_a_s_i_s │ │ │ │ │ -B Basis │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _t_r_u_e_ _>_:_:_B_a_s_e │ │ │ │ │ -LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _>_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const Function &function, std::vector< DofField > │ │ │ │ │ -&coefficients) const │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _B_,_ _Q_,_ _f_a_l_s_e_ _>_:_:_B_a_s_e │ │ │ │ │ -LocalL2InterpolationBase< B, Q > Base │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -A factory class for the local l2 interpolations taking a basis factory. │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:199 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:200 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:217 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ -BasisFactory::Object Basis │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:202 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_F_i_e_l_d │ │ │ │ │ -double Field │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_Q_u_a_d_r_a_t_u_r_e_P_r_o_v_i_d_e_r │ │ │ │ │ -QuadratureRules< Field, dimension > QuadratureProvider │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:205 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_Q_u_a_d_r_a_t_u_r_e │ │ │ │ │ -QuadratureRule< Field, dimension > Quadrature │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:204 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:210 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -BasisFactory::Key Key │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const LocalInterpolation Object │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:207 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -LocalL2Interpolation< Basis, Quadrature, onb > LocalInterpolation │ │ │ │ │ -DDeeffiinniittiioonn l2interpolation.hh:206 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:231 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localbasis.hh:67 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: tensor.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,128 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Enumerations | │ │ │ │ -Functions
│ │ │ │ -
tensor.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
hierarchicalprismp2localinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <ostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LFETensor< F, dimD, deriv >
 
struct  Dune::LFETensor< F, 0, deriv >
 
struct  Dune::LFETensor< F, 0, 0 >
 
class  Dune::LFETensor< F, dimD, 0 >
 
struct  Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value >
 
struct  Dune::Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value >
 
struct  Dune::Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative >
 
struct  Dune::LFETensorAxpy< Vec1, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative >, Vec2, deriv >
 
struct  Dune::LFETensorAxpy< Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value >, Vec2, deriv >
 
struct  Dune::DerivativeAssign< Vec1, Vec2 >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, layout > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, layout >, F2 >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, dimR > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value >, FieldVector< F2, 1 > >
 
struct  Dune::DerivativeAssign< Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative >, FieldVector< F2, 1 > >
class  Dune::HierarchicalPrismP2LocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
namespace  Dune::DerivativeLayoutNS
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Enumerations

enum  Dune::DerivativeLayoutNS::DerivativeLayout { Dune::DerivativeLayoutNS::value │ │ │ │ -, Dune::DerivativeLayoutNS::derivative │ │ │ │ - }
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<class F , int dimD, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const LFETensor< F, dimD, deriv > &tensor)
 
template<class F , int dimD, int dimR, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &d)
 
template<class F , int dimD, int dimR, unsigned int deriv>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > &d)
 
template<class F , int dimD, int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::derivative > &d)
 
template<class F , int dimD, int dimR>
std::ostream & Dune::operator<< (std::ostream &out, const Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > &d)
 
template<class F , int dimD, int dimR, unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout>
std::ostream & Dune::operator<< (std::ostream &out, const std::vector< Derivatives< F, dimD, dimR, deriv, layout > > &y)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,137 +1,21 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _E_n_u_m_e_r_a_t_i_o_n_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -tensor.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +hierarchicalprismp2localinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _0_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _0_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ - _d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _V_e_c_1_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ - _d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ - _v_a_l_u_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _V_e_c_1_,_ _V_e_c_2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2 │ │ │ │ │ - _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_, │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -namespace   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S │ │ │ │ │ -  │ │ │ │ │ -EEnnuummeerraattiioonnss │ │ │ │ │ -enum   _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t { _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ - _v_a_l_u_e , _D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e } │ │ │ │ │ -  │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _L_F_E_T_e_n_s_o_r< F, dimD, │ │ │ │ │ - deriv > &tensor) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ - dimD, dimR, deriv, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ - dimD, dimR, deriv, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ - dimD, dimR, 0, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s< F, │ │ │ │ │ - dimD, dimR, 0, _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e > &d) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -std::ostream &  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_<_< (std::ostream &out, const std::vector< │ │ │ │ │ - _D_e_r_i_v_a_t_i_v_e_s< F, dimD, dimR, deriv, layout > > &y) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00176_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: tensor.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalprismp2localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1393 +70,108 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
tensor.hh
│ │ │ │ +
hierarchicalprismp2localinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_TENSOR_HH
│ │ │ │ -
7#define DUNE_TENSOR_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <ostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18 /***********************************************
│ │ │ │ -
19 * The classes here are work in progress.
│ │ │ │ -
20 * Basically they provide tensor structures for
│ │ │ │ -
21 * higher order derivatives of vector valued function.
│ │ │ │ -
22 * Two storage structures are provided
│ │ │ │ -
23 * (either based on the components of the vector valued
│ │ │ │ -
24 * functions or on the order of the derivative).
│ │ │ │ -
25 * Conversions are supplied between the two storage
│ │ │ │ -
26 * structures and simple operations, which make the
│ │ │ │ -
27 * code difficult to use and requires rewritting...
│ │ │ │ -
28 ***************************************************/
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
16 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
19 public:
│ │ │ │ +
20
│ │ │ │ +
21 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
22 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
23 {
│ │ │ │ +
24 typename LB::Traits::DomainType x;
│ │ │ │ +
25 typename LB::Traits::RangeType y;
│ │ │ │ +
26 out.resize(18);
│ │ │ │ +
27
│ │ │ │ +
28 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │
29
│ │ │ │ -
30 // Structure for scalar tensor of order deriv
│ │ │ │ -
31 template <class F,int dimD,unsigned int deriv>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ - │ │ │ │ -
35 typedef LFETensor<F,dimD-1,deriv> BaseDim;
│ │ │ │ -
36 typedef LFETensor<F,dimD,deriv-1> BaseDeriv;
│ │ │ │ +
30 //First the vertex dofs
│ │ │ │ +
31 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x);
│ │ │ │ +
32 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[1] = f(x);
│ │ │ │ +
33 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[2] = f(x);
│ │ │ │ +
34 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[3] = f(x);
│ │ │ │ +
35 x[0] = 1.0; x[1] = 0.0; x[2] = 1.0; out[4] = f(x);
│ │ │ │ +
36 x[0] = 0.0; x[1] = 1.0; x[2] = 1.0; out[5] = f(x);
│ │ │ │
37
│ │ │ │ -
38 public:
│ │ │ │ -
39 typedef F field_type;
│ │ │ │ -
40 static const unsigned int size = BaseDim::size+BaseDeriv::size;
│ │ │ │ -
41 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ +
38
│ │ │ │ +
39 // Then: the 9 edge dofs and the 3 face dofs
│ │ │ │ +
40 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
41 out[6] = y - 0.5*(out[0] + out[3]);
│ │ │ │
42
│ │ │ │ -
43 template< class FF >
│ │ │ │ -
│ │ │ │ -
44 This &operator= ( const FF &f )
│ │ │ │ -
45 {
│ │ │ │ -
46 block() = field_cast< F >( f );
│ │ │ │ -
47 return *this;
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
50 This &operator= ( const Block &b )
│ │ │ │ -
51 {
│ │ │ │ -
52 block() = b;
│ │ │ │ -
53 return *this;
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
57 {
│ │ │ │ -
58 block() *= f;
│ │ │ │ -
59 return *this;
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
62 const field_type &operator[] ( const unsigned int i ) const
│ │ │ │ -
63 {
│ │ │ │ -
64 return block()[ i ];
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ +
43 x[0] = 1.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
44 out[7] = y - 0.5*(out[1] + out[4]);
│ │ │ │ +
45
│ │ │ │ +
46 x[0] = 0.0; x[1] = 1.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
47 out[8] = y - 0.5*(out[2] + out[5]);
│ │ │ │ +
48
│ │ │ │ +
49 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x);
│ │ │ │ +
50 out[9] = y - 0.5*(out[0] + out[1]);
│ │ │ │ +
51
│ │ │ │ +
52 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ +
53 out[10] = y - 0.5*(out[2] + out[0]);
│ │ │ │ +
54
│ │ │ │ +
55 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ +
56 out[11] = y - 0.5*(out[2] + out[1]);
│ │ │ │ +
57
│ │ │ │ +
58 x[0] = 0.5; x[1] = 0.0; x[2] = 1.0; y = f(x);
│ │ │ │ +
59 out[12] = y - 0.5*(out[3] + out[4]);
│ │ │ │ +
60
│ │ │ │ +
61 x[0] = 0.0; x[1] = 0.5; x[2] = 1.0; y = f(x);
│ │ │ │ +
62 out[13] = y - 0.5*(out[3] + out[5]);
│ │ │ │ +
63
│ │ │ │ +
64 x[0] = 0.5; x[1] = 0.5; x[2] = 1.0; y = f(x);
│ │ │ │ +
65 out[14] = y - 0.5*(out[4] + out[5]);
│ │ │ │
66
│ │ │ │ -
│ │ │ │ -
67 field_type &operator[] ( const unsigned int i )
│ │ │ │ -
68 {
│ │ │ │ -
69 return block()[ i ];
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ +
67
│ │ │ │ +
68 //faces
│ │ │ │ +
69 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
70 out[15] = y - 0.25*(out[4] + out[1] + out[0] + out[3] );
│ │ │ │
71
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
73 {
│ │ │ │ -
74 return block_;
│ │ │ │ -
75 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
76 const Block &block() const
│ │ │ │ -
77 {
│ │ │ │ -
78 return block_;
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
80 void axpy(const F& a, const This &y)
│ │ │ │ -
81 {
│ │ │ │ -
82 block().axpy(a,y.block());
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
86 {
│ │ │ │ -
87 field_cast(y.block(),block());
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
90 };
│ │ │ │ -
│ │ │ │ -
91
│ │ │ │ -
92 // ******************************************
│ │ │ │ -
93 template <class F,unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
94 struct LFETensor<F,0,deriv>
│ │ │ │ -
95 {
│ │ │ │ -
96 static const int size = 0;
│ │ │ │ -
97 };
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99 template <class F>
│ │ │ │ -
│ │ │ │ -
100 struct LFETensor<F,0,0>
│ │ │ │ -
101 {
│ │ │ │ -
102 static const int size = 1;
│ │ │ │ -
103 };
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 template <class F,int dimD>
│ │ │ │ -
│ │ │ │ -
106 class LFETensor<F,dimD,0>
│ │ │ │ -
107 {
│ │ │ │ - │ │ │ │ -
109
│ │ │ │ -
110 public:
│ │ │ │ -
111 typedef F field_type;
│ │ │ │ -
112 static const int size = 1;
│ │ │ │ -
113 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ -
114
│ │ │ │ -
115 template< class FF >
│ │ │ │ -
│ │ │ │ -
116 This &operator= ( const FF &f )
│ │ │ │ -
117 {
│ │ │ │ -
118 block() = field_cast< F >( f );
│ │ │ │ -
119 return *this;
│ │ │ │ -
120 }
│ │ │ │ -
│ │ │ │ -
121
│ │ │ │ -
│ │ │ │ -
122 This &operator= ( const Block &b )
│ │ │ │ -
123 {
│ │ │ │ -
124 block() = b;
│ │ │ │ -
125 return *this;
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
129 {
│ │ │ │ -
130 block() *= f;
│ │ │ │ -
131 return *this;
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ -
│ │ │ │ -
134 const F &operator[] ( const unsigned int i ) const
│ │ │ │ -
135 {
│ │ │ │ -
136 return block()[ i ];
│ │ │ │ -
137 }
│ │ │ │ -
│ │ │ │ -
138
│ │ │ │ -
│ │ │ │ -
139 F &operator[] ( const unsigned int i )
│ │ │ │ -
140 {
│ │ │ │ -
141 return block()[ i ];
│ │ │ │ -
142 }
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
│ │ │ │ -
144 void axpy(const F& a, const This &y)
│ │ │ │ -
145 {
│ │ │ │ -
146 block().axpy(a,y.block());
│ │ │ │ -
147 }
│ │ │ │ -
│ │ │ │ -
148 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
150 {
│ │ │ │ -
151 field_cast(y.block(),block());
│ │ │ │ -
152 }
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
155 {
│ │ │ │ -
156 return block_;
│ │ │ │ -
157 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
158 const Block &block() const
│ │ │ │ -
159 {
│ │ │ │ -
160 return block_;
│ │ │ │ -
161 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
163 };
│ │ │ │ -
│ │ │ │ -
164 // ***********************************************************
│ │ │ │ -
165 // Structure for all derivatives up to order deriv
│ │ │ │ -
166 // for vector valued function
│ │ │ │ -
│ │ │ │ -
167 namespace DerivativeLayoutNS {
│ │ │ │ - │ │ │ │ -
169 }
│ │ │ │ -
│ │ │ │ -
170 template <class F,int dimD,int dimR,unsigned int deriv,
│ │ │ │ - │ │ │ │ - │ │ │ │ -
173
│ │ │ │ -
174 // Implemnetation for valued based layout
│ │ │ │ -
175 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
176 struct Derivatives<F,dimD,dimR,deriv,DerivativeLayoutNS::value>
│ │ │ │ -
177 : public Derivatives<F,dimD,dimR,deriv-1,DerivativeLayoutNS::value>
│ │ │ │ -
178 {
│ │ │ │ - │ │ │ │ -
180 typedef Derivatives<F,dimD,dimR,deriv-1,DerivativeLayoutNS::value> Base;
│ │ │ │ - │ │ │ │ -
182
│ │ │ │ -
183 typedef F Field;
│ │ │ │ -
184 typedef F field_type;
│ │ │ │ -
185
│ │ │ │ - │ │ │ │ -
187 static const unsigned int dimDomain = dimD;
│ │ │ │ -
188 static const unsigned int dimRange = dimR;
│ │ │ │ -
189 constexpr static int size = Base::size+ThisLFETensor::size*dimR;
│ │ │ │ -
190 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ -
191
│ │ │ │ -
│ │ │ │ -
192 This &operator=(const F& f)
│ │ │ │ -
193 {
│ │ │ │ -
194 block() = f;
│ │ │ │ -
195 return *this;
│ │ │ │ -
196 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
197 This &operator=(const Dune::FieldVector<ThisLFETensor,dimR> &t)
│ │ │ │ -
198 {
│ │ │ │ -
199 tensor_ = t;
│ │ │ │ -
200 return *this;
│ │ │ │ -
201 }
│ │ │ │ -
│ │ │ │ -
202 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
203 This &operator=(const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &t)
│ │ │ │ -
204 {
│ │ │ │ -
205 tensor<dorder>() = t;
│ │ │ │ -
206 return *this;
│ │ │ │ -
207 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
209 {
│ │ │ │ -
210 block() = t;
│ │ │ │ -
211 return *this;
│ │ │ │ -
212 }
│ │ │ │ -
│ │ │ │ -
213
│ │ │ │ -
│ │ │ │ -
214 This &operator*= ( const field_type &f )
│ │ │ │ -
215 {
│ │ │ │ -
216 block() *= f;
│ │ │ │ -
217 return *this;
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
│ │ │ │ -
220 void axpy(const F &a, const This &y)
│ │ │ │ -
221 {
│ │ │ │ -
222 block().axpy(a,y.block());
│ │ │ │ -
223 }
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225 // assign with same layout (only different Field)
│ │ │ │ -
226 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
228 {
│ │ │ │ -
229 field_cast(y.block(),block());
│ │ │ │ -
230 }
│ │ │ │ -
│ │ │ │ -
231 // assign with different layout (same dimRange)
│ │ │ │ -
232 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
234 {
│ │ │ │ -
235 Base::assign(y);
│ │ │ │ -
236 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ -
237 tensor_[rr] = y[rr].template tensor<deriv>()[0];
│ │ │ │ -
238 }
│ │ │ │ -
│ │ │ │ -
239 // assign with rth component of function
│ │ │ │ -
240 template <class Fy,int dimRy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
242 {
│ │ │ │ -
243 assign<Fy,dimRy>(y.block(),r);
│ │ │ │ -
244 }
│ │ │ │ -
│ │ │ │ -
245 // assign with scalar functions to component r
│ │ │ │ -
246 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
248 {
│ │ │ │ -
249 assign(r,y.block());
│ │ │ │ -
250 }
│ │ │ │ -
│ │ │ │ -
251 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
253 {
│ │ │ │ -
254 assign(r,y[0]);
│ │ │ │ -
255 }
│ │ │ │ -
│ │ │ │ -
256
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
258 {
│ │ │ │ -
259 return reinterpret_cast<Block&>(*this);
│ │ │ │ -
260 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
261 const Block &block() const
│ │ │ │ -
262 {
│ │ │ │ -
263 return reinterpret_cast<const Block&>(*this);
│ │ │ │ -
264 }
│ │ │ │ -
│ │ │ │ -
265
│ │ │ │ -
266 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
267 const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &tensor() const
│ │ │ │ -
268 {
│ │ │ │ -
269 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
270 const std::integral_constant<int,dorder> a = {};
│ │ │ │ -
271 return tensor(a);
│ │ │ │ -
272 }
│ │ │ │ -
│ │ │ │ -
273 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
274 Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &tensor()
│ │ │ │ -
275 {
│ │ │ │ -
276 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
277 return tensor(std::integral_constant<int,dorder>());
│ │ │ │ -
278 }
│ │ │ │ -
│ │ │ │ -
279 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
280 const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block() const
│ │ │ │ -
281 {
│ │ │ │ -
282 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
283 const std::integral_constant<int,dorder> a = {};
│ │ │ │ -
284 return reinterpret_cast<const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ -
285 }
│ │ │ │ -
│ │ │ │ -
286 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
287 Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block()
│ │ │ │ -
288 {
│ │ │ │ -
289 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
290 const std::integral_constant<int,dorder> a = {};
│ │ │ │ -
291 return reinterpret_cast<Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ -
292 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
294 return tensor_[r];
│ │ │ │ -
295 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
296 const ThisLFETensor &operator[](int r) const {
│ │ │ │ -
297 return tensor_[r];
│ │ │ │ -
298 }
│ │ │ │ -
│ │ │ │ -
299 protected:
│ │ │ │ -
300 template <class Fy,int dimRy>
│ │ │ │ -
│ │ │ │ -
301 void assign(const FieldVector<Fy,size*dimRy> &y,unsigned int r)
│ │ │ │ -
302 {
│ │ │ │ -
303 Base::template assign<Fy,dimRy>(reinterpret_cast<const FieldVector<Fy,Base::size*dimRy>&>(y),r);
│ │ │ │ -
304 tensor_[0] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[Base::size*dimRy+r*ThisLFETensor::size]);
│ │ │ │ -
305 }
│ │ │ │ -
│ │ │ │ -
306 template <class Fy>
│ │ │ │ -
│ │ │ │ -
307 void assign(unsigned int r,const FieldVector<Fy,size/dimR> &y)
│ │ │ │ -
308 {
│ │ │ │ -
309 Base::assign(r,reinterpret_cast<const FieldVector<Fy,Base::size/dimR>&>(y));
│ │ │ │ -
310 tensor_[r] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[Base::size/dimR]);
│ │ │ │ -
311 }
│ │ │ │ -
│ │ │ │ -
312 // assign with different layout (same dimRange)
│ │ │ │ -
313 template <class Fy,unsigned int dy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
315 {
│ │ │ │ -
316 Base::assign(y);
│ │ │ │ -
317 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ -
318 tensor_[rr] = y[rr].template tensor<deriv>()[0];
│ │ │ │ -
319 }
│ │ │ │ -
│ │ │ │ -
320
│ │ │ │ -
321 template <int dorder>
│ │ │ │ -
322 const Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &
│ │ │ │ -
│ │ │ │ -
323 tensor(const std::integral_constant<int,dorder> &dorderVar) const
│ │ │ │ -
324 {
│ │ │ │ -
325 return Base::tensor(dorderVar);
│ │ │ │ -
326 }
│ │ │ │ -
│ │ │ │ -
327 const Dune::FieldVector<LFETensor<F,dimD,deriv>,dimR> &
│ │ │ │ -
│ │ │ │ -
328 tensor(const std::integral_constant<int,deriv> &dorderVar) const
│ │ │ │ -
329 {
│ │ │ │ -
330 return tensor_;
│ │ │ │ -
331 }
│ │ │ │ -
│ │ │ │ -
332 template <int dorder>
│ │ │ │ -
333 Dune::FieldVector<LFETensor<F,dimD,dorder>,dimR> &
│ │ │ │ -
│ │ │ │ -
334 tensor(const std::integral_constant<int,dorder> &dorderVar)
│ │ │ │ -
335 {
│ │ │ │ -
336 return Base::tensor(dorderVar);
│ │ │ │ -
337 }
│ │ │ │ -
│ │ │ │ -
338 Dune::FieldVector<LFETensor<F,dimD,deriv>,dimR> &
│ │ │ │ -
│ │ │ │ -
339 tensor(const std::integral_constant<int,deriv> &dorderVar)
│ │ │ │ -
340 {
│ │ │ │ -
341 return tensor_;
│ │ │ │ -
342 }
│ │ │ │ -
│ │ │ │ -
343 Dune::FieldVector<ThisLFETensor,dimR> tensor_;
│ │ │ │ -
344 };
│ │ │ │ -
│ │ │ │ -
345
│ │ │ │ -
346 template <class F,int dimD,int dimR>
│ │ │ │ -
│ │ │ │ -
347 struct Derivatives<F,dimD,dimR,0,DerivativeLayoutNS::value>
│ │ │ │ -
348 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
351
│ │ │ │ -
352 typedef F Field;
│ │ │ │ -
353 typedef F field_type;
│ │ │ │ -
354
│ │ │ │ - │ │ │ │ -
356 static const unsigned int dimDomain = dimD;
│ │ │ │ -
357 static const unsigned int dimRange = dimR;
│ │ │ │ -
358 constexpr static int size = ThisLFETensor::size*dimR;
│ │ │ │ -
359 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ -
360
│ │ │ │ -
361 template <class FF>
│ │ │ │ -
│ │ │ │ -
362 This &operator=(const FF& f)
│ │ │ │ -
363 {
│ │ │ │ -
364 for (int r=0; r<dimR; ++r)
│ │ │ │ -
365 tensor_[r] = field_cast<F>(f);
│ │ │ │ -
366 return *this;
│ │ │ │ -
367 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
368 This &operator=(const Dune::FieldVector<ThisLFETensor,dimR> &t)
│ │ │ │ -
369 {
│ │ │ │ -
370 tensor_ = t;
│ │ │ │ -
371 return *this;
│ │ │ │ -
372 }
│ │ │ │ -
│ │ │ │ -
373
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
375 {
│ │ │ │ -
376 block() = t;
│ │ │ │ -
377 return *this;
│ │ │ │ -
378 }
│ │ │ │ -
│ │ │ │ -
379
│ │ │ │ -
│ │ │ │ -
380 This &operator*= ( const field_type &f )
│ │ │ │ -
381 {
│ │ │ │ -
382 block() *= f;
│ │ │ │ -
383 return *this;
│ │ │ │ -
384 }
│ │ │ │ -
│ │ │ │ -
385
│ │ │ │ -
│ │ │ │ -
386 void axpy(const F &a, const This &y)
│ │ │ │ -
387 {
│ │ │ │ -
388 block().axpy(a,y.block());
│ │ │ │ -
389 }
│ │ │ │ -
│ │ │ │ -
390 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
392 {
│ │ │ │ -
393 field_cast(y.block(),block());
│ │ │ │ -
394 }
│ │ │ │ -
│ │ │ │ -
395 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
397 {
│ │ │ │ -
398 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ -
399 tensor_[rr] = y[rr].template tensor<0>()[0];
│ │ │ │ -
400 }
│ │ │ │ -
│ │ │ │ -
401 template <class Fy,int dimRy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
403 {
│ │ │ │ -
404 assign<Fy,dimRy>(y.block(),r);
│ │ │ │ -
405 }
│ │ │ │ -
│ │ │ │ -
406 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
408 {
│ │ │ │ -
409 tensor_[r].assign(y[0]);
│ │ │ │ -
410 }
│ │ │ │ -
│ │ │ │ -
411 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
413 {
│ │ │ │ -
414 tensor_[r].assign(y[0][0]);
│ │ │ │ -
415 }
│ │ │ │ -
│ │ │ │ -
416
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
418 {
│ │ │ │ -
419 return reinterpret_cast<Block&>(*this);
│ │ │ │ -
420 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
421 const Block &block() const
│ │ │ │ -
422 {
│ │ │ │ -
423 return reinterpret_cast<const Block&>(*this);
│ │ │ │ -
424 }
│ │ │ │ -
│ │ │ │ -
425
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
427 return tensor_[r];
│ │ │ │ -
428 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
429 const ThisLFETensor &operator[](int r) const {
│ │ │ │ -
430 return tensor_[r];
│ │ │ │ -
431 }
│ │ │ │ -
│ │ │ │ -
432 template <int dorder>
│ │ │ │ -
│ │ │ │ -
433 const Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &tensor() const
│ │ │ │ -
434 {
│ │ │ │ -
435 return tensor_;
│ │ │ │ -
436 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
437 Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &tensor()
│ │ │ │ -
438 {
│ │ │ │ -
439 return tensor_;
│ │ │ │ -
440 }
│ │ │ │ -
│ │ │ │ -
441 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
442 const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block() const
│ │ │ │ -
443 {
│ │ │ │ -
444 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
445 const std::integral_constant<int,dorder> a = {};
│ │ │ │ -
446 return reinterpret_cast<const Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ -
447 }
│ │ │ │ -
│ │ │ │ -
448 template <unsigned int dorder>
│ │ │ │ -
│ │ │ │ -
449 Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR> &block()
│ │ │ │ -
450 {
│ │ │ │ -
451 // use integral_constant<int,...> here to stay compatible with Int2Type
│ │ │ │ -
452 const std::integral_constant<int,dorder> a = {};
│ │ │ │ -
453 return reinterpret_cast<Dune::FieldVector<F,LFETensor<F,dimD,dorder>::size*dimR>&>(tensor(a));
│ │ │ │ -
454 }
│ │ │ │ -
│ │ │ │ -
455
│ │ │ │ -
456 protected:
│ │ │ │ -
457 const Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &
│ │ │ │ -
│ │ │ │ -
458 tensor(const std::integral_constant<int,0> &dorderVar) const
│ │ │ │ -
459 {
│ │ │ │ -
460 return tensor_;
│ │ │ │ -
461 }
│ │ │ │ -
│ │ │ │ -
462 Dune::FieldVector<LFETensor<F,dimD,0>,dimR> &
│ │ │ │ -
│ │ │ │ -
463 tensor(const std::integral_constant<int,0> &dorderVar)
│ │ │ │ -
464 {
│ │ │ │ -
465 return tensor_;
│ │ │ │ -
466 }
│ │ │ │ -
│ │ │ │ -
467 template <class Fy,unsigned int dy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
469 {
│ │ │ │ -
470 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ -
471 tensor_[rr] = y[rr].template tensor<0>()[0];
│ │ │ │ -
472 }
│ │ │ │ -
│ │ │ │ -
473 template <class Fy,int dimRy>
│ │ │ │ -
│ │ │ │ -
474 void assign(const FieldVector<Fy,size*dimRy> &y,unsigned int r)
│ │ │ │ -
475 {
│ │ │ │ -
476 tensor_[0] = reinterpret_cast<const FieldVector<Fy,ThisLFETensor::size>&>(y[r*ThisLFETensor::size]);
│ │ │ │ -
477 }
│ │ │ │ -
│ │ │ │ -
478 template <class Fy>
│ │ │ │ -
│ │ │ │ -
479 void assign(unsigned int r,const FieldVector<Fy,size/dimR> &y)
│ │ │ │ -
480 {
│ │ │ │ -
481 tensor_[r] = y;
│ │ │ │ -
482 }
│ │ │ │ -
│ │ │ │ -
483 Dune::FieldVector<ThisLFETensor,dimR> tensor_;
│ │ │ │ -
484 };
│ │ │ │ -
│ │ │ │ -
485
│ │ │ │ -
486 // Implemnetation for DerivativeLayoutNS::derivative based layout
│ │ │ │ -
487 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
488 struct Derivatives<F,dimD,dimR,deriv,DerivativeLayoutNS::derivative>
│ │ │ │ -
489 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
492
│ │ │ │ -
493 typedef F Field;
│ │ │ │ -
494 typedef F field_type;
│ │ │ │ -
495
│ │ │ │ - │ │ │ │ -
497 static const unsigned int dimDomain = dimD;
│ │ │ │ -
498 static const unsigned int dimRange = dimR;
│ │ │ │ -
499 constexpr static int size = ScalarDeriv::size*dimR;
│ │ │ │ -
500 typedef Dune::FieldVector<F,size> Block;
│ │ │ │ -
501
│ │ │ │ -
502 template <class FF>
│ │ │ │ -
│ │ │ │ -
503 This &operator=(const FF& f)
│ │ │ │ -
504 {
│ │ │ │ -
505 block() = field_cast<F>(f);
│ │ │ │ -
506 return *this;
│ │ │ │ -
507 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
509 {
│ │ │ │ -
510 block() = t;
│ │ │ │ -
511 return *this;
│ │ │ │ -
512 }
│ │ │ │ -
│ │ │ │ -
513
│ │ │ │ -
│ │ │ │ -
514 This &operator*= ( const field_type &f )
│ │ │ │ -
515 {
│ │ │ │ -
516 block() *= f;
│ │ │ │ -
517 return *this;
│ │ │ │ -
518 }
│ │ │ │ -
│ │ │ │ -
519
│ │ │ │ -
520 template <class FF>
│ │ │ │ -
│ │ │ │ -
521 void axpy(const FF &a, const This &y)
│ │ │ │ -
522 {
│ │ │ │ -
523 block().axpy(field_cast<F>(a),y.block());
│ │ │ │ -
524 }
│ │ │ │ -
│ │ │ │ -
525 // assign with same layout (only different Field)
│ │ │ │ -
526 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
528 {
│ │ │ │ -
529 field_cast(y.block(),block());
│ │ │ │ -
530 }
│ │ │ │ -
│ │ │ │ -
531 // assign with different layout (same dimRange)
│ │ │ │ -
532 template <class Fy>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
534 {
│ │ │ │ -
535 for (unsigned int rr=0; rr<dimR; ++rr)
│ │ │ │ -
536 deriv_[rr].assign(y,rr);
│ │ │ │ -
537 }
│ │ │ │ -
│ │ │ │ -
538 // assign with scalar functions to component r
│ │ │ │ -
539 template <class Fy,DerivativeLayoutNS::DerivativeLayout layouty>
│ │ │ │ -
│ │ │ │ -
540 void assign(unsigned int r,const Derivatives<Fy,dimD,1,deriv,layouty> &y)
│ │ │ │ -
541 {
│ │ │ │ -
542 deriv_[r].assign(r,y);
│ │ │ │ -
543 }
│ │ │ │ -
│ │ │ │ -
544
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
546 {
│ │ │ │ -
547 return reinterpret_cast<Block&>(*this);
│ │ │ │ -
548 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
549 const Block &block() const
│ │ │ │ -
550 {
│ │ │ │ -
551 return reinterpret_cast<const Block&>(*this);
│ │ │ │ -
552 }
│ │ │ │ -
│ │ │ │ -
553
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
555 return deriv_[r];
│ │ │ │ -
556 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
557 const ScalarDeriv &operator[](int r) const {
│ │ │ │ -
558 return deriv_[r];
│ │ │ │ -
559 }
│ │ │ │ -
│ │ │ │ -
560 protected:
│ │ │ │ -
561 Dune::FieldVector<ScalarDeriv,dimR> deriv_;
│ │ │ │ -
562 };
│ │ │ │ -
│ │ │ │ -
563
│ │ │ │ -
564 // ******************************************
│ │ │ │ -
565 // AXPY *************************************
│ │ │ │ -
566 // ******************************************
│ │ │ │ -
567 template <class Vec1,class Vec2,unsigned int deriv>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
569 {
│ │ │ │ -
570 template <class Field>
│ │ │ │ -
│ │ │ │ -
571 static void apply(unsigned int r,const Field &a,
│ │ │ │ -
572 const Vec1 &x, Vec2 &y)
│ │ │ │ -
573 {
│ │ │ │ -
574 y.axpy(a,x);
│ │ │ │ -
575 }
│ │ │ │ -
│ │ │ │ -
576 };
│ │ │ │ -
│ │ │ │ -
577 template <class F1,int dimD,int dimR,
│ │ │ │ -
578 unsigned int d,
│ │ │ │ -
579 class Vec2,
│ │ │ │ -
580 unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
581 struct LFETensorAxpy<Derivatives<F1,dimD,dimR,d,DerivativeLayoutNS::value>,Vec2,deriv>
│ │ │ │ -
582 {
│ │ │ │ - │ │ │ │ -
584 template <class Field>
│ │ │ │ -
│ │ │ │ -
585 static void apply(unsigned int r,const Field &a,
│ │ │ │ -
586 const Vec1 &x, Vec2 &y)
│ │ │ │ -
587 {
│ │ │ │ -
588 const FieldVector<F1,Vec2::size> &xx = x.template block<deriv>();
│ │ │ │ -
589 for (int i=0; i<y.size; ++i)
│ │ │ │ -
590 y[i] += xx[i]*a;
│ │ │ │ -
591 }
│ │ │ │ -
│ │ │ │ -
592 };
│ │ │ │ -
│ │ │ │ -
593 template <class F1,int dimD,int dimR,
│ │ │ │ -
594 unsigned int d,
│ │ │ │ -
595 class Vec2,
│ │ │ │ -
596 unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
597 struct LFETensorAxpy<Derivatives<F1,dimD,dimR,d,DerivativeLayoutNS::derivative>,Vec2,deriv>
│ │ │ │ -
598 {
│ │ │ │ - │ │ │ │ -
600 template <class Field>
│ │ │ │ -
│ │ │ │ -
601 static void apply(unsigned int r,const Field &a,
│ │ │ │ -
602 const Vec1 &x, Vec2 &y)
│ │ │ │ -
603 {
│ │ │ │ -
604 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ - │ │ │ │ -
606 Vec2,deriv>::apply(rr,a,x[rr],y);
│ │ │ │ -
607 }
│ │ │ │ -
│ │ │ │ -
608 };
│ │ │ │ -
│ │ │ │ -
609 template <class F1,int dimD,
│ │ │ │ -
610 unsigned int d,
│ │ │ │ -
611 class Vec2,
│ │ │ │ -
612 unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
613 struct LFETensorAxpy<Derivatives<F1,dimD,1,d,DerivativeLayoutNS::derivative>,Vec2,deriv>
│ │ │ │ -
614 {
│ │ │ │ - │ │ │ │ -
616 template <class Field>
│ │ │ │ -
│ │ │ │ -
617 static void apply(unsigned int r,const Field &a,
│ │ │ │ -
618 const Vec1 &x, Vec2 &y)
│ │ │ │ -
619 {
│ │ │ │ - │ │ │ │ -
621 Vec2,deriv>::apply(r,a,x[0],y);
│ │ │ │ -
622 }
│ │ │ │ -
│ │ │ │ -
623 };
│ │ │ │ -
│ │ │ │ -
624 template <class F1,int dimD,
│ │ │ │ -
625 unsigned int d,
│ │ │ │ -
626 class Vec2,
│ │ │ │ -
627 unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
628 struct LFETensorAxpy<Derivatives<F1,dimD,1,d,DerivativeLayoutNS::value>,Vec2,deriv>
│ │ │ │ -
629 {
│ │ │ │ - │ │ │ │ -
631 template <class Field>
│ │ │ │ -
│ │ │ │ -
632 static void apply(unsigned int r,const Field &a,
│ │ │ │ -
633 const Vec1 &x, Vec2 &y)
│ │ │ │ -
634 {
│ │ │ │ -
635 typedef LFETensor<F1,dimD,deriv> LFETensorType;
│ │ │ │ -
636 const unsigned int rr = r*LFETensorType::size;
│ │ │ │ -
637 const FieldVector<F1,LFETensorType::size> &xx = x.template block<deriv>();
│ │ │ │ -
638 for (int i=0; i<FieldVector<F1,LFETensorType::size>::dimension; ++i)
│ │ │ │ -
639 y[rr+i] += xx[i]*a;
│ │ │ │ -
640 }
│ │ │ │ -
│ │ │ │ -
641 };
│ │ │ │ -
│ │ │ │ -
642
│ │ │ │ -
643 // ***********************************************
│ │ │ │ -
644 // Assign ****************************************
│ │ │ │ -
645 // ***********************************************
│ │ │ │ -
646 template <class Vec1,class Vec2>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
648 {
│ │ │ │ -
│ │ │ │ -
649 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
650 {
│ │ │ │ -
651 field_cast(vec1,vec2);
│ │ │ │ -
652 }
│ │ │ │ -
│ │ │ │ -
653 };
│ │ │ │ -
│ │ │ │ -
654 template <int dimD,int dimR,unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ -
655 class F1,class F2>
│ │ │ │ -
│ │ │ │ -
656 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,layout>,
│ │ │ │ -
657 Derivatives<F2,dimD,dimR,deriv,layout> >
│ │ │ │ -
658 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
661 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
662 {
│ │ │ │ -
663 field_cast(vec1.block(),vec2.block());
│ │ │ │ -
664 }
│ │ │ │ -
│ │ │ │ -
665 };
│ │ │ │ -
│ │ │ │ -
666 template <int dimD,int dimR,unsigned int deriv,
│ │ │ │ -
667 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
668 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::value>,
│ │ │ │ -
669 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ -
670 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
673 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
674 {
│ │ │ │ -
675 vec2.assign(vec1);
│ │ │ │ -
676 }
│ │ │ │ -
│ │ │ │ -
677 };
│ │ │ │ -
│ │ │ │ -
678 template <int dimD,int dimR,unsigned int deriv,
│ │ │ │ -
679 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
680 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ -
681 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::value> >
│ │ │ │ -
682 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
685 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
686 {
│ │ │ │ -
687 vec2.assign(vec1);
│ │ │ │ -
688 }
│ │ │ │ -
│ │ │ │ -
689 };
│ │ │ │ -
│ │ │ │ -
690 template <int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ -
691 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
692 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ -
693 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::value> >
│ │ │ │ -
694 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
697 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
698 {
│ │ │ │ -
699 vec2.assign(r,vec1);
│ │ │ │ -
700 }
│ │ │ │ -
│ │ │ │ -
701 };
│ │ │ │ -
│ │ │ │ -
702 template <int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ -
703 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
704 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ -
705 Derivatives<F2,dimD,dimR,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ -
706 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
709 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
710 {
│ │ │ │ -
711 vec2.assign(r,vec1);
│ │ │ │ -
712 }
│ │ │ │ -
│ │ │ │ -
713 };
│ │ │ │ -
│ │ │ │ -
714 template <int dimD,unsigned int deriv,
│ │ │ │ -
715 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
716 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,
│ │ │ │ -
717 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::value> >
│ │ │ │ -
718 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
721 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
722 {
│ │ │ │ -
723 field_cast(vec1.block(),vec2.block());
│ │ │ │ -
724 }
│ │ │ │ -
│ │ │ │ -
725 };
│ │ │ │ -
│ │ │ │ -
726 template <int dimD,unsigned int deriv,
│ │ │ │ -
727 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
728 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ -
729 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ -
730 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
733 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
734 {
│ │ │ │ -
735 field_cast(vec1.block(),vec2.block());
│ │ │ │ -
736 }
│ │ │ │ -
│ │ │ │ -
737 };
│ │ │ │ -
│ │ │ │ -
738 template <int dimD,unsigned int deriv,
│ │ │ │ -
739 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
740 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,
│ │ │ │ -
741 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::value> >
│ │ │ │ -
742 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
745 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
746 {
│ │ │ │ -
747 field_cast(vec1.block(),vec2.block());
│ │ │ │ -
748 }
│ │ │ │ -
│ │ │ │ -
749 };
│ │ │ │ -
│ │ │ │ -
750 template <int dimD,unsigned int deriv,
│ │ │ │ -
751 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
752 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,
│ │ │ │ -
753 Derivatives<F2,dimD,1,deriv,DerivativeLayoutNS::derivative> >
│ │ │ │ -
754 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
757 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
758 {
│ │ │ │ -
759 field_cast(vec1.block(),vec2.block());
│ │ │ │ -
760 }
│ │ │ │ -
│ │ │ │ -
761 };
│ │ │ │ -
│ │ │ │ -
762 template <int dimD,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout,
│ │ │ │ -
763 class F1, class F2>
│ │ │ │ -
│ │ │ │ -
764 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,layout>,
│ │ │ │ -
765 F2 >
│ │ │ │ -
766 {
│ │ │ │ - │ │ │ │ -
768 typedef F2 Vec2;
│ │ │ │ -
│ │ │ │ -
769 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
770 {
│ │ │ │ -
771 field_cast(vec1.block(),vec2);
│ │ │ │ -
772 }
│ │ │ │ -
│ │ │ │ -
773 };
│ │ │ │ -
│ │ │ │ -
774 template <int dimD,int dimR,
│ │ │ │ -
775 class F1,unsigned int deriv,
│ │ │ │ -
776 class F2>
│ │ │ │ -
│ │ │ │ -
777 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::value>,FieldVector<F2,dimR> >
│ │ │ │ -
778 {
│ │ │ │ - │ │ │ │ -
780 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ -
│ │ │ │ -
781 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
782 {
│ │ │ │ -
783 field_cast(vec1.template block<0>(),vec2);
│ │ │ │ -
784 }
│ │ │ │ -
│ │ │ │ -
785 };
│ │ │ │ -
│ │ │ │ -
786 template <int dimD,int dimR,
│ │ │ │ -
787 class F1,unsigned int deriv,
│ │ │ │ -
788 class F2>
│ │ │ │ -
│ │ │ │ -
789 struct DerivativeAssign<Derivatives<F1,dimD,dimR,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,dimR> >
│ │ │ │ -
790 {
│ │ │ │ - │ │ │ │ -
792 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ -
│ │ │ │ -
793 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
794 {
│ │ │ │ -
795 for (int rr=0; rr<dimR; ++rr)
│ │ │ │ -
796 field_cast(vec1[rr].template tensor<0>()[0].block(),vec2[rr]);
│ │ │ │ -
797 }
│ │ │ │ -
│ │ │ │ -
798 };
│ │ │ │ -
│ │ │ │ -
799 template <int dimD,
│ │ │ │ -
800 class F1,unsigned int deriv,
│ │ │ │ -
801 class F2,int dimR>
│ │ │ │ -
│ │ │ │ -
802 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,FieldVector<F2,dimR> >
│ │ │ │ -
803 {
│ │ │ │ - │ │ │ │ -
805 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ -
│ │ │ │ -
806 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
807 {
│ │ │ │ -
808 field_cast(vec1.template tensor<0>()[0].block(),vec2[r]);
│ │ │ │ -
809 }
│ │ │ │ -
│ │ │ │ -
810 };
│ │ │ │ -
│ │ │ │ -
811 template <int dimD,
│ │ │ │ -
812 class F1,unsigned int deriv,
│ │ │ │ -
813 class F2,int dimR>
│ │ │ │ -
│ │ │ │ -
814 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,dimR> >
│ │ │ │ -
815 {
│ │ │ │ - │ │ │ │ -
817 typedef FieldVector<F2,dimR> Vec2;
│ │ │ │ -
│ │ │ │ -
818 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
819 {
│ │ │ │ -
820 field_cast(vec1[0].template tensor<0>()[0].block(),vec2[r]);
│ │ │ │ -
821 }
│ │ │ │ -
│ │ │ │ -
822 };
│ │ │ │ -
│ │ │ │ -
823 template <int dimD,
│ │ │ │ -
824 class F1,unsigned int deriv,
│ │ │ │ -
825 class F2>
│ │ │ │ -
│ │ │ │ -
826 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::value>,FieldVector<F2,1> >
│ │ │ │ -
827 {
│ │ │ │ - │ │ │ │ -
829 typedef FieldVector<F2,1> Vec2;
│ │ │ │ -
│ │ │ │ -
830 static void apply(unsigned int r,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
831 {
│ │ │ │ -
832 field_cast(vec1.template tensor<0>()[0].block(),vec2);
│ │ │ │ -
833 }
│ │ │ │ -
│ │ │ │ -
834 };
│ │ │ │ -
│ │ │ │ -
835 template <int dimD,
│ │ │ │ -
836 class F1,unsigned int deriv,
│ │ │ │ -
837 class F2>
│ │ │ │ -
│ │ │ │ -
838 struct DerivativeAssign<Derivatives<F1,dimD,1,deriv,DerivativeLayoutNS::derivative>,FieldVector<F2,1> >
│ │ │ │ -
839 {
│ │ │ │ - │ │ │ │ -
841 typedef FieldVector<F2,1> Vec2;
│ │ │ │ -
│ │ │ │ -
842 static void apply(unsigned int /*r*/,const Vec1 &vec1,Vec2 &vec2)
│ │ │ │ -
843 {
│ │ │ │ -
844 field_cast(vec1[0].template tensor<0>()[0].block(),vec2);
│ │ │ │ -
845 }
│ │ │ │ -
│ │ │ │ -
846 };
│ │ │ │ -
│ │ │ │ -
847
│ │ │ │ -
848 // ***********************************************
│ │ │ │ -
849 // IO ********************************************
│ │ │ │ -
850 // ***********************************************
│ │ │ │ -
851 template <class F,int dimD,unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
852 std::ostream &operator<< ( std::ostream &out, const LFETensor< F,dimD,deriv > &tensor )
│ │ │ │ -
853 {
│ │ │ │ -
854 return out << tensor.block();
│ │ │ │ -
855 }
│ │ │ │ -
│ │ │ │ -
856#if 0
│ │ │ │ -
857 template <class F,int dimD,unsigned int deriv>
│ │ │ │ -
858 std::ostream &operator<< ( std::ostream &out, const ScalarDerivatives< F,dimD,deriv > &d )
│ │ │ │ -
859 {
│ │ │ │ -
860 out << static_cast<const ScalarDerivatives< F,dimD,deriv-1 > &>(d);
│ │ │ │ -
861 out << " , " << d.tensor() << std::endl;
│ │ │ │ -
862 return out;
│ │ │ │ -
863 }
│ │ │ │ -
864 template <class F,int dimD>
│ │ │ │ -
865 std::ostream &operator<< ( std::ostream &out, const ScalarDerivatives< F,dimD,0 > &d )
│ │ │ │ -
866 {
│ │ │ │ -
867 out << d.tensor() << std::endl;
│ │ │ │ -
868 return out;
│ │ │ │ -
869 }
│ │ │ │ -
870#endif
│ │ │ │ -
871 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
873 {
│ │ │ │ -
874 out << " ( ";
│ │ │ │ -
875 out << d[0];
│ │ │ │ -
876 for (int r=1; r<dimR; ++r)
│ │ │ │ -
877 {
│ │ │ │ -
878 out << " , " << d[r];
│ │ │ │ -
879 }
│ │ │ │ -
880 out << " ) " << std::endl;
│ │ │ │ -
881 return out;
│ │ │ │ -
882 }
│ │ │ │ -
│ │ │ │ -
883 template <class F,int dimD,int dimR,unsigned int deriv>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
885 {
│ │ │ │ -
886 out << static_cast<const Derivatives< F,dimD,dimR,deriv-1,DerivativeLayoutNS::value > &>(d);
│ │ │ │ -
887 out << " ( ";
│ │ │ │ -
888 out << d[0];
│ │ │ │ -
889 for (int r=1; r<dimR; ++r)
│ │ │ │ -
890 {
│ │ │ │ -
891 out << " , " << d[r];
│ │ │ │ -
892 }
│ │ │ │ -
893 out << " ) " << std::endl;
│ │ │ │ -
894 return out;
│ │ │ │ -
895 }
│ │ │ │ -
│ │ │ │ -
896 template <class F,int dimD,int dimR>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
898 {
│ │ │ │ -
899 out << " ( ";
│ │ │ │ -
900 out << d[0];
│ │ │ │ -
901 for (int r=1; r<dimR; ++r)
│ │ │ │ -
902 {
│ │ │ │ -
903 out << " , " << d[r];
│ │ │ │ -
904 }
│ │ │ │ -
905 out << " ) " << std::endl;
│ │ │ │ -
906 return out;
│ │ │ │ -
907 }
│ │ │ │ -
│ │ │ │ -
908 template <class F,int dimD,int dimR>
│ │ │ │ -
│ │ │ │ -
909 std::ostream &operator<< ( std::ostream &out, const Derivatives< F,dimD,dimR,0,DerivativeLayoutNS::value > &d )
│ │ │ │ -
910 {
│ │ │ │ -
911 out << " ( ";
│ │ │ │ -
912 out << d[0];
│ │ │ │ -
913 for (int r=1; r<dimR; ++r)
│ │ │ │ -
914 {
│ │ │ │ -
915 out << " , " << d[r];
│ │ │ │ -
916 }
│ │ │ │ -
917 out << " ) " << std::endl;
│ │ │ │ -
918 return out;
│ │ │ │ -
919 }
│ │ │ │ -
│ │ │ │ -
920 template <class F,int dimD,int dimR,unsigned int deriv,DerivativeLayoutNS::DerivativeLayout layout>
│ │ │ │ -
│ │ │ │ -
921 std::ostream &operator<< ( std::ostream &out, const std::vector<Derivatives< F,dimD,dimR,deriv,layout > > &y )
│ │ │ │ -
922 {
│ │ │ │ -
923 out << "Number of basis functions: " << y.size() << std::endl;
│ │ │ │ -
924 for (unsigned int i=0; i<y.size(); ++i)
│ │ │ │ -
925 {
│ │ │ │ -
926 out << "Base " << i << " : " << std::endl;
│ │ │ │ -
927 out << y[i];
│ │ │ │ -
928 out << std::endl;
│ │ │ │ -
929 }
│ │ │ │ -
930 return out;
│ │ │ │ -
931 }
│ │ │ │ -
│ │ │ │ -
932}
│ │ │ │ -
933#endif // DUNE_TENSOR_HH
│ │ │ │ - │ │ │ │ +
72 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ +
73 out[16] = y - 0.25*(out[2] + out[0] + out[3] + out[5] );
│ │ │ │ +
74
│ │ │ │ +
75 x[0] = 0.5; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ +
76 out[17] = y - 0.25*(out[2] + out[1] + out[4] + out[5] );
│ │ │ │ +
77
│ │ │ │ +
78 }
│ │ │ │ +
│ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81
│ │ │ │ +
82#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
std::ostream & operator<<(std::ostream &out, const LFEMatrix< Field > &mat)
Definition lfematrix.hh:152
│ │ │ │ -
DerivativeLayout
Definition tensor.hh:168
│ │ │ │ -
@ derivative
Definition tensor.hh:168
│ │ │ │ -
@ value
Definition tensor.hh:168
│ │ │ │ -
Definition tensor.hh:33
│ │ │ │ -
const Block & block() const
Definition tensor.hh:76
│ │ │ │ -
This & operator*=(const field_type &f)
Definition tensor.hh:56
│ │ │ │ -
Dune::FieldVector< F, size > Block
Definition tensor.hh:41
│ │ │ │ -
This & operator=(const FF &f)
Definition tensor.hh:44
│ │ │ │ -
Block block_
Definition tensor.hh:89
│ │ │ │ -
F field_type
Definition tensor.hh:39
│ │ │ │ -
void axpy(const F &a, const This &y)
Definition tensor.hh:80
│ │ │ │ -
Block & block()
Definition tensor.hh:72
│ │ │ │ -
void assign(const LFETensor< Fy, dimD, deriv > &y)
Definition tensor.hh:85
│ │ │ │ -
static const unsigned int size
Definition tensor.hh:40
│ │ │ │ -
const field_type & operator[](const unsigned int i) const
Definition tensor.hh:62
│ │ │ │ -
Definition tensor.hh:107
│ │ │ │ -
Block & block()
Definition tensor.hh:154
│ │ │ │ -
F field_type
Definition tensor.hh:111
│ │ │ │ -
Block block_
Definition tensor.hh:162
│ │ │ │ -
void assign(const LFETensor< Fy, dimD, 0 > &y)
Definition tensor.hh:149
│ │ │ │ -
const Block & block() const
Definition tensor.hh:158
│ │ │ │ -
void axpy(const F &a, const This &y)
Definition tensor.hh:144
│ │ │ │ -
Dune::FieldVector< F, size > Block
Definition tensor.hh:113
│ │ │ │ -
Definition tensor.hh:172
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This
Definition tensor.hh:179
│ │ │ │ -
This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > &t)
Definition tensor.hh:203
│ │ │ │ - │ │ │ │ -
Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base
Definition tensor.hh:180
│ │ │ │ -
const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std::integral_constant< int, dorder > &dorderVar) const
Definition tensor.hh:323
│ │ │ │ -
void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r)
Definition tensor.hh:301
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:227
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:314
│ │ │ │ - │ │ │ │ -
const ThisLFETensor & operator[](int r) const
Definition tensor.hh:296
│ │ │ │ -
Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block()
Definition tensor.hh:287
│ │ │ │ -
LFETensor< F, dimD, deriv > ThisLFETensor
Definition tensor.hh:181
│ │ │ │ -
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:247
│ │ │ │ -
const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() const
Definition tensor.hh:280
│ │ │ │ -
Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std::integral_constant< int, dorder > &dorderVar)
Definition tensor.hh:334
│ │ │ │ -
const Block & block() const
Definition tensor.hh:261
│ │ │ │ -
void axpy(const F &a, const This &y)
Definition tensor.hh:220
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:233
│ │ │ │ -
This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t)
Definition tensor.hh:197
│ │ │ │ -
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:252
│ │ │ │ -
This & operator=(const Block &t)
Definition tensor.hh:208
│ │ │ │ -
Dune::FieldVector< F, size > Block
Definition tensor.hh:190
│ │ │ │ -
Dune::FieldVector< ThisLFETensor, dimR > tensor_
Definition tensor.hh:343
│ │ │ │ -
Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std::integral_constant< int, deriv > &dorderVar)
Definition tensor.hh:339
│ │ │ │ -
Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor()
Definition tensor.hh:274
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS::value > &y, unsigned int r)
Definition tensor.hh:241
│ │ │ │ -
const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const
Definition tensor.hh:267
│ │ │ │ -
const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std::integral_constant< int, deriv > &dorderVar) const
Definition tensor.hh:328
│ │ │ │ -
ThisLFETensor & operator[](int r)
Definition tensor.hh:293
│ │ │ │ - │ │ │ │ -
void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y)
Definition tensor.hh:307
│ │ │ │ - │ │ │ │ -
ThisLFETensor & operator[](int r)
Definition tensor.hh:426
│ │ │ │ -
LFETensor< F, dimD, 0 > ThisLFETensor
Definition tensor.hh:350
│ │ │ │ -
Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block()
Definition tensor.hh:449
│ │ │ │ -
Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std::integral_constant< int, 0 > &dorderVar)
Definition tensor.hh:463
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > &y)
Definition tensor.hh:391
│ │ │ │ - │ │ │ │ -
Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This
Definition tensor.hh:349
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:468
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > &y, unsigned int r)
Definition tensor.hh:402
│ │ │ │ -
const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const
Definition tensor.hh:433
│ │ │ │ -
Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor()
Definition tensor.hh:437
│ │ │ │ -
This & operator=(const Block &t)
Definition tensor.hh:374
│ │ │ │ - │ │ │ │ -
const ThisLFETensor & operator[](int r) const
Definition tensor.hh:429
│ │ │ │ -
const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std::integral_constant< int, 0 > &dorderVar) const
Definition tensor.hh:458
│ │ │ │ -
Dune::FieldVector< F, size > Block
Definition tensor.hh:359
│ │ │ │ -
const Block & block() const
Definition tensor.hh:421
│ │ │ │ -
const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() const
Definition tensor.hh:442
│ │ │ │ -
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:412
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:396
│ │ │ │ -
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, DerivativeLayoutNS::value > &y)
Definition tensor.hh:407
│ │ │ │ -
This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t)
Definition tensor.hh:368
│ │ │ │ -
void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r)
Definition tensor.hh:474
│ │ │ │ -
Dune::FieldVector< ThisLFETensor, dimR > tensor_
Definition tensor.hh:483
│ │ │ │ -
void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y)
Definition tensor.hh:479
│ │ │ │ -
This & operator=(const FF &f)
Definition tensor.hh:362
│ │ │ │ - │ │ │ │ -
void axpy(const F &a, const This &y)
Definition tensor.hh:386
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > &y)
Definition tensor.hh:540
│ │ │ │ - │ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value > &y)
Definition tensor.hh:533
│ │ │ │ -
Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This
Definition tensor.hh:490
│ │ │ │ -
Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv
Definition tensor.hh:491
│ │ │ │ -
const ScalarDeriv & operator[](int r) const
Definition tensor.hh:557
│ │ │ │ -
void axpy(const FF &a, const This &y)
Definition tensor.hh:521
│ │ │ │ -
This & operator=(const Block &t)
Definition tensor.hh:508
│ │ │ │ -
Dune::FieldVector< F, size > Block
Definition tensor.hh:500
│ │ │ │ -
Dune::FieldVector< ScalarDeriv, dimR > deriv_
Definition tensor.hh:561
│ │ │ │ -
void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::derivative > &y)
Definition tensor.hh:527
│ │ │ │ -
Definition tensor.hh:569
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:571
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:585
│ │ │ │ -
Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:583
│ │ │ │ -
Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:599
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:601
│ │ │ │ -
Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:615
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:617
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:632
│ │ │ │ -
Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:630
│ │ │ │ -
Definition tensor.hh:648
│ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:649
│ │ │ │ - │ │ │ │ - │ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:661
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2
Definition tensor.hh:696
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2
Definition tensor.hh:708
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:769
│ │ │ │ -
Derivatives< F1, dimD, 1, deriv, layout > Vec1
Definition tensor.hh:767
│ │ │ │ -
Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:779
│ │ │ │ - │ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:781
│ │ │ │ -
Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:791
│ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:793
│ │ │ │ - │ │ │ │ -
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:804
│ │ │ │ - │ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:806
│ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:818
│ │ │ │ -
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:816
│ │ │ │ - │ │ │ │ - │ │ │ │ -
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1
Definition tensor.hh:828
│ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:830
│ │ │ │ -
Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1
Definition tensor.hh:840
│ │ │ │ -
static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:842
│ │ │ │ - │ │ │ │ +
Definition hierarchicalprismp2localinterpolation.hh:18
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalprismp2localinterpolation.hh:22
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1607 +1,100 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -tensor.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_r_i_s_m_p_2 │ │ │ │ │ +hierarchicalprismp2localinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_TENSOR_HH │ │ │ │ │ -7#define DUNE_TENSOR_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 /*********************************************** │ │ │ │ │ -19 * The classes here are work in progress. │ │ │ │ │ -20 * Basically they provide tensor structures for │ │ │ │ │ -21 * higher order derivatives of vector valued function. │ │ │ │ │ -22 * Two storage structures are provided │ │ │ │ │ -23 * (either based on the components of the vector valued │ │ │ │ │ -24 * functions or on the order of the derivative). │ │ │ │ │ -25 * Conversions are supplied between the two storage │ │ │ │ │ -26 * structures and simple operations, which make the │ │ │ │ │ -27 * code difficult to use and requires rewritting... │ │ │ │ │ -28 ***************************************************/ │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_PRISM_P2_LOCALINTERPOLATION_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 public: │ │ │ │ │ +20 │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +23 { │ │ │ │ │ +24 typename LB::Traits::DomainType x; │ │ │ │ │ +25 typename LB::Traits::RangeType y; │ │ │ │ │ +26 out.resize(18); │ │ │ │ │ +27 │ │ │ │ │ +28 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ 29 │ │ │ │ │ -30 // Structure for scalar tensor of order deriv │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 class _L_F_E_T_e_n_s_o_r │ │ │ │ │ -33 { │ │ │ │ │ -34 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_e_r_i_v_> _T_h_i_s; │ │ │ │ │ -35 typedef _L_F_E_T_e_n_s_o_r _B_a_s_e_D_i_m; │ │ │ │ │ -36 typedef _L_F_E_T_e_n_s_o_r _B_a_s_e_D_e_r_i_v; │ │ │ │ │ +30 //First the vertex dofs │ │ │ │ │ +31 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x); │ │ │ │ │ +32 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[1] = f(x); │ │ │ │ │ +33 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[2] = f(x); │ │ │ │ │ +34 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[3] = f(x); │ │ │ │ │ +35 x[0] = 1.0; x[1] = 0.0; x[2] = 1.0; out[4] = f(x); │ │ │ │ │ +36 x[0] = 0.0; x[1] = 1.0; x[2] = 1.0; out[5] = f(x); │ │ │ │ │ 37 │ │ │ │ │ -38 public: │ │ │ │ │ -_3_9 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ -_4_0 static const unsigned int _s_i_z_e = _B_a_s_e_D_i_m_:_:_s_i_z_e+_B_a_s_e_D_e_r_i_v_:_:_s_i_z_e; │ │ │ │ │ -_4_1 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ +38 │ │ │ │ │ +39 // Then: the 9 edge dofs and the 3 face dofs │ │ │ │ │ +40 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +41 out[6] = y - 0.5*(out[0] + out[3]); │ │ │ │ │ 42 │ │ │ │ │ -43 template< class FF > │ │ │ │ │ -_4_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const FF &f ) │ │ │ │ │ -45 { │ │ │ │ │ -46 _b_l_o_c_k() = field_cast< F >( f ); │ │ │ │ │ -47 return *this; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -_5_0 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _B_l_o_c_k &b ) │ │ │ │ │ -51 { │ │ │ │ │ -52 _b_l_o_c_k() = b; │ │ │ │ │ -53 return *this; │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -_5_6 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ -57 { │ │ │ │ │ -58 _b_l_o_c_k() *= f; │ │ │ │ │ -59 return *this; │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 const _f_i_e_l_d___t_y_p_e &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) const │ │ │ │ │ -63 { │ │ │ │ │ -64 return _b_l_o_c_k()[ i ]; │ │ │ │ │ -65 } │ │ │ │ │ +43 x[0] = 1.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +44 out[7] = y - 0.5*(out[1] + out[4]); │ │ │ │ │ +45 │ │ │ │ │ +46 x[0] = 0.0; x[1] = 1.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +47 out[8] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ +48 │ │ │ │ │ +49 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x); │ │ │ │ │ +50 out[9] = y - 0.5*(out[0] + out[1]); │ │ │ │ │ +51 │ │ │ │ │ +52 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ +53 out[10] = y - 0.5*(out[2] + out[0]); │ │ │ │ │ +54 │ │ │ │ │ +55 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ +56 out[11] = y - 0.5*(out[2] + out[1]); │ │ │ │ │ +57 │ │ │ │ │ +58 x[0] = 0.5; x[1] = 0.0; x[2] = 1.0; y = f(x); │ │ │ │ │ +59 out[12] = y - 0.5*(out[3] + out[4]); │ │ │ │ │ +60 │ │ │ │ │ +61 x[0] = 0.0; x[1] = 0.5; x[2] = 1.0; y = f(x); │ │ │ │ │ +62 out[13] = y - 0.5*(out[3] + out[5]); │ │ │ │ │ +63 │ │ │ │ │ +64 x[0] = 0.5; x[1] = 0.5; x[2] = 1.0; y = f(x); │ │ │ │ │ +65 out[14] = y - 0.5*(out[4] + out[5]); │ │ │ │ │ 66 │ │ │ │ │ -_6_7 _f_i_e_l_d___t_y_p_e &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) │ │ │ │ │ -68 { │ │ │ │ │ -69 return _b_l_o_c_k()[ i ]; │ │ │ │ │ -70 } │ │ │ │ │ +67 │ │ │ │ │ +68 //faces │ │ │ │ │ +69 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +70 out[15] = y - 0.25*(out[4] + out[1] + out[0] + out[3] ); │ │ │ │ │ 71 │ │ │ │ │ -_7_2 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ -73 { │ │ │ │ │ -74 return _b_l_o_c_k__; │ │ │ │ │ -75 } │ │ │ │ │ -_7_6 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ -77 { │ │ │ │ │ -78 return _b_l_o_c_k__; │ │ │ │ │ -79 } │ │ │ │ │ -_8_0 void _a_x_p_y(const F& a, const _T_h_i_s &y) │ │ │ │ │ -81 { │ │ │ │ │ -82 _b_l_o_c_k().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ -83 } │ │ │ │ │ -84 template │ │ │ │ │ -_8_5 void _a_s_s_i_g_n(const _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_D_,_d_e_r_i_v_> &y) │ │ │ │ │ -86 { │ │ │ │ │ -87 _f_i_e_l_d___c_a_s_t(y._b_l_o_c_k(),_b_l_o_c_k()); │ │ │ │ │ -88 } │ │ │ │ │ -_8_9 _B_l_o_c_k _b_l_o_c_k__; │ │ │ │ │ -90 }; │ │ │ │ │ -91 │ │ │ │ │ -92 // ****************************************** │ │ │ │ │ -93 template │ │ │ │ │ -_9_4 struct _L_F_E_T_e_n_s_o_r │ │ │ │ │ -95 { │ │ │ │ │ -_9_6 static const int _s_i_z_e = 0; │ │ │ │ │ -97 }; │ │ │ │ │ -98 │ │ │ │ │ -99 template │ │ │ │ │ -_1_0_0 struct _L_F_E_T_e_n_s_o_r │ │ │ │ │ -101 { │ │ │ │ │ -_1_0_2 static const int _s_i_z_e = 1; │ │ │ │ │ -103 }; │ │ │ │ │ -104 │ │ │ │ │ -105 template │ │ │ │ │ -_1_0_6 class _L_F_E_T_e_n_s_o_r │ │ │ │ │ -107 { │ │ │ │ │ -108 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_0_> _T_h_i_s; │ │ │ │ │ -109 │ │ │ │ │ -110 public: │ │ │ │ │ -_1_1_1 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ -_1_1_2 static const int _s_i_z_e = 1; │ │ │ │ │ -_1_1_3 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ -114 │ │ │ │ │ -115 template< class FF > │ │ │ │ │ -_1_1_6 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const FF &f ) │ │ │ │ │ -117 { │ │ │ │ │ -118 _b_l_o_c_k() = field_cast< F >( f ); │ │ │ │ │ -119 return *this; │ │ │ │ │ -120 } │ │ │ │ │ -121 │ │ │ │ │ -_1_2_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=_ ( const _B_l_o_c_k &b ) │ │ │ │ │ -123 { │ │ │ │ │ -124 _b_l_o_c_k() = b; │ │ │ │ │ -125 return *this; │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 _T_h_i_s &_o_p_e_r_a_t_o_r_*_=_ ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ -129 { │ │ │ │ │ -130 _b_l_o_c_k() *= f; │ │ │ │ │ -131 return *this; │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -_1_3_4 const F &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) const │ │ │ │ │ -135 { │ │ │ │ │ -136 return _b_l_o_c_k()[ i ]; │ │ │ │ │ -137 } │ │ │ │ │ -138 │ │ │ │ │ -_1_3_9 F &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) │ │ │ │ │ -140 { │ │ │ │ │ -141 return _b_l_o_c_k()[ i ]; │ │ │ │ │ -142 } │ │ │ │ │ -143 │ │ │ │ │ -_1_4_4 void _a_x_p_y(const F& a, const _T_h_i_s &y) │ │ │ │ │ -145 { │ │ │ │ │ -146 _b_l_o_c_k().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ -147 } │ │ │ │ │ -148 template │ │ │ │ │ -_1_4_9 void _a_s_s_i_g_n(const _L_F_E_T_e_n_s_o_r_<_F_y_,_d_i_m_D_,_0_> &y) │ │ │ │ │ -150 { │ │ │ │ │ -151 _f_i_e_l_d___c_a_s_t(y._b_l_o_c_k(),_b_l_o_c_k()); │ │ │ │ │ -152 } │ │ │ │ │ -153 │ │ │ │ │ -_1_5_4 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ -155 { │ │ │ │ │ -156 return _b_l_o_c_k__; │ │ │ │ │ -157 } │ │ │ │ │ -_1_5_8 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ -159 { │ │ │ │ │ -160 return _b_l_o_c_k__; │ │ │ │ │ -161 } │ │ │ │ │ -_1_6_2 _B_l_o_c_k _b_l_o_c_k__; │ │ │ │ │ -163 }; │ │ │ │ │ -164 // *********************************************************** │ │ │ │ │ -165 // Structure for all derivatives up to order deriv │ │ │ │ │ -166 // for vector valued function │ │ │ │ │ -_1_6_7 namespace DerivativeLayoutNS { │ │ │ │ │ -_1_6_8 enum _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t {_v_a_l_u_e,_d_e_r_i_v_a_t_i_v_e}; │ │ │ │ │ -169 } │ │ │ │ │ -170 template │ │ │ │ │ -_1_7_2 struct _D_e_r_i_v_a_t_i_v_e_s; │ │ │ │ │ -173 │ │ │ │ │ -174 // Implemnetation for valued based layout │ │ │ │ │ -175 template │ │ │ │ │ -_1_7_6 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -177 : public _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -178 { │ │ │ │ │ -_1_7_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _T_h_i_s; │ │ │ │ │ -_1_8_0 typedef _D_e_r_i_v_a_t_i_v_e_s _B_a_s_e; │ │ │ │ │ -_1_8_1 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_e_r_i_v_> _T_h_i_s_L_F_E_T_e_n_s_o_r; │ │ │ │ │ -182 │ │ │ │ │ -_1_8_3 typedef F _F_i_e_l_d; │ │ │ │ │ -_1_8_4 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ -185 │ │ │ │ │ -_1_8_6 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ -_1_8_7 static const unsigned int dimDomain = dimD; │ │ │ │ │ -_1_8_8 static const unsigned int dimRange = dimR; │ │ │ │ │ -_1_8_9 constexpr static int size = Base::size+ThisLFETensor::size*dimR; │ │ │ │ │ -_1_9_0 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ -191 │ │ │ │ │ -_1_9_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const F& f) │ │ │ │ │ -193 { │ │ │ │ │ -194 block() = f; │ │ │ │ │ -195 return *this; │ │ │ │ │ -196 } │ │ │ │ │ -_1_9_7 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector &t) │ │ │ │ │ -198 { │ │ │ │ │ -199 tensor_ = t; │ │ │ │ │ -200 return *this; │ │ │ │ │ -201 } │ │ │ │ │ -202 template │ │ │ │ │ -_2_0_3 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector<_L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_d_o_r_d_e_r_>,dimR> &t) │ │ │ │ │ -204 { │ │ │ │ │ -205 tensor() = t; │ │ │ │ │ -206 return *this; │ │ │ │ │ -207 } │ │ │ │ │ -_2_0_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ -209 { │ │ │ │ │ -210 block() = t; │ │ │ │ │ -211 return *this; │ │ │ │ │ -212 } │ │ │ │ │ -213 │ │ │ │ │ -_2_1_4 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ -215 { │ │ │ │ │ -216 block() *= f; │ │ │ │ │ -217 return *this; │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -_2_2_0 void _a_x_p_y(const F &a, const _T_h_i_s &y) │ │ │ │ │ -221 { │ │ │ │ │ -222 block().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ -223 } │ │ │ │ │ -224 │ │ │ │ │ -225 // assign with same layout (only different Field) │ │ │ │ │ -226 template │ │ │ │ │ -_2_2_7 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ -&y) │ │ │ │ │ -228 { │ │ │ │ │ -229 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ -230 } │ │ │ │ │ -231 // assign with different layout (same dimRange) │ │ │ │ │ -232 template │ │ │ │ │ -_2_3_3 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -234 { │ │ │ │ │ -235 Base::assign(y); │ │ │ │ │ -236 for (int rr=0; rr()[0]; │ │ │ │ │ -238 } │ │ │ │ │ -239 // assign with rth component of function │ │ │ │ │ -240 template │ │ │ │ │ -_2_4_1 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_y_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_> &y,unsigned int r) │ │ │ │ │ -242 { │ │ │ │ │ -243 assign(y.block(),r); │ │ │ │ │ -244 } │ │ │ │ │ -245 // assign with scalar functions to component r │ │ │ │ │ -246 template │ │ │ │ │ -_2_4_7 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ -248 { │ │ │ │ │ -249 assign(r,y.block()); │ │ │ │ │ -250 } │ │ │ │ │ -251 template │ │ │ │ │ -_2_5_2 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -253 { │ │ │ │ │ -254 assign(r,y[0]); │ │ │ │ │ -255 } │ │ │ │ │ -256 │ │ │ │ │ -_2_5_7 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ -258 { │ │ │ │ │ -259 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ -260 } │ │ │ │ │ -_2_6_1 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ -262 { │ │ │ │ │ -263 return reinterpret_cast(*this); │ │ │ │ │ -264 } │ │ │ │ │ -265 │ │ │ │ │ -266 template │ │ │ │ │ -_2_6_7 const Dune::FieldVector,dimR> &_t_e_n_s_o_r() const │ │ │ │ │ -268 { │ │ │ │ │ -269 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -270 const std::integral_constant a = {}; │ │ │ │ │ -271 return tensor(a); │ │ │ │ │ -272 } │ │ │ │ │ -273 template │ │ │ │ │ -_2_7_4 Dune::FieldVector,dimR> &_t_e_n_s_o_r() │ │ │ │ │ -275 { │ │ │ │ │ -276 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -277 return tensor(std::integral_constant()); │ │ │ │ │ -278 } │ │ │ │ │ -279 template │ │ │ │ │ -_2_8_0 const Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ -const │ │ │ │ │ -281 { │ │ │ │ │ -282 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -283 const std::integral_constant a = {}; │ │ │ │ │ -284 return reinterpret_cast::size*dimR>&>(tensor(a)); │ │ │ │ │ -285 } │ │ │ │ │ -286 template │ │ │ │ │ -_2_8_7 Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ -288 { │ │ │ │ │ -289 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -290 const std::integral_constant a = {}; │ │ │ │ │ -291 return reinterpret_cast:: │ │ │ │ │ -size*dimR>&>(tensor(a)); │ │ │ │ │ -292 } │ │ │ │ │ -_2_9_3 _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ -294 return tensor_[r]; │ │ │ │ │ -295 } │ │ │ │ │ -_2_9_6 const _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ -297 return tensor_[r]; │ │ │ │ │ -298 } │ │ │ │ │ -299 protected: │ │ │ │ │ -300 template │ │ │ │ │ -_3_0_1 void _a_s_s_i_g_n(const FieldVector &y,unsigned int r) │ │ │ │ │ -302 { │ │ │ │ │ -303 Base::template assign(reinterpret_cast&>(y),r); │ │ │ │ │ -304 tensor_[0] = reinterpret_cast&>(y │ │ │ │ │ -[Base::size*dimRy+r*ThisLFETensor::size]); │ │ │ │ │ -305 } │ │ │ │ │ -306 template │ │ │ │ │ -_3_0_7 void _a_s_s_i_g_n(unsigned int r,const FieldVector &y) │ │ │ │ │ -308 { │ │ │ │ │ -309 Base::assign(r,reinterpret_cast&> │ │ │ │ │ -(y)); │ │ │ │ │ -310 tensor_[r] = reinterpret_cast&>(y │ │ │ │ │ -[Base::size/dimR]); │ │ │ │ │ -311 } │ │ │ │ │ -312 // assign with different layout (same dimRange) │ │ │ │ │ -313 template │ │ │ │ │ -_3_1_4 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_y_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -315 { │ │ │ │ │ -316 Base::assign(y); │ │ │ │ │ -317 for (int rr=0; rr()[0]; │ │ │ │ │ -319 } │ │ │ │ │ -320 │ │ │ │ │ -321 template │ │ │ │ │ -322 const Dune::FieldVector,dimR> & │ │ │ │ │ -_3_2_3 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ -324 { │ │ │ │ │ -325 return Base::tensor(dorderVar); │ │ │ │ │ -326 } │ │ │ │ │ -327 const Dune::FieldVector,dimR> & │ │ │ │ │ -_3_2_8 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ -329 { │ │ │ │ │ -330 return tensor_; │ │ │ │ │ -331 } │ │ │ │ │ -332 template │ │ │ │ │ -333 Dune::FieldVector,dimR> & │ │ │ │ │ -_3_3_4 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ -335 { │ │ │ │ │ -336 return Base::tensor(dorderVar); │ │ │ │ │ -337 } │ │ │ │ │ -338 Dune::FieldVector,dimR> & │ │ │ │ │ -_3_3_9 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ -340 { │ │ │ │ │ -341 return tensor_; │ │ │ │ │ -342 } │ │ │ │ │ -_3_4_3 Dune::FieldVector _t_e_n_s_o_r__; │ │ │ │ │ -344 }; │ │ │ │ │ -345 │ │ │ │ │ -346 template │ │ │ │ │ -_3_4_7 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -348 { │ │ │ │ │ -_3_4_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _T_h_i_s; │ │ │ │ │ -_3_5_0 typedef _L_F_E_T_e_n_s_o_r_<_F_,_d_i_m_D_,_0_> _T_h_i_s_L_F_E_T_e_n_s_o_r; │ │ │ │ │ -351 │ │ │ │ │ -_3_5_2 typedef F _F_i_e_l_d; │ │ │ │ │ -_3_5_3 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ -354 │ │ │ │ │ -_3_5_5 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ -_3_5_6 static const unsigned int dimDomain = dimD; │ │ │ │ │ -_3_5_7 static const unsigned int dimRange = dimR; │ │ │ │ │ -_3_5_8 constexpr static int size = ThisLFETensor::size*dimR; │ │ │ │ │ -_3_5_9 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ -360 │ │ │ │ │ -361 template │ │ │ │ │ -_3_6_2 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const FF& f) │ │ │ │ │ -363 { │ │ │ │ │ -364 for (int r=0; r(f); │ │ │ │ │ -366 return *this; │ │ │ │ │ -367 } │ │ │ │ │ -_3_6_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const Dune::FieldVector &t) │ │ │ │ │ -369 { │ │ │ │ │ -370 tensor_ = t; │ │ │ │ │ -371 return *this; │ │ │ │ │ -372 } │ │ │ │ │ -373 │ │ │ │ │ -_3_7_4 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ -375 { │ │ │ │ │ -376 block() = t; │ │ │ │ │ -377 return *this; │ │ │ │ │ -378 } │ │ │ │ │ -379 │ │ │ │ │ -_3_8_0 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ -381 { │ │ │ │ │ -382 block() *= f; │ │ │ │ │ -383 return *this; │ │ │ │ │ -384 } │ │ │ │ │ -385 │ │ │ │ │ -_3_8_6 void _a_x_p_y(const F &a, const _T_h_i_s &y) │ │ │ │ │ -387 { │ │ │ │ │ -388 block().axpy(a,y._b_l_o_c_k()); │ │ │ │ │ -389 } │ │ │ │ │ -390 template │ │ │ │ │ -_3_9_1 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ -392 { │ │ │ │ │ -393 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ -394 } │ │ │ │ │ -395 template │ │ │ │ │ -_3_9_6 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -397 { │ │ │ │ │ -398 for (int rr=0; rr()[0]; │ │ │ │ │ -400 } │ │ │ │ │ -401 template │ │ │ │ │ -_4_0_2 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_y_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ -&y,unsigned int r) │ │ │ │ │ -403 { │ │ │ │ │ -404 assign(y.block(),r); │ │ │ │ │ -405 } │ │ │ │ │ -406 template │ │ │ │ │ -_4_0_7 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> &y) │ │ │ │ │ -408 { │ │ │ │ │ -409 tensor_[r].assign(y[0]); │ │ │ │ │ -410 } │ │ │ │ │ -411 template │ │ │ │ │ -_4_1_2 void _a_s_s_i_g_n(unsigned int r,const │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -413 { │ │ │ │ │ -414 tensor_[r].assign(y[0][0]); │ │ │ │ │ -415 } │ │ │ │ │ -416 │ │ │ │ │ -_4_1_7 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ -418 { │ │ │ │ │ -419 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ -420 } │ │ │ │ │ -_4_2_1 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ -422 { │ │ │ │ │ -423 return reinterpret_cast(*this); │ │ │ │ │ -424 } │ │ │ │ │ -425 │ │ │ │ │ -_4_2_6 _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ -427 return tensor_[r]; │ │ │ │ │ -428 } │ │ │ │ │ -_4_2_9 const _T_h_i_s_L_F_E_T_e_n_s_o_r &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ -430 return tensor_[r]; │ │ │ │ │ -431 } │ │ │ │ │ -432 template │ │ │ │ │ -_4_3_3 const Dune::FieldVector,dimR> &_t_e_n_s_o_r() const │ │ │ │ │ -434 { │ │ │ │ │ -435 return tensor_; │ │ │ │ │ -436 } │ │ │ │ │ -_4_3_7 Dune::FieldVector,dimR> &_t_e_n_s_o_r() │ │ │ │ │ -438 { │ │ │ │ │ -439 return tensor_; │ │ │ │ │ -440 } │ │ │ │ │ -441 template │ │ │ │ │ -_4_4_2 const Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ -const │ │ │ │ │ -443 { │ │ │ │ │ -444 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -445 const std::integral_constant a = {}; │ │ │ │ │ -446 return reinterpret_cast::size*dimR>&>(tensor(a)); │ │ │ │ │ -447 } │ │ │ │ │ -448 template │ │ │ │ │ -_4_4_9 Dune::FieldVector::size*dimR> &_b_l_o_c_k() │ │ │ │ │ -450 { │ │ │ │ │ -451 // use integral_constant here to stay compatible with Int2Type │ │ │ │ │ -452 const std::integral_constant a = {}; │ │ │ │ │ -453 return reinterpret_cast:: │ │ │ │ │ -size*dimR>&>(tensor(a)); │ │ │ │ │ -454 } │ │ │ │ │ -455 │ │ │ │ │ -456 protected: │ │ │ │ │ -457 const Dune::FieldVector,dimR> & │ │ │ │ │ -_4_5_8 _t_e_n_s_o_r(const std::integral_constant &dorderVar) const │ │ │ │ │ -459 { │ │ │ │ │ -460 return tensor_; │ │ │ │ │ -461 } │ │ │ │ │ -462 Dune::FieldVector,dimR> & │ │ │ │ │ -_4_6_3 _t_e_n_s_o_r(const std::integral_constant &dorderVar) │ │ │ │ │ -464 { │ │ │ │ │ -465 return tensor_; │ │ │ │ │ -466 } │ │ │ │ │ -467 template │ │ │ │ │ -_4_6_8 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_y_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -469 { │ │ │ │ │ -470 for (int rr=0; rr()[0]; │ │ │ │ │ -472 } │ │ │ │ │ -473 template │ │ │ │ │ -_4_7_4 void _a_s_s_i_g_n(const FieldVector &y,unsigned int r) │ │ │ │ │ -475 { │ │ │ │ │ -476 tensor_[0] = reinterpret_cast&>(y │ │ │ │ │ -[r*ThisLFETensor::size]); │ │ │ │ │ -477 } │ │ │ │ │ -478 template │ │ │ │ │ -_4_7_9 void _a_s_s_i_g_n(unsigned int r,const FieldVector &y) │ │ │ │ │ -480 { │ │ │ │ │ -481 tensor_[r] = y; │ │ │ │ │ -482 } │ │ │ │ │ -_4_8_3 Dune::FieldVector _t_e_n_s_o_r__; │ │ │ │ │ -484 }; │ │ │ │ │ -485 │ │ │ │ │ -486 // Implemnetation for DerivativeLayoutNS::derivative based layout │ │ │ │ │ -487 template │ │ │ │ │ -_4_8_8 struct _D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -489 { │ │ │ │ │ -_4_9_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _T_h_i_s; │ │ │ │ │ -_4_9_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _S_c_a_l_a_r_D_e_r_i_v; │ │ │ │ │ -492 │ │ │ │ │ -_4_9_3 typedef F _F_i_e_l_d; │ │ │ │ │ -_4_9_4 typedef F _f_i_e_l_d___t_y_p_e; │ │ │ │ │ -495 │ │ │ │ │ -_4_9_6 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e; │ │ │ │ │ -_4_9_7 static const unsigned int dimDomain = dimD; │ │ │ │ │ -_4_9_8 static const unsigned int dimRange = dimR; │ │ │ │ │ -_4_9_9 constexpr static int size = ScalarDeriv::size*dimR; │ │ │ │ │ -_5_0_0 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ -501 │ │ │ │ │ -502 template │ │ │ │ │ -_5_0_3 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const FF& f) │ │ │ │ │ -504 { │ │ │ │ │ -505 block() = field_cast(f); │ │ │ │ │ -506 return *this; │ │ │ │ │ -507 } │ │ │ │ │ -_5_0_8 _T_h_i_s &_o_p_e_r_a_t_o_r_=(const _B_l_o_c_k &t) │ │ │ │ │ -509 { │ │ │ │ │ -510 block() = t; │ │ │ │ │ -511 return *this; │ │ │ │ │ -512 } │ │ │ │ │ -513 │ │ │ │ │ -_5_1_4 _T_h_i_s &operator*= ( const _f_i_e_l_d___t_y_p_e &f ) │ │ │ │ │ -515 { │ │ │ │ │ -516 block() *= f; │ │ │ │ │ -517 return *this; │ │ │ │ │ -518 } │ │ │ │ │ -519 │ │ │ │ │ -520 template │ │ │ │ │ -_5_2_1 void _a_x_p_y(const FF &a, const _T_h_i_s &y) │ │ │ │ │ -522 { │ │ │ │ │ -523 block().axpy(field_cast(a),y._b_l_o_c_k()); │ │ │ │ │ -524 } │ │ │ │ │ -525 // assign with same layout (only different Field) │ │ │ │ │ -526 template │ │ │ │ │ -_5_2_7 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> &y) │ │ │ │ │ -528 { │ │ │ │ │ -529 _f_i_e_l_d___c_a_s_t(y.block(),block()); │ │ │ │ │ -530 } │ │ │ │ │ -531 // assign with different layout (same dimRange) │ │ │ │ │ -532 template │ │ │ │ │ -_5_3_3 void _a_s_s_i_g_n(const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> │ │ │ │ │ -&y) │ │ │ │ │ -534 { │ │ │ │ │ -535 for (unsigned int rr=0; rr │ │ │ │ │ -_5_4_0 void _a_s_s_i_g_n(unsigned int r,const _D_e_r_i_v_a_t_i_v_e_s_<_F_y_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_y_> &y) │ │ │ │ │ -541 { │ │ │ │ │ -542 deriv_[r].assign(r,y); │ │ │ │ │ -543 } │ │ │ │ │ -544 │ │ │ │ │ -_5_4_5 _B_l_o_c_k &_b_l_o_c_k() │ │ │ │ │ -546 { │ │ │ │ │ -547 return reinterpret_cast<_B_l_o_c_k&>(*this); │ │ │ │ │ -548 } │ │ │ │ │ -_5_4_9 const _B_l_o_c_k &_b_l_o_c_k() const │ │ │ │ │ -550 { │ │ │ │ │ -551 return reinterpret_cast(*this); │ │ │ │ │ -552 } │ │ │ │ │ -553 │ │ │ │ │ -_5_5_4 _S_c_a_l_a_r_D_e_r_i_v &_o_p_e_r_a_t_o_r_[_](int r) { │ │ │ │ │ -555 return deriv_[r]; │ │ │ │ │ -556 } │ │ │ │ │ -_5_5_7 const _S_c_a_l_a_r_D_e_r_i_v &_o_p_e_r_a_t_o_r_[_](int r) const { │ │ │ │ │ -558 return deriv_[r]; │ │ │ │ │ -559 } │ │ │ │ │ -560 protected: │ │ │ │ │ -_5_6_1 Dune::FieldVector _d_e_r_i_v__; │ │ │ │ │ -562 }; │ │ │ │ │ -563 │ │ │ │ │ -564 // ****************************************** │ │ │ │ │ -565 // AXPY ************************************* │ │ │ │ │ -566 // ****************************************** │ │ │ │ │ -567 template │ │ │ │ │ -_5_6_8 struct _L_F_E_T_e_n_s_o_r_A_x_p_y │ │ │ │ │ -569 { │ │ │ │ │ -570 template │ │ │ │ │ -_5_7_1 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ -572 const Vec1 &x, Vec2 &y) │ │ │ │ │ -573 { │ │ │ │ │ -574 y.axpy(a,x); │ │ │ │ │ -575 } │ │ │ │ │ -576 }; │ │ │ │ │ -577 template │ │ │ │ │ -_5_8_1 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ -582 { │ │ │ │ │ -_5_8_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -584 template │ │ │ │ │ -_5_8_5 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ -586 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ -587 { │ │ │ │ │ -588 const FieldVector &xx = x.template block(); │ │ │ │ │ -589 for (int i=0; i │ │ │ │ │ -_5_9_7 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ -598 { │ │ │ │ │ -_5_9_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -600 template │ │ │ │ │ -_6_0_1 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ -602 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ -603 { │ │ │ │ │ -604 for (int rr=0; rr, │ │ │ │ │ -606 Vec2,deriv>_:_:_a_p_p_l_y(rr,a,x[rr],y); │ │ │ │ │ -607 } │ │ │ │ │ -608 }; │ │ │ │ │ -609 template │ │ │ │ │ -_6_1_3 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ -614 { │ │ │ │ │ -_6_1_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -616 template │ │ │ │ │ -_6_1_7 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ -618 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ -619 { │ │ │ │ │ -620 _L_F_E_T_e_n_s_o_r_A_x_p_y_<_D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_>, │ │ │ │ │ -621 Vec2,deriv>_:_:_a_p_p_l_y(r,a,x[0],y); │ │ │ │ │ -622 } │ │ │ │ │ -623 }; │ │ │ │ │ -624 template │ │ │ │ │ -_6_2_8 struct _L_F_E_T_e_n_s_o_r_A_x_p_y<_D_e_r_i_v_a_t_i_v_e_s,Vec2,deriv> │ │ │ │ │ -629 { │ │ │ │ │ -_6_3_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -631 template │ │ │ │ │ -_6_3_2 static void _a_p_p_l_y(unsigned int r,const Field &a, │ │ │ │ │ -633 const _V_e_c_1 &x, Vec2 &y) │ │ │ │ │ -634 { │ │ │ │ │ -635 typedef _L_F_E_T_e_n_s_o_r_<_F_1_,_d_i_m_D_,_d_e_r_i_v_> LFETensorType; │ │ │ │ │ -636 const unsigned int rr = r*LFETensorType::size; │ │ │ │ │ -637 const FieldVector &xx = x.template block(); │ │ │ │ │ -638 for (int i=0; i::dimension; ++i) │ │ │ │ │ -639 y[rr+i] += xx[i]*a; │ │ │ │ │ -640 } │ │ │ │ │ -641 }; │ │ │ │ │ -642 │ │ │ │ │ -643 // *********************************************** │ │ │ │ │ -644 // Assign **************************************** │ │ │ │ │ -645 // *********************************************** │ │ │ │ │ -646 template │ │ │ │ │ -_6_4_7 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n │ │ │ │ │ -648 { │ │ │ │ │ -_6_4_9 static void _a_p_p_l_y(unsigned int r,const Vec1 &vec1,Vec2 &vec2) │ │ │ │ │ -650 { │ │ │ │ │ -651 _f_i_e_l_d___c_a_s_t(vec1,vec2); │ │ │ │ │ -652 } │ │ │ │ │ -653 }; │ │ │ │ │ -654 template │ │ │ │ │ -_6_5_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -657 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -658 { │ │ │ │ │ -_6_5_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ -_6_6_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_2; │ │ │ │ │ -_6_6_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -662 { │ │ │ │ │ -663 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ -664 } │ │ │ │ │ -665 }; │ │ │ │ │ -666 template │ │ │ │ │ -_6_6_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -669 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -670 { │ │ │ │ │ -_6_7_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_6_7_2 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ -_V_e_c_2; │ │ │ │ │ -_6_7_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -674 { │ │ │ │ │ -675 vec2.assign(vec1); │ │ │ │ │ -676 } │ │ │ │ │ -677 }; │ │ │ │ │ -678 template │ │ │ │ │ -_6_8_0 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -681 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -682 { │ │ │ │ │ -_6_8_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ -_V_e_c_1; │ │ │ │ │ -_6_8_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ -_6_8_5 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -686 { │ │ │ │ │ -687 vec2.assign(vec1); │ │ │ │ │ -688 } │ │ │ │ │ -689 }; │ │ │ │ │ -690 template │ │ │ │ │ -_6_9_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -693 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -694 { │ │ │ │ │ -_6_9_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ -_6_9_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ -_6_9_7 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -698 { │ │ │ │ │ -699 vec2.assign(r,vec1); │ │ │ │ │ -700 } │ │ │ │ │ -701 }; │ │ │ │ │ -702 template │ │ │ │ │ -_7_0_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -705 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -706 { │ │ │ │ │ -_7_0_7 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ -_7_0_8 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ -_V_e_c_2; │ │ │ │ │ -_7_0_9 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -710 { │ │ │ │ │ -711 vec2.assign(r,vec1); │ │ │ │ │ -712 } │ │ │ │ │ -713 }; │ │ │ │ │ -714 template │ │ │ │ │ -_7_1_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -717 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -718 { │ │ │ │ │ -_7_1_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_7_2_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ -_7_2_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -722 { │ │ │ │ │ -723 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ -724 } │ │ │ │ │ -725 }; │ │ │ │ │ -726 template │ │ │ │ │ -_7_2_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -729 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -730 { │ │ │ │ │ -_7_3_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -_7_3_2 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_2; │ │ │ │ │ -_7_3_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -734 { │ │ │ │ │ -735 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ -736 } │ │ │ │ │ -737 }; │ │ │ │ │ -738 template │ │ │ │ │ -_7_4_0 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -741 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -742 { │ │ │ │ │ -_7_4_3 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -_7_4_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_2; │ │ │ │ │ -_7_4_5 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -746 { │ │ │ │ │ -747 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ -748 } │ │ │ │ │ -749 }; │ │ │ │ │ -750 template │ │ │ │ │ -_7_5_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -753 _D_e_r_i_v_a_t_i_v_e_s > │ │ │ │ │ -754 { │ │ │ │ │ -_7_5_5 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_7_5_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_2_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_2; │ │ │ │ │ -_7_5_7 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -758 { │ │ │ │ │ -759 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2.block()); │ │ │ │ │ -760 } │ │ │ │ │ -761 }; │ │ │ │ │ -762 template │ │ │ │ │ -_7_6_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s, │ │ │ │ │ -765 F2 > │ │ │ │ │ -766 { │ │ │ │ │ -_7_6_7 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> _V_e_c_1; │ │ │ │ │ -_7_6_8 typedef F2 _V_e_c_2; │ │ │ │ │ -_7_6_9 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -770 { │ │ │ │ │ -771 _f_i_e_l_d___c_a_s_t(vec1.block(),vec2); │ │ │ │ │ -772 } │ │ │ │ │ -773 }; │ │ │ │ │ -774 template │ │ │ │ │ -_7_7_7 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -778 { │ │ │ │ │ -_7_7_9 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_7_8_0 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_7_8_1 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -782 { │ │ │ │ │ -783 _f_i_e_l_d___c_a_s_t(vec1.template block<0>(),vec2); │ │ │ │ │ -784 } │ │ │ │ │ -785 }; │ │ │ │ │ -786 template │ │ │ │ │ -_7_8_9 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -790 { │ │ │ │ │ -_7_9_1 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> │ │ │ │ │ -_V_e_c_1; │ │ │ │ │ -_7_9_2 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_7_9_3 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -794 { │ │ │ │ │ -795 for (int rr=0; rr()[0].block(),vec2[rr]); │ │ │ │ │ -797 } │ │ │ │ │ -798 }; │ │ │ │ │ -799 template │ │ │ │ │ -_8_0_2 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -803 { │ │ │ │ │ -_8_0_4 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_8_0_5 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_8_0_6 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -807 { │ │ │ │ │ -808 _f_i_e_l_d___c_a_s_t(vec1.template tensor<0>()[0].block(),vec2[r]); │ │ │ │ │ -809 } │ │ │ │ │ -810 }; │ │ │ │ │ -811 template │ │ │ │ │ -_8_1_4 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -815 { │ │ │ │ │ -_8_1_6 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -_8_1_7 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_8_1_8 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -819 { │ │ │ │ │ -820 _f_i_e_l_d___c_a_s_t(vec1[0].template tensor<0>()[0].block(),vec2[r]); │ │ │ │ │ -821 } │ │ │ │ │ -822 }; │ │ │ │ │ -823 template │ │ │ │ │ -_8_2_6 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -827 { │ │ │ │ │ -_8_2_8 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_> _V_e_c_1; │ │ │ │ │ -_8_2_9 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_8_3_0 static void _a_p_p_l_y(unsigned int r,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -831 { │ │ │ │ │ -832 _f_i_e_l_d___c_a_s_t(vec1.template tensor<0>()[0].block(),vec2); │ │ │ │ │ -833 } │ │ │ │ │ -834 }; │ │ │ │ │ -835 template │ │ │ │ │ -_8_3_8 struct _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n<_D_e_r_i_v_a_t_i_v_e_s,FieldVector > │ │ │ │ │ -839 { │ │ │ │ │ -_8_4_0 typedef _D_e_r_i_v_a_t_i_v_e_s_<_F_1_,_d_i_m_D_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_> _V_e_c_1; │ │ │ │ │ -_8_4_1 typedef FieldVector _V_e_c_2; │ │ │ │ │ -_8_4_2 static void _a_p_p_l_y(unsigned int /*r*/,const _V_e_c_1 &vec1,_V_e_c_2 &vec2) │ │ │ │ │ -843 { │ │ │ │ │ -844 _f_i_e_l_d___c_a_s_t(vec1[0].template tensor<0>()[0].block(),vec2); │ │ │ │ │ -845 } │ │ │ │ │ -846 }; │ │ │ │ │ -847 │ │ │ │ │ -848 // *********************************************** │ │ │ │ │ -849 // IO ******************************************** │ │ │ │ │ -850 // *********************************************** │ │ │ │ │ -851 template │ │ │ │ │ -_8_5_2 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _L_F_E_T_e_n_s_o_r_<_ _F_,_d_i_m_D_,_d_e_r_i_v │ │ │ │ │ -_> &tensor ) │ │ │ │ │ -853 { │ │ │ │ │ -854 return out << tensor._b_l_o_c_k(); │ │ │ │ │ -855 } │ │ │ │ │ -856#if 0 │ │ │ │ │ -857 template │ │ │ │ │ -858 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const ScalarDerivatives< │ │ │ │ │ -F,dimD,deriv > &d ) │ │ │ │ │ -859 { │ │ │ │ │ -860 out << static_cast &>(d); │ │ │ │ │ -861 out << " , " << d.tensor() << std::endl; │ │ │ │ │ -862 return out; │ │ │ │ │ -863 } │ │ │ │ │ -864 template │ │ │ │ │ -865 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const ScalarDerivatives< │ │ │ │ │ -F,dimD,0 > &d ) │ │ │ │ │ -866 { │ │ │ │ │ -867 out << d.tensor() << std::endl; │ │ │ │ │ -868 return out; │ │ │ │ │ -869 } │ │ │ │ │ -870#endif │ │ │ │ │ -871 template │ │ │ │ │ -_8_7_2 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> &d ) │ │ │ │ │ -873 { │ │ │ │ │ -874 out << " ( "; │ │ │ │ │ -875 out << d[0]; │ │ │ │ │ -876 for (int r=1; r │ │ │ │ │ -_8_8_4 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> &d ) │ │ │ │ │ -885 { │ │ │ │ │ -886 out << static_cast &>(d); │ │ │ │ │ -887 out << " ( "; │ │ │ │ │ -888 out << d[0]; │ │ │ │ │ -889 for (int r=1; r │ │ │ │ │ -_8_9_7 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> &d ) │ │ │ │ │ -898 { │ │ │ │ │ -899 out << " ( "; │ │ │ │ │ -900 out << d[0]; │ │ │ │ │ -901 for (int r=1; r │ │ │ │ │ -_9_0_9 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_,_d_i_m_D_,_d_i_m_R_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> &d ) │ │ │ │ │ -910 { │ │ │ │ │ -911 out << " ( "; │ │ │ │ │ -912 out << d[0]; │ │ │ │ │ -913 for (int r=1; r │ │ │ │ │ -_9_2_1 std::ostream &_o_p_e_r_a_t_o_r_<_<_ ( std::ostream &out, const std:: │ │ │ │ │ -vector<_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_d_i_m_D_,_d_i_m_R_,_d_e_r_i_v_,_l_a_y_o_u_t_ _> > &y ) │ │ │ │ │ -922 { │ │ │ │ │ -923 out << "Number of basis functions: " << y.size() << std::endl; │ │ │ │ │ -924 for (unsigned int i=0; i &mat) │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t │ │ │ │ │ -DerivativeLayout │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e │ │ │ │ │ -@ derivative │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ -@ value │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k │ │ │ │ │ -const Block & block() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_*_= │ │ │ │ │ -This & operator*=(const field_type &f) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k__ │ │ │ │ │ -Block block_ │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ -F field_type │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_a_x_p_y │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_b_l_o_c_k │ │ │ │ │ -Block & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const LFETensor< Fy, dimD, deriv > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_s_i_z_e │ │ │ │ │ -static const unsigned int size │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const field_type & operator[](const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _> │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k │ │ │ │ │ -Block & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ -F field_type │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k__ │ │ │ │ │ -Block block_ │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const LFETensor< Fy, dimD, 0 > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_b_l_o_c_k │ │ │ │ │ -const Block & block() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:158 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_a_x_p_y │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_<_ _F_,_ _d_i_m_D_,_ _0_ _>_:_:_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:113 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:178 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:183 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::value > This │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > │ │ │ │ │ -&t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_: │ │ │ │ │ -_f_i_e_l_d___t_y_p_e │ │ │ │ │ -F field_type │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:184 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_a_s_e │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv-1, DerivativeLayoutNS::value > Base │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:180 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const │ │ │ │ │ -std::integral_constant< int, dorder > &dorderVar) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:323 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:301 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ -> &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:227 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:314 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const F &f) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:192 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r │ │ │ │ │ -_[_] │ │ │ │ │ -const ThisLFETensor & operator[](int r) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:296 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:287 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_: │ │ │ │ │ -_T_h_i_s_L_F_E_T_e_n_s_o_r │ │ │ │ │ -LFETensor< F, dimD, deriv > ThisLFETensor │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ -DerivativeLayoutNS::value > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:247 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ -() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:280 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, dorder > &dorderVar) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:334 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -const Block & block() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:261 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_x_p_y │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:233 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:197 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:252 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:208 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r__ │ │ │ │ │ -Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:343 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, deriv > &dorderVar) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:339 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:274 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimRy, deriv, DerivativeLayoutNS:: │ │ │ │ │ -value > &y, unsigned int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:241 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, dorder >, dimR > & tensor() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:267 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, deriv >, dimR > & tensor(const │ │ │ │ │ -std::integral_constant< int, deriv > &dorderVar) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:328 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r │ │ │ │ │ -_[_] │ │ │ │ │ -ThisLFETensor & operator[](int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:293 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -Block & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:257 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:307 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _> │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:348 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -ThisLFETensor & operator[](int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:426 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s_L_F_E_T_e_n_s_o_r │ │ │ │ │ -LFETensor< F, dimD, 0 > ThisLFETensor │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:350 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:449 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, 0 > &dorderVar) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:463 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS::value > │ │ │ │ │ -&y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:391 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:352 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_T_h_i_s │ │ │ │ │ -Derivatives< F, dimD, dimR, 0, DerivativeLayoutNS::value > This │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:349 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, dy, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:468 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimRy, 0, DerivativeLayoutNS::value > │ │ │ │ │ -&y, unsigned int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:402 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:433 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:437 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:374 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_f_i_e_l_d___t_y_p_e │ │ │ │ │ -F field_type │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:353 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const ThisLFETensor & operator[](int r) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:429 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r │ │ │ │ │ -const Dune::FieldVector< LFETensor< F, dimD, 0 >, dimR > & tensor(const std:: │ │ │ │ │ -integral_constant< int, 0 > &dorderVar) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:458 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:359 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -const Block & block() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:421 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -const Dune::FieldVector< F, LFETensor< F, dimD, dorder >::size *dimR > & block │ │ │ │ │ -() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:442 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ -DerivativeLayoutNS::derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:412 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, 0, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:396 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, 0, │ │ │ │ │ -DerivativeLayoutNS::value > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:407 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Dune::FieldVector< ThisLFETensor, dimR > &t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:368 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(const FieldVector< Fy, size *dimRy > &y, unsigned int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:474 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_t_e_n_s_o_r__ │ │ │ │ │ -Dune::FieldVector< ThisLFETensor, dimR > tensor_ │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:483 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const FieldVector< Fy, size/dimR > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:479 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:362 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_b_l_o_c_k │ │ │ │ │ -Block & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:417 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _0_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_:_:_a_x_p_y │ │ │ │ │ -void axpy(const F &a, const This &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:386 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:489 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const FF &f) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:503 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_b_l_o_c_k │ │ │ │ │ -Block & block() │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:545 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:493 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_b_l_o_c_k │ │ │ │ │ -const Block & block() const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:549 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_f_i_e_l_d___t_y_p_e │ │ │ │ │ -F field_type │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:494 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_a_s_s_i_g_n │ │ │ │ │ -void assign(unsigned int r, const Derivatives< Fy, dimD, 1, deriv, layouty > │ │ │ │ │ -&y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:540 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -ScalarDeriv & operator[](int r) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:554 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS::value │ │ │ │ │ -> &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:533 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_:_T_h_i_s │ │ │ │ │ -Derivatives< F, dimD, dimR, deriv, DerivativeLayoutNS::derivative > This │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:490 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_S_c_a_l_a_r_D_e_r_i_v │ │ │ │ │ -Derivatives< F, dimD, 1, deriv, DerivativeLayoutNS::value > ScalarDeriv │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:491 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const ScalarDeriv & operator[](int r) const │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:557 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_:_a_x_p_y │ │ │ │ │ -void axpy(const FF &a, const This &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:521 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_o_p_e_r_a_t_o_r_= │ │ │ │ │ -This & operator=(const Block &t) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:508 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< F, size > Block │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:500 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_d_e_r_i_v__ │ │ │ │ │ -Dune::FieldVector< ScalarDeriv, dimR > deriv_ │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:561 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s_<_ _F_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_:_: │ │ │ │ │ -_a_s_s_i_g_n │ │ │ │ │ -void assign(const Derivatives< Fy, dimD, dimR, deriv, DerivativeLayoutNS:: │ │ │ │ │ -derivative > &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:527 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:569 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:571 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ -_>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:585 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e │ │ │ │ │ -_>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:583 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:599 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:601 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:615 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:617 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_, │ │ │ │ │ -_V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:632 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_, │ │ │ │ │ -_V_e_c_2_,_ _d_e_r_i_v_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, d, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:630 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:648 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:649 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, layout > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:659 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, layout > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:660 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:661 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:671 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:673 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:672 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:684 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:683 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:685 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:695 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:697 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:696 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:707 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:709 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_< │ │ │ │ │ -_F_2_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:708 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:719 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:720 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:721 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ -_>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:731 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ -_>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:733 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _> │ │ │ │ │ -_>_:_:_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:732 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ -_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::value > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:744 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ -_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:745 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_ _>_:_: │ │ │ │ │ -_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:743 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ -_V_e_c_2 │ │ │ │ │ -Derivatives< F2, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:756 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ -_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:757 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_2_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_ _>_:_: │ │ │ │ │ -_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:755 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_V_e_c_2 │ │ │ │ │ -F2 Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:768 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:769 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _l_a_y_o_u_t_ _>_,_ _F_2_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, layout > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:767 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:779 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:780 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:781 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, dimR, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:791 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:793 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _d_i_m_R_,_ _d_e_r_i_v_, │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:792 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:804 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:805 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:806 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:818 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:816 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _d_i_m_R_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, dimR > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:817 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, 1 > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:829 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::value > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:828 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:830 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_1 │ │ │ │ │ -Derivatives< F1, dimD, 1, deriv, DerivativeLayoutNS::derivative > Vec1 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:840 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:842 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_ _D_e_r_i_v_a_t_i_v_e_s_<_ _F_1_,_ _d_i_m_D_,_ _1_,_ _d_e_r_i_v_,_ _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_ _>_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_2_,_ _1_ _>_ _>_:_:_V_e_c_2 │ │ │ │ │ -FieldVector< F2, 1 > Vec2 │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:841 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_P_r_i_s_m_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalprismp2localinterpolation.hh:22 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomialbasis.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,60 +65,32 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
monomialbasis.hh File Reference
│ │ │ │ +
hierarchicalsimplexp2localinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/topologyfactory.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ -#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::MonomialBasisSize< geometryId >
 
struct  Dune::MonomialBasisHelper< mydim, dim, F >
 
class  Dune::MonomialBasisImpl< geometryId, F >
 
class  Dune::MonomialBasis< geometryId, F >
 
class  Dune::StandardMonomialBasis< dim, F >
 
class  Dune::StandardBiMonomialBasis< dim, F >
 
class  Dune::VirtualMonomialBasis< dim, F >
 
class  Dune::VirtualMonomialBasisImpl< geometryId, F >
 
struct  Dune::MonomialBasisFactory< dim, F >
 
struct  Dune::MonomialBasisFactory< dim, F >::EvaluationBasisFactory< dd, FF >
 
struct  Dune::MonomialBasisProvider< dim, SF >
 
struct  Dune::MonomialBasisProvider< dim, SF >::EvaluationBasisFactory< dd, FF >
class  Dune::HierarchicalSimplexP2LocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,49 +1,21 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -monomialbasis.hh File Reference │ │ │ │ │ +hierarchicalsimplexp2localinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_ _g_e_o_m_e_t_r_y_I_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_<_ _m_y_d_i_m_,_ _d_i_m_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_ _d_i_m_,_ _S_F_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_ _d_i_m_,_ _S_F_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F │ │ │ │ │ - _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00179_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: monomialbasis.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,1025 +70,134 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
monomialbasis.hh
│ │ │ │ +
hierarchicalsimplexp2localinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_MONOMIALBASIS_HH
│ │ │ │ -
6#define DUNE_MONOMIALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12
│ │ │ │ -
13#include <dune/geometry/type.hh>
│ │ │ │ -
14#include <dune/geometry/topologyfactory.hh>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22 /************************************************
│ │ │ │ -
23 * Classes for evaluating ''Monomials'' on any order
│ │ │ │ -
24 * for all reference element type.
│ │ │ │ -
25 * For a simplex topology these are the normal
│ │ │ │ -
26 * monomials for cube topologies the bimonomials.
│ │ │ │ -
27 * The construction follows the construction of the
│ │ │ │ -
28 * generic geometries using tensor products for
│ │ │ │ -
29 * prism generation and duffy transform for pyramid
│ │ │ │ -
30 * construction.
│ │ │ │ -
31 * A derivative argument can be applied, in which case
│ │ │ │ -
32 * all derivatives up to the desired order are
│ │ │ │ -
33 * evaluated. Note that for higher order derivatives
│ │ │ │ -
34 * only the ''lower'' part of the symmetric tensor
│ │ │ │ -
35 * is evaluated, e.g., passing derivative equal to 2
│ │ │ │ -
36 * to the class will provide the vector
│ │ │ │ -
37 * (d/dxdx p, d/dxydx p, d/dydy p,
│ │ │ │ -
38 * d/dx p, d/dy p, p)
│ │ │ │ -
39 * Important:
│ │ │ │ -
40 * So far the computation of the derivatives has not
│ │ │ │ -
41 * been fully implemented for general pyramid
│ │ │ │ -
42 * construction, i.e., in the case where a pyramid is
│ │ │ │ -
43 * build over a non simplex base geometry.
│ │ │ │ -
44 *
│ │ │ │ -
45 * Central classes:
│ │ │ │ -
46 * 1) template< GeometryType::Id geometryId, class F >
│ │ │ │ -
47 * class MonomialBasisImpl;
│ │ │ │ -
48 * Implementation of the monomial evaluation for
│ │ │ │ -
49 * a given topology and field type.
│ │ │ │ -
50 * The method evaluate fills a F* vector
│ │ │ │ -
51 * 2) template< GeometryType::Id geometryId, class F >
│ │ │ │ -
52 * class MonomialBasis
│ │ │ │ -
53 * The base class for the static monomial evaluation
│ │ │ │ -
54 * providing addiional evaluate methods including
│ │ │ │ -
55 * one taking std::vector<F>.
│ │ │ │ -
56 * 3) template< int dim, class F >
│ │ │ │ -
57 * class VirtualMonomialBasis
│ │ │ │ -
58 * Virtualization of the MonomialBasis.
│ │ │ │ -
59 * 4) template< int dim, class F >
│ │ │ │ -
60 * struct MonomialBasisFactory;
│ │ │ │ -
61 * A factory class for the VirtualMonomialBasis
│ │ │ │ -
62 * 5) template< int dim, class F >
│ │ │ │ -
63 * struct MonomialBasisProvider
│ │ │ │ -
64 * A singleton container for the virtual monomial
│ │ │ │ -
65 * basis
│ │ │ │ -
66 ************************************************/
│ │ │ │ -
67
│ │ │ │ -
68 // Internal Forward Declarations
│ │ │ │ -
69 // -----------------------------
│ │ │ │ + │ │ │ │ +
10
│ │ │ │ +
11namespace Dune
│ │ │ │ +
12{
│ │ │ │ +
16 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
19 public:
│ │ │ │ +
20
│ │ │ │ +
21 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
22 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
23 {
│ │ │ │ +
24 typename LB::Traits::DomainType x;
│ │ │ │ +
25 typename LB::Traits::RangeType y;
│ │ │ │ +
26
│ │ │ │ +
27 auto&& f = Impl::makeFunctionWithCallOperator<decltype(x)>(ff);
│ │ │ │ +
28
│ │ │ │ +
29 static_assert(LB::Traits::dimDomain <= 3,
│ │ │ │ +
30 "LocalInterpolation for HierarchicalSimplexP2 finite elements"
│ │ │ │ +
31 " is only implemented for dimDomain <=3!");
│ │ │ │ +
32
│ │ │ │ +
33 switch ( int(LB::Traits::dimDomain)) {
│ │ │ │ +
34
│ │ │ │ +
35 case 1 :
│ │ │ │ +
36
│ │ │ │ +
37 out.resize(3);
│ │ │ │ +
38
│ │ │ │ +
39 // First: the two vertex dofs
│ │ │ │ +
40 x[0] = 0.0; out[0] = f(x);
│ │ │ │ +
41 x[0] = 1.0; out[2] = f(x);
│ │ │ │ +
42
│ │ │ │ +
43 // Then: the edge dof
│ │ │ │ +
44 x[0] = 0.5; y = f(x);
│ │ │ │ +
45 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ +
46
│ │ │ │ +
47 break;
│ │ │ │ +
48
│ │ │ │ +
49
│ │ │ │ +
50 case 2 :
│ │ │ │ +
51
│ │ │ │ +
52 out.resize(6);
│ │ │ │ +
53
│ │ │ │ +
54 // First: the three vertex dofs
│ │ │ │ +
55 x[0] = 0.0; x[1] = 0.0; out[0] = f(x);
│ │ │ │ +
56 x[0] = 1.0; x[1] = 0.0; out[2] = f(x);
│ │ │ │ +
57 x[0] = 0.0; x[1] = 1.0; out[5] = f(x);
│ │ │ │ +
58
│ │ │ │ +
59 // Then: the three edge dofs
│ │ │ │ +
60 x[0] = 0.5; x[1] = 0.0; y = f(x);
│ │ │ │ +
61 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ +
62
│ │ │ │ +
63 x[0] = 0.0; x[1] = 0.5; y = f(x);
│ │ │ │ +
64 out[3] = y - 0.5*(out[0] + out[5]);
│ │ │ │ +
65
│ │ │ │ +
66 x[0] = 0.5; x[1] = 0.5; y = f(x);
│ │ │ │ +
67 out[4] = y - 0.5*(out[2] + out[5]);
│ │ │ │ +
68
│ │ │ │ +
69 break;
│ │ │ │
70
│ │ │ │ -
71 template< GeometryType::Id geometryId >
│ │ │ │ -
72 class MonomialBasisSize;
│ │ │ │ -
73
│ │ │ │ -
74 template< GeometryType::Id geometryId, class F >
│ │ │ │ -
75 class MonomialBasis;
│ │ │ │ -
76
│ │ │ │ -
77
│ │ │ │ -
78
│ │ │ │ -
79 // MonomialBasisSize
│ │ │ │ -
80 // -----------------
│ │ │ │ -
81
│ │ │ │ -
82 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
84 {
│ │ │ │ - │ │ │ │ -
86
│ │ │ │ -
87 public:
│ │ │ │ -
│ │ │ │ -
88 static This &instance ()
│ │ │ │ -
89 {
│ │ │ │ -
90 static This _instance;
│ │ │ │ -
91 return _instance;
│ │ │ │ -
92 }
│ │ │ │ -
│ │ │ │ +
71 case 3 :
│ │ │ │ +
72
│ │ │ │ +
73 out.resize(10);
│ │ │ │ +
74
│ │ │ │ +
75 // First: the four vertex dofs
│ │ │ │ +
76 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x);
│ │ │ │ +
77 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[2] = f(x);
│ │ │ │ +
78 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[5] = f(x);
│ │ │ │ +
79 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[9] = f(x);
│ │ │ │ +
80
│ │ │ │ +
81 // Then: the six edge dofs
│ │ │ │ +
82 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x);
│ │ │ │ +
83 out[1] = y - 0.5*(out[0] + out[2]);
│ │ │ │ +
84
│ │ │ │ +
85 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ +
86 out[3] = y - 0.5*(out[0] + out[5]);
│ │ │ │ +
87
│ │ │ │ +
88 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x);
│ │ │ │ +
89 out[4] = y - 0.5*(out[2] + out[5]);
│ │ │ │ +
90
│ │ │ │ +
91 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
92 out[6] = y - 0.5*(out[0] + out[9]);
│ │ │ │
93
│ │ │ │ -
94 unsigned int maxOrder_;
│ │ │ │ -
95
│ │ │ │ -
96 // sizes_[ k ]: number of basis functions of exactly order k
│ │ │ │ -
97 mutable unsigned int *sizes_;
│ │ │ │ -
98
│ │ │ │ -
99 // numBaseFunctions_[ k ] = sizes_[ 0 ] + ... + sizes_[ k ]
│ │ │ │ -
100 mutable unsigned int *numBaseFunctions_;
│ │ │ │ +
94 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x);
│ │ │ │ +
95 out[7] = y - 0.5*(out[2] + out[9]);
│ │ │ │ +
96
│ │ │ │ +
97 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x);
│ │ │ │ +
98 out[8] = y - 0.5*(out[5] + out[9]);
│ │ │ │ +
99
│ │ │ │ +
100 break;
│ │ │ │
101
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
103 : maxOrder_( 0 ),
│ │ │ │ -
104 sizes_( 0 ),
│ │ │ │ - │ │ │ │ -
106 {
│ │ │ │ -
107 computeSizes( 2 );
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
111 {
│ │ │ │ -
112 delete[] sizes_;
│ │ │ │ -
113 delete[] numBaseFunctions_;
│ │ │ │ -
114 }
│ │ │ │ -
│ │ │ │ -
115
│ │ │ │ -
│ │ │ │ -
116 unsigned int operator() ( const unsigned int order ) const
│ │ │ │ -
117 {
│ │ │ │ -
118 return numBaseFunctions_[ order ];
│ │ │ │ -
119 }
│ │ │ │ -
│ │ │ │ -
120
│ │ │ │ -
│ │ │ │ -
121 unsigned int maxOrder() const
│ │ │ │ -
122 {
│ │ │ │ -
123 return maxOrder_;
│ │ │ │ -
124 }
│ │ │ │ -
│ │ │ │ -
125
│ │ │ │ -
│ │ │ │ -
126 void computeSizes ( unsigned int order )
│ │ │ │ -
127 {
│ │ │ │ -
128 if (order <= maxOrder_)
│ │ │ │ -
129 return;
│ │ │ │ -
130
│ │ │ │ -
131 maxOrder_ = order;
│ │ │ │ -
132
│ │ │ │ -
133 delete[] sizes_;
│ │ │ │ -
134 delete[] numBaseFunctions_;
│ │ │ │ -
135 sizes_ = new unsigned int[ order+1 ];
│ │ │ │ -
136 numBaseFunctions_ = new unsigned int[ order+1 ];
│ │ │ │ -
137
│ │ │ │ -
138 constexpr GeometryType geometry = geometryId;
│ │ │ │ -
139 constexpr auto dim = geometry.dim();
│ │ │ │ -
140
│ │ │ │ -
141 sizes_[ 0 ] = 1;
│ │ │ │ -
142 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
143 sizes_[ k ] = 0;
│ │ │ │ -
144
│ │ │ │ -
145 std::fill(numBaseFunctions_, numBaseFunctions_+order+1, 1);
│ │ │ │ -
146
│ │ │ │ -
147 for( int codim=dim-1; codim>=0; codim--)
│ │ │ │ -
148 {
│ │ │ │ -
149 if (Impl::isPrism(geometry.id(),dim,codim))
│ │ │ │ -
150 {
│ │ │ │ -
151 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
152 {
│ │ │ │ -
153 sizes_[ k ] = numBaseFunctions_[ k ] + k*sizes_[ k ];
│ │ │ │ -
154 numBaseFunctions_[ k ] = numBaseFunctions_[ k-1 ] + sizes_[ k ];
│ │ │ │ -
155 }
│ │ │ │ -
156 }
│ │ │ │ -
157 else
│ │ │ │ -
158 {
│ │ │ │ -
159 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
160 {
│ │ │ │ -
161 sizes_[ k ] = numBaseFunctions_[ k ];
│ │ │ │ -
162 numBaseFunctions_[ k ] = numBaseFunctions_[ k-1 ] + sizes_[ k ];
│ │ │ │ -
163 }
│ │ │ │ -
164 }
│ │ │ │ -
165 }
│ │ │ │ -
166 }
│ │ │ │ -
│ │ │ │ -
167 };
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
169
│ │ │ │ -
170
│ │ │ │ -
171 // MonomialBasisHelper
│ │ │ │ -
172 // -------------------
│ │ │ │ -
173
│ │ │ │ -
174
│ │ │ │ -
175 template< int mydim, int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
177 {
│ │ │ │ -
178 typedef MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize;
│ │ │ │ -
179 typedef MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size;
│ │ │ │ -
180
│ │ │ │ -
│ │ │ │ -
181 static void copy ( const unsigned int deriv, F *&wit, F *&rit,
│ │ │ │ -
182 const unsigned int numBaseFunctions, const F &z )
│ │ │ │ -
183 {
│ │ │ │ -
184 // n(d,k) = size<k>[d];
│ │ │ │ -
185 MySize &mySize = MySize::instance();
│ │ │ │ -
186 Size &size = Size::instance();
│ │ │ │ -
187
│ │ │ │ -
188 const F *const rend = rit + size( deriv )*numBaseFunctions;
│ │ │ │ -
189 for( ; rit != rend; )
│ │ │ │ -
190 {
│ │ │ │ -
191 F *prit = rit;
│ │ │ │ -
192
│ │ │ │ -
193 *wit = z * *rit;
│ │ │ │ -
194 ++rit, ++wit;
│ │ │ │ -
195
│ │ │ │ -
196 for( unsigned d = 1; d <= deriv; ++d )
│ │ │ │ -
197 {
│ │ │ │ -
198 #ifndef NDEBUG
│ │ │ │ -
199 const F *const derivEnd = rit + mySize.sizes_[ d ];
│ │ │ │ -
200 #endif
│ │ │ │ -
201
│ │ │ │ -
202 {
│ │ │ │ -
203 const F *const drend = rit + mySize.sizes_[ d ] - mySize.sizes_[ d-1 ];
│ │ │ │ -
204 for( ; rit != drend ; ++rit, ++wit )
│ │ │ │ -
205 *wit = z * *rit;
│ │ │ │ -
206 }
│ │ │ │ -
207
│ │ │ │ -
208 for (unsigned int j=1; j<d; ++j)
│ │ │ │ -
209 {
│ │ │ │ -
210 const F *const drend = rit + mySize.sizes_[ d-j ] - mySize.sizes_[ d-j-1 ];
│ │ │ │ -
211 for( ; rit != drend ; ++prit, ++rit, ++wit )
│ │ │ │ -
212 *wit = F(j) * *prit + z * *rit;
│ │ │ │ -
213 }
│ │ │ │ -
214 *wit = F(d) * *prit + z * *rit;
│ │ │ │ -
215 ++prit, ++rit, ++wit;
│ │ │ │ -
216 assert(derivEnd == rit);
│ │ │ │ -
217 rit += size.sizes_[d] - mySize.sizes_[d];
│ │ │ │ -
218 prit += size.sizes_[d-1] - mySize.sizes_[d-1];
│ │ │ │ -
219 const F *const emptyWitEnd = wit + size.sizes_[d] - mySize.sizes_[d];
│ │ │ │ -
220 for ( ; wit != emptyWitEnd; ++wit )
│ │ │ │ -
221 *wit = Zero<F>();
│ │ │ │ -
222 }
│ │ │ │ -
223 }
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225 };
│ │ │ │ -
│ │ │ │ -
226
│ │ │ │ -
227
│ │ │ │ -
228
│ │ │ │ -
229 // MonomialBasisImpl
│ │ │ │ -
230 // -----------------
│ │ │ │ -
231
│ │ │ │ -
232 template< GeometryType::Id geometryId, class F>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
234 {
│ │ │ │ -
235 public:
│ │ │ │ -
236 typedef F Field;
│ │ │ │ -
237
│ │ │ │ -
238 static constexpr GeometryType geometry = geometryId;
│ │ │ │ -
239
│ │ │ │ -
240 static const unsigned int dimDomain = geometry.dim();
│ │ │ │ -
241
│ │ │ │ -
242 typedef FieldVector< Field, dimDomain > DomainVector;
│ │ │ │ -
243
│ │ │ │ -
244 private:
│ │ │ │ -
245 friend class MonomialBasis< geometryId, Field >;
│ │ │ │ -
246
│ │ │ │ - │ │ │ │ -
248 {}
│ │ │ │ -
249
│ │ │ │ -
250 template< int dimD >
│ │ │ │ -
251 void evaluate ( const unsigned int deriv, const unsigned int order,
│ │ │ │ -
252 const FieldVector< Field, dimD > &x,
│ │ │ │ -
253 const unsigned int block, const unsigned int *const offsets,
│ │ │ │ -
254 Field *const values ) const
│ │ │ │ -
255 {
│ │ │ │ -
256 //start with vertex
│ │ │ │ -
257 *values = Unity< F >();
│ │ │ │ -
258 F *const end = values + block;
│ │ │ │ -
259 for( Field *it = values+1 ; it != end; ++it )
│ │ │ │ -
260 *it = Zero< F >();
│ │ │ │ -
261
│ │ │ │ -
262 constexpr GeometryType gt = GeometryTypes::vertex;
│ │ │ │ -
263
│ │ │ │ -
264 if constexpr ( geometry == gt)
│ │ │ │ -
265 return;
│ │ │ │ -
266 else
│ │ │ │ -
267 evaluate<gt,dimD>(deriv, order, x, block, offsets, values );
│ │ │ │ -
268 }
│ │ │ │ -
269
│ │ │ │ -
270 template<GeometryType::Id baseGeometryId, int dimD >
│ │ │ │ -
271 void evaluate ( const unsigned int deriv, const unsigned int order,
│ │ │ │ -
272 const FieldVector< Field, dimD > &x,
│ │ │ │ -
273 const unsigned int block, const unsigned int *const offsets,
│ │ │ │ -
274 Field *const values ) const
│ │ │ │ -
275 {
│ │ │ │ -
276
│ │ │ │ -
277 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ -
278
│ │ │ │ -
279 auto constexpr isPrismatic = geometry.isPrismatic(baseGeometry.dim());
│ │ │ │ -
280
│ │ │ │ -
281 // compute
│ │ │ │ -
282 typedef MonomialBasisHelper< baseGeometry.dim() + 1, dimD, Field > Helper;
│ │ │ │ -
283 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ -
284
│ │ │ │ -
285 const BaseSize &size = BaseSize::instance();
│ │ │ │ -
286 const_cast<BaseSize&>(size).computeSizes(order);
│ │ │ │ -
287
│ │ │ │ -
288 const Field &z = x[ baseGeometry.dim() ];
│ │ │ │ -
289
│ │ │ │ -
290 Field *row0 = values;
│ │ │ │ -
291 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
292 {
│ │ │ │ -
293 Field *row1 = values + block*offsets[ k-1 ];
│ │ │ │ -
294 Field *wit = row1 + block*size.sizes_[ k ];
│ │ │ │ -
295 if constexpr ( isPrismatic )
│ │ │ │ -
296 Helper::copy( deriv, wit, row1, k*size.sizes_[ k ], z );
│ │ │ │ -
297 Helper::copy( deriv, wit, row0, size( k-1 ), z );
│ │ │ │ -
298 row0 = row1;
│ │ │ │ -
299 }
│ │ │ │ -
300
│ │ │ │ -
301 // stop if desired dimension is reached
│ │ │ │ -
302 if constexpr( baseGeometry.dim() == dimDomain-1)
│ │ │ │ -
303 return;
│ │ │ │ -
304 else
│ │ │ │ -
305 {
│ │ │ │ -
306 constexpr GeometryType nextGeometry = isPrismatic ? GeometryTypes::prismaticExtension(baseGeometry)
│ │ │ │ -
307 : GeometryTypes::conicalExtension(baseGeometry);
│ │ │ │ -
308
│ │ │ │ -
309 evaluate<nextGeometry.toId(),dimD>(deriv, order, x, block, offsets, values );
│ │ │ │ -
310 }
│ │ │ │ -
311 }
│ │ │ │ -
312
│ │ │ │ -
313 void integrate ( const unsigned int order,
│ │ │ │ -
314 const unsigned int *const offsets,
│ │ │ │ -
315 Field *const values ) const
│ │ │ │ -
316 {
│ │ │ │ -
317 //start with vertex
│ │ │ │ -
318 values[ 0 ] = Unity< Field >();
│ │ │ │ -
319 static constexpr GeometryType gt = GeometryTypes::vertex;
│ │ │ │ -
320
│ │ │ │ -
321 if constexpr ( geometry == gt)
│ │ │ │ -
322 return;
│ │ │ │ -
323 else
│ │ │ │ -
324 integrate<gt>(order, offsets, values);
│ │ │ │ -
325 }
│ │ │ │ -
326
│ │ │ │ -
327 template<GeometryType::Id baseGeometryId>
│ │ │ │ -
328 void integrate ( const unsigned int order,
│ │ │ │ -
329 const unsigned int *const offsets,
│ │ │ │ -
330 Field *const values) const
│ │ │ │ -
331 {
│ │ │ │ -
332 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ -
333
│ │ │ │ -
334 auto constexpr isPrismatic = geometry.isPrismatic(baseGeometry.dim());
│ │ │ │ -
335
│ │ │ │ -
336 // decide which kind of integration should be performed
│ │ │ │ -
337 if constexpr ( isPrismatic )
│ │ │ │ -
338 integratePrismatic<baseGeometry>(order, offsets, values);
│ │ │ │ -
339 else
│ │ │ │ -
340 integrateConical<baseGeometry>(order, offsets, values);
│ │ │ │ -
341
│ │ │ │ -
342 // stop if the desired dimension is reached
│ │ │ │ -
343 if constexpr( baseGeometry.dim() == dimDomain-1)
│ │ │ │ -
344 return;
│ │ │ │ -
345 else
│ │ │ │ -
346 {
│ │ │ │ -
347 static constexpr GeometryType nextGeometry = (isPrismatic ? GeometryTypes::prismaticExtension(baseGeometry)
│ │ │ │ -
348 : GeometryTypes::conicalExtension(baseGeometry));
│ │ │ │ -
349
│ │ │ │ -
350 integrate<nextGeometry.toId()>(order, offsets, values);
│ │ │ │ -
351 }
│ │ │ │ -
352
│ │ │ │ -
353 }
│ │ │ │ -
354
│ │ │ │ -
355 template<GeometryType::Id baseGeometryId>
│ │ │ │ -
356 void integratePrismatic ( const unsigned int order,
│ │ │ │ -
357 const unsigned int *const offsets,
│ │ │ │ -
358 Field *const values ) const
│ │ │ │ -
359 {
│ │ │ │ -
360 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ -
361 static const BaseSize &size = BaseSize::instance();
│ │ │ │ -
362 const unsigned int *const baseSizes = size.sizes_;
│ │ │ │ -
363
│ │ │ │ -
364 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ -
365 static constexpr GeometryType nextGeometry = GeometryTypes::prismaticExtension(baseGeometry);
│ │ │ │ -
366
│ │ │ │ -
367 typedef MonomialBasisSize<nextGeometry.toId()> Size;
│ │ │ │ -
368 static const Size &mySize = Size::instance();
│ │ │ │ -
369
│ │ │ │ -
370 Field *row0 = values;
│ │ │ │ -
371 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
372 {
│ │ │ │ -
373 Field *const row1begin = values + offsets[ k-1 ];
│ │ │ │ -
374 Field *const row1End = row1begin + mySize.sizes_[ k ];
│ │ │ │ -
375 assert( (unsigned int)(row1End - values) <= offsets[ k ] );
│ │ │ │ -
376
│ │ │ │ -
377 Field *row1 = row1begin;
│ │ │ │ -
378 Field *it = row1begin + baseSizes[ k ];
│ │ │ │ -
379 for( unsigned int j = 1; j <= k; ++j )
│ │ │ │ -
380 {
│ │ │ │ -
381 Field *const end = it + baseSizes[ k ];
│ │ │ │ -
382 assert( (unsigned int)(end - values) <= offsets[ k ] );
│ │ │ │ -
383 for( ; it != end; ++row1, ++it )
│ │ │ │ -
384 *it = (Field( j ) / Field( j+1 )) * (*row1);
│ │ │ │ -
385 }
│ │ │ │ -
386 for( ; it != row1End; ++row0, ++it )
│ │ │ │ -
387 *it = (Field( k ) / Field( k+1 )) * (*row0);
│ │ │ │ -
388 row0 = row1;
│ │ │ │ -
389 }
│ │ │ │ -
390 }
│ │ │ │ -
391
│ │ │ │ -
392
│ │ │ │ -
393 template<GeometryType::Id baseGeometryId>
│ │ │ │ -
394 void integrateConical ( const unsigned int order,
│ │ │ │ -
395 const unsigned int *const offsets,
│ │ │ │ -
396 Field *const values) const
│ │ │ │ -
397 {
│ │ │ │ -
398 typedef MonomialBasisSize<baseGeometryId> BaseSize;
│ │ │ │ -
399 static const BaseSize &size = BaseSize::instance();
│ │ │ │ -
400 const unsigned int *const baseSizes = size.sizes_;
│ │ │ │ -
401
│ │ │ │ -
402 static constexpr GeometryType baseGeometry = baseGeometryId;
│ │ │ │ -
403
│ │ │ │ -
404 {
│ │ │ │ -
405 Field *const col0End = values + baseSizes[ 0 ];
│ │ │ │ -
406 for( Field *it = values; it != col0End; ++it )
│ │ │ │ -
407 *it *= Field( 1 ) / Field( int(baseGeometry.dim()+1) );
│ │ │ │ -
408 }
│ │ │ │ -
409
│ │ │ │ -
410 Field *row0 = values;
│ │ │ │ -
411 for( unsigned int k = 1; k <= order; ++k )
│ │ │ │ -
412 {
│ │ │ │ -
413 const Field factor = (Field( 1 ) / Field( k + baseGeometry.dim()+1));
│ │ │ │ -
414
│ │ │ │ -
415 Field *const row1 = values+offsets[ k-1 ];
│ │ │ │ -
416 Field *const col0End = row1 + baseSizes[ k ];
│ │ │ │ -
417 Field *it = row1;
│ │ │ │ -
418 for( ; it != col0End; ++it )
│ │ │ │ -
419 *it *= factor;
│ │ │ │ -
420 for( unsigned int i = 1; i <= k; ++i )
│ │ │ │ -
421 {
│ │ │ │ -
422 Field *const end = it + baseSizes[ k-i ];
│ │ │ │ -
423 assert( (unsigned int)(end - values) <= offsets[ k ] );
│ │ │ │ -
424 for( ; it != end; ++row0, ++it )
│ │ │ │ -
425 *it = (*row0) * (Field( i ) * factor);
│ │ │ │ -
426 }
│ │ │ │ -
427 row0 = row1;
│ │ │ │ -
428 }
│ │ │ │ -
429 }
│ │ │ │ -
430
│ │ │ │ -
431 };
│ │ │ │ -
│ │ │ │ -
432
│ │ │ │ -
433
│ │ │ │ -
434 // MonomialBasis
│ │ │ │ -
435 // -------------
│ │ │ │ -
436
│ │ │ │ -
437 template< GeometryType::Id geometryId, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
439 : public MonomialBasisImpl< geometryId, F >
│ │ │ │ -
440 {
│ │ │ │ -
441 static constexpr GeometryType geometry = geometryId;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
444
│ │ │ │ -
445 public:
│ │ │ │ -
446 static const unsigned int dimension = Base::dimDomain;
│ │ │ │ -
447 static const unsigned int dimRange = 1;
│ │ │ │ -
448
│ │ │ │ -
449 typedef typename Base::Field Field;
│ │ │ │ -
450
│ │ │ │ - │ │ │ │ -
452
│ │ │ │ -
453 typedef Dune::FieldVector<Field,dimRange> RangeVector;
│ │ │ │ -
454
│ │ │ │ - │ │ │ │ -
456
│ │ │ │ -
│ │ │ │ -
457 MonomialBasis (unsigned int order)
│ │ │ │ -
458 : Base(),
│ │ │ │ -
459 order_(order),
│ │ │ │ -
460 size_(Size::instance())
│ │ │ │ -
461 {
│ │ │ │ -
462 assert(order<=1024); // avoid wrapping of unsigned int (0-1) order=1024 is quite hight...)
│ │ │ │ -
463 }
│ │ │ │ -
│ │ │ │ -
464
│ │ │ │ -
│ │ │ │ -
465 const unsigned int *sizes ( unsigned int order ) const
│ │ │ │ -
466 {
│ │ │ │ -
467 size_.computeSizes( order );
│ │ │ │ -
468 return size_.numBaseFunctions_;
│ │ │ │ -
469 }
│ │ │ │ -
│ │ │ │ -
470
│ │ │ │ -
│ │ │ │ -
471 const unsigned int *sizes () const
│ │ │ │ -
472 {
│ │ │ │ -
473 return sizes( order_ );
│ │ │ │ -
474 }
│ │ │ │ -
│ │ │ │ -
475
│ │ │ │ -
│ │ │ │ -
476 unsigned int size () const
│ │ │ │ -
477 {
│ │ │ │ -
478 size_.computeSizes( order_ );
│ │ │ │ -
479 return size_( order_ );
│ │ │ │ -
480 }
│ │ │ │ -
│ │ │ │ -
481
│ │ │ │ -
│ │ │ │ -
482 unsigned int derivSize ( const unsigned int deriv ) const
│ │ │ │ -
483 {
│ │ │ │ -
484 MonomialBasisSize< GeometryTypes::simplex(dimension).toId() >::instance().computeSizes( deriv );
│ │ │ │ -
485 return MonomialBasisSize< GeometryTypes::simplex(dimension).toId() >::instance() ( deriv );
│ │ │ │ -
486 }
│ │ │ │ -
│ │ │ │ -
487
│ │ │ │ -
│ │ │ │ -
488 unsigned int order () const
│ │ │ │ -
489 {
│ │ │ │ -
490 return order_ ;
│ │ │ │ -
491 }
│ │ │ │ -
│ │ │ │ -
492
│ │ │ │ -
│ │ │ │ -
493 unsigned int topologyId ( ) const
│ │ │ │ -
494 {
│ │ │ │ -
495 return geometry.id();
│ │ │ │ -
496 }
│ │ │ │ -
│ │ │ │ -
497
│ │ │ │ -
│ │ │ │ -
498 void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ -
499 Field *const values ) const
│ │ │ │ -
500 {
│ │ │ │ -
501 Base::evaluate( deriv, order_, x, derivSize( deriv ), sizes( order_ ), values );
│ │ │ │ -
502 }
│ │ │ │ -
│ │ │ │ -
503
│ │ │ │ -
504 template <unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
505 void evaluate ( const DomainVector &x,
│ │ │ │ -
506 Field *const values ) const
│ │ │ │ -
507 {
│ │ │ │ -
508 evaluate( deriv, x, values );
│ │ │ │ -
509 }
│ │ │ │ -
│ │ │ │ -
510
│ │ │ │ -
511 template<unsigned int deriv, class Vector >
│ │ │ │ -
│ │ │ │ -
512 void evaluate ( const DomainVector &x,
│ │ │ │ -
513 Vector &values ) const
│ │ │ │ -
514 {
│ │ │ │ -
515 evaluate<deriv>(x,&(values[0]));
│ │ │ │ -
516 }
│ │ │ │ -
│ │ │ │ -
517 template<unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout >
│ │ │ │ -
│ │ │ │ -
518 void evaluate ( const DomainVector &x,
│ │ │ │ - │ │ │ │ -
520 {
│ │ │ │ -
521 evaluate<deriv>(x,&(values->block()));
│ │ │ │ -
522 }
│ │ │ │ -
│ │ │ │ -
523 template< unsigned int deriv >
│ │ │ │ -
│ │ │ │ -
524 void evaluate ( const DomainVector &x,
│ │ │ │ - │ │ │ │ -
526 {
│ │ │ │ -
527 evaluate(0,x,&(values[0][0]));
│ │ │ │ -
528 }
│ │ │ │ -
│ │ │ │ -
529
│ │ │ │ -
530 template<class Vector >
│ │ │ │ -
│ │ │ │ -
531 void evaluate ( const DomainVector &x,
│ │ │ │ -
532 Vector &values ) const
│ │ │ │ -
533 {
│ │ │ │ -
534 evaluate<0>(x,&(values[0]));
│ │ │ │ -
535 }
│ │ │ │ -
│ │ │ │ -
536
│ │ │ │ -
537 template< class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
538 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ -
539 {
│ │ │ │ -
540 assert( DVector::dimension == dimension);
│ │ │ │ -
541 DomainVector bx;
│ │ │ │ -
542 for( int d = 0; d < dimension; ++d )
│ │ │ │ -
543 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
544 evaluate<0>( bx, values );
│ │ │ │ -
545 }
│ │ │ │ -
│ │ │ │ -
546
│ │ │ │ -
│ │ │ │ -
547 void integrate ( Field *const values ) const
│ │ │ │ -
548 {
│ │ │ │ -
549 Base::integrate( order_, sizes( order_ ), values );
│ │ │ │ -
550 }
│ │ │ │ -
│ │ │ │ -
551 template <class Vector>
│ │ │ │ -
│ │ │ │ -
552 void integrate ( Vector &values ) const
│ │ │ │ -
553 {
│ │ │ │ -
554 integrate( &(values[ 0 ]) );
│ │ │ │ -
555 }
│ │ │ │ -
│ │ │ │ -
556 private:
│ │ │ │ -
557 MonomialBasis(const This&);
│ │ │ │ -
558 This& operator=(const This&);
│ │ │ │ -
559 unsigned int order_;
│ │ │ │ -
560 Size &size_;
│ │ │ │ -
561 };
│ │ │ │ -
│ │ │ │ -
562
│ │ │ │ -
563
│ │ │ │ -
564
│ │ │ │ -
565 // StdMonomialBasis
│ │ │ │ -
566 // ----------------
│ │ │ │ -
567
│ │ │ │ -
568 template< int dim,class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
570 : public MonomialBasis< GeometryTypes::simplex(dim).toId() , F >
│ │ │ │ -
571 {
│ │ │ │ - │ │ │ │ -
573 typedef MonomialBasis< GeometryTypes::simplex(dim).toId(), F > Base;
│ │ │ │ -
574
│ │ │ │ -
575 public:
│ │ │ │ -
576 static constexpr GeometryType geometry = GeometryTypes::simplex(dim);
│ │ │ │ -
577 static const int dimension = dim;
│ │ │ │ -
578
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
580 : Base( order )
│ │ │ │ -
581 {}
│ │ │ │ -
│ │ │ │ -
582 };
│ │ │ │ -
│ │ │ │ -
583
│ │ │ │ -
584
│ │ │ │ -
585
│ │ │ │ -
586 // StandardBiMonomialBasis
│ │ │ │ -
587 // -----------------------
│ │ │ │ -
588
│ │ │ │ -
589 template< int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
591 : public MonomialBasis< GeometryTypes::cube(dim).toId() , F >
│ │ │ │ -
592 {
│ │ │ │ - │ │ │ │ -
594 typedef MonomialBasis< GeometryTypes::cube(dim).toId() , F > Base;
│ │ │ │ -
595
│ │ │ │ -
596 public:
│ │ │ │ -
597 static constexpr GeometryType geometry = GeometryTypes::cube(dim);
│ │ │ │ -
598 static const int dimension = dim;
│ │ │ │ -
599
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
601 : Base( order )
│ │ │ │ -
602 {}
│ │ │ │ -
│ │ │ │ -
603 };
│ │ │ │ -
│ │ │ │ -
604
│ │ │ │ -
605 // -----------------------------------------------------------
│ │ │ │ -
606 // -----------------------------------------------------------
│ │ │ │ -
607 // VirtualMonomialBasis
│ │ │ │ -
608 // -------------------
│ │ │ │ -
609
│ │ │ │ -
610 template< int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
612 {
│ │ │ │ - │ │ │ │ -
614
│ │ │ │ -
615 public:
│ │ │ │ -
616 typedef F Field;
│ │ │ │ -
617 typedef F StorageField;
│ │ │ │ -
618 static const int dimension = dim;
│ │ │ │ -
619 static const unsigned int dimRange = 1;
│ │ │ │ -
620
│ │ │ │ -
621 typedef FieldVector<Field,dimension> DomainVector;
│ │ │ │ -
622 typedef FieldVector<Field,dimRange> RangeVector;
│ │ │ │ -
623
│ │ │ │ -
│ │ │ │ -
624 explicit VirtualMonomialBasis(const GeometryType& gt,
│ │ │ │ -
625 unsigned int order)
│ │ │ │ -
626 : order_(order), geometry_(gt) {}
│ │ │ │ -
│ │ │ │ -
627
│ │ │ │ - │ │ │ │ -
629
│ │ │ │ -
630 virtual const unsigned int *sizes ( ) const = 0;
│ │ │ │ -
631
│ │ │ │ -
│ │ │ │ -
632 unsigned int size ( ) const
│ │ │ │ -
633 {
│ │ │ │ -
634 return sizes( )[ order_ ];
│ │ │ │ -
635 }
│ │ │ │ -
│ │ │ │ -
636
│ │ │ │ -
│ │ │ │ -
637 unsigned int order () const
│ │ │ │ -
638 {
│ │ │ │ -
639 return order_;
│ │ │ │ -
640 }
│ │ │ │ -
│ │ │ │ -
641
│ │ │ │ -
│ │ │ │ -
642 GeometryType type() const
│ │ │ │ -
643 {
│ │ │ │ -
644 return geometry_;
│ │ │ │ -
645 }
│ │ │ │ -
│ │ │ │ -
646
│ │ │ │ -
647 virtual void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ -
648 Field *const values ) const = 0;
│ │ │ │ -
649 template < unsigned int deriv >
│ │ │ │ -
│ │ │ │ -
650 void evaluate ( const DomainVector &x,
│ │ │ │ -
651 Field *const values ) const
│ │ │ │ -
652 {
│ │ │ │ -
653 evaluate( deriv, x, values );
│ │ │ │ -
654 }
│ │ │ │ -
│ │ │ │ -
655 template < unsigned int deriv, int size >
│ │ │ │ -
│ │ │ │ -
656 void evaluate ( const DomainVector &x,
│ │ │ │ -
657 Dune::FieldVector<Field,size> *const values ) const
│ │ │ │ -
658 {
│ │ │ │ -
659 evaluate( deriv, x, &(values[0][0]) );
│ │ │ │ -
660 }
│ │ │ │ -
│ │ │ │ -
661 template<unsigned int deriv, DerivativeLayoutNS::DerivativeLayout layout >
│ │ │ │ -
│ │ │ │ -
662 void evaluate ( const DomainVector &x,
│ │ │ │ - │ │ │ │ -
664 {
│ │ │ │ -
665 evaluate<deriv>(x,&(values->block()));
│ │ │ │ -
666 }
│ │ │ │ -
│ │ │ │ -
667 template <unsigned int deriv, class Vector>
│ │ │ │ -
│ │ │ │ -
668 void evaluate ( const DomainVector &x,
│ │ │ │ -
669 Vector &values ) const
│ │ │ │ -
670 {
│ │ │ │ -
671 evaluate<deriv>( x, &(values[ 0 ]) );
│ │ │ │ -
672 }
│ │ │ │ -
│ │ │ │ -
673 template< class Vector >
│ │ │ │ -
│ │ │ │ -
674 void evaluate ( const DomainVector &x,
│ │ │ │ -
675 Vector &values ) const
│ │ │ │ -
676 {
│ │ │ │ -
677 evaluate<0>(x,values);
│ │ │ │ -
678 }
│ │ │ │ -
│ │ │ │ -
679 template< class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
680 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ -
681 {
│ │ │ │ -
682 assert( DVector::dimension == dimension);
│ │ │ │ -
683 DomainVector bx;
│ │ │ │ -
684 for( int d = 0; d < dimension; ++d )
│ │ │ │ -
685 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
686 evaluate<0>( bx, values );
│ │ │ │ -
687 }
│ │ │ │ -
│ │ │ │ -
688 template< unsigned int deriv, class DVector, class RVector >
│ │ │ │ -
│ │ │ │ -
689 void evaluate ( const DVector &x, RVector &values ) const
│ │ │ │ -
690 {
│ │ │ │ -
691 assert( DVector::dimension == dimension);
│ │ │ │ -
692 DomainVector bx;
│ │ │ │ -
693 for( int d = 0; d < dimension; ++d )
│ │ │ │ -
694 field_cast( x[ d ], bx[ d ] );
│ │ │ │ -
695 evaluate<deriv>( bx, values );
│ │ │ │ -
696 }
│ │ │ │ -
│ │ │ │ -
697
│ │ │ │ -
698 virtual void integrate ( Field *const values ) const = 0;
│ │ │ │ -
699 template <class Vector>
│ │ │ │ -
│ │ │ │ -
700 void integrate ( Vector &values ) const
│ │ │ │ -
701 {
│ │ │ │ -
702 integrate( &(values[ 0 ]) );
│ │ │ │ -
703 }
│ │ │ │ -
│ │ │ │ -
704 protected:
│ │ │ │ -
705 unsigned int order_;
│ │ │ │ -
706 GeometryType geometry_;
│ │ │ │ -
707 };
│ │ │ │ -
│ │ │ │ -
708
│ │ │ │ -
709 template< GeometryType::Id geometryId, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
711 : public VirtualMonomialBasis< static_cast<GeometryType>(geometryId).dim(), F >
│ │ │ │ -
712 {
│ │ │ │ -
713 static constexpr GeometryType geometry = geometryId;
│ │ │ │ -
714 typedef VirtualMonomialBasis< geometry.dim(), F > Base;
│ │ │ │ - │ │ │ │ -
716
│ │ │ │ -
717 public:
│ │ │ │ -
718 typedef typename Base::Field Field;
│ │ │ │ - │ │ │ │ -
720
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
722 : Base(geometry,order), basis_(order)
│ │ │ │ -
723 {}
│ │ │ │ -
│ │ │ │ -
724
│ │ │ │ -
│ │ │ │ -
725 const unsigned int *sizes ( ) const
│ │ │ │ -
726 {
│ │ │ │ -
727 return basis_.sizes(order_);
│ │ │ │ -
728 }
│ │ │ │ -
│ │ │ │ -
729
│ │ │ │ -
│ │ │ │ -
730 void evaluate ( const unsigned int deriv, const DomainVector &x,
│ │ │ │ -
731 Field *const values ) const
│ │ │ │ -
732 {
│ │ │ │ -
733 basis_.evaluate(deriv,x,values);
│ │ │ │ -
734 }
│ │ │ │ -
│ │ │ │ -
735
│ │ │ │ -
│ │ │ │ -
736 void integrate ( Field *const values ) const
│ │ │ │ -
737 {
│ │ │ │ -
738 basis_.integrate(values);
│ │ │ │ -
739 }
│ │ │ │ -
│ │ │ │ -
740
│ │ │ │ -
741 private:
│ │ │ │ - │ │ │ │ -
743 using Base::order_;
│ │ │ │ -
744 };
│ │ │ │ -
│ │ │ │ -
745
│ │ │ │ -
746 // MonomialBasisFactory
│ │ │ │ -
747 // --------------------
│ │ │ │ -
748
│ │ │ │ -
749 template< int dim, class F >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
751 {
│ │ │ │ -
752 static const unsigned int dimension = dim;
│ │ │ │ -
753 typedef F StorageField;
│ │ │ │ -
754
│ │ │ │ -
755 typedef unsigned int Key;
│ │ │ │ - │ │ │ │ -
757
│ │ │ │ -
758 template < int dd, class FF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
760 {
│ │ │ │ - │ │ │ │ -
762 };
│ │ │ │ -
│ │ │ │ -
763
│ │ │ │ -
764 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
765 static Object* create ( const Key &order )
│ │ │ │ -
766 {
│ │ │ │ - │ │ │ │ -
768 }
│ │ │ │ -
│ │ │ │ -
769 static void release( Object *object ) { delete object; }
│ │ │ │ -
770 };
│ │ │ │ -
│ │ │ │ -
771
│ │ │ │ -
772
│ │ │ │ -
773
│ │ │ │ -
774 // MonomialBasisProvider
│ │ │ │ -
775 // ---------------------
│ │ │ │ -
776
│ │ │ │ -
777 template< int dim, class SF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > >
│ │ │ │ -
780 {
│ │ │ │ -
781 static const unsigned int dimension = dim;
│ │ │ │ -
782 typedef SF StorageField;
│ │ │ │ -
783 template < int dd, class FF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
785 {
│ │ │ │ - │ │ │ │ -
787 };
│ │ │ │ +
102 }
│ │ │ │ +
103 }
│ │ │ │
│ │ │ │ -
788 };
│ │ │ │ +
104
│ │ │ │ +
105 };
│ │ │ │
│ │ │ │ -
789
│ │ │ │ -
790}
│ │ │ │ -
791
│ │ │ │ -
792#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
106}
│ │ │ │ +
107
│ │ │ │ +
108#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
Definition monomialbasis.hh:84
│ │ │ │ -
unsigned int * numBaseFunctions_
Definition monomialbasis.hh:100
│ │ │ │ -
void computeSizes(unsigned int order)
Definition monomialbasis.hh:126
│ │ │ │ -
unsigned int * sizes_
Definition monomialbasis.hh:97
│ │ │ │ -
MonomialBasisSize()
Definition monomialbasis.hh:102
│ │ │ │ -
~MonomialBasisSize()
Definition monomialbasis.hh:110
│ │ │ │ -
unsigned int operator()(const unsigned int order) const
Definition monomialbasis.hh:116
│ │ │ │ -
unsigned int maxOrder_
Definition monomialbasis.hh:94
│ │ │ │ -
unsigned int maxOrder() const
Definition monomialbasis.hh:121
│ │ │ │ -
static This & instance()
Definition monomialbasis.hh:88
│ │ │ │ -
Definition monomialbasis.hh:440
│ │ │ │ -
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ -
static const unsigned int dimension
Definition monomialbasis.hh:446
│ │ │ │ -
Dune::FieldVector< Field, dimRange > RangeVector
Definition monomialbasis.hh:453
│ │ │ │ -
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ -
const unsigned int * sizes() const
Definition monomialbasis.hh:471
│ │ │ │ -
unsigned int topologyId() const
Definition monomialbasis.hh:493
│ │ │ │ -
void integrate(Vector &values) const
Definition monomialbasis.hh:552
│ │ │ │ -
Base::Field Field
Definition monomialbasis.hh:449
│ │ │ │ -
void integrate(Field *const values) const
Definition monomialbasis.hh:547
│ │ │ │ -
static const unsigned int dimRange
Definition monomialbasis.hh:447
│ │ │ │ -
Base::DomainVector DomainVector
Definition monomialbasis.hh:451
│ │ │ │ -
void evaluate(const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:505
│ │ │ │ -
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:531
│ │ │ │ -
void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const
Definition monomialbasis.hh:524
│ │ │ │ -
void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, layout > *values) const
Definition monomialbasis.hh:518
│ │ │ │ -
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:538
│ │ │ │ -
MonomialBasisSize< geometryId > Size
Definition monomialbasis.hh:455
│ │ │ │ -
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:512
│ │ │ │ -
MonomialBasis(unsigned int order)
Definition monomialbasis.hh:457
│ │ │ │ -
unsigned int derivSize(const unsigned int deriv) const
Definition monomialbasis.hh:482
│ │ │ │ -
const unsigned int * sizes(unsigned int order) const
Definition monomialbasis.hh:465
│ │ │ │ -
unsigned int order() const
Definition monomialbasis.hh:488
│ │ │ │ -
Definition monomialbasis.hh:177
│ │ │ │ -
MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size
Definition monomialbasis.hh:179
│ │ │ │ -
static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int numBaseFunctions, const F &z)
Definition monomialbasis.hh:181
│ │ │ │ -
MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize
Definition monomialbasis.hh:178
│ │ │ │ -
Definition monomialbasis.hh:234
│ │ │ │ -
FieldVector< Field, dimDomain > DomainVector
Definition monomialbasis.hh:242
│ │ │ │ -
static constexpr GeometryType geometry
Definition monomialbasis.hh:238
│ │ │ │ -
F Field
Definition monomialbasis.hh:236
│ │ │ │ -
static const unsigned int dimDomain
Definition monomialbasis.hh:240
│ │ │ │ -
Definition monomialbasis.hh:571
│ │ │ │ -
static constexpr GeometryType geometry
Definition monomialbasis.hh:576
│ │ │ │ -
StandardMonomialBasis(unsigned int order)
Definition monomialbasis.hh:579
│ │ │ │ -
static const int dimension
Definition monomialbasis.hh:577
│ │ │ │ -
Definition monomialbasis.hh:592
│ │ │ │ -
static const int dimension
Definition monomialbasis.hh:598
│ │ │ │ -
static constexpr GeometryType geometry
Definition monomialbasis.hh:597
│ │ │ │ -
StandardBiMonomialBasis(unsigned int order)
Definition monomialbasis.hh:600
│ │ │ │ -
Definition monomialbasis.hh:612
│ │ │ │ -
GeometryType geometry_
Definition monomialbasis.hh:706
│ │ │ │ -
FieldVector< Field, dimension > DomainVector
Definition monomialbasis.hh:621
│ │ │ │ -
unsigned int order_
Definition monomialbasis.hh:705
│ │ │ │ -
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:674
│ │ │ │ -
void evaluate(const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:650
│ │ │ │ -
F Field
Definition monomialbasis.hh:616
│ │ │ │ -
void evaluate(const DomainVector &x, Vector &values) const
Definition monomialbasis.hh:668
│ │ │ │ -
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:680
│ │ │ │ -
unsigned int order() const
Definition monomialbasis.hh:637
│ │ │ │ -
static const unsigned int dimRange
Definition monomialbasis.hh:619
│ │ │ │ -
F StorageField
Definition monomialbasis.hh:617
│ │ │ │ -
static const int dimension
Definition monomialbasis.hh:618
│ │ │ │ -
unsigned int size() const
Definition monomialbasis.hh:632
│ │ │ │ -
FieldVector< Field, dimRange > RangeVector
Definition monomialbasis.hh:622
│ │ │ │ -
virtual ~VirtualMonomialBasis()
Definition monomialbasis.hh:628
│ │ │ │ -
virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const =0
│ │ │ │ -
virtual void integrate(Field *const values) const =0
│ │ │ │ -
void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const values) const
Definition monomialbasis.hh:656
│ │ │ │ -
void evaluate(const DVector &x, RVector &values) const
Definition monomialbasis.hh:689
│ │ │ │ -
GeometryType type() const
Definition monomialbasis.hh:642
│ │ │ │ -
void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, layout > *values) const
Definition monomialbasis.hh:662
│ │ │ │ -
VirtualMonomialBasis(const GeometryType &gt, unsigned int order)
Definition monomialbasis.hh:624
│ │ │ │ -
virtual const unsigned int * sizes() const =0
│ │ │ │ -
void integrate(Vector &values) const
Definition monomialbasis.hh:700
│ │ │ │ -
Definition monomialbasis.hh:712
│ │ │ │ -
void integrate(Field *const values) const
Definition monomialbasis.hh:736
│ │ │ │ -
const unsigned int * sizes() const
Definition monomialbasis.hh:725
│ │ │ │ -
Base::DomainVector DomainVector
Definition monomialbasis.hh:719
│ │ │ │ -
Base::Field Field
Definition monomialbasis.hh:718
│ │ │ │ -
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:730
│ │ │ │ -
VirtualMonomialBasisImpl(unsigned int order)
Definition monomialbasis.hh:721
│ │ │ │ -
Definition monomialbasis.hh:751
│ │ │ │ -
static void release(Object *object)
Definition monomialbasis.hh:769
│ │ │ │ -
const VirtualMonomialBasis< dimension, F > Object
Definition monomialbasis.hh:756
│ │ │ │ -
static Object * create(const Key &order)
Definition monomialbasis.hh:765
│ │ │ │ -
F StorageField
Definition monomialbasis.hh:753
│ │ │ │ -
static const unsigned int dimension
Definition monomialbasis.hh:752
│ │ │ │ -
unsigned int Key
Definition monomialbasis.hh:755
│ │ │ │ - │ │ │ │ -
MonomialBasisFactory< dd, FF > Type
Definition monomialbasis.hh:761
│ │ │ │ -
Definition monomialbasis.hh:780
│ │ │ │ -
static const unsigned int dimension
Definition monomialbasis.hh:781
│ │ │ │ -
SF StorageField
Definition monomialbasis.hh:782
│ │ │ │ - │ │ │ │ -
MonomialBasisProvider< dd, FF > Type
Definition monomialbasis.hh:786
│ │ │ │ -
Definition tensor.hh:172
│ │ │ │ +
Definition hierarchicalsimplexp2localinterpolation.hh:18
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition hierarchicalsimplexp2localinterpolation.hh:22
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,1112 +1,126 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -monomialbasis.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ +hierarchicalsimplexp2localinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_MONOMIALBASIS_HH │ │ │ │ │ -6#define DUNE_MONOMIALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20namespace _D_u_n_e │ │ │ │ │ -21{ │ │ │ │ │ -22 /************************************************ │ │ │ │ │ -23 * Classes for evaluating ''Monomials'' on any order │ │ │ │ │ -24 * for all reference element type. │ │ │ │ │ -25 * For a simplex topology these are the normal │ │ │ │ │ -26 * monomials for cube topologies the bimonomials. │ │ │ │ │ -27 * The construction follows the construction of the │ │ │ │ │ -28 * generic geometries using tensor products for │ │ │ │ │ -29 * prism generation and duffy transform for pyramid │ │ │ │ │ -30 * construction. │ │ │ │ │ -31 * A derivative argument can be applied, in which case │ │ │ │ │ -32 * all derivatives up to the desired order are │ │ │ │ │ -33 * evaluated. Note that for higher order derivatives │ │ │ │ │ -34 * only the ''lower'' part of the symmetric tensor │ │ │ │ │ -35 * is evaluated, e.g., passing derivative equal to 2 │ │ │ │ │ -36 * to the class will provide the vector │ │ │ │ │ -37 * (d/dxdx p, d/dxydx p, d/dydy p, │ │ │ │ │ -38 * d/dx p, d/dy p, p) │ │ │ │ │ -39 * Important: │ │ │ │ │ -40 * So far the computation of the derivatives has not │ │ │ │ │ -41 * been fully implemented for general pyramid │ │ │ │ │ -42 * construction, i.e., in the case where a pyramid is │ │ │ │ │ -43 * build over a non simplex base geometry. │ │ │ │ │ -44 * │ │ │ │ │ -45 * Central classes: │ │ │ │ │ -46 * 1) template< GeometryType::Id geometryId, class F > │ │ │ │ │ -47 * class MonomialBasisImpl; │ │ │ │ │ -48 * Implementation of the monomial evaluation for │ │ │ │ │ -49 * a given topology and field type. │ │ │ │ │ -50 * The method evaluate fills a F* vector │ │ │ │ │ -51 * 2) template< GeometryType::Id geometryId, class F > │ │ │ │ │ -52 * class MonomialBasis │ │ │ │ │ -53 * The base class for the static monomial evaluation │ │ │ │ │ -54 * providing addiional evaluate methods including │ │ │ │ │ -55 * one taking std::vector. │ │ │ │ │ -56 * 3) template< int dim, class F > │ │ │ │ │ -57 * class VirtualMonomialBasis │ │ │ │ │ -58 * Virtualization of the MonomialBasis. │ │ │ │ │ -59 * 4) template< int dim, class F > │ │ │ │ │ -60 * struct MonomialBasisFactory; │ │ │ │ │ -61 * A factory class for the VirtualMonomialBasis │ │ │ │ │ -62 * 5) template< int dim, class F > │ │ │ │ │ -63 * struct MonomialBasisProvider │ │ │ │ │ -64 * A singleton container for the virtual monomial │ │ │ │ │ -65 * basis │ │ │ │ │ -66 ************************************************/ │ │ │ │ │ -67 │ │ │ │ │ -68 // Internal Forward Declarations │ │ │ │ │ -69 // ----------------------------- │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +10 │ │ │ │ │ +11namespace _D_u_n_e │ │ │ │ │ +12{ │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 public: │ │ │ │ │ +20 │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +23 { │ │ │ │ │ +24 typename LB::Traits::DomainType x; │ │ │ │ │ +25 typename LB::Traits::RangeType y; │ │ │ │ │ +26 │ │ │ │ │ +27 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +28 │ │ │ │ │ +29 static_assert(LB::Traits::dimDomain <= 3, │ │ │ │ │ +30 "LocalInterpolation for HierarchicalSimplexP2 finite elements" │ │ │ │ │ +31 " is only implemented for dimDomain <=3!"); │ │ │ │ │ +32 │ │ │ │ │ +33 switch ( int(LB::Traits::dimDomain)) { │ │ │ │ │ +34 │ │ │ │ │ +35 case 1 : │ │ │ │ │ +36 │ │ │ │ │ +37 out.resize(3); │ │ │ │ │ +38 │ │ │ │ │ +39 // First: the two vertex dofs │ │ │ │ │ +40 x[0] = 0.0; out[0] = f(x); │ │ │ │ │ +41 x[0] = 1.0; out[2] = f(x); │ │ │ │ │ +42 │ │ │ │ │ +43 // Then: the edge dof │ │ │ │ │ +44 x[0] = 0.5; y = f(x); │ │ │ │ │ +45 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ +46 │ │ │ │ │ +47 break; │ │ │ │ │ +48 │ │ │ │ │ +49 │ │ │ │ │ +50 case 2 : │ │ │ │ │ +51 │ │ │ │ │ +52 out.resize(6); │ │ │ │ │ +53 │ │ │ │ │ +54 // First: the three vertex dofs │ │ │ │ │ +55 x[0] = 0.0; x[1] = 0.0; out[0] = f(x); │ │ │ │ │ +56 x[0] = 1.0; x[1] = 0.0; out[2] = f(x); │ │ │ │ │ +57 x[0] = 0.0; x[1] = 1.0; out[5] = f(x); │ │ │ │ │ +58 │ │ │ │ │ +59 // Then: the three edge dofs │ │ │ │ │ +60 x[0] = 0.5; x[1] = 0.0; y = f(x); │ │ │ │ │ +61 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ +62 │ │ │ │ │ +63 x[0] = 0.0; x[1] = 0.5; y = f(x); │ │ │ │ │ +64 out[3] = y - 0.5*(out[0] + out[5]); │ │ │ │ │ +65 │ │ │ │ │ +66 x[0] = 0.5; x[1] = 0.5; y = f(x); │ │ │ │ │ +67 out[4] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ +68 │ │ │ │ │ +69 break; │ │ │ │ │ 70 │ │ │ │ │ -71 template< GeometryType::Id geometryId > │ │ │ │ │ -72 class MonomialBasisSize; │ │ │ │ │ -73 │ │ │ │ │ -74 template< GeometryType::Id geometryId, class F > │ │ │ │ │ -75 class MonomialBasis; │ │ │ │ │ -76 │ │ │ │ │ -77 │ │ │ │ │ -78 │ │ │ │ │ -79 // MonomialBasisSize │ │ │ │ │ -80 // ----------------- │ │ │ │ │ -81 │ │ │ │ │ -82 template< GeometryType::Id geometryId > │ │ │ │ │ -_8_3 class _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ -84 { │ │ │ │ │ -85 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_ _g_e_o_m_e_t_r_y_I_d_ _> _T_h_i_s; │ │ │ │ │ -86 │ │ │ │ │ -87 public: │ │ │ │ │ -_8_8 static _T_h_i_s &_i_n_s_t_a_n_c_e () │ │ │ │ │ -89 { │ │ │ │ │ -90 static _T_h_i_s _instance; │ │ │ │ │ -91 return _instance; │ │ │ │ │ -92 } │ │ │ │ │ +71 case 3 : │ │ │ │ │ +72 │ │ │ │ │ +73 out.resize(10); │ │ │ │ │ +74 │ │ │ │ │ +75 // First: the four vertex dofs │ │ │ │ │ +76 x[0] = 0.0; x[1] = 0.0; x[2] = 0.0; out[0] = f(x); │ │ │ │ │ +77 x[0] = 1.0; x[1] = 0.0; x[2] = 0.0; out[2] = f(x); │ │ │ │ │ +78 x[0] = 0.0; x[1] = 1.0; x[2] = 0.0; out[5] = f(x); │ │ │ │ │ +79 x[0] = 0.0; x[1] = 0.0; x[2] = 1.0; out[9] = f(x); │ │ │ │ │ +80 │ │ │ │ │ +81 // Then: the six edge dofs │ │ │ │ │ +82 x[0] = 0.5; x[1] = 0.0; x[2] = 0.0; y = f(x); │ │ │ │ │ +83 out[1] = y - 0.5*(out[0] + out[2]); │ │ │ │ │ +84 │ │ │ │ │ +85 x[0] = 0.0; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ +86 out[3] = y - 0.5*(out[0] + out[5]); │ │ │ │ │ +87 │ │ │ │ │ +88 x[0] = 0.5; x[1] = 0.5; x[2] = 0.0; y = f(x); │ │ │ │ │ +89 out[4] = y - 0.5*(out[2] + out[5]); │ │ │ │ │ +90 │ │ │ │ │ +91 x[0] = 0.0; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +92 out[6] = y - 0.5*(out[0] + out[9]); │ │ │ │ │ 93 │ │ │ │ │ -_9_4 unsigned int _m_a_x_O_r_d_e_r__; │ │ │ │ │ -95 │ │ │ │ │ -96 // sizes_[ k ]: number of basis functions of exactly order k │ │ │ │ │ -_9_7 mutable unsigned int *_s_i_z_e_s__; │ │ │ │ │ -98 │ │ │ │ │ -99 // numBaseFunctions_[ k ] = sizes_[ 0 ] + ... + sizes_[ k ] │ │ │ │ │ -_1_0_0 mutable unsigned int *_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ +94 x[0] = 0.5; x[1] = 0.0; x[2] = 0.5; y = f(x); │ │ │ │ │ +95 out[7] = y - 0.5*(out[2] + out[9]); │ │ │ │ │ +96 │ │ │ │ │ +97 x[0] = 0.0; x[1] = 0.5; x[2] = 0.5; y = f(x); │ │ │ │ │ +98 out[8] = y - 0.5*(out[5] + out[9]); │ │ │ │ │ +99 │ │ │ │ │ +100 break; │ │ │ │ │ 101 │ │ │ │ │ -_1_0_2 _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e () │ │ │ │ │ -103 : _m_a_x_O_r_d_e_r__( 0 ), │ │ │ │ │ -104 _s_i_z_e_s__( 0 ), │ │ │ │ │ -105 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__( 0 ) │ │ │ │ │ -106 { │ │ │ │ │ -107 _c_o_m_p_u_t_e_S_i_z_e_s( 2 ); │ │ │ │ │ -108 } │ │ │ │ │ -109 │ │ │ │ │ -_1_1_0 _~_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e () │ │ │ │ │ -111 { │ │ │ │ │ -112 delete[] _s_i_z_e_s__; │ │ │ │ │ -113 delete[] _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ -114 } │ │ │ │ │ -115 │ │ │ │ │ -_1_1_6 unsigned int _o_p_e_r_a_t_o_r_(_)_ ( const unsigned int order ) const │ │ │ │ │ -117 { │ │ │ │ │ -118 return _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ order ]; │ │ │ │ │ -119 } │ │ │ │ │ -120 │ │ │ │ │ -_1_2_1 unsigned int _m_a_x_O_r_d_e_r() const │ │ │ │ │ -122 { │ │ │ │ │ -123 return _m_a_x_O_r_d_e_r__; │ │ │ │ │ -124 } │ │ │ │ │ -125 │ │ │ │ │ -_1_2_6 void _c_o_m_p_u_t_e_S_i_z_e_s ( unsigned int order ) │ │ │ │ │ -127 { │ │ │ │ │ -128 if (order <= _m_a_x_O_r_d_e_r__) │ │ │ │ │ -129 return; │ │ │ │ │ -130 │ │ │ │ │ -131 _m_a_x_O_r_d_e_r__ = order; │ │ │ │ │ -132 │ │ │ │ │ -133 delete[] _s_i_z_e_s__; │ │ │ │ │ -134 delete[] _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ -135 _s_i_z_e_s__ = new unsigned int[ order+1 ]; │ │ │ │ │ -136 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__ = new unsigned int[ order+1 ]; │ │ │ │ │ -137 │ │ │ │ │ -138 constexpr GeometryType geometry = geometryId; │ │ │ │ │ -139 constexpr auto dim = geometry.dim(); │ │ │ │ │ -140 │ │ │ │ │ -141 _s_i_z_e_s__[ 0 ] = 1; │ │ │ │ │ -142 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -143 _s_i_z_e_s__[ k ] = 0; │ │ │ │ │ -144 │ │ │ │ │ -145 std::fill(_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__, _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__+order+1, 1); │ │ │ │ │ -146 │ │ │ │ │ -147 for( int codim=dim-1; codim>=0; codim--) │ │ │ │ │ -148 { │ │ │ │ │ -149 if (Impl::isPrism(geometry.id(),dim,codim)) │ │ │ │ │ -150 { │ │ │ │ │ -151 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -152 { │ │ │ │ │ -153 _s_i_z_e_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] + k*_s_i_z_e_s__[ k ]; │ │ │ │ │ -154 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k-1 ] + _s_i_z_e_s__[ k ]; │ │ │ │ │ -155 } │ │ │ │ │ -156 } │ │ │ │ │ -157 else │ │ │ │ │ -158 { │ │ │ │ │ -159 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -160 { │ │ │ │ │ -161 _s_i_z_e_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ]; │ │ │ │ │ -162 _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k ] = _n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__[ k-1 ] + _s_i_z_e_s__[ k ]; │ │ │ │ │ -163 } │ │ │ │ │ -164 } │ │ │ │ │ -165 } │ │ │ │ │ -166 } │ │ │ │ │ -167 }; │ │ │ │ │ -168 │ │ │ │ │ -169 │ │ │ │ │ -170 │ │ │ │ │ -171 // MonomialBasisHelper │ │ │ │ │ -172 // ------------------- │ │ │ │ │ -173 │ │ │ │ │ -174 │ │ │ │ │ -175 template< int mydim, int dim, class F > │ │ │ │ │ -_1_7_6 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r │ │ │ │ │ -177 { │ │ │ │ │ -_1_7_8 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(mydim).toId() > _M_y_S_i_z_e; │ │ │ │ │ -_1_7_9 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(dim).toId() > _S_i_z_e; │ │ │ │ │ -180 │ │ │ │ │ -_1_8_1 static void _c_o_p_y ( const unsigned int deriv, F *&wit, F *&rit, │ │ │ │ │ -182 const unsigned int numBaseFunctions, const F &z ) │ │ │ │ │ -183 { │ │ │ │ │ -184 // n(d,k) = size[d]; │ │ │ │ │ -185 _M_y_S_i_z_e &mySize = _M_y_S_i_z_e_:_:_i_n_s_t_a_n_c_e(); │ │ │ │ │ -186 _S_i_z_e &size = _S_i_z_e_:_:_i_n_s_t_a_n_c_e(); │ │ │ │ │ -187 │ │ │ │ │ -188 const F *const rend = rit + size( deriv )*numBaseFunctions; │ │ │ │ │ -189 for( ; rit != rend; ) │ │ │ │ │ -190 { │ │ │ │ │ -191 F *prit = rit; │ │ │ │ │ -192 │ │ │ │ │ -193 *wit = z * *rit; │ │ │ │ │ -194 ++rit, ++wit; │ │ │ │ │ -195 │ │ │ │ │ -196 for( unsigned d = 1; d <= deriv; ++d ) │ │ │ │ │ -197 { │ │ │ │ │ -198 #ifndef NDEBUG │ │ │ │ │ -199 const F *const derivEnd = rit + mySize._s_i_z_e_s__[ d ]; │ │ │ │ │ -200 #endif │ │ │ │ │ -201 │ │ │ │ │ -202 { │ │ │ │ │ -203 const F *const drend = rit + mySize._s_i_z_e_s__[ d ] - mySize._s_i_z_e_s__[ d-1 ]; │ │ │ │ │ -204 for( ; rit != drend ; ++rit, ++wit ) │ │ │ │ │ -205 *wit = z * *rit; │ │ │ │ │ -206 } │ │ │ │ │ -207 │ │ │ │ │ -208 for (unsigned int j=1; j(); │ │ │ │ │ -222 } │ │ │ │ │ -223 } │ │ │ │ │ -224 } │ │ │ │ │ -225 }; │ │ │ │ │ -226 │ │ │ │ │ -227 │ │ │ │ │ -228 │ │ │ │ │ -229 // MonomialBasisImpl │ │ │ │ │ -230 // ----------------- │ │ │ │ │ -231 │ │ │ │ │ -232 template< GeometryType::Id geometryId, class F> │ │ │ │ │ -_2_3_3 class _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ -234 { │ │ │ │ │ -235 public: │ │ │ │ │ -_2_3_6 typedef F _F_i_e_l_d; │ │ │ │ │ -237 │ │ │ │ │ -_2_3_8 static constexpr GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ -239 │ │ │ │ │ -_2_4_0 static const unsigned int _d_i_m_D_o_m_a_i_n = _g_e_o_m_e_t_r_y.dim(); │ │ │ │ │ -241 │ │ │ │ │ -_2_4_2 typedef FieldVector< Field, dimDomain > _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -243 │ │ │ │ │ -244 private: │ │ │ │ │ -245 friend class _M_o_n_o_m_i_a_l_B_a_s_i_s< geometryId, _F_i_e_l_d >; │ │ │ │ │ -246 │ │ │ │ │ -247 _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l () │ │ │ │ │ -248 {} │ │ │ │ │ -249 │ │ │ │ │ -250 template< int dimD > │ │ │ │ │ -251 void evaluate ( const unsigned int deriv, const unsigned int order, │ │ │ │ │ -252 const FieldVector< Field, dimD > &x, │ │ │ │ │ -253 const unsigned int block, const unsigned int *const offsets, │ │ │ │ │ -254 _F_i_e_l_d *const values ) const │ │ │ │ │ -255 { │ │ │ │ │ -256 //start with vertex │ │ │ │ │ -257 *values = _U_n_i_t_y_<_ _F_ _>(); │ │ │ │ │ -258 F *const end = values + block; │ │ │ │ │ -259 for( _F_i_e_l_d *it = values+1 ; it != end; ++it ) │ │ │ │ │ -260 *it = _Z_e_r_o_<_ _F_ _>(); │ │ │ │ │ -261 │ │ │ │ │ -262 constexpr GeometryType gt = GeometryTypes::vertex; │ │ │ │ │ -263 │ │ │ │ │ -264 if constexpr ( _g_e_o_m_e_t_r_y == gt) │ │ │ │ │ -265 return; │ │ │ │ │ -266 else │ │ │ │ │ -267 evaluate(deriv, order, x, block, offsets, values ); │ │ │ │ │ -268 } │ │ │ │ │ -269 │ │ │ │ │ -270 template │ │ │ │ │ -271 void evaluate ( const unsigned int deriv, const unsigned int order, │ │ │ │ │ -272 const FieldVector< Field, dimD > &x, │ │ │ │ │ -273 const unsigned int block, const unsigned int *const offsets, │ │ │ │ │ -274 _F_i_e_l_d *const values ) const │ │ │ │ │ -275 { │ │ │ │ │ -276 │ │ │ │ │ -277 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ -278 │ │ │ │ │ -279 auto constexpr isPrismatic = _g_e_o_m_e_t_r_y.isPrismatic(baseGeometry.dim()); │ │ │ │ │ -280 │ │ │ │ │ -281 // compute │ │ │ │ │ -282 typedef MonomialBasisHelper< baseGeometry.dim() + 1, dimD, _F_i_e_l_d > Helper; │ │ │ │ │ -283 typedef MonomialBasisSize BaseSize; │ │ │ │ │ -284 │ │ │ │ │ -285 const BaseSize &size = BaseSize::instance(); │ │ │ │ │ -286 const_cast(size).computeSizes(order); │ │ │ │ │ -287 │ │ │ │ │ -288 const _F_i_e_l_d &z = x[ baseGeometry.dim() ]; │ │ │ │ │ -289 │ │ │ │ │ -290 _F_i_e_l_d *row0 = values; │ │ │ │ │ -291 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -292 { │ │ │ │ │ -293 _F_i_e_l_d *row1 = values + block*offsets[ k-1 ]; │ │ │ │ │ -294 _F_i_e_l_d *wit = row1 + block*size.sizes_[ k ]; │ │ │ │ │ -295 if constexpr ( isPrismatic ) │ │ │ │ │ -296 Helper::copy( deriv, wit, row1, k*size.sizes_[ k ], z ); │ │ │ │ │ -297 Helper::copy( deriv, wit, row0, size( k-1 ), z ); │ │ │ │ │ -298 row0 = row1; │ │ │ │ │ -299 } │ │ │ │ │ -300 │ │ │ │ │ -301 // stop if desired dimension is reached │ │ │ │ │ -302 if constexpr( baseGeometry.dim() == _d_i_m_D_o_m_a_i_n-1) │ │ │ │ │ -303 return; │ │ │ │ │ -304 else │ │ │ │ │ -305 { │ │ │ │ │ -306 constexpr GeometryType nextGeometry = isPrismatic ? GeometryTypes:: │ │ │ │ │ -prismaticExtension(baseGeometry) │ │ │ │ │ -307 : GeometryTypes::conicalExtension(baseGeometry); │ │ │ │ │ -308 │ │ │ │ │ -309 evaluate(deriv, order, x, block, offsets, values │ │ │ │ │ -); │ │ │ │ │ -310 } │ │ │ │ │ -311 } │ │ │ │ │ -312 │ │ │ │ │ -313 void integrate ( const unsigned int order, │ │ │ │ │ -314 const unsigned int *const offsets, │ │ │ │ │ -315 _F_i_e_l_d *const values ) const │ │ │ │ │ -316 { │ │ │ │ │ -317 //start with vertex │ │ │ │ │ -318 values[ 0 ] = Unity< Field >(); │ │ │ │ │ -319 static constexpr GeometryType gt = GeometryTypes::vertex; │ │ │ │ │ -320 │ │ │ │ │ -321 if constexpr ( _g_e_o_m_e_t_r_y == gt) │ │ │ │ │ -322 return; │ │ │ │ │ -323 else │ │ │ │ │ -324 integrate(order, offsets, values); │ │ │ │ │ -325 } │ │ │ │ │ -326 │ │ │ │ │ -327 template │ │ │ │ │ -328 void integrate ( const unsigned int order, │ │ │ │ │ -329 const unsigned int *const offsets, │ │ │ │ │ -330 _F_i_e_l_d *const values) const │ │ │ │ │ -331 { │ │ │ │ │ -332 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ -333 │ │ │ │ │ -334 auto constexpr isPrismatic = _g_e_o_m_e_t_r_y.isPrismatic(baseGeometry.dim()); │ │ │ │ │ -335 │ │ │ │ │ -336 // decide which kind of integration should be performed │ │ │ │ │ -337 if constexpr ( isPrismatic ) │ │ │ │ │ -338 integratePrismatic(order, offsets, values); │ │ │ │ │ -339 else │ │ │ │ │ -340 integrateConical(order, offsets, values); │ │ │ │ │ -341 │ │ │ │ │ -342 // stop if the desired dimension is reached │ │ │ │ │ -343 if constexpr( baseGeometry.dim() == _d_i_m_D_o_m_a_i_n-1) │ │ │ │ │ -344 return; │ │ │ │ │ -345 else │ │ │ │ │ -346 { │ │ │ │ │ -347 static constexpr GeometryType nextGeometry = (isPrismatic ? GeometryTypes:: │ │ │ │ │ -prismaticExtension(baseGeometry) │ │ │ │ │ -348 : GeometryTypes::conicalExtension(baseGeometry)); │ │ │ │ │ -349 │ │ │ │ │ -350 integrate(order, offsets, values); │ │ │ │ │ -351 } │ │ │ │ │ -352 │ │ │ │ │ -353 } │ │ │ │ │ -354 │ │ │ │ │ -355 template │ │ │ │ │ -356 void integratePrismatic ( const unsigned int order, │ │ │ │ │ -357 const unsigned int *const offsets, │ │ │ │ │ -358 _F_i_e_l_d *const values ) const │ │ │ │ │ -359 { │ │ │ │ │ -360 typedef MonomialBasisSize BaseSize; │ │ │ │ │ -361 static const BaseSize &size = BaseSize::instance(); │ │ │ │ │ -362 const unsigned int *const baseSizes = size.sizes_; │ │ │ │ │ -363 │ │ │ │ │ -364 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ -365 static constexpr GeometryType nextGeometry = GeometryTypes:: │ │ │ │ │ -prismaticExtension(baseGeometry); │ │ │ │ │ -366 │ │ │ │ │ -367 typedef MonomialBasisSize Size; │ │ │ │ │ -368 static const Size &mySize = Size::instance(); │ │ │ │ │ -369 │ │ │ │ │ -370 _F_i_e_l_d *row0 = values; │ │ │ │ │ -371 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -372 { │ │ │ │ │ -373 _F_i_e_l_d *const row1begin = values + offsets[ k-1 ]; │ │ │ │ │ -374 _F_i_e_l_d *const row1End = row1begin + mySize.sizes_[ k ]; │ │ │ │ │ -375 assert( (unsigned int)(row1End - values) <= offsets[ k ] ); │ │ │ │ │ -376 │ │ │ │ │ -377 _F_i_e_l_d *row1 = row1begin; │ │ │ │ │ -378 _F_i_e_l_d *it = row1begin + baseSizes[ k ]; │ │ │ │ │ -379 for( unsigned int j = 1; j <= k; ++j ) │ │ │ │ │ -380 { │ │ │ │ │ -381 _F_i_e_l_d *const end = it + baseSizes[ k ]; │ │ │ │ │ -382 assert( (unsigned int)(end - values) <= offsets[ k ] ); │ │ │ │ │ -383 for( ; it != end; ++row1, ++it ) │ │ │ │ │ -384 *it = (_F_i_e_l_d( j ) / _F_i_e_l_d( j+1 )) * (*row1); │ │ │ │ │ -385 } │ │ │ │ │ -386 for( ; it != row1End; ++row0, ++it ) │ │ │ │ │ -387 *it = (_F_i_e_l_d( k ) / _F_i_e_l_d( k+1 )) * (*row0); │ │ │ │ │ -388 row0 = row1; │ │ │ │ │ -389 } │ │ │ │ │ -390 } │ │ │ │ │ -391 │ │ │ │ │ -392 │ │ │ │ │ -393 template │ │ │ │ │ -394 void integrateConical ( const unsigned int order, │ │ │ │ │ -395 const unsigned int *const offsets, │ │ │ │ │ -396 _F_i_e_l_d *const values) const │ │ │ │ │ -397 { │ │ │ │ │ -398 typedef MonomialBasisSize BaseSize; │ │ │ │ │ -399 static const BaseSize &size = BaseSize::instance(); │ │ │ │ │ -400 const unsigned int *const baseSizes = size.sizes_; │ │ │ │ │ -401 │ │ │ │ │ -402 static constexpr GeometryType baseGeometry = baseGeometryId; │ │ │ │ │ -403 │ │ │ │ │ -404 { │ │ │ │ │ -405 _F_i_e_l_d *const col0End = values + baseSizes[ 0 ]; │ │ │ │ │ -406 for( _F_i_e_l_d *it = values; it != col0End; ++it ) │ │ │ │ │ -407 *it *= _F_i_e_l_d( 1 ) / _F_i_e_l_d( int(baseGeometry.dim()+1) ); │ │ │ │ │ -408 } │ │ │ │ │ -409 │ │ │ │ │ -410 _F_i_e_l_d *row0 = values; │ │ │ │ │ -411 for( unsigned int k = 1; k <= order; ++k ) │ │ │ │ │ -412 { │ │ │ │ │ -413 const _F_i_e_l_d factor = (_F_i_e_l_d( 1 ) / _F_i_e_l_d( k + baseGeometry.dim()+1)); │ │ │ │ │ -414 │ │ │ │ │ -415 _F_i_e_l_d *const row1 = values+offsets[ k-1 ]; │ │ │ │ │ -416 _F_i_e_l_d *const col0End = row1 + baseSizes[ k ]; │ │ │ │ │ -417 _F_i_e_l_d *it = row1; │ │ │ │ │ -418 for( ; it != col0End; ++it ) │ │ │ │ │ -419 *it *= factor; │ │ │ │ │ -420 for( unsigned int i = 1; i <= k; ++i ) │ │ │ │ │ -421 { │ │ │ │ │ -422 _F_i_e_l_d *const end = it + baseSizes[ k-i ]; │ │ │ │ │ -423 assert( (unsigned int)(end - values) <= offsets[ k ] ); │ │ │ │ │ -424 for( ; it != end; ++row0, ++it ) │ │ │ │ │ -425 *it = (*row0) * (_F_i_e_l_d( i ) * factor); │ │ │ │ │ -426 } │ │ │ │ │ -427 row0 = row1; │ │ │ │ │ -428 } │ │ │ │ │ -429 } │ │ │ │ │ -430 │ │ │ │ │ -431 }; │ │ │ │ │ -432 │ │ │ │ │ -433 │ │ │ │ │ -434 // MonomialBasis │ │ │ │ │ -435 // ------------- │ │ │ │ │ -436 │ │ │ │ │ -437 template< GeometryType::Id geometryId, class F > │ │ │ │ │ -_4_3_8 class _M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -439 : public _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l< geometryId, F > │ │ │ │ │ -440 { │ │ │ │ │ -441 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ -442 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -443 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _B_a_s_e; │ │ │ │ │ -444 │ │ │ │ │ -445 public: │ │ │ │ │ -_4_4_6 static const unsigned int _d_i_m_e_n_s_i_o_n = _B_a_s_e_:_:_d_i_m_D_o_m_a_i_n; │ │ │ │ │ -_4_4_7 static const unsigned int _d_i_m_R_a_n_g_e = 1; │ │ │ │ │ -448 │ │ │ │ │ -_4_4_9 typedef typename _B_a_s_e_:_:_F_i_e_l_d _F_i_e_l_d; │ │ │ │ │ -450 │ │ │ │ │ -_4_5_1 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -452 │ │ │ │ │ -_4_5_3 typedef Dune::FieldVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -454 │ │ │ │ │ -_4_5_5 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_<_g_e_o_m_e_t_r_y_I_d_> _S_i_z_e; │ │ │ │ │ -456 │ │ │ │ │ -_4_5_7 _M_o_n_o_m_i_a_l_B_a_s_i_s (unsigned int _o_r_d_e_r) │ │ │ │ │ -458 : _B_a_s_e(), │ │ │ │ │ -459 order_(_o_r_d_e_r), │ │ │ │ │ -460 size_(_S_i_z_e::instance()) │ │ │ │ │ -461 { │ │ │ │ │ -462 assert(_o_r_d_e_r<=1024); // avoid wrapping of unsigned int (0-1) order=1024 is │ │ │ │ │ -quite hight...) │ │ │ │ │ -463 } │ │ │ │ │ -464 │ │ │ │ │ -_4_6_5 const unsigned int *_s_i_z_e_s ( unsigned int _o_r_d_e_r ) const │ │ │ │ │ -466 { │ │ │ │ │ -467 size_._c_o_m_p_u_t_e_S_i_z_e_s( _o_r_d_e_r ); │ │ │ │ │ -468 return size_._n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__; │ │ │ │ │ -469 } │ │ │ │ │ -470 │ │ │ │ │ -_4_7_1 const unsigned int *_s_i_z_e_s () const │ │ │ │ │ -472 { │ │ │ │ │ -473 return _s_i_z_e_s( order_ ); │ │ │ │ │ -474 } │ │ │ │ │ -475 │ │ │ │ │ -_4_7_6 unsigned int _s_i_z_e () const │ │ │ │ │ -477 { │ │ │ │ │ -478 size_._c_o_m_p_u_t_e_S_i_z_e_s( order_ ); │ │ │ │ │ -479 return size_( order_ ); │ │ │ │ │ -480 } │ │ │ │ │ -481 │ │ │ │ │ -_4_8_2 unsigned int _d_e_r_i_v_S_i_z_e ( const unsigned int deriv ) const │ │ │ │ │ -483 { │ │ │ │ │ -484 _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(_d_i_m_e_n_s_i_o_n).toId() >::instance │ │ │ │ │ -()._c_o_m_p_u_t_e_S_i_z_e_s( deriv ); │ │ │ │ │ -485 return _M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e< GeometryTypes::simplex(_d_i_m_e_n_s_i_o_n).toId() >:: │ │ │ │ │ -instance() ( deriv ); │ │ │ │ │ -486 } │ │ │ │ │ -487 │ │ │ │ │ -_4_8_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ -489 { │ │ │ │ │ -490 return order_ ; │ │ │ │ │ -491 } │ │ │ │ │ -492 │ │ │ │ │ -_4_9_3 unsigned int _t_o_p_o_l_o_g_y_I_d ( ) const │ │ │ │ │ -494 { │ │ │ │ │ -495 return geometry.id(); │ │ │ │ │ -496 } │ │ │ │ │ -497 │ │ │ │ │ -_4_9_8 void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -499 _F_i_e_l_d *const values ) const │ │ │ │ │ -500 { │ │ │ │ │ -501 Base::evaluate( deriv, order_, x, _d_e_r_i_v_S_i_z_e( deriv ), _s_i_z_e_s( order_ ), │ │ │ │ │ -values ); │ │ │ │ │ -502 } │ │ │ │ │ -503 │ │ │ │ │ -504 template │ │ │ │ │ -_5_0_5 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -506 _F_i_e_l_d *const values ) const │ │ │ │ │ -507 { │ │ │ │ │ -508 _e_v_a_l_u_a_t_e( deriv, x, values ); │ │ │ │ │ -509 } │ │ │ │ │ -510 │ │ │ │ │ -511 template │ │ │ │ │ -_5_1_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -513 Vector &values ) const │ │ │ │ │ -514 { │ │ │ │ │ -515 evaluate(x,&(values[0])); │ │ │ │ │ -516 } │ │ │ │ │ -517 template │ │ │ │ │ -_5_1_8 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -519 _D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> *values ) const │ │ │ │ │ -520 { │ │ │ │ │ -521 evaluate(x,&(values->block())); │ │ │ │ │ -522 } │ │ │ │ │ -523 template< unsigned int deriv > │ │ │ │ │ -_5_2_4 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -525 FieldVector<_F_i_e_l_d,_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_>_:_:_s_i_z_e> *values ) const │ │ │ │ │ -526 { │ │ │ │ │ -527 _e_v_a_l_u_a_t_e(0,x,&(values[0][0])); │ │ │ │ │ -528 } │ │ │ │ │ -529 │ │ │ │ │ -530 template │ │ │ │ │ -_5_3_1 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -532 Vector &values ) const │ │ │ │ │ -533 { │ │ │ │ │ -534 evaluate<0>(x,&(values[0])); │ │ │ │ │ -535 } │ │ │ │ │ -536 │ │ │ │ │ -537 template< class DVector, class RVector > │ │ │ │ │ -_5_3_8 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ -539 { │ │ │ │ │ -540 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -541 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -542 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -543 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -544 evaluate<0>( bx, values ); │ │ │ │ │ -545 } │ │ │ │ │ -546 │ │ │ │ │ -_5_4_7 void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const │ │ │ │ │ -548 { │ │ │ │ │ -549 Base::integrate( order_, _s_i_z_e_s( order_ ), values ); │ │ │ │ │ -550 } │ │ │ │ │ -551 template │ │ │ │ │ -_5_5_2 void _i_n_t_e_g_r_a_t_e ( Vector &values ) const │ │ │ │ │ -553 { │ │ │ │ │ -554 _i_n_t_e_g_r_a_t_e( &(values[ 0 ]) ); │ │ │ │ │ -555 } │ │ │ │ │ -556 private: │ │ │ │ │ -557 _M_o_n_o_m_i_a_l_B_a_s_i_s(const This&); │ │ │ │ │ -558 This& operator=(const This&); │ │ │ │ │ -559 unsigned int order_; │ │ │ │ │ -560 _S_i_z_e &size_; │ │ │ │ │ -561 }; │ │ │ │ │ -562 │ │ │ │ │ -563 │ │ │ │ │ -564 │ │ │ │ │ -565 // StdMonomialBasis │ │ │ │ │ -566 // ---------------- │ │ │ │ │ -567 │ │ │ │ │ -568 template< int dim,class F > │ │ │ │ │ -_5_6_9 class _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -570 : public _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::simplex(dim).toId() , F > │ │ │ │ │ -571 { │ │ │ │ │ -572 typedef _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -573 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::simplex(dim).toId(), F > _B_a_s_e; │ │ │ │ │ -574 │ │ │ │ │ -575 public: │ │ │ │ │ -_5_7_6 static constexpr GeometryType _g_e_o_m_e_t_r_y = GeometryTypes::simplex(dim); │ │ │ │ │ -_5_7_7 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -578 │ │ │ │ │ -_5_7_9 _S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s ( unsigned int _o_r_d_e_r ) │ │ │ │ │ -580 : _B_a_s_e( _o_r_d_e_r ) │ │ │ │ │ -581 {} │ │ │ │ │ -582 }; │ │ │ │ │ -583 │ │ │ │ │ -584 │ │ │ │ │ -585 │ │ │ │ │ -586 // StandardBiMonomialBasis │ │ │ │ │ -587 // ----------------------- │ │ │ │ │ -588 │ │ │ │ │ -589 template< int dim, class F > │ │ │ │ │ -_5_9_0 class _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -591 : public _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::cube(dim).toId() , F > │ │ │ │ │ -592 { │ │ │ │ │ -593 typedef _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -594 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s< GeometryTypes::cube(dim).toId() , F > _B_a_s_e; │ │ │ │ │ -595 │ │ │ │ │ -596 public: │ │ │ │ │ -_5_9_7 static constexpr GeometryType _g_e_o_m_e_t_r_y = GeometryTypes::cube(dim); │ │ │ │ │ -_5_9_8 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -599 │ │ │ │ │ -_6_0_0 _S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s ( unsigned int _o_r_d_e_r ) │ │ │ │ │ -601 : _B_a_s_e( _o_r_d_e_r ) │ │ │ │ │ -602 {} │ │ │ │ │ -603 }; │ │ │ │ │ -604 │ │ │ │ │ -605 // ----------------------------------------------------------- │ │ │ │ │ -606 // ----------------------------------------------------------- │ │ │ │ │ -607 // VirtualMonomialBasis │ │ │ │ │ -608 // ------------------- │ │ │ │ │ -609 │ │ │ │ │ -610 template< int dim, class F > │ │ │ │ │ -_6_1_1 class _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -612 { │ │ │ │ │ -613 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -614 │ │ │ │ │ -615 public: │ │ │ │ │ -_6_1_6 typedef F _F_i_e_l_d; │ │ │ │ │ -_6_1_7 typedef F _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -_6_1_8 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_6_1_9 static const unsigned int _d_i_m_R_a_n_g_e = 1; │ │ │ │ │ -620 │ │ │ │ │ -_6_2_1 typedef FieldVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_6_2_2 typedef FieldVector _R_a_n_g_e_V_e_c_t_o_r; │ │ │ │ │ -623 │ │ │ │ │ -_6_2_4 explicit _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s(const GeometryType& gt, │ │ │ │ │ -625 unsigned int _o_r_d_e_r) │ │ │ │ │ -626 : _o_r_d_e_r__(_o_r_d_e_r), _g_e_o_m_e_t_r_y__(gt) {} │ │ │ │ │ -627 │ │ │ │ │ -_6_2_8 virtual _~_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s() {} │ │ │ │ │ -629 │ │ │ │ │ -_6_3_0 virtual const unsigned int *_s_i_z_e_s ( ) const = 0; │ │ │ │ │ -631 │ │ │ │ │ -_6_3_2 unsigned int _s_i_z_e ( ) const │ │ │ │ │ -633 { │ │ │ │ │ -634 return _s_i_z_e_s( )[ _o_r_d_e_r__ ]; │ │ │ │ │ -635 } │ │ │ │ │ -636 │ │ │ │ │ -_6_3_7 unsigned int _o_r_d_e_r () const │ │ │ │ │ -638 { │ │ │ │ │ -639 return _o_r_d_e_r__; │ │ │ │ │ -640 } │ │ │ │ │ -641 │ │ │ │ │ -_6_4_2 GeometryType _t_y_p_e() const │ │ │ │ │ -643 { │ │ │ │ │ -644 return _g_e_o_m_e_t_r_y__; │ │ │ │ │ -645 } │ │ │ │ │ -646 │ │ │ │ │ -_6_4_7 virtual void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -648 _F_i_e_l_d *const values ) const = 0; │ │ │ │ │ -649 template < unsigned int deriv > │ │ │ │ │ -_6_5_0 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -651 _F_i_e_l_d *const values ) const │ │ │ │ │ -652 { │ │ │ │ │ -653 _e_v_a_l_u_a_t_e( deriv, x, values ); │ │ │ │ │ -654 } │ │ │ │ │ -655 template < unsigned int deriv, int size > │ │ │ │ │ -_6_5_6 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -657 Dune::FieldVector *const values ) const │ │ │ │ │ -658 { │ │ │ │ │ -659 _e_v_a_l_u_a_t_e( deriv, x, &(values[0][0]) ); │ │ │ │ │ -660 } │ │ │ │ │ -661 template │ │ │ │ │ -_6_6_2 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -663 _D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_d_e_r_i_v_,_l_a_y_o_u_t_> *values ) const │ │ │ │ │ -664 { │ │ │ │ │ -665 evaluate(x,&(values->block())); │ │ │ │ │ -666 } │ │ │ │ │ -667 template │ │ │ │ │ -_6_6_8 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -669 Vector &values ) const │ │ │ │ │ -670 { │ │ │ │ │ -671 evaluate( x, &(values[ 0 ]) ); │ │ │ │ │ -672 } │ │ │ │ │ -673 template< class Vector > │ │ │ │ │ -_6_7_4 void _e_v_a_l_u_a_t_e ( const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -675 Vector &values ) const │ │ │ │ │ -676 { │ │ │ │ │ -677 evaluate<0>(x,values); │ │ │ │ │ -678 } │ │ │ │ │ -679 template< class DVector, class RVector > │ │ │ │ │ -_6_8_0 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ -681 { │ │ │ │ │ -682 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -683 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -684 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -685 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -686 evaluate<0>( bx, values ); │ │ │ │ │ -687 } │ │ │ │ │ -688 template< unsigned int deriv, class DVector, class RVector > │ │ │ │ │ -_6_8_9 void _e_v_a_l_u_a_t_e ( const DVector &x, RVector &values ) const │ │ │ │ │ -690 { │ │ │ │ │ -691 assert( DVector::dimension == _d_i_m_e_n_s_i_o_n); │ │ │ │ │ -692 _D_o_m_a_i_n_V_e_c_t_o_r bx; │ │ │ │ │ -693 for( int d = 0; d < _d_i_m_e_n_s_i_o_n; ++d ) │ │ │ │ │ -694 _f_i_e_l_d___c_a_s_t( x[ d ], bx[ d ] ); │ │ │ │ │ -695 evaluate( bx, values ); │ │ │ │ │ -696 } │ │ │ │ │ -697 │ │ │ │ │ -_6_9_8 virtual void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const = 0; │ │ │ │ │ -699 template │ │ │ │ │ -_7_0_0 void _i_n_t_e_g_r_a_t_e ( Vector &values ) const │ │ │ │ │ -701 { │ │ │ │ │ -702 _i_n_t_e_g_r_a_t_e( &(values[ 0 ]) ); │ │ │ │ │ -703 } │ │ │ │ │ -704 protected: │ │ │ │ │ -_7_0_5 unsigned int _o_r_d_e_r__; │ │ │ │ │ -_7_0_6 GeometryType _g_e_o_m_e_t_r_y__; │ │ │ │ │ -707 }; │ │ │ │ │ -708 │ │ │ │ │ -709 template< GeometryType::Id geometryId, class F > │ │ │ │ │ -_7_1_0 class _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ -711 : public _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< static_cast(geometryId).dim(), │ │ │ │ │ -F > │ │ │ │ │ -712 { │ │ │ │ │ -713 static constexpr GeometryType geometry = geometryId; │ │ │ │ │ -714 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< geometry.dim(), F > _B_a_s_e; │ │ │ │ │ -715 typedef _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -716 │ │ │ │ │ -717 public: │ │ │ │ │ -_7_1_8 typedef typename _B_a_s_e_:_:_F_i_e_l_d _F_i_e_l_d; │ │ │ │ │ -_7_1_9 typedef typename _B_a_s_e_:_:_D_o_m_a_i_n_V_e_c_t_o_r _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -720 │ │ │ │ │ -_7_2_1 _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l(unsigned int _o_r_d_e_r) │ │ │ │ │ -722 : _B_a_s_e(geometry,_o_r_d_e_r), basis_(_o_r_d_e_r) │ │ │ │ │ -723 {} │ │ │ │ │ -724 │ │ │ │ │ -_7_2_5 const unsigned int *_s_i_z_e_s ( ) const │ │ │ │ │ -726 { │ │ │ │ │ -727 return basis_._s_i_z_e_s(order_); │ │ │ │ │ -728 } │ │ │ │ │ -729 │ │ │ │ │ -_7_3_0 void _e_v_a_l_u_a_t_e ( const unsigned int deriv, const _D_o_m_a_i_n_V_e_c_t_o_r &x, │ │ │ │ │ -731 _F_i_e_l_d *const values ) const │ │ │ │ │ -732 { │ │ │ │ │ -733 basis_._e_v_a_l_u_a_t_e(deriv,x,values); │ │ │ │ │ -734 } │ │ │ │ │ -735 │ │ │ │ │ -_7_3_6 void _i_n_t_e_g_r_a_t_e ( _F_i_e_l_d *const values ) const │ │ │ │ │ -737 { │ │ │ │ │ -738 basis_._i_n_t_e_g_r_a_t_e(values); │ │ │ │ │ -739 } │ │ │ │ │ -740 │ │ │ │ │ -741 private: │ │ │ │ │ -742 _M_o_n_o_m_i_a_l_B_a_s_i_s_<_g_e_o_m_e_t_r_y_I_d_,_F_i_e_l_d_> basis_; │ │ │ │ │ -743 using _B_a_s_e_:_:_o_r_d_e_r__; │ │ │ │ │ -744 }; │ │ │ │ │ -745 │ │ │ │ │ -746 // MonomialBasisFactory │ │ │ │ │ -747 // -------------------- │ │ │ │ │ -748 │ │ │ │ │ -749 template< int dim, class F > │ │ │ │ │ -_7_5_0 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -751 { │ │ │ │ │ -_7_5_2 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_7_5_3 typedef F _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -754 │ │ │ │ │ -_7_5_5 typedef unsigned int _K_e_y; │ │ │ │ │ -_7_5_6 typedef const _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> _O_b_j_e_c_t; │ │ │ │ │ -757 │ │ │ │ │ -758 template < int dd, class FF > │ │ │ │ │ -_7_5_9 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -760 { │ │ │ │ │ -_7_6_1 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ -762 }; │ │ │ │ │ -763 │ │ │ │ │ -764 template< GeometryType::Id geometryId > │ │ │ │ │ -_7_6_5 static _O_b_j_e_c_t* _c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ -766 { │ │ │ │ │ -767 return new _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_<_ _g_e_o_m_e_t_r_y_I_d_,_ _S_t_o_r_a_g_e_F_i_e_l_d_ _>( order ); │ │ │ │ │ -768 } │ │ │ │ │ -_7_6_9 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -770 }; │ │ │ │ │ -771 │ │ │ │ │ -772 │ │ │ │ │ -773 │ │ │ │ │ -774 // MonomialBasisProvider │ │ │ │ │ -775 // --------------------- │ │ │ │ │ -776 │ │ │ │ │ -777 template< int dim, class SF > │ │ │ │ │ -_7_7_8 struct _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ -779 : public TopologySingletonFactory< MonomialBasisFactory< dim, SF > > │ │ │ │ │ -780 { │ │ │ │ │ -_7_8_1 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_7_8_2 typedef SF _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -783 template < int dd, class FF > │ │ │ │ │ -_7_8_4 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -785 { │ │ │ │ │ -_7_8_6 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ -787 }; │ │ │ │ │ -788 }; │ │ │ │ │ -789 │ │ │ │ │ -790} │ │ │ │ │ -791 │ │ │ │ │ -792#endif │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ -_t_e_n_s_o_r_._h_h │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +102 } │ │ │ │ │ +103 } │ │ │ │ │ +104 │ │ │ │ │ +105 }; │ │ │ │ │ +106} │ │ │ │ │ +107 │ │ │ │ │ +108#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_n_u_m_B_a_s_e_F_u_n_c_t_i_o_n_s__ │ │ │ │ │ -unsigned int * numBaseFunctions_ │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_c_o_m_p_u_t_e_S_i_z_e_s │ │ │ │ │ -void computeSizes(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_s_i_z_e_s__ │ │ │ │ │ -unsigned int * sizes_ │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ -MonomialBasisSize() │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_~_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e │ │ │ │ │ -~MonomialBasisSize() │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -unsigned int operator()(const unsigned int order) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_m_a_x_O_r_d_e_r__ │ │ │ │ │ -unsigned int maxOrder_ │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_m_a_x_O_r_d_e_r │ │ │ │ │ -unsigned int maxOrder() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:121 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_S_i_z_e_:_:_i_n_s_t_a_n_c_e │ │ │ │ │ -static This & instance() │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:446 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -Dune::FieldVector< Field, dimRange > RangeVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:453 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ -const unsigned int * sizes() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:471 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_t_o_p_o_l_o_g_y_I_d │ │ │ │ │ -unsigned int topologyId() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:493 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -void integrate(Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:552 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_F_i_e_l_d │ │ │ │ │ -Base::Field Field │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:449 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -void integrate(Field *const values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:547 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:447 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:451 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:505 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:531 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, FieldVector< Field, Derivatives< Field, │ │ │ │ │ -dimension, 1, deriv, DerivativeLayoutNS::value >::size > *values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:524 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ -layout > *values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:518 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:538 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_i_z_e │ │ │ │ │ -MonomialBasisSize< geometryId > Size │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:455 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:512 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -MonomialBasis(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:457 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_e_r_i_v_S_i_z_e │ │ │ │ │ -unsigned int derivSize(const unsigned int deriv) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:482 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ -const unsigned int * sizes(unsigned int order) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:465 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:488 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:177 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_S_i_z_e │ │ │ │ │ -MonomialBasisSize< GeometryTypes::simplex(dim).toId() > Size │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_c_o_p_y │ │ │ │ │ -static void copy(const unsigned int deriv, F *&wit, F *&rit, const unsigned int │ │ │ │ │ -numBaseFunctions, const F &z) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:181 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_H_e_l_p_e_r_:_:_M_y_S_i_z_e │ │ │ │ │ -MonomialBasisSize< GeometryTypes::simplex(mydim).toId() > MySize │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:178 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:234 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -FieldVector< Field, dimDomain > DomainVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:242 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:238 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_d_i_m_D_o_m_a_i_n │ │ │ │ │ -static const unsigned int dimDomain │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:571 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:576 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -StandardMonomialBasis(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:579 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:577 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:592 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:598 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:597 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_a_n_d_a_r_d_B_i_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -StandardBiMonomialBasis(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:600 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_g_e_o_m_e_t_r_y__ │ │ │ │ │ -GeometryType geometry_ │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:706 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -FieldVector< Field, dimension > DomainVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:621 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r__ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:705 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:674 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Field *const values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:650 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:616 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:668 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:680 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:637 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const unsigned int dimRange │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:619 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ -F StorageField │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:617 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:618 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:632 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_R_a_n_g_e_V_e_c_t_o_r │ │ │ │ │ -FieldVector< Field, dimRange > RangeVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:622 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_~_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -virtual ~VirtualMonomialBasis() │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:628 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -virtual void evaluate(const unsigned int deriv, const DomainVector &x, Field │ │ │ │ │ -*const values) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -virtual void integrate(Field *const values) const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Dune::FieldVector< Field, size > *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:656 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DVector &x, RVector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:689 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:642 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const DomainVector &x, Derivatives< Field, dimension, 1, deriv, │ │ │ │ │ -layout > *values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:662 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -VirtualMonomialBasis(const GeometryType >, unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:624 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ -virtual const unsigned int * sizes() const =0 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -void integrate(Vector &values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:700 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:712 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -void integrate(Field *const values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:736 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_s_i_z_e_s │ │ │ │ │ -const unsigned int * sizes() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:725 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Base::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:719 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_F_i_e_l_d │ │ │ │ │ -Base::Field Field │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:718 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:730 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_I_m_p_l │ │ │ │ │ -VirtualMonomialBasisImpl(unsigned int order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:721 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:751 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:769 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const VirtualMonomialBasis< dimension, F > Object │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:756 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:765 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ -F StorageField │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:753 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:752 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -unsigned int Key │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:755 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:760 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -MonomialBasisFactory< dd, FF > Type │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:761 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:781 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_S_t_o_r_a_g_e_F_i_e_l_d │ │ │ │ │ -SF StorageField │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:782 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:785 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:786 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localinterpolation.hh:22 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolationhelper.hh File Reference │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,55 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
interpolationhelper.hh File Reference
│ │ │ │ +
hierarchicalsimplexp2localbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ + │ │ │ │ +

Hierarchical p2 shape functions for the simplex. │ │ │ │ +More...

│ │ │ │ +
#include <numeric>
│ │ │ │ #include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/concept.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::InterpolationHelper< F, dimension >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, dim >
 
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 1 >
 Hierarchical P2 basis in 1d. More...
 
struct  Dune::InterpolationHelper< F, dimension >::Helper< Func, Vector, true >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 2 >
 Hierarchical P2 basis in 2d. More...
 
struct  Dune::InterpolationHelper< F, dimension >::Helper< Basis, Matrix, false >
class  Dune::HierarchicalSimplexP2LocalBasis< D, R, 3 >
 Hierarchical P2 basis in 3d. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Hierarchical p2 shape functions for the simplex.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -interpolationhelper.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +hierarchicalsimplexp2localbasis.hh File Reference │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. _M_o_r_e_._._. │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e │ │ │ │ │ - _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _> │ │ │ │ │ +  Hierarchical P2 basis in 1d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_ _F_,_ _d_i_m_e_n_s_i_o_n_ _>_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_, │ │ │ │ │ - _f_a_l_s_e_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _> │ │ │ │ │ +  Hierarchical P2 basis in 2d. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _> │ │ │ │ │ +  Hierarchical P2 basis in 3d. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Hierarchical p2 shape functions for the simplex. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00182_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: interpolationhelper.hh Source File │ │ │ │ +dune-localfunctions: hierarchicalsimplexp2localbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,367 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
interpolationhelper.hh
│ │ │ │ +
hierarchicalsimplexp2localbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ -
6#define GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ +
5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11#include <dune/common/concept.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 // A small helper class to avoid having to
│ │ │ │ -
18 // write the interpolation twice (once for function
│ │ │ │ -
19 // and once for a basis)
│ │ │ │ -
20 template< class F, unsigned int dimension >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ -
23 template <class Func,class Container, bool type>
│ │ │ │ -
24 struct Helper;
│ │ │ │ -
25 };
│ │ │ │ -
│ │ │ │ -
26 template <class F,unsigned int d>
│ │ │ │ -
27 template <class Func,class Vector>
│ │ │ │ -
│ │ │ │ -
28 struct InterpolationHelper<F,d>::Helper<Func,Vector,true>
│ │ │ │ -
29 // Func is of Function type
│ │ │ │ -
30 {
│ │ │ │ -
31 typedef std::vector< Dune::FieldVector<F,d> > Result;
│ │ │ │ -
│ │ │ │ -
32 Helper(const Func & func, Vector &vec)
│ │ │ │ -
33 : func_(func),
│ │ │ │ -
34 vec_(vec),
│ │ │ │ -
35 tmp_(1)
│ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
37 const typename Vector::value_type &operator()(unsigned int row,unsigned int col)
│ │ │ │ -
38 {
│ │ │ │ -
39 return vec_[row];
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41 template <class Fy>
│ │ │ │ -
│ │ │ │ -
42 void set(unsigned int row,unsigned int col,
│ │ │ │ -
43 const Fy &val)
│ │ │ │ -
44 {
│ │ │ │ -
45 assert(col==0);
│ │ │ │ -
46 assert(row<vec_.size());
│ │ │ │ -
47 field_cast( val, vec_[row] );
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49 template <class Fy>
│ │ │ │ -
│ │ │ │ -
50 void add(unsigned int row,unsigned int col,
│ │ │ │ -
51 const Fy &val)
│ │ │ │ -
52 {
│ │ │ │ -
53 assert(col==0);
│ │ │ │ -
54 assert(row<vec_.size());
│ │ │ │ -
55 vec_[row] += field_cast<typename Vector::value_type>(val);
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57 template <class DomainVector,
│ │ │ │ -
58 std::enable_if_t<models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ -
│ │ │ │ -
59 const Result &evaluate(const DomainVector &x) const
│ │ │ │ -
60 {
│ │ │ │ -
61 field_cast(func_(x), tmp_[0] );
│ │ │ │ -
62 return tmp_;
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64 template <class DomainVector,
│ │ │ │ -
65 std::enable_if_t<not models<Impl::FunctionWithCallOperator<DomainVector>, Func>(), int> = 0>
│ │ │ │ -
│ │ │ │ -
66 const Result &evaluate(const DomainVector &x) const
│ │ │ │ -
67 {
│ │ │ │ -
68 typename Func::DomainType xx ;
│ │ │ │ -
69 typename Func::RangeType ff ;
│ │ │ │ -
70 field_cast(x,xx);
│ │ │ │ -
71 func_.evaluate(xx,ff);
│ │ │ │ -
72 field_cast(ff, tmp_[0] );
│ │ │ │ -
73 return tmp_;
│ │ │ │ -
74 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
75 unsigned int size() const
│ │ │ │ -
76 {
│ │ │ │ -
77 return 1;
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79 const Func &func_;
│ │ │ │ -
80 Vector &vec_;
│ │ │ │ -
81 mutable Result tmp_;
│ │ │ │ -
82 };
│ │ │ │ -
│ │ │ │ -
83 template <class F,unsigned int d>
│ │ │ │ -
84 template <class Basis,class Matrix>
│ │ │ │ -
│ │ │ │ -
85 struct InterpolationHelper<F,d>::Helper<Basis,Matrix,false>
│ │ │ │ -
86 // Func is of Basis type
│ │ │ │ -
87 {
│ │ │ │ -
88 typedef std::vector< Dune::FieldVector<F,d> > Result;
│ │ │ │ -
│ │ │ │ -
89 Helper(const Basis & basis, Matrix &matrix)
│ │ │ │ -
90 : basis_(basis),
│ │ │ │ -
91 matrix_(matrix),
│ │ │ │ -
92 tmp_(basis.size()) {}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
93 const F &operator()(unsigned int row,unsigned int col) const
│ │ │ │ -
94 {
│ │ │ │ -
95 return matrix_(row,col);
│ │ │ │ -
96 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
97 F &operator()(unsigned int row,unsigned int col)
│ │ │ │ -
98 {
│ │ │ │ -
99 return matrix_(row,col);
│ │ │ │ -
100 }
│ │ │ │ -
│ │ │ │ -
101 template <class Fy>
│ │ │ │ -
│ │ │ │ -
102 void set(unsigned int row,unsigned int col,
│ │ │ │ -
103 const Fy &val)
│ │ │ │ -
104 {
│ │ │ │ -
105 assert(col<matrix_.cols());
│ │ │ │ -
106 assert(row<matrix_.rows());
│ │ │ │ -
107 field_cast(val,matrix_(row,col));
│ │ │ │ -
108 }
│ │ │ │ -
│ │ │ │ -
109 template <class Fy>
│ │ │ │ -
│ │ │ │ -
110 void add(unsigned int row,unsigned int col,
│ │ │ │ -
111 const Fy &val)
│ │ │ │ -
112 {
│ │ │ │ -
113 assert(col<matrix_.cols());
│ │ │ │ -
114 assert(row<matrix_.rows());
│ │ │ │ -
115 matrix_(row,col) += val;
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117 template <class DomainVector>
│ │ │ │ -
│ │ │ │ -
118 const Result &evaluate(const DomainVector &x) const
│ │ │ │ -
119 {
│ │ │ │ -
120 basis_.template evaluate<0>(x,tmp_);
│ │ │ │ -
121 return tmp_;
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
123 unsigned int size() const
│ │ │ │ -
124 {
│ │ │ │ -
125 return basis_.size();
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
128 const Basis &basis_;
│ │ │ │ -
129 Matrix &matrix_;
│ │ │ │ -
130 mutable Result tmp_;
│ │ │ │ -
131 };
│ │ │ │ -
│ │ │ │ -
132}
│ │ │ │ -
133#endif // GENERIC_INTERPOLATIONHELPER_HH
│ │ │ │ - │ │ │ │ +
12#include <numeric>
│ │ │ │ +
13
│ │ │ │ +
14#include <dune/common/fvector.hh>
│ │ │ │ +
15#include <dune/common/fmatrix.hh>
│ │ │ │ +
16
│ │ │ │ + │ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not implemented for dim > 3.");
│ │ │ │ +
28 }
│ │ │ │ +
│ │ │ │ +
29 };
│ │ │ │ +
│ │ │ │ +
30
│ │ │ │ +
45 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 {
│ │ │ │ +
48 public:
│ │ │ │ +
50 typedef LocalBasisTraits<D,1,Dune::FieldVector<D,1>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
51 Dune::FieldMatrix<R,1,1> > Traits;
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ +
54 unsigned int size () const
│ │ │ │ +
55 {
│ │ │ │ +
56 return 3;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ +
60 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
61 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
62 {
│ │ │ │ +
63 out.resize(3);
│ │ │ │ +
64
│ │ │ │ +
65 out[0] = 1-in[0];
│ │ │ │ +
66 out[1] = 1-4*(in[0]-0.5)*(in[0]-0.5);
│ │ │ │ +
67 out[2] = in[0];
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
71 inline void
│ │ │ │ +
│ │ │ │ +
72 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
73 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
74 {
│ │ │ │ +
75 out.resize(3);
│ │ │ │ +
76
│ │ │ │ +
77 out[0][0][0] = -1;
│ │ │ │ +
78 out[1][0][0] = 4-8*in[0];
│ │ │ │ +
79 out[2][0][0] = 1;
│ │ │ │ +
80 }
│ │ │ │ +
│ │ │ │ +
81
│ │ │ │ +
│ │ │ │ +
83 void partial (const std::array<unsigned int, 1>& order,
│ │ │ │ +
84 const typename Traits::DomainType& in, // position
│ │ │ │ +
85 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
86 {
│ │ │ │ +
87 auto totalOrder = order[0];
│ │ │ │ +
88 if (totalOrder == 0) {
│ │ │ │ +
89 evaluateFunction(in, out);
│ │ │ │ +
90 } else if (totalOrder == 1) {
│ │ │ │ +
91 out.resize(size());
│ │ │ │ +
92 out[0] = -1;
│ │ │ │ +
93 out[1] = 4-8*in[0];
│ │ │ │ +
94 out[2] = 1;
│ │ │ │ +
95 } else if (totalOrder == 2) {
│ │ │ │ +
96 out.resize(size());
│ │ │ │ +
97 out[0] = 0;
│ │ │ │ +
98 out[1] = -8;
│ │ │ │ +
99 out[2] = 0;
│ │ │ │ +
100 } else {
│ │ │ │ +
101 out.resize(size());
│ │ │ │ +
102 out[0] = out[1] = out[2] = 0;
│ │ │ │ +
103 }
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
108 unsigned int order () const
│ │ │ │ +
109 {
│ │ │ │ +
110 return 2;
│ │ │ │ +
111 }
│ │ │ │ +
│ │ │ │ +
112
│ │ │ │ +
113 };
│ │ │ │ +
│ │ │ │ +
114
│ │ │ │ +
134 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
136 {
│ │ │ │ +
137 public:
│ │ │ │ +
139 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
140 Dune::FieldMatrix<R,1,2> > Traits;
│ │ │ │ +
141
│ │ │ │ +
│ │ │ │ +
143 unsigned int size () const
│ │ │ │ +
144 {
│ │ │ │ +
145 return 6;
│ │ │ │ +
146 }
│ │ │ │ +
│ │ │ │ +
147
│ │ │ │ +
│ │ │ │ +
149 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
150 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
151 {
│ │ │ │ +
152 out.resize(6);
│ │ │ │ +
153
│ │ │ │ +
154 out[0] = 1 - in[0] - in[1];
│ │ │ │ +
155 out[1] = 4*in[0]*(1-in[0]-in[1]);
│ │ │ │ +
156 out[2] = in[0];
│ │ │ │ +
157 out[3] = 4*in[1]*(1-in[0]-in[1]);
│ │ │ │ +
158 out[4] = 4*in[0]*in[1];
│ │ │ │ +
159 out[5] = in[1];
│ │ │ │ +
160
│ │ │ │ +
161 }
│ │ │ │ +
│ │ │ │ +
162
│ │ │ │ +
164 inline void
│ │ │ │ +
│ │ │ │ +
165 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
166 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
167 {
│ │ │ │ +
168 out.resize(6);
│ │ │ │ +
169
│ │ │ │ +
170 out[0][0][0] = -1; out[0][0][1] = -1;
│ │ │ │ +
171 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0];
│ │ │ │ +
172 out[2][0][0] = 1; out[2][0][1] = 0;
│ │ │ │ +
173 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1];
│ │ │ │ +
174 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0];
│ │ │ │ +
175 out[5][0][0] = 0; out[5][0][1] = 1;
│ │ │ │ +
176 }
│ │ │ │ +
│ │ │ │ +
177
│ │ │ │ +
│ │ │ │ +
179 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
180 const typename Traits::DomainType& in, // position
│ │ │ │ +
181 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
182 {
│ │ │ │ +
183 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
184 if (totalOrder == 0) {
│ │ │ │ +
185 evaluateFunction(in, out);
│ │ │ │ +
186 } else if (totalOrder == 1) {
│ │ │ │ +
187 out.resize(size());
│ │ │ │ +
188 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
189
│ │ │ │ +
190 switch (direction) {
│ │ │ │ +
191 case 0:
│ │ │ │ +
192 out[0] = -1;
│ │ │ │ +
193 out[1] = 4-8*in[0]-4*in[1];
│ │ │ │ +
194 out[2] = 1;
│ │ │ │ +
195 out[3] = -4*in[1];
│ │ │ │ +
196 out[4] = 4*in[1];
│ │ │ │ +
197 out[5] = 0;
│ │ │ │ +
198 break;
│ │ │ │ +
199 case 1:
│ │ │ │ +
200 out[0] = -1;
│ │ │ │ +
201 out[1] = -4*in[0];
│ │ │ │ +
202 out[2] = 0;
│ │ │ │ +
203 out[3] = 4-4*in[0]-8*in[1];
│ │ │ │ +
204 out[4] = 4*in[0];
│ │ │ │ +
205 out[5] = 1;
│ │ │ │ +
206 break;
│ │ │ │ +
207 default:
│ │ │ │ +
208 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
209 }
│ │ │ │ +
210 } else {
│ │ │ │ +
211 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
212 }
│ │ │ │ +
213 }
│ │ │ │ +
│ │ │ │ +
214
│ │ │ │ +
│ │ │ │ +
217 unsigned int order () const
│ │ │ │ +
218 {
│ │ │ │ +
219 return 2;
│ │ │ │ +
220 }
│ │ │ │ +
│ │ │ │ +
221
│ │ │ │ +
222 };
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
247 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
249 {
│ │ │ │ +
250 public:
│ │ │ │ +
252 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ +
253 Dune::FieldMatrix<R,1,3> > Traits;
│ │ │ │ +
254
│ │ │ │ +
│ │ │ │ +
256 unsigned int size () const
│ │ │ │ +
257 {
│ │ │ │ +
258 return 10;
│ │ │ │ +
259 }
│ │ │ │ +
│ │ │ │ +
260
│ │ │ │ +
│ │ │ │ +
262 void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
263 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
264 {
│ │ │ │ +
265 out.resize(10);
│ │ │ │ +
266
│ │ │ │ +
267 out[0] = 1 - in[0] - in[1] - in[2];
│ │ │ │ +
268 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
269 out[2] = in[0];
│ │ │ │ +
270 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
271 out[4] = 4 * in[0] * in[1];
│ │ │ │ +
272 out[5] = in[1];
│ │ │ │ +
273 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]);
│ │ │ │ +
274 out[7] = 4 * in[0] * in[2];
│ │ │ │ +
275 out[8] = 4 * in[1] * in[2];
│ │ │ │ +
276 out[9] = in[2];
│ │ │ │ +
277 }
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
│ │ │ │ +
280 void evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
281 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
282 {
│ │ │ │ +
283 out.resize(10);
│ │ │ │ +
284
│ │ │ │ +
285 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1;
│ │ │ │ +
286 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1][0][2] = -4*in[0];
│ │ │ │ +
287 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ +
288 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3][0][2] = -4*in[1];
│ │ │ │ +
289 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0;
│ │ │ │ +
290 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0;
│ │ │ │ +
291 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ +
292 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0];
│ │ │ │ +
293 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1];
│ │ │ │ +
294 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1;
│ │ │ │ +
295 }
│ │ │ │ +
│ │ │ │ +
296
│ │ │ │ +
│ │ │ │ +
298 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
299 const typename Traits::DomainType& in, // position
│ │ │ │ +
300 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
301 {
│ │ │ │ +
302 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
303 if (totalOrder == 0) {
│ │ │ │ +
304 evaluateFunction(in, out);
│ │ │ │ +
305 } else if (totalOrder == 1) {
│ │ │ │ +
306 out.resize(size());
│ │ │ │ +
307 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
308
│ │ │ │ +
309 switch (direction) {
│ │ │ │ +
310 case 0:
│ │ │ │ +
311 out[0] = -1;
│ │ │ │ +
312 out[1] = 4-8*in[0]-4*in[1]-4*in[2];
│ │ │ │ +
313 out[2] = 1;
│ │ │ │ +
314 out[3] = -4*in[1];
│ │ │ │ +
315 out[4] = 4*in[1];
│ │ │ │ +
316 out[5] = 0;
│ │ │ │ +
317 out[6] = -4*in[2];
│ │ │ │ +
318 out[7] = 4*in[2];
│ │ │ │ +
319 out[8] = 0;
│ │ │ │ +
320 out[9] = 0;
│ │ │ │ +
321 break;
│ │ │ │ +
322 case 1:
│ │ │ │ +
323 out[0] = -1;
│ │ │ │ +
324 out[1] = -4*in[0];
│ │ │ │ +
325 out[2] = 0;
│ │ │ │ +
326 out[3] = 4-4*in[0]-8*in[1]-4*in[2];
│ │ │ │ +
327 out[4] = 4*in[0];
│ │ │ │ +
328 out[5] = 1;
│ │ │ │ +
329 out[6] = -4*in[2];
│ │ │ │ +
330 out[7] = 0;
│ │ │ │ +
331 out[8] = 4*in[2];
│ │ │ │ +
332 out[9] = 0;
│ │ │ │ +
333 break;
│ │ │ │ +
334 case 2:
│ │ │ │ +
335 out[0] = -1;
│ │ │ │ +
336 out[1] = -4*in[0];
│ │ │ │ +
337 out[2] = 0;
│ │ │ │ +
338 out[3] = -4*in[1];
│ │ │ │ +
339 out[4] = 0;
│ │ │ │ +
340 out[5] = 0;
│ │ │ │ +
341 out[6] = 4-4*in[0]-4*in[1]-8*in[2];
│ │ │ │ +
342 out[7] = 4*in[0];
│ │ │ │ +
343 out[8] = 4*in[1];
│ │ │ │ +
344 out[9] = 1;
│ │ │ │ +
345 break;
│ │ │ │ +
346 default:
│ │ │ │ +
347 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
348 }
│ │ │ │ +
349 } else {
│ │ │ │ +
350 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
351 }
│ │ │ │ +
352 }
│ │ │ │ +
│ │ │ │ +
353
│ │ │ │ +
│ │ │ │ +
356 unsigned int order () const
│ │ │ │ +
357 {
│ │ │ │ +
358 return 2;
│ │ │ │ +
359 }
│ │ │ │ +
│ │ │ │ +
360
│ │ │ │ +
361 };
│ │ │ │ +
│ │ │ │ +
362}
│ │ │ │ +
363#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition interpolationhelper.hh:22
│ │ │ │ -
Definition interpolationhelper.hh:24
│ │ │ │ -
void add(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:50
│ │ │ │ -
const Func & func_
Definition interpolationhelper.hh:79
│ │ │ │ -
Helper(const Func &func, Vector &vec)
Definition interpolationhelper.hh:32
│ │ │ │ -
const Result & evaluate(const DomainVector &x) const
Definition interpolationhelper.hh:59
│ │ │ │ -
std::vector< Dune::FieldVector< F, d > > Result
Definition interpolationhelper.hh:31
│ │ │ │ -
unsigned int size() const
Definition interpolationhelper.hh:75
│ │ │ │ -
Vector & vec_
Definition interpolationhelper.hh:80
│ │ │ │ -
void set(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:42
│ │ │ │ -
Result tmp_
Definition interpolationhelper.hh:81
│ │ │ │ -
const Vector::value_type & operator()(unsigned int row, unsigned int col)
Definition interpolationhelper.hh:37
│ │ │ │ -
const Basis & basis_
Definition interpolationhelper.hh:128
│ │ │ │ -
const Result & evaluate(const DomainVector &x) const
Definition interpolationhelper.hh:118
│ │ │ │ -
F & operator()(unsigned int row, unsigned int col)
Definition interpolationhelper.hh:97
│ │ │ │ -
void set(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:102
│ │ │ │ -
Helper(const Basis &basis, Matrix &matrix)
Definition interpolationhelper.hh:89
│ │ │ │ -
unsigned int size() const
Definition interpolationhelper.hh:123
│ │ │ │ -
Result tmp_
Definition interpolationhelper.hh:130
│ │ │ │ -
void add(unsigned int row, unsigned int col, const Fy &val)
Definition interpolationhelper.hh:110
│ │ │ │ -
std::vector< Dune::FieldVector< F, d > > Result
Definition interpolationhelper.hh:88
│ │ │ │ -
Matrix & matrix_
Definition interpolationhelper.hh:129
│ │ │ │ -
const F & operator()(unsigned int row, unsigned int col) const
Definition interpolationhelper.hh:93
│ │ │ │ - │ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Definition hierarchicalsimplexp2localbasis.hh:23
│ │ │ │ +
HierarchicalSimplexP2LocalBasis()
Definition hierarchicalsimplexp2localbasis.hh:25
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (2, in this case)
Definition hierarchicalsimplexp2localbasis.hh:108
│ │ │ │ +
LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 1 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:51
│ │ │ │ +
void partial(const std::array< unsigned int, 1 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:83
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:54
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:72
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:60
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 2 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:140
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:179
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:143
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (2 in this case)
Definition hierarchicalsimplexp2localbasis.hh:217
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:165
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:149
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, 3 > > Traits
export type traits for function signature
Definition hierarchicalsimplexp2localbasis.hh:253
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:262
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:280
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition hierarchicalsimplexp2localbasis.hh:256
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition hierarchicalsimplexp2localbasis.hh:298
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions (2 in this case)
Definition hierarchicalsimplexp2localbasis.hh:356
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,223 +1,403 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -interpolationhelper.hh │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l │ │ │ │ │ + * _h_i_e_r_a_r_c_h_i_c_a_l_p_2 │ │ │ │ │ +hierarchicalsimplexp2localbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ -6#define GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ +5#ifndef DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_HIERARCHICAL_SIMPLEX_P2_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 // A small helper class to avoid having to │ │ │ │ │ -18 // write the interpolation twice (once for function │ │ │ │ │ -19 // and once for a basis) │ │ │ │ │ -20 template< class F, unsigned int dimension > │ │ │ │ │ -_2_1 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ -22 { │ │ │ │ │ -23 template │ │ │ │ │ -_2_4 struct _H_e_l_p_e_r; │ │ │ │ │ -25 }; │ │ │ │ │ -26 template │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r::_H_e_l_p_e_r │ │ │ │ │ -29 // Func is of Function type │ │ │ │ │ -30 { │ │ │ │ │ -_3_1 typedef std::vector< Dune::FieldVector > _R_e_s_u_l_t; │ │ │ │ │ -_3_2 _H_e_l_p_e_r(const Func & func, Vector &vec) │ │ │ │ │ -33 : func_(func), │ │ │ │ │ -34 vec_(vec), │ │ │ │ │ -35 tmp_(1) │ │ │ │ │ -36 {} │ │ │ │ │ -_3_7 const typename Vector::value_type &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int │ │ │ │ │ -col) │ │ │ │ │ -38 { │ │ │ │ │ -39 return vec_[row]; │ │ │ │ │ -40 } │ │ │ │ │ -41 template │ │ │ │ │ -_4_2 void _s_e_t(unsigned int row,unsigned int col, │ │ │ │ │ -43 const Fy &val) │ │ │ │ │ -44 { │ │ │ │ │ -45 assert(col==0); │ │ │ │ │ -46 assert(row │ │ │ │ │ -_5_0 void _a_d_d(unsigned int row,unsigned int col, │ │ │ │ │ -51 const Fy &val) │ │ │ │ │ -52 { │ │ │ │ │ -53 assert(col==0); │ │ │ │ │ -54 assert(row(val); │ │ │ │ │ -56 } │ │ │ │ │ -57 template , Func> │ │ │ │ │ -(), int> = 0> │ │ │ │ │ -_5_9 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ -60 { │ │ │ │ │ -61 _f_i_e_l_d___c_a_s_t(func_(x), tmp_[0] ); │ │ │ │ │ -62 return tmp_; │ │ │ │ │ -63 } │ │ │ │ │ -64 template , │ │ │ │ │ -Func>(), int> = 0> │ │ │ │ │ -_6_6 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ -67 { │ │ │ │ │ -68 typename Func::DomainType xx ; │ │ │ │ │ -69 typename Func::RangeType ff ; │ │ │ │ │ -70 _f_i_e_l_d___c_a_s_t(x,xx); │ │ │ │ │ -71 func_.evaluate(xx,ff); │ │ │ │ │ -72 _f_i_e_l_d___c_a_s_t(ff, tmp_[0] ); │ │ │ │ │ -73 return tmp_; │ │ │ │ │ -74 } │ │ │ │ │ -_7_5 unsigned int _s_i_z_e() const │ │ │ │ │ -76 { │ │ │ │ │ -77 return 1; │ │ │ │ │ -78 } │ │ │ │ │ -_7_9 const Func &_f_u_n_c__; │ │ │ │ │ -_8_0 Vector &_v_e_c__; │ │ │ │ │ -_8_1 mutable _R_e_s_u_l_t _t_m_p__; │ │ │ │ │ -82 }; │ │ │ │ │ -83 template │ │ │ │ │ -84 template │ │ │ │ │ -_8_5 struct _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r::_H_e_l_p_e_r │ │ │ │ │ -86 // Func is of Basis type │ │ │ │ │ -87 { │ │ │ │ │ -_8_8 typedef std::vector< Dune::FieldVector > _R_e_s_u_l_t; │ │ │ │ │ -_8_9 _H_e_l_p_e_r(const Basis & basis, Matrix &matrix) │ │ │ │ │ -90 : basis_(basis), │ │ │ │ │ -91 matrix_(matrix), │ │ │ │ │ -92 tmp_(basis.size()) {} │ │ │ │ │ -_9_3 const F &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int col) const │ │ │ │ │ -94 { │ │ │ │ │ -95 return matrix_(row,col); │ │ │ │ │ -96 } │ │ │ │ │ -_9_7 F &_o_p_e_r_a_t_o_r_(_)(unsigned int row,unsigned int col) │ │ │ │ │ -98 { │ │ │ │ │ -99 return matrix_(row,col); │ │ │ │ │ -100 } │ │ │ │ │ -101 template │ │ │ │ │ -_1_0_2 void _s_e_t(unsigned int row,unsigned int col, │ │ │ │ │ -103 const Fy &val) │ │ │ │ │ -104 { │ │ │ │ │ -105 assert(col │ │ │ │ │ -_1_1_0 void _a_d_d(unsigned int row,unsigned int col, │ │ │ │ │ -111 const Fy &val) │ │ │ │ │ -112 { │ │ │ │ │ -113 assert(col │ │ │ │ │ -_1_1_8 const _R_e_s_u_l_t &_e_v_a_l_u_a_t_e(const DomainVector &x) const │ │ │ │ │ -119 { │ │ │ │ │ -120 basis_.template evaluate<0>(x,tmp_); │ │ │ │ │ -121 return tmp_; │ │ │ │ │ -122 } │ │ │ │ │ -_1_2_3 unsigned int _s_i_z_e() const │ │ │ │ │ -124 { │ │ │ │ │ -125 return basis_.size(); │ │ │ │ │ -126 } │ │ │ │ │ -127 │ │ │ │ │ -_1_2_8 const Basis &_b_a_s_i_s__; │ │ │ │ │ -_1_2_9 Matrix &_m_a_t_r_i_x__; │ │ │ │ │ -_1_3_0 mutable _R_e_s_u_l_t _t_m_p__; │ │ │ │ │ -131 }; │ │ │ │ │ -132} │ │ │ │ │ -133#endif // GENERIC_INTERPOLATIONHELPER_HH │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16 │ │ │ │ │ +17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +23 { │ │ │ │ │ +24 public: │ │ │ │ │ +_2_5 _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s() │ │ │ │ │ +26 { │ │ │ │ │ +27 DUNE_THROW(Dune::NotImplemented,"HierarchicalSimplexP2LocalBasis not │ │ │ │ │ +implemented for dim > 3."); │ │ │ │ │ +28 } │ │ │ │ │ +29 }; │ │ │ │ │ +30 │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +47 { │ │ │ │ │ +48 public: │ │ │ │ │ +50 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_1_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_1_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_5_1 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +52 │ │ │ │ │ +_5_4 unsigned int _s_i_z_e () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return 3; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_6_0 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +61 std::vector& out) const │ │ │ │ │ +62 { │ │ │ │ │ +63 out.resize(3); │ │ │ │ │ +64 │ │ │ │ │ +65 out[0] = 1-in[0]; │ │ │ │ │ +66 out[1] = 1-4*(in[0]-0.5)*(in[0]-0.5); │ │ │ │ │ +67 out[2] = in[0]; │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +71 inline void │ │ │ │ │ +_7_2 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +73 std::vector& out) const // return value │ │ │ │ │ +74 { │ │ │ │ │ +75 out.resize(3); │ │ │ │ │ +76 │ │ │ │ │ +77 out[0][0][0] = -1; │ │ │ │ │ +78 out[1][0][0] = 4-8*in[0]; │ │ │ │ │ +79 out[2][0][0] = 1; │ │ │ │ │ +80 } │ │ │ │ │ +81 │ │ │ │ │ +_8_3 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +84 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +85 std::vector& out) const // return value │ │ │ │ │ +86 { │ │ │ │ │ +87 auto totalOrder = order[0]; │ │ │ │ │ +88 if (totalOrder == 0) { │ │ │ │ │ +89 evaluateFunction(in, out); │ │ │ │ │ +90 } else if (totalOrder == 1) { │ │ │ │ │ +91 out.resize(size()); │ │ │ │ │ +92 out[0] = -1; │ │ │ │ │ +93 out[1] = 4-8*in[0]; │ │ │ │ │ +94 out[2] = 1; │ │ │ │ │ +95 } else if (totalOrder == 2) { │ │ │ │ │ +96 out.resize(size()); │ │ │ │ │ +97 out[0] = 0; │ │ │ │ │ +98 out[1] = -8; │ │ │ │ │ +99 out[2] = 0; │ │ │ │ │ +100 } else { │ │ │ │ │ +101 out.resize(size()); │ │ │ │ │ +102 out[0] = out[1] = out[2] = 0; │ │ │ │ │ +103 } │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ +109 { │ │ │ │ │ +110 return 2; │ │ │ │ │ +111 } │ │ │ │ │ +112 │ │ │ │ │ +113 }; │ │ │ │ │ +114 │ │ │ │ │ +134 template │ │ │ │ │ +_1_3_5 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +136 { │ │ │ │ │ +137 public: │ │ │ │ │ +139 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_1_4_0 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +141 │ │ │ │ │ +_1_4_3 unsigned int _s_i_z_e () const │ │ │ │ │ +144 { │ │ │ │ │ +145 return 6; │ │ │ │ │ +146 } │ │ │ │ │ +147 │ │ │ │ │ +_1_4_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +150 std::vector& out) const │ │ │ │ │ +151 { │ │ │ │ │ +152 out.resize(6); │ │ │ │ │ +153 │ │ │ │ │ +154 out[0] = 1 - in[0] - in[1]; │ │ │ │ │ +155 out[1] = 4*in[0]*(1-in[0]-in[1]); │ │ │ │ │ +156 out[2] = in[0]; │ │ │ │ │ +157 out[3] = 4*in[1]*(1-in[0]-in[1]); │ │ │ │ │ +158 out[4] = 4*in[0]*in[1]; │ │ │ │ │ +159 out[5] = in[1]; │ │ │ │ │ +160 │ │ │ │ │ +161 } │ │ │ │ │ +162 │ │ │ │ │ +164 inline void │ │ │ │ │ +_1_6_5 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +166 std::vector& out) const // return value │ │ │ │ │ +167 { │ │ │ │ │ +168 out.resize(6); │ │ │ │ │ +169 │ │ │ │ │ +170 out[0][0][0] = -1; out[0][0][1] = -1; │ │ │ │ │ +171 out[1][0][0] = 4-8*in[0]-4*in[1]; out[1][0][1] = -4*in[0]; │ │ │ │ │ +172 out[2][0][0] = 1; out[2][0][1] = 0; │ │ │ │ │ +173 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]; │ │ │ │ │ +174 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; │ │ │ │ │ +175 out[5][0][0] = 0; out[5][0][1] = 1; │ │ │ │ │ +176 } │ │ │ │ │ +177 │ │ │ │ │ +_1_7_9 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +180 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +181 std::vector& out) const // return value │ │ │ │ │ +182 { │ │ │ │ │ +183 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +184 if (totalOrder == 0) { │ │ │ │ │ +185 evaluateFunction(in, out); │ │ │ │ │ +186 } else if (totalOrder == 1) { │ │ │ │ │ +187 out.resize(size()); │ │ │ │ │ +188 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +189 │ │ │ │ │ +190 switch (direction) { │ │ │ │ │ +191 case 0: │ │ │ │ │ +192 out[0] = -1; │ │ │ │ │ +193 out[1] = 4-8*in[0]-4*in[1]; │ │ │ │ │ +194 out[2] = 1; │ │ │ │ │ +195 out[3] = -4*in[1]; │ │ │ │ │ +196 out[4] = 4*in[1]; │ │ │ │ │ +197 out[5] = 0; │ │ │ │ │ +198 break; │ │ │ │ │ +199 case 1: │ │ │ │ │ +200 out[0] = -1; │ │ │ │ │ +201 out[1] = -4*in[0]; │ │ │ │ │ +202 out[2] = 0; │ │ │ │ │ +203 out[3] = 4-4*in[0]-8*in[1]; │ │ │ │ │ +204 out[4] = 4*in[0]; │ │ │ │ │ +205 out[5] = 1; │ │ │ │ │ +206 break; │ │ │ │ │ +207 default: │ │ │ │ │ +208 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +209 } │ │ │ │ │ +210 } else { │ │ │ │ │ +211 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +212 } │ │ │ │ │ +213 } │ │ │ │ │ +214 │ │ │ │ │ +_2_1_7 unsigned int _o_r_d_e_r () const │ │ │ │ │ +218 { │ │ │ │ │ +219 return 2; │ │ │ │ │ +220 } │ │ │ │ │ +221 │ │ │ │ │ +222 }; │ │ │ │ │ +223 │ │ │ │ │ +247 template │ │ │ │ │ +_2_4_8 class _H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +249 { │ │ │ │ │ +250 public: │ │ │ │ │ +252 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,1,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_2_5_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +254 │ │ │ │ │ +_2_5_6 unsigned int _s_i_z_e () const │ │ │ │ │ +257 { │ │ │ │ │ +258 return 10; │ │ │ │ │ +259 } │ │ │ │ │ +260 │ │ │ │ │ +_2_6_2 void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +263 std::vector& out) const │ │ │ │ │ +264 { │ │ │ │ │ +265 out.resize(10); │ │ │ │ │ +266 │ │ │ │ │ +267 out[0] = 1 - in[0] - in[1] - in[2]; │ │ │ │ │ +268 out[1] = 4 * in[0] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +269 out[2] = in[0]; │ │ │ │ │ +270 out[3] = 4 * in[1] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +271 out[4] = 4 * in[0] * in[1]; │ │ │ │ │ +272 out[5] = in[1]; │ │ │ │ │ +273 out[6] = 4 * in[2] * (1 - in[0] - in[1] - in[2]); │ │ │ │ │ +274 out[7] = 4 * in[0] * in[2]; │ │ │ │ │ +275 out[8] = 4 * in[1] * in[2]; │ │ │ │ │ +276 out[9] = in[2]; │ │ │ │ │ +277 } │ │ │ │ │ +278 │ │ │ │ │ +_2_8_0 void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +281 std::vector& out) const // return value │ │ │ │ │ +282 { │ │ │ │ │ +283 out.resize(10); │ │ │ │ │ +284 │ │ │ │ │ +285 out[0][0][0] = -1; out[0][0][1] = -1; out[0][0][2] = -1; │ │ │ │ │ +286 out[1][0][0] = 4-8*in[0]-4*in[1]-4*in[2]; out[1][0][1] = -4*in[0]; out[1] │ │ │ │ │ +[0][2] = -4*in[0]; │ │ │ │ │ +287 out[2][0][0] = 1; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ +288 out[3][0][0] = -4*in[1]; out[3][0][1] = 4-4*in[0]-8*in[1]-4*in[2]; out[3] │ │ │ │ │ +[0][2] = -4*in[1]; │ │ │ │ │ +289 out[4][0][0] = 4*in[1]; out[4][0][1] = 4*in[0]; out[4][0][2] = 0; │ │ │ │ │ +290 out[5][0][0] = 0; out[5][0][1] = 1; out[5][0][2] = 0; │ │ │ │ │ +291 out[6][0][0] = -4*in[2]; out[6][0][1] = -4*in[2]; out[6][0][2] = 4-4*in[0]- │ │ │ │ │ +4*in[1]-8*in[2]; │ │ │ │ │ +292 out[7][0][0] = 4*in[2]; out[7][0][1] = 0; out[7][0][2] = 4*in[0]; │ │ │ │ │ +293 out[8][0][0] = 0; out[8][0][1] = 4*in[2]; out[8][0][2] = 4*in[1]; │ │ │ │ │ +294 out[9][0][0] = 0; out[9][0][1] = 0; out[9][0][2] = 1; │ │ │ │ │ +295 } │ │ │ │ │ +296 │ │ │ │ │ +_2_9_8 void _p_a_r_t_i_a_l (const std::array& order, │ │ │ │ │ +299 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +300 std::vector& out) const // return value │ │ │ │ │ +301 { │ │ │ │ │ +302 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ +303 if (totalOrder == 0) { │ │ │ │ │ +304 evaluateFunction(in, out); │ │ │ │ │ +305 } else if (totalOrder == 1) { │ │ │ │ │ +306 out.resize(size()); │ │ │ │ │ +307 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ +(), order.end(), 1)); │ │ │ │ │ +308 │ │ │ │ │ +309 switch (direction) { │ │ │ │ │ +310 case 0: │ │ │ │ │ +311 out[0] = -1; │ │ │ │ │ +312 out[1] = 4-8*in[0]-4*in[1]-4*in[2]; │ │ │ │ │ +313 out[2] = 1; │ │ │ │ │ +314 out[3] = -4*in[1]; │ │ │ │ │ +315 out[4] = 4*in[1]; │ │ │ │ │ +316 out[5] = 0; │ │ │ │ │ +317 out[6] = -4*in[2]; │ │ │ │ │ +318 out[7] = 4*in[2]; │ │ │ │ │ +319 out[8] = 0; │ │ │ │ │ +320 out[9] = 0; │ │ │ │ │ +321 break; │ │ │ │ │ +322 case 1: │ │ │ │ │ +323 out[0] = -1; │ │ │ │ │ +324 out[1] = -4*in[0]; │ │ │ │ │ +325 out[2] = 0; │ │ │ │ │ +326 out[3] = 4-4*in[0]-8*in[1]-4*in[2]; │ │ │ │ │ +327 out[4] = 4*in[0]; │ │ │ │ │ +328 out[5] = 1; │ │ │ │ │ +329 out[6] = -4*in[2]; │ │ │ │ │ +330 out[7] = 0; │ │ │ │ │ +331 out[8] = 4*in[2]; │ │ │ │ │ +332 out[9] = 0; │ │ │ │ │ +333 break; │ │ │ │ │ +334 case 2: │ │ │ │ │ +335 out[0] = -1; │ │ │ │ │ +336 out[1] = -4*in[0]; │ │ │ │ │ +337 out[2] = 0; │ │ │ │ │ +338 out[3] = -4*in[1]; │ │ │ │ │ +339 out[4] = 0; │ │ │ │ │ +340 out[5] = 0; │ │ │ │ │ +341 out[6] = 4-4*in[0]-4*in[1]-8*in[2]; │ │ │ │ │ +342 out[7] = 4*in[0]; │ │ │ │ │ +343 out[8] = 4*in[1]; │ │ │ │ │ +344 out[9] = 1; │ │ │ │ │ +345 break; │ │ │ │ │ +346 default: │ │ │ │ │ +347 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +348 } │ │ │ │ │ +349 } else { │ │ │ │ │ +350 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +351 } │ │ │ │ │ +352 } │ │ │ │ │ +353 │ │ │ │ │ +_3_5_6 unsigned int _o_r_d_e_r () const │ │ │ │ │ +357 { │ │ │ │ │ +358 return 2; │ │ │ │ │ +359 } │ │ │ │ │ +360 │ │ │ │ │ +361 }; │ │ │ │ │ +362} │ │ │ │ │ +363#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_a_d_d │ │ │ │ │ -void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_f_u_n_c__ │ │ │ │ │ -const Func & func_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_H_e_l_p_e_r │ │ │ │ │ -Helper(const Func &func, Vector &vec) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -const Result & evaluate(const DomainVector &x) const │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_R_e_s_u_l_t │ │ │ │ │ -std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +HierarchicalSimplexP2LocalBasis() │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2, in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 1, Dune::FieldVector< D, 1 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 1 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 1 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_v_e_c__ │ │ │ │ │ -Vector & vec_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_s_e_t │ │ │ │ │ -void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_t_m_p__ │ │ │ │ │ -Result tmp_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:81 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _F_u_n_c_,_ _V_e_c_t_o_r_,_ _t_r_u_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const Vector::value_type & operator()(unsigned int row, unsigned int col) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_b_a_s_i_s__ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -const Result & evaluate(const DomainVector &x) const │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -F & operator()(unsigned int row, unsigned int col) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:97 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_s_e_t │ │ │ │ │ -void set(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:102 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_H_e_l_p_e_r │ │ │ │ │ -Helper(const Basis &basis, Matrix &matrix) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_s_i_z_e │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _1_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 2 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:140 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_t_m_p__ │ │ │ │ │ -Result tmp_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:130 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_a_d_d │ │ │ │ │ -void add(unsigned int row, unsigned int col, const Fy &val) │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:110 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_R_e_s_u_l_t │ │ │ │ │ -std::vector< Dune::FieldVector< F, d > > Result │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_m_a_t_r_i_x__ │ │ │ │ │ -Matrix & matrix_ │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:129 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r_<_ _B_a_s_i_s_,_ _M_a_t_r_i_x_,_ _f_a_l_s_e_ _>_:_:_o_p_e_r_a_t_o_r_(_) │ │ │ │ │ -const F & operator()(unsigned int row, unsigned int col) const │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:93 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:143 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2 in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:217 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:165 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _2_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:149 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 1, Dune::FieldVector< R, │ │ │ │ │ +1 >, Dune::FieldMatrix< R, 1, 3 > > Traits │ │ │ │ │ +export type traits for function signature │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:262 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:280 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:256 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:298 │ │ │ │ │ +_D_u_n_e_:_:_H_i_e_r_a_r_c_h_i_c_a_l_S_i_m_p_l_e_x_P_2_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _3_ _>_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions (2 in this case) │ │ │ │ │ +DDeeffiinniittiioonn hierarchicalsimplexp2localbasis.hh:356 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basismatrix.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basismatrix.hh File Reference
│ │ │ │ +
raviartthomas3cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/lfematrix.hh>
│ │ │ │ -#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas3cube2d/raviartthomas3cube2dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas3cube2d/raviartthomas3cube2dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas3cube2d/raviartthomas3cube2dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::BasisMatrixBase< PreBasis, Interpolation, Field >
 
struct  Dune::BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
 
struct  Dune::BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
 
struct  Dune::BasisMatrix< const PolynomialBasis< Eval, CM, D, R >, Interpolation, Field >
 
struct  Dune::BasisMatrix< const PolynomialBasisWithMatrix< Eval, CM >, Interpolation, Field >
class  Dune::RT3Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -basismatrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas3cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_ _P_r_e_B_a_s_i_s_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_, │ │ │ │ │ - _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_, │ │ │ │ │ - _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_, │ │ │ │ │ - _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_, │ │ │ │ │ - _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00185_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basismatrix.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,286 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basismatrix.hh
│ │ │ │ +
raviartthomas3cube2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_BASISMATRIX_HH
│ │ │ │ -
6#define DUNE_BASISMATRIX_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │ -
17 /****************************************
│ │ │ │ -
18 * A dense matrix representation of a ''polynomial''
│ │ │ │ -
19 * basis. Its represent a basis as a linear
│ │ │ │ -
20 * combination of a second basis, i.e., a
│ │ │ │ -
21 * monomial basis. It is simular to the PolynomialBasis
│ │ │ │ -
22 * but it not derived from the LocalBasis class.
│ │ │ │ -
23 * It is used to define a ''pre basis''.
│ │ │ │ -
24 ****************************************/
│ │ │ │ -
25 template< class PreBasis, class Interpolation,
│ │ │ │ -
26 class Field >
│ │ │ │ - │ │ │ │ -
28
│ │ │ │ -
29 template< class PreBasis, class Interpolation,
│ │ │ │ -
30 class Field >
│ │ │ │ -
│ │ │ │ -
31 struct BasisMatrixBase : public LFEMatrix<Field>
│ │ │ │ -
32 {
│ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
│ │ │ │ -
35 BasisMatrixBase( const PreBasis& preBasis,
│ │ │ │ -
36 const Interpolation& localInterpolation )
│ │ │ │ -
37 : cols_(preBasis.size())
│ │ │ │ -
38 {
│ │ │ │ -
39 localInterpolation.interpolate( preBasis, *this );
│ │ │ │ -
40
│ │ │ │ -
41 if ( !Matrix::invert() )
│ │ │ │ -
42 {
│ │ │ │ -
43 DUNE_THROW(MathError, "While computing basis a singular matrix was constructed!");
│ │ │ │ -
44 }
│ │ │ │ -
45 }
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
36
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │
│ │ │ │ +
40
│ │ │ │
│ │ │ │ -
46 unsigned int cols () const
│ │ │ │ -
47 {
│ │ │ │ -
48 return cols_;
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
50 unsigned int rows () const
│ │ │ │ -
51 {
│ │ │ │ -
52 return Matrix::rows();
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54 private:
│ │ │ │ -
55 unsigned int cols_;
│ │ │ │ -
56 };
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58 template< GeometryType::Id geometryId, class F,
│ │ │ │ -
59 class Interpolation,
│ │ │ │ -
60 class Field >
│ │ │ │ -
│ │ │ │ -
61 struct BasisMatrix< const MonomialBasis< geometryId, F >, Interpolation, Field >
│ │ │ │ -
62 : public BasisMatrixBase< const MonomialBasis< geometryId, F >, Interpolation, Field >
│ │ │ │ -
63 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
66 typedef typename Base::Matrix Matrix;
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
68 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ -
69 const Interpolation& localInterpolation )
│ │ │ │ -
70 : Base(preBasis, localInterpolation)
│ │ │ │ -
71 {}
│ │ │ │ -
│ │ │ │ -
72 template <class Vector>
│ │ │ │ -
│ │ │ │ -
73 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
74 {
│ │ │ │ -
75 const unsigned int N = Matrix::rows();
│ │ │ │ -
76 assert( Matrix::cols() == N && vec.size() == N );
│ │ │ │ -
77 // note: that the transposed matrix is computed,
│ │ │ │ -
78 // and is square
│ │ │ │ -
79 for (unsigned int i=0; i<N; ++i)
│ │ │ │ -
80 field_cast(Matrix::operator()(i,row),vec[i]);
│ │ │ │ -
81 }
│ │ │ │ -
│ │ │ │ -
82 };
│ │ │ │ -
│ │ │ │ -
83 template< int dim, class F,
│ │ │ │ -
84 class Interpolation,
│ │ │ │ -
85 class Field >
│ │ │ │ -
│ │ │ │ -
86 struct BasisMatrix< const Dune::VirtualMonomialBasis< dim, F >, Interpolation, Field >
│ │ │ │ -
87 : public BasisMatrixBase< const VirtualMonomialBasis< dim, F >, Interpolation, Field >
│ │ │ │ -
88 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
91 typedef typename Base::Matrix Matrix;
│ │ │ │ -
92
│ │ │ │ -
│ │ │ │ -
93 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ -
94 const Interpolation& localInterpolation )
│ │ │ │ -
95 : Base(preBasis, localInterpolation)
│ │ │ │ -
96 {}
│ │ │ │ -
│ │ │ │ -
97 template <class Vector>
│ │ │ │ -
│ │ │ │ -
98 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
99 {
│ │ │ │ -
100 const unsigned int N = Matrix::rows();
│ │ │ │ -
101 assert( Matrix::cols() == N && vec.size() == N );
│ │ │ │ -
102 // note: that the transposed matrix is computed,
│ │ │ │ -
103 // and is square
│ │ │ │ -
104 for (unsigned int i=0; i<N; ++i)
│ │ │ │ -
105 field_cast(Matrix::operator()(i,row),vec[i]);
│ │ │ │ -
106 }
│ │ │ │ -
│ │ │ │ -
107 };
│ │ │ │ -
│ │ │ │ -
108 template< class Eval, class CM, class D, class R,
│ │ │ │ -
109 class Interpolation,
│ │ │ │ -
110 class Field >
│ │ │ │ -
│ │ │ │ -
111 struct BasisMatrix< const PolynomialBasis<Eval,CM,D,R>, Interpolation, Field >
│ │ │ │ -
112 : public BasisMatrixBase< const PolynomialBasis<Eval,CM,D,R>, Interpolation, Field >
│ │ │ │ -
113 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
116 typedef typename Base::Matrix Matrix;
│ │ │ │ -
117
│ │ │ │ -
│ │ │ │ -
118 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ -
119 const Interpolation& localInterpolation )
│ │ │ │ -
120 : Base(preBasis, localInterpolation),
│ │ │ │ -
121 preBasis_(preBasis)
│ │ │ │ -
122 {}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
123 unsigned int cols() const
│ │ │ │ -
124 {
│ │ │ │ -
125 return preBasis_.matrix().baseSize() ;
│ │ │ │ -
126 }
│ │ │ │ -
│ │ │ │ -
127 template <class Vector>
│ │ │ │ -
│ │ │ │ -
128 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
129 {
│ │ │ │ -
130 assert( Matrix::rows() == Matrix::cols() );
│ │ │ │ -
131 assert( vec.size() == preBasis_.matrix().baseSize() );
│ │ │ │ -
132 assert( Matrix::cols() == preBasis_.size() );
│ │ │ │ -
133 for (unsigned int j=0; j<Matrix::cols(); ++j)
│ │ │ │ -
134 vec[j] = 0;
│ │ │ │ -
135 for (unsigned int i=0; i<Matrix::rows(); ++i)
│ │ │ │ -
136 preBasis_.matrix().
│ │ │ │ -
137 addRow(i,Base::Matrix::operator()(i,row),vec);
│ │ │ │ -
138 }
│ │ │ │ -
│ │ │ │ -
139 private:
│ │ │ │ -
140 const PreBasis& preBasis_;
│ │ │ │ -
141 };
│ │ │ │ -
│ │ │ │ -
142 template< class Eval, class CM,
│ │ │ │ -
143 class Interpolation,
│ │ │ │ -
144 class Field >
│ │ │ │ -
│ │ │ │ -
145 struct BasisMatrix< const PolynomialBasisWithMatrix<Eval,CM>, Interpolation, Field >
│ │ │ │ -
146 : public BasisMatrixBase< const PolynomialBasisWithMatrix<Eval,CM>, Interpolation, Field >
│ │ │ │ -
147 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
150 typedef typename Base::Matrix Matrix;
│ │ │ │ -
151
│ │ │ │ -
│ │ │ │ -
152 BasisMatrix( const PreBasis& preBasis,
│ │ │ │ -
153 const Interpolation& localInterpolation )
│ │ │ │ -
154 : Base(preBasis, localInterpolation),
│ │ │ │ -
155 preBasis_(preBasis)
│ │ │ │ -
156 {}
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
157 unsigned int cols() const
│ │ │ │ -
158 {
│ │ │ │ -
159 return preBasis_.matrix().baseSize() ;
│ │ │ │ -
160 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
161 unsigned int rows () const
│ │ │ │ -
162 {
│ │ │ │ -
163 assert( Matrix::rows() == preBasis_.matrix().size() );
│ │ │ │ -
164 return preBasis_.matrix().size()*CM::blockSize ;
│ │ │ │ -
165 }
│ │ │ │ -
│ │ │ │ -
166 template <class Vector>
│ │ │ │ -
│ │ │ │ -
167 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
168 {
│ │ │ │ -
169 unsigned int r = row / CM::blockSize;
│ │ │ │ -
170 assert( r < Matrix::rows() );
│ │ │ │ -
171 assert( Matrix::rows() == Matrix::cols() );
│ │ │ │ -
172 assert( vec.size() == preBasis_.matrix().baseSize() );
│ │ │ │ -
173 assert( Matrix::cols() == preBasis_.size() );
│ │ │ │ -
174 for (unsigned int j=0; j<vec.size(); ++j)
│ │ │ │ -
175 vec[j] = 0;
│ │ │ │ -
176 for (unsigned int i=0; i<Matrix::rows(); ++i)
│ │ │ │ -
177 preBasis_.matrix().
│ │ │ │ -
178 addRow(i*CM::blockSize+row%CM::blockSize,Base::Matrix::operator()(i,r),vec);
│ │ │ │ -
179 }
│ │ │ │ -
│ │ │ │ -
180 private:
│ │ │ │ -
181 const PreBasis& preBasis_;
│ │ │ │ -
182 };
│ │ │ │ -
│ │ │ │ -
183}
│ │ │ │ -
184
│ │ │ │ -
185#endif // DUNE_BASISMATRIX_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
47 basis(s),
│ │ │ │ +
48 interpolation(s)
│ │ │ │ +
49 {}
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
52 {
│ │ │ │ +
53 return basis;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 return coefficients;
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62 {
│ │ │ │ +
63 return interpolation;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
67 unsigned int size () const
│ │ │ │ +
68 {
│ │ │ │ +
69 return basis.size();
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
72 static constexpr GeometryType type ()
│ │ │ │ +
73 {
│ │ │ │ +
74 return GeometryTypes::quadrilateral;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
77 private:
│ │ │ │ + │ │ │ │ +
79 RT3Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
82}
│ │ │ │ +
83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition basismatrix.hh:27
│ │ │ │ -
Definition basismatrix.hh:32
│ │ │ │ -
unsigned int cols() const
Definition basismatrix.hh:46
│ │ │ │ -
unsigned int rows() const
Definition basismatrix.hh:50
│ │ │ │ -
BasisMatrixBase(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:35
│ │ │ │ -
LFEMatrix< Field > Matrix
Definition basismatrix.hh:33
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:73
│ │ │ │ -
const MonomialBasis< geometryId, F > PreBasis
Definition basismatrix.hh:64
│ │ │ │ - │ │ │ │ -
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:68
│ │ │ │ -
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:65
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:98
│ │ │ │ -
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:90
│ │ │ │ - │ │ │ │ -
const VirtualMonomialBasis< dim, F > PreBasis
Definition basismatrix.hh:89
│ │ │ │ -
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:93
│ │ │ │ - │ │ │ │ -
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:115
│ │ │ │ -
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:118
│ │ │ │ - │ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:128
│ │ │ │ -
const PolynomialBasis< Eval, CM, D, R > PreBasis
Definition basismatrix.hh:114
│ │ │ │ -
const PolynomialBasisWithMatrix< Eval, CM > PreBasis
Definition basismatrix.hh:148
│ │ │ │ -
BasisMatrixBase< PreBasis, Interpolation, Field > Base
Definition basismatrix.hh:149
│ │ │ │ - │ │ │ │ - │ │ │ │ -
BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation)
Definition basismatrix.hh:152
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition basismatrix.hh:167
│ │ │ │ - │ │ │ │ -
Definition lfematrix.hh:18
│ │ │ │ -
unsigned int rows() const
Definition lfematrix.hh:58
│ │ │ │ -
bool invert()
Definition lfematrix.hh:89
│ │ │ │ -
Field Field
Definition lfematrix.hh:24
│ │ │ │ -
Definition monomialbasis.hh:440
│ │ │ │ -
Definition monomialbasis.hh:612
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ -
Definition polynomialbasis.hh:348
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas3cube2d.hh:29
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas3cube2d.hh:56
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas3cube2d.hh:72
│ │ │ │ +
LocalFiniteElementTraits< RT3Cube2DLocalBasis< D, R >, RT3Cube2DLocalCoefficients, RT3Cube2DLocalInterpolation< RT3Cube2DLocalBasis< D, R > > > Traits
Definition raviartthomas3cube2d.hh:35
│ │ │ │ +
RT3Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition raviartthomas3cube2d.hh:46
│ │ │ │ +
RT3Cube2DLocalFiniteElement()
Standard constructor.
Definition raviartthomas3cube2d.hh:38
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas3cube2d.hh:67
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas3cube2d.hh:51
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas3cube2d.hh:61
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas3cube2dlocalbasis.hh:29
│ │ │ │ +
Layout map for Raviart-Thomas-3 elements on quadrilaterals.
Definition raviartthomas3cube2dlocalcoefficients.hh:23
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas3cube2dlocalinterpolation.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,344 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -basismatrix.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas3cube2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_BASISMATRIX_HH │ │ │ │ │ -6#define DUNE_BASISMATRIX_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_f_e_m_a_t_r_i_x_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 14 │ │ │ │ │ 15namespace _D_u_n_e │ │ │ │ │ 16{ │ │ │ │ │ -17 /**************************************** │ │ │ │ │ -18 * A dense matrix representation of a ''polynomial'' │ │ │ │ │ -19 * basis. Its represent a basis as a linear │ │ │ │ │ -20 * combination of a second basis, i.e., a │ │ │ │ │ -21 * monomial basis. It is simular to the PolynomialBasis │ │ │ │ │ -22 * but it not derived from the LocalBasis class. │ │ │ │ │ -23 * It is used to define a ''pre basis''. │ │ │ │ │ -24 ****************************************/ │ │ │ │ │ -25 template< class PreBasis, class Interpolation, │ │ │ │ │ -26 class Field > │ │ │ │ │ -_2_7 struct _B_a_s_i_s_M_a_t_r_i_x; │ │ │ │ │ -28 │ │ │ │ │ -29 template< class PreBasis, class Interpolation, │ │ │ │ │ -30 class Field > │ │ │ │ │ -_3_1 struct _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e : public _L_F_E_M_a_t_r_i_x │ │ │ │ │ -32 { │ │ │ │ │ -_3_3 typedef _L_F_E_M_a_t_r_i_x_<_F_i_e_l_d_> _M_a_t_r_i_x; │ │ │ │ │ -34 │ │ │ │ │ -_3_5 _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e( const PreBasis& preBasis, │ │ │ │ │ -36 const Interpolation& localInterpolation ) │ │ │ │ │ -37 : cols_(preBasis.size()) │ │ │ │ │ -38 { │ │ │ │ │ -39 localInterpolation.interpolate( preBasis, *this ); │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +33 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +34 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_5 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +36 │ │ │ │ │ +_3_8 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +39 {} │ │ │ │ │ 40 │ │ │ │ │ -41 if ( !_M_a_t_r_i_x_:_:_i_n_v_e_r_t() ) │ │ │ │ │ -42 { │ │ │ │ │ -43 DUNE_THROW(MathError, "While computing basis a singular matrix was │ │ │ │ │ -constructed!"); │ │ │ │ │ -44 } │ │ │ │ │ -45 } │ │ │ │ │ -_4_6 unsigned int _c_o_l_s () const │ │ │ │ │ -47 { │ │ │ │ │ -48 return cols_; │ │ │ │ │ -49 } │ │ │ │ │ -_5_0 unsigned int _r_o_w_s () const │ │ │ │ │ -51 { │ │ │ │ │ -52 return _M_a_t_r_i_x_:_:_r_o_w_s(); │ │ │ │ │ -53 } │ │ │ │ │ -54 private: │ │ │ │ │ -55 unsigned int cols_; │ │ │ │ │ -56 }; │ │ │ │ │ -57 │ │ │ │ │ -58 template< GeometryType::Id geometryId, class F, │ │ │ │ │ -59 class Interpolation, │ │ │ │ │ -60 class Field > │ │ │ │ │ -_6_1 struct _B_a_s_i_s_M_a_t_r_i_x< const _M_o_n_o_m_i_a_l_B_a_s_i_s< geometryId, F >, Interpolation, │ │ │ │ │ -_F_i_e_l_d > │ │ │ │ │ -62 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const MonomialBasis< geometryId, F >, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ -63 { │ │ │ │ │ -_6_4 typedef const _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _> _P_r_e_B_a_s_i_s; │ │ │ │ │ -_6_5 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ -_6_6 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ -67 │ │ │ │ │ -_6_8 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ -69 const Interpolation& localInterpolation ) │ │ │ │ │ -70 : _B_a_s_e(preBasis, localInterpolation) │ │ │ │ │ -71 {} │ │ │ │ │ -72 template │ │ │ │ │ -_7_3 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ -74 { │ │ │ │ │ -75 const unsigned int N = Matrix::rows(); │ │ │ │ │ -76 assert( Matrix::cols() == N && vec.size() == N ); │ │ │ │ │ -77 // note: that the transposed matrix is computed, │ │ │ │ │ -78 // and is square │ │ │ │ │ -79 for (unsigned int i=0; i │ │ │ │ │ -_8_6 struct _B_a_s_i_s_M_a_t_r_i_x< const _D_u_n_e::_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s< dim, F >, │ │ │ │ │ -Interpolation, _F_i_e_l_d > │ │ │ │ │ -87 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const VirtualMonomialBasis< dim, F >, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ -88 { │ │ │ │ │ -_8_9 typedef const _V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _> _P_r_e_B_a_s_i_s; │ │ │ │ │ -_9_0 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ -_9_1 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ -92 │ │ │ │ │ -_9_3 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ -94 const Interpolation& localInterpolation ) │ │ │ │ │ -95 : _B_a_s_e(preBasis, localInterpolation) │ │ │ │ │ -96 {} │ │ │ │ │ -97 template │ │ │ │ │ -_9_8 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ -99 { │ │ │ │ │ -100 const unsigned int N = Matrix::rows(); │ │ │ │ │ -101 assert( Matrix::cols() == N && vec.size() == N ); │ │ │ │ │ -102 // note: that the transposed matrix is computed, │ │ │ │ │ -103 // and is square │ │ │ │ │ -104 for (unsigned int i=0; i │ │ │ │ │ -_1_1_1 struct _B_a_s_i_s_M_a_t_r_i_x< const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s, Interpolation, │ │ │ │ │ -_F_i_e_l_d > │ │ │ │ │ -112 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const PolynomialBasis, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ -113 { │ │ │ │ │ -_1_1_4 typedef const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_E_v_a_l_,_C_M_,_D_,_R_> _P_r_e_B_a_s_i_s; │ │ │ │ │ -_1_1_5 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ -_1_1_6 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ -117 │ │ │ │ │ -_1_1_8 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ -119 const Interpolation& localInterpolation ) │ │ │ │ │ -120 : _B_a_s_e(preBasis, localInterpolation), │ │ │ │ │ -121 preBasis_(preBasis) │ │ │ │ │ -122 {} │ │ │ │ │ -_1_2_3 unsigned int _c_o_l_s() const │ │ │ │ │ -124 { │ │ │ │ │ -125 return preBasis_.matrix().baseSize() ; │ │ │ │ │ -126 } │ │ │ │ │ -127 template │ │ │ │ │ -_1_2_8 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ -129 { │ │ │ │ │ -130 assert( Matrix::rows() == Matrix::cols() ); │ │ │ │ │ -131 assert( vec.size() == preBasis_.matrix().baseSize() ); │ │ │ │ │ -132 assert( Matrix::cols() == preBasis_.size() ); │ │ │ │ │ -133 for (unsigned int j=0; j │ │ │ │ │ -_1_4_5 struct _B_a_s_i_s_M_a_t_r_i_x< const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x, │ │ │ │ │ -Interpolation, _F_i_e_l_d > │ │ │ │ │ -146 : public _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e< const PolynomialBasisWithMatrix, │ │ │ │ │ -Interpolation, Field > │ │ │ │ │ -147 { │ │ │ │ │ -_1_4_8 typedef const _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_E_v_a_l_,_C_M_> _P_r_e_B_a_s_i_s; │ │ │ │ │ -_1_4_9 typedef _B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_<_P_r_e_B_a_s_i_s_,_I_n_t_e_r_p_o_l_a_t_i_o_n_,_F_i_e_l_d_> _B_a_s_e; │ │ │ │ │ -_1_5_0 typedef typename _B_a_s_e_:_:_M_a_t_r_i_x _M_a_t_r_i_x; │ │ │ │ │ -151 │ │ │ │ │ -_1_5_2 _B_a_s_i_s_M_a_t_r_i_x( const _P_r_e_B_a_s_i_s& preBasis, │ │ │ │ │ -153 const Interpolation& localInterpolation ) │ │ │ │ │ -154 : _B_a_s_e(preBasis, localInterpolation), │ │ │ │ │ -155 preBasis_(preBasis) │ │ │ │ │ -156 {} │ │ │ │ │ -_1_5_7 unsigned int _c_o_l_s() const │ │ │ │ │ -158 { │ │ │ │ │ -159 return preBasis_.matrix().baseSize() ; │ │ │ │ │ -160 } │ │ │ │ │ -_1_6_1 unsigned int _r_o_w_s () const │ │ │ │ │ -162 { │ │ │ │ │ -163 assert( Matrix::rows() == preBasis_.matrix().size() ); │ │ │ │ │ -164 return preBasis_.matrix().size()*CM::blockSize ; │ │ │ │ │ -165 } │ │ │ │ │ -166 template │ │ │ │ │ -_1_6_7 void _r_o_w( const unsigned int row, Vector &vec ) const │ │ │ │ │ -168 { │ │ │ │ │ -169 unsigned int r = row / CM::blockSize; │ │ │ │ │ -170 assert( r < Matrix::rows() ); │ │ │ │ │ -171 assert( Matrix::rows() == Matrix::cols() ); │ │ │ │ │ -172 assert( vec.size() == preBasis_.matrix().baseSize() ); │ │ │ │ │ -173 assert( Matrix::cols() == preBasis_.size() ); │ │ │ │ │ -174 for (unsigned int j=0; j basis; │ │ │ │ │ +79 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +80 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +81 }; │ │ │ │ │ +82} │ │ │ │ │ +83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e │ │ │ │ │ -BasisMatrixBase(const PreBasis &preBasis, const Interpolation │ │ │ │ │ -&localInterpolation) │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_B_a_s_e_:_:_M_a_t_r_i_x │ │ │ │ │ -LFEMatrix< Field > Matrix │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ -_>_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ -_>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ -const MonomialBasis< geometryId, F > PreBasis │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ -_>_:_:_M_a_t_r_i_x │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:66 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ -_>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _F_i_e_l_d │ │ │ │ │ -_>_:_:_B_a_s_e │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:98 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ -const VirtualMonomialBasis< dim, F > PreBasis │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s_<_ _d_i_m_,_ _F_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:93 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:118 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:128 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_ _E_v_a_l_,_ _C_M_,_ _D_,_ _R_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ -const PolynomialBasis< Eval, CM, D, R > PreBasis │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_P_r_e_B_a_s_i_s │ │ │ │ │ -const PolynomialBasisWithMatrix< Eval, CM > PreBasis │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_e │ │ │ │ │ -BasisMatrixBase< PreBasis, Interpolation, Field > Base │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:161 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_M_a_t_r_i_x │ │ │ │ │ -Base::Matrix Matrix │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_B_a_s_i_s_M_a_t_r_i_x │ │ │ │ │ -BasisMatrix(const PreBasis &preBasis, const Interpolation &localInterpolation) │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:152 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:167 │ │ │ │ │ -_D_u_n_e_:_:_B_a_s_i_s_M_a_t_r_i_x_<_ _c_o_n_s_t_ _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_,_ _C_M_ _>_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_, │ │ │ │ │ -_F_i_e_l_d_ _>_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn basismatrix.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_i_n_v_e_r_t │ │ │ │ │ -bool invert() │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_M_a_t_r_i_x_<_ _F_i_e_l_d_ _>_:_:_F_i_e_l_d │ │ │ │ │ -Field Field │ │ │ │ │ -DDeeffiinniittiioonn lfematrix.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT3Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT3Cube2DLocalCoefficients, RT3Cube2DLocalInterpolation< RT3Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT3Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT3Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dglocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
dglocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomassimplexbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ +#include "raviartthomassimplexinterpolation.hh"
│ │ │ │ +#include "raviartthomassimplexprebasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::DGLocalCoefficients
 A class providing local coefficients for dg spaces. More...
 
struct  Dune::DGLocalCoefficientsFactory< BasisFactory >
 A factory class for the dg local coefficients. More...
struct  Dune::RaviartThomasBasisFactory< dim, SF, CF >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -dglocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomassimplexbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  A class providing local coefficients for dg spaces. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _B_a_s_i_s_F_a_c_t_o_r_y_ _> │ │ │ │ │ -  A factory class for the dg local coefficients. _M_o_r_e_._._. │ │ │ │ │ +struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00188_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: dglocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,117 +70,72 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
dglocalcoefficients.hh
│ │ │ │ +
raviartthomassimplexbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cassert>
│ │ │ │ -
9#include <vector>
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <dune/common/exceptions.hh>
│ │ │ │
10
│ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 // DGLocalCoefficients
│ │ │ │ -
17 // -------------------
│ │ │ │ -
18
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
23 {
│ │ │ │ - │ │ │ │ -
25
│ │ │ │ -
26 public:
│ │ │ │ -
│ │ │ │ -
28 DGLocalCoefficients ( const unsigned int n )
│ │ │ │ -
29 : localKey_( n )
│ │ │ │ -
30 {
│ │ │ │ -
31 for( unsigned i = 0; i < n; ++i )
│ │ │ │ -
32 localKey_[ i ] = LocalKey( 0, 0, i );
│ │ │ │ -
33 }
│ │ │ │ -
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 /*
│ │ │ │ +
18 * `RTPreBasisFactory` provides a basis for the Raviart-Thomas function space.
│ │ │ │ +
19 * `RaviartThomasL2InterpolationFactory` provides the linear functionals.
│ │ │ │ +
20 *
│ │ │ │ +
21 * `Defaultbasisfactory::create` first builds the function space and the linear functionals.
│ │ │ │ +
22 * Then the constructor of `BasisMatrix` gets called. There the matrix
│ │ │ │ +
23 *
│ │ │ │ +
24 * \begin{equation}
│ │ │ │ +
25 * A_{i,j} := N_j(\phi_i)
│ │ │ │ +
26 * \end{equation}
│ │ │ │ +
27 *
│ │ │ │ +
28 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled.
│ │ │ │ +
29 * Then the matrix gets inverted and is then used as a coefficent matrix for the standard monomial basis.
│ │ │ │ +
30 *
│ │ │ │ +
31 * For more details on the theory see the first chapter "Construction of Local Finite Element Spaces Using the Generic Reference Elements"
│ │ │ │ +
32 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published in 2012.
│ │ │ │ +
33 */
│ │ │ │
34
│ │ │ │ -
│ │ │ │ -
35 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ -
36 {
│ │ │ │ -
37 assert( i < size() );
│ │ │ │ -
38 return localKey_[ i ];
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 unsigned int size () const
│ │ │ │ -
42 {
│ │ │ │ -
43 return localKey_.size();
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 private:
│ │ │ │ -
47 std::vector< LocalKey > localKey_;
│ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
50
│ │ │ │ -
51
│ │ │ │ -
52 // DGLocalCoefficientsFactory
│ │ │ │ -
53 // --------------------------
│ │ │ │ -
57 template< class BasisFactory >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
59 {
│ │ │ │ -
60 static const unsigned int dimension = BasisFactory::dimension;
│ │ │ │ -
61 typedef typename BasisFactory::Key Key;
│ │ │ │ - │ │ │ │ -
63
│ │ │ │ -
64 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
65 static Object *create ( const Key &key )
│ │ │ │ -
66 {
│ │ │ │ -
67 const typename BasisFactory::Object *basis
│ │ │ │ -
68 = BasisFactory::template create< geometryId >( key );
│ │ │ │ -
69 Object *coefficients = new Object( basis->size() );
│ │ │ │ -
70 BasisFactory::release( basis );
│ │ │ │ -
71 return coefficients;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
73 static void release( Object *object ) { delete object; }
│ │ │ │ -
74 };
│ │ │ │ -
│ │ │ │ -
75
│ │ │ │ -
76}
│ │ │ │ -
77
│ │ │ │ -
78#endif // #ifndef DUNE_DGLOCALCOEFFICIENTS_HH
│ │ │ │ - │ │ │ │ +
35 template< unsigned int dim, class SF, class CF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 : public DefaultBasisFactory< RTPreBasisFactory<dim,CF>,
│ │ │ │ +
38 RaviartThomasL2InterpolationFactory<dim,CF>,
│ │ │ │ +
39 dim,dim,SF,CF >
│ │ │ │ +
40 {};
│ │ │ │ +
│ │ │ │ +
41}
│ │ │ │ +
42
│ │ │ │ +
43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
A class providing local coefficients for dg spaces.
Definition dglocalcoefficients.hh:23
│ │ │ │ -
unsigned int size() const
Definition dglocalcoefficients.hh:41
│ │ │ │ -
const LocalKey & localKey(const unsigned int i) const
Definition dglocalcoefficients.hh:35
│ │ │ │ -
DGLocalCoefficients(const unsigned int n)
construct local keys for n basis functions
Definition dglocalcoefficients.hh:28
│ │ │ │ -
A factory class for the dg local coefficients.
Definition dglocalcoefficients.hh:59
│ │ │ │ -
static void release(Object *object)
Definition dglocalcoefficients.hh:73
│ │ │ │ -
const DGLocalCoefficients Object
Definition dglocalcoefficients.hh:62
│ │ │ │ -
static Object * create(const Key &key)
Definition dglocalcoefficients.hh:65
│ │ │ │ -
BasisFactory::Key Key
Definition dglocalcoefficients.hh:61
│ │ │ │ -
static const unsigned int dimension
Definition dglocalcoefficients.hh:60
│ │ │ │ +
Definition raviartthomassimplexbasis.hh:40
│ │ │ │ +
Definition defaultbasisfactory.hh:38
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,120 +1,70 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -dglocalcoefficients.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ +raviartthomassimplexbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ +6#define DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 // DGLocalCoefficients │ │ │ │ │ -17 // ------------------- │ │ │ │ │ -18 │ │ │ │ │ -_2_2 class _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -23 { │ │ │ │ │ -24 typedef _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s _T_h_i_s; │ │ │ │ │ -25 │ │ │ │ │ -26 public: │ │ │ │ │ -_2_8 _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s ( const unsigned int n ) │ │ │ │ │ -29 : localKey_( n ) │ │ │ │ │ -30 { │ │ │ │ │ -31 for( unsigned i = 0; i < n; ++i ) │ │ │ │ │ -32 localKey_[ i ] = _L_o_c_a_l_K_e_y( 0, 0, i ); │ │ │ │ │ -33 } │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 /* │ │ │ │ │ +18 * `RTPreBasisFactory` provides a basis for the Raviart-Thomas function │ │ │ │ │ +space. │ │ │ │ │ +19 * `RaviartThomasL2InterpolationFactory` provides the linear functionals. │ │ │ │ │ +20 * │ │ │ │ │ +21 * `Defaultbasisfactory::create` first builds the function space and the │ │ │ │ │ +linear functionals. │ │ │ │ │ +22 * Then the constructor of `BasisMatrix` gets called. There the matrix │ │ │ │ │ +23 * │ │ │ │ │ +24 * \begin{equation} │ │ │ │ │ +25 * A_{i,j} := N_j(\phi_i) │ │ │ │ │ +26 * \end{equation} │ │ │ │ │ +27 * │ │ │ │ │ +28 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled. │ │ │ │ │ +29 * Then the matrix gets inverted and is then used as a coefficent matrix for │ │ │ │ │ +the standard monomial basis. │ │ │ │ │ +30 * │ │ │ │ │ +31 * For more details on the theory see the first chapter "Construction of │ │ │ │ │ +Local Finite Element Spaces Using the Generic Reference Elements" │ │ │ │ │ +32 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published │ │ │ │ │ +in 2012. │ │ │ │ │ +33 */ │ │ │ │ │ 34 │ │ │ │ │ -_3_5 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ -36 { │ │ │ │ │ -37 assert( i < _s_i_z_e() ); │ │ │ │ │ -38 return localKey_[ i ]; │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -_4_1 unsigned int _s_i_z_e () const │ │ │ │ │ -42 { │ │ │ │ │ -43 return localKey_.size(); │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -46 private: │ │ │ │ │ -47 std::vector< LocalKey > localKey_; │ │ │ │ │ -48 }; │ │ │ │ │ -49 │ │ │ │ │ -50 │ │ │ │ │ -51 │ │ │ │ │ -52 // DGLocalCoefficientsFactory │ │ │ │ │ -53 // -------------------------- │ │ │ │ │ -57 template< class BasisFactory > │ │ │ │ │ -_5_8 struct _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -59 { │ │ │ │ │ -_6_0 static const unsigned int _d_i_m_e_n_s_i_o_n = BasisFactory::dimension; │ │ │ │ │ -_6_1 typedef typename BasisFactory::Key _K_e_y; │ │ │ │ │ -_6_2 typedef const _D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s _O_b_j_e_c_t; │ │ │ │ │ -63 │ │ │ │ │ -64 template< GeometryType::Id geometryId > │ │ │ │ │ -_6_5 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ -66 { │ │ │ │ │ -67 const typename BasisFactory::Object *basis │ │ │ │ │ -68 = BasisFactory::template create< geometryId >( key ); │ │ │ │ │ -69 _O_b_j_e_c_t *coefficients = new _O_b_j_e_c_t( basis->size() ); │ │ │ │ │ -70 BasisFactory::release( basis ); │ │ │ │ │ -71 return coefficients; │ │ │ │ │ -72 } │ │ │ │ │ -_7_3 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -74 }; │ │ │ │ │ -75 │ │ │ │ │ -76} │ │ │ │ │ -77 │ │ │ │ │ -78#endif // #ifndef DUNE_DGLOCALCOEFFICIENTS_HH │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +35 template< unsigned int dim, class SF, class CF > │ │ │ │ │ +_3_6 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +37 : public _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y< RTPreBasisFactory, │ │ │ │ │ +38 RaviartThomasL2InterpolationFactory, │ │ │ │ │ +39 dim,dim,SF,CF > │ │ │ │ │ +40 {}; │ │ │ │ │ +41} │ │ │ │ │ +42 │ │ │ │ │ +43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ +_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -A class providing local coefficients for dg spaces. │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -DGLocalCoefficients(const unsigned int n) │ │ │ │ │ -construct local keys for n basis functions │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -A factory class for the dg local coefficients. │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const DGLocalCoefficients Object │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -BasisFactory::Key Key │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_D_G_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn dglocalcoefficients.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexbasis.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisevaluator.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,46 +65,50 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
basisevaluator.hh File Reference
│ │ │ │ +
raviartthomassimplexinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/typetraits.hh>
│ │ │ │ +
#include <fstream>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ -#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │ +#include <dune/geometry/typeindex.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/utility/interpolationhelper.hh>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::MonomialEvaluator< B >
class  Dune::LocalCoefficientsContainer
 
struct  Dune::MonomialEvaluator< B >::Iterator< deriv >
struct  Dune::RaviartThomasCoefficientsFactory< dim >
 
struct  Dune::MonomialEvaluator< B >::BaseIterator< Deriv >
struct  Dune::RTL2InterpolationBuilder< dim, Field >
 
struct  Dune::StandardEvaluator< B >
class  Dune::RaviartThomasL2Interpolation< dimension, F >
 An L2-based interpolation for Raviart Thomas. More...
 
struct  Dune::StandardEvaluator< B >::Iterator< deriv >
struct  Dune::RaviartThomasL2InterpolationFactory< dim, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,39 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -basisevaluator.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_I_t_e_r_a_t_o_r_<_ _d_e_r_i_v_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_B_a_s_e_I_t_e_r_a_t_o_r_<_ _D_e_r_i_v_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _B_ _> │ │ │ │ │ + class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> │ │ │ │ │ +  An L2-based interpolation for Raviart Thomas. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _B_ _>_:_:_I_t_e_r_a_t_o_r_<_ _d_e_r_i_v_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00191_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisevaluator.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,279 +70,546 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basisevaluator.hh
│ │ │ │ +
raviartthomassimplexinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_BASISEVALUATOR_HH
│ │ │ │ -
6#define DUNE_BASISEVALUATOR_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11#include <dune/common/fvector.hh>
│ │ │ │ -
12#include <dune/common/typetraits.hh>
│ │ │ │ -
13
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ -
15
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
19
│ │ │ │ -
20namespace Dune
│ │ │ │ -
21{
│ │ │ │ -
22 /*******************************************
│ │ │ │ -
23 * Should be removed as soon as the Tensor
│ │ │ │ -
24 * classes have been revisited. See remarks
│ │ │ │ -
25 * in tensor.hh (also hold true here).
│ │ │ │ -
26 *******************************************/
│ │ │ │ -
27
│ │ │ │ +
8#include <fstream>
│ │ │ │ +
9#include <utility>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/exceptions.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ +
15#include <dune/geometry/type.hh>
│ │ │ │ +
16#include <dune/geometry/typeindex.hh>
│ │ │ │ +
17
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
22
│ │ │ │ +
23namespace Dune
│ │ │ │ +
24{
│ │ │ │ +
25
│ │ │ │ +
26 // Internal Forward Declarations
│ │ │ │ +
27 // -----------------------------
│ │ │ │
28
│ │ │ │ -
29 template <class B>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
31 {
│ │ │ │ -
32 typedef B Basis;
│ │ │ │ -
33 typedef typename Basis::Field Field;
│ │ │ │ -
34 typedef typename Basis::DomainVector DomainVector;
│ │ │ │ -
35 static const int dimension = Basis::dimension;
│ │ │ │ -
36 static const int dimRange = Basis::dimRange;
│ │ │ │ -
37
│ │ │ │ -
38 typedef std::vector<Field> Container;
│ │ │ │ -
39
│ │ │ │ -
40 template< class Deriv >
│ │ │ │ -
41 struct BaseIterator;
│ │ │ │ -
42
│ │ │ │ -
43 template <unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
44 struct Iterator
│ │ │ │ -
45 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
48 };
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ -
50 unsigned int size() const
│ │ │ │ -
51 {
│ │ │ │ -
52 return size_;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
55 protected:
│ │ │ │ -
│ │ │ │ -
56 MonomialEvaluator(const Basis &basis,unsigned int order,unsigned int size)
│ │ │ │ -
57 : basis_(basis),
│ │ │ │ -
58 order_(order),
│ │ │ │ -
59 size_(size),
│ │ │ │ -
60 container_(0)
│ │ │ │ -
61 {}
│ │ │ │ -
│ │ │ │ -
62 template <int deriv>
│ │ │ │ -
│ │ │ │ -
63 void resize()
│ │ │ │ -
64 {
│ │ │ │ - │ │ │ │ -
66 container_.resize(totalSize);
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
69 const Basis &basis_;
│ │ │ │ -
70 unsigned int order_,size_;
│ │ │ │ - │ │ │ │ -
72 };
│ │ │ │ -
│ │ │ │ +
29 template < unsigned int dim, class Field >
│ │ │ │ +
30 struct RaviartThomasL2InterpolationFactory;
│ │ │ │ +
31
│ │ │ │ +
32
│ │ │ │ +
33
│ │ │ │ +
34 // LocalCoefficientsContainer
│ │ │ │ +
35 // --------------------------
│ │ │ │ +
36
│ │ │ │ +
37 class LocalCoefficientsContainer
│ │ │ │ +
38 {
│ │ │ │ +
39 typedef LocalCoefficientsContainer This;
│ │ │ │ +
40
│ │ │ │ +
41 public:
│ │ │ │ +
42 template <class Setter>
│ │ │ │ +
│ │ │ │ +
43 LocalCoefficientsContainer ( const Setter &setter )
│ │ │ │ +
44 {
│ │ │ │ +
45 setter.setLocalKeys(localKey_);
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ +
49 {
│ │ │ │ +
50 assert( i < size() );
│ │ │ │ +
51 return localKey_[ i ];
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
54 std::size_t size () const
│ │ │ │ +
55 {
│ │ │ │ +
56 return localKey_.size();
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
59 private:
│ │ │ │ +
60 std::vector< LocalKey > localKey_;
│ │ │ │ +
61 };
│ │ │ │ +
62
│ │ │ │ +
63
│ │ │ │ +
64
│ │ │ │ +
65 // RaviartThomasCoefficientsFactory
│ │ │ │ +
66 // --------------------------------
│ │ │ │ +
67
│ │ │ │ +
68 template < unsigned int dim >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
70 {
│ │ │ │ +
71 typedef std::size_t Key;
│ │ │ │ + │ │ │ │
73
│ │ │ │ -
74
│ │ │ │ -
75 template< class B >
│ │ │ │ -
76 template< class Deriv >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
78 {
│ │ │ │ -
79 typedef Deriv Derivatives;
│ │ │ │ -
80 typedef typename Deriv::Field Field;
│ │ │ │ -
81 static const unsigned int blockSize = Deriv::size;
│ │ │ │ -
82 typedef Dune::FieldVector<Field,blockSize> Block;
│ │ │ │ -
83 static const DerivativeLayoutNS::DerivativeLayout layout = Deriv::layout;
│ │ │ │ -
84 static const unsigned int dimDomain = Deriv::dimDomain;
│ │ │ │ -
85 static const unsigned int dimRange = Deriv::dimRange;
│ │ │ │ -
86
│ │ │ │ -
87 typedef std::vector<Field> Container;
│ │ │ │ -
88 typedef typename Container::iterator CIter;
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
90 explicit BaseIterator ( Container &container )
│ │ │ │ -
91 : pos_( container.begin() ),
│ │ │ │ -
92 end_( container.end() )
│ │ │ │ -
93 {}
│ │ │ │ +
74 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
75 static Object *create( const Key &key )
│ │ │ │ +
76 {
│ │ │ │ +
77 typedef RaviartThomasL2InterpolationFactory< dim, double > InterpolationFactory;
│ │ │ │ +
78 if( !supports< geometryId >( key ) )
│ │ │ │ +
79 return nullptr;
│ │ │ │ +
80 typename InterpolationFactory::Object *interpolation = InterpolationFactory::template create< geometryId >( key );
│ │ │ │ +
81 Object *localKeys = new Object( *interpolation );
│ │ │ │ +
82 InterpolationFactory::release( interpolation );
│ │ │ │ +
83 return localKeys;
│ │ │ │ +
84 }
│ │ │ │ +
│ │ │ │ +
85
│ │ │ │ +
86 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
87 static bool supports ( const Key &key )
│ │ │ │ +
88 {
│ │ │ │ +
89 return GeometryType(geometryId).isSimplex();
│ │ │ │ +
90 }
│ │ │ │
│ │ │ │ -
94
│ │ │ │ -
│ │ │ │ -
95 const Deriv &operator*() const
│ │ │ │ -
96 {
│ │ │ │ -
97 assert(!done());
│ │ │ │ -
98 return reinterpret_cast<const Deriv&>(*pos_);
│ │ │ │ -
99 }
│ │ │ │ -
│ │ │ │ -
100
│ │ │ │ -
│ │ │ │ -
101 const Deriv *operator->() const
│ │ │ │ -
102 {
│ │ │ │ -
103 return &(operator*());
│ │ │ │ -
104 }
│ │ │ │ -
│ │ │ │ -
105
│ │ │ │ -
│ │ │ │ -
106 bool done () const
│ │ │ │ -
107 {
│ │ │ │ -
108 return pos_ == end_;
│ │ │ │ -
109 }
│ │ │ │ -
│ │ │ │ -
110
│ │ │ │ -
│ │ │ │ -
111 BaseIterator &operator++ ()
│ │ │ │ -
112 {
│ │ │ │ -
113 pos_ += blockSize;
│ │ │ │ -
114 return *this;
│ │ │ │ -
115 }
│ │ │ │ -
│ │ │ │ -
116
│ │ │ │ -
│ │ │ │ -
117 BaseIterator &operator+= ( unsigned int skip )
│ │ │ │ -
118 {
│ │ │ │ -
119 pos_ += skip*blockSize;
│ │ │ │ -
120 return *this;
│ │ │ │ -
121 }
│ │ │ │ +
91 static void release( Object *object ) { delete object; }
│ │ │ │ +
92 };
│ │ │ │
│ │ │ │ +
93
│ │ │ │ +
94
│ │ │ │ +
95
│ │ │ │ +
96 // RTL2InterpolationBuilder
│ │ │ │ +
97 // ------------------------
│ │ │ │ +
98
│ │ │ │ +
99 // L2 Interpolation requires:
│ │ │ │ +
100 // - for element
│ │ │ │ +
101 // - test basis
│ │ │ │ +
102 // - for each face (dynamic)
│ │ │ │ +
103 // - test basis
│ │ │ │ +
104 // - normal
│ │ │ │ +
105 template< unsigned int dim, class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
107 {
│ │ │ │ +
108 static const unsigned int dimension = dim;
│ │ │ │ +
109
│ │ │ │ +
110 // for the dofs associated to the element
│ │ │ │ + │ │ │ │ + │ │ │ │ +
113
│ │ │ │ +
114 // for the dofs associated to the faces
│ │ │ │ + │ │ │ │ + │ │ │ │ +
117
│ │ │ │ +
118 // the normals of the faces
│ │ │ │ +
119 typedef FieldVector< Field, dimension > Normal;
│ │ │ │ +
120
│ │ │ │ + │ │ │ │
122
│ │ │ │ -
123 private:
│ │ │ │ -
124 CIter pos_;
│ │ │ │ -
125 const CIter end_;
│ │ │ │ -
126 };
│ │ │ │ -
│ │ │ │ -
127
│ │ │ │ -
128 template< class B >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
130 : public MonomialEvaluator< B >
│ │ │ │ -
131 {
│ │ │ │ -
132 typedef B Basis;
│ │ │ │ -
133 typedef typename Basis::Field Field;
│ │ │ │ -
134 typedef typename Basis::DomainVector DomainVector;
│ │ │ │ -
135 typedef std::vector<Field> Container;
│ │ │ │ -
136 static const int dimension = Basis::dimension;
│ │ │ │ -
137 static const int dimRange = Basis::dimRange;
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ +
125
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
127 {
│ │ │ │ +
128 TestBasisFactory::release( testBasis_ );
│ │ │ │ +
129 for( FaceStructure &f : faceStructure_ )
│ │ │ │ + │ │ │ │ +
131 }
│ │ │ │ +
│ │ │ │ +
132
│ │ │ │ +
133 GeometryType type () const { return geometry_; }
│ │ │ │ +
134
│ │ │ │ +
135 std::size_t order () const { return order_; }
│ │ │ │ +
136
│ │ │ │ +
137 // number of faces
│ │ │ │ +
138 unsigned int faceSize () const { return faceSize_; }
│ │ │ │
139
│ │ │ │ -
140 template <unsigned int deriv>
│ │ │ │ -
│ │ │ │ -
141 struct Iterator : public Base::template Iterator<deriv>
│ │ │ │ -
142 {};
│ │ │ │ -
│ │ │ │ -
143
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
145 : Base(basis,basis.order(),basis.size())
│ │ │ │ -
146 {}
│ │ │ │ -
│ │ │ │ -
147 template <unsigned int deriv,class DVector>
│ │ │ │ -
│ │ │ │ -
148 typename Iterator<deriv>::All evaluate(const DVector &x)
│ │ │ │ -
149 {
│ │ │ │ -
150 Base::template resize<deriv>();
│ │ │ │ -
151 basis_.template evaluate<deriv>(x,&(container_[0]));
│ │ │ │ -
152 return typename Iterator<deriv>::All(container_);
│ │ │ │ -
153 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
155 {
│ │ │ │ -
156 Base::template resize<0>();
│ │ │ │ -
157 basis_.integrate(&(container_[0]));
│ │ │ │ -
158 return typename Iterator<0>::Integrate(container_);
│ │ │ │ -
159 }
│ │ │ │ -
│ │ │ │ -
160
│ │ │ │ -
161 protected:
│ │ │ │ -
│ │ │ │ -
162 StandardEvaluator ( const Basis &basis, unsigned int size )
│ │ │ │ -
163 : Base( basis, basis.order(), size )
│ │ │ │ -
164 {}
│ │ │ │ -
│ │ │ │ -
165
│ │ │ │ -
166 private:
│ │ │ │ - │ │ │ │ -
168 using Base::basis_;
│ │ │ │ -
169 using Base::container_;
│ │ │ │ -
170 };
│ │ │ │ -
│ │ │ │ -
171
│ │ │ │ -
172}
│ │ │ │ -
173
│ │ │ │ -
174#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
140 // basis associated to the element
│ │ │ │ +
141 TestBasis *testBasis () const { return testBasis_; }
│ │ │ │ +
142
│ │ │ │ +
143 // basis associated to face f
│ │ │ │ +
144 TestFaceBasis *testFaceBasis ( unsigned int f ) const { assert( f < faceSize() ); return faceStructure_[ f ].basis_; }
│ │ │ │ +
145
│ │ │ │ +
146 // normal of face f
│ │ │ │ +
147 const Normal &normal ( unsigned int f ) const { assert( f < faceSize() ); return *(faceStructure_[ f ].normal_); }
│ │ │ │ +
148
│ │ │ │ +
149 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
150 void build ( std::size_t order )
│ │ │ │ +
151 {
│ │ │ │ +
152 constexpr GeometryType geometry = geometryId;
│ │ │ │ +
153 geometry_ = geometry;
│ │ │ │ +
154 order_ = order;
│ │ │ │ +
155
│ │ │ │ +
156 testBasis_ = (order > 0 ? TestBasisFactory::template create< geometry >( order-1 ) : nullptr);
│ │ │ │ +
157
│ │ │ │ +
158 const auto &refElement = ReferenceElements< Field, dimension >::general( type() );
│ │ │ │ +
159 faceSize_ = refElement.size( 1 );
│ │ │ │ +
160 faceStructure_.reserve( faceSize_ );
│ │ │ │ +
161 for( unsigned int face = 0; face < faceSize_; ++face )
│ │ │ │ +
162 {
│ │ │ │ +
163 /* For simplices or cubes of arbitrary dimension you could just use
│ │ │ │ +
164 *
│ │ │ │ +
165 * ```
│ │ │ │ +
166 * GeometryType faceGeometry = Impl::getBase(geometry_);
│ │ │ │ +
167 * TestFaceBasis *faceBasis = TestFaceBasisFactory::template create< faceGeometry >( order );
│ │ │ │ +
168 * ```
│ │ │ │ +
169 *
│ │ │ │ +
170 * For i.e. Prisms and Pyramids in 3d this does not work because they contain squares and triangles as faces.
│ │ │ │ +
171 * And depending on the dynamic face index a different face geometry is needed.
│ │ │ │ +
172 *
│ │ │ │ +
173 */
│ │ │ │ +
174 TestFaceBasis *faceBasis = Impl::toGeometryTypeIdConstant<dimension-1>(refElement.type( face, 1 ), [&](auto faceGeometryTypeId) {
│ │ │ │ +
175 return TestFaceBasisFactory::template create< decltype(faceGeometryTypeId)::value >( order );
│ │ │ │ +
176 });
│ │ │ │ +
177 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal( face ) );
│ │ │ │ +
178 }
│ │ │ │ +
179 assert( faceStructure_.size() == faceSize_ );
│ │ │ │ +
180 }
│ │ │ │ +
│ │ │ │ +
181
│ │ │ │ +
182 private:
│ │ │ │ +
183 struct FaceStructure
│ │ │ │ +
184 {
│ │ │ │ +
185 FaceStructure( TestFaceBasis *tfb, const Normal &n )
│ │ │ │ +
186 : basis_( tfb ), normal_( &n )
│ │ │ │ +
187 {}
│ │ │ │ +
188
│ │ │ │ +
189 TestFaceBasis *basis_;
│ │ │ │ +
190 const Dune::FieldVector< Field, dimension > *normal_;
│ │ │ │ +
191 };
│ │ │ │ +
192
│ │ │ │ +
193 std::vector< FaceStructure > faceStructure_;
│ │ │ │ +
194 TestBasis *testBasis_ = nullptr;
│ │ │ │ +
195 GeometryType geometry_;
│ │ │ │ +
196 unsigned int faceSize_;
│ │ │ │ +
197 std::size_t order_;
│ │ │ │ +
198 };
│ │ │ │ +
│ │ │ │ +
199
│ │ │ │ +
200
│ │ │ │ +
201
│ │ │ │ +
202 // RaviartThomasL2Interpolation
│ │ │ │ +
203 // ----------------------------
│ │ │ │ +
204
│ │ │ │ +
210 template< unsigned int dimension, class F>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
212 : public InterpolationHelper< F ,dimension >
│ │ │ │ +
213 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
216
│ │ │ │ +
217 public:
│ │ │ │ +
218 typedef F Field;
│ │ │ │ + │ │ │ │ +
│ │ │ │ + │ │ │ │ +
221 : order_(0),
│ │ │ │ +
222 size_(0)
│ │ │ │ +
223 {}
│ │ │ │ +
│ │ │ │ +
224
│ │ │ │ +
225 template< class Function, class Vector >
│ │ │ │ +
│ │ │ │ +
226 auto interpolate ( const Function &function, Vector &coefficients ) const
│ │ │ │ +
227 -> std::enable_if_t< std::is_same< decltype(std::declval<Vector>().resize(1) ),void >::value,void>
│ │ │ │ +
228 {
│ │ │ │ +
229 coefficients.resize(size());
│ │ │ │ +
230 typename Base::template Helper<Function,Vector,true> func( function,coefficients );
│ │ │ │ +
231 interpolate(func);
│ │ │ │ +
232 }
│ │ │ │ +
│ │ │ │ +
233
│ │ │ │ +
234 template< class Basis, class Matrix >
│ │ │ │ +
│ │ │ │ +
235 auto interpolate ( const Basis &basis, Matrix &matrix ) const
│ │ │ │ +
236 -> std::enable_if_t< std::is_same<
│ │ │ │ +
237 decltype(std::declval<Matrix>().rowPtr(0)), typename Matrix::Field* >::value,void>
│ │ │ │ +
238 {
│ │ │ │ +
239 matrix.resize( size(), basis.size() );
│ │ │ │ +
240 typename Base::template Helper<Basis,Matrix,false> func( basis,matrix );
│ │ │ │ +
241 interpolate(func);
│ │ │ │ +
242 }
│ │ │ │ +
│ │ │ │ +
243
│ │ │ │ +
│ │ │ │ +
244 std::size_t order() const
│ │ │ │ +
245 {
│ │ │ │ +
246 return order_;
│ │ │ │ +
247 }
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
248 std::size_t size() const
│ │ │ │ +
249 {
│ │ │ │ +
250 return size_;
│ │ │ │ +
251 }
│ │ │ │ +
│ │ │ │ +
252 template <GeometryType::Id geometryId>
│ │ │ │ +
│ │ │ │ +
253 void build( std::size_t order )
│ │ │ │ +
254 {
│ │ │ │ +
255 size_ = 0;
│ │ │ │ +
256 order_ = order;
│ │ │ │ +
257 builder_.template build<geometryId>(order_);
│ │ │ │ +
258 if (builder_.testBasis())
│ │ │ │ +
259 size_ += dimension*builder_.testBasis()->size();
│ │ │ │ +
260 for ( unsigned int f=0; f<builder_.faceSize(); ++f )
│ │ │ │ +
261 if (builder_.testFaceBasis(f))
│ │ │ │ +
262 size_ += builder_.testFaceBasis(f)->size();
│ │ │ │ +
263 }
│ │ │ │ +
│ │ │ │ +
264
│ │ │ │ +
│ │ │ │ +
265 void setLocalKeys(std::vector< LocalKey > &keys) const
│ │ │ │ +
266 {
│ │ │ │ +
267 keys.resize(size());
│ │ │ │ +
268 unsigned int row = 0;
│ │ │ │ +
269 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ +
270 {
│ │ │ │ +
271 if (builder_.faceSize())
│ │ │ │ +
272 for (unsigned int i=0; i<builder_.testFaceBasis(f)->size(); ++i,++row)
│ │ │ │ +
273 keys[row] = LocalKey(f,1,i);
│ │ │ │ +
274 }
│ │ │ │ +
275 if (builder_.testBasis())
│ │ │ │ +
276 for (unsigned int i=0; i<builder_.testBasis()->size()*dimension; ++i,++row)
│ │ │ │ +
277 keys[row] = LocalKey(0,0,i);
│ │ │ │ +
278 assert( row == size() );
│ │ │ │ +
279 }
│ │ │ │ +
│ │ │ │ +
280
│ │ │ │ +
281 protected:
│ │ │ │ +
282 template< class Func, class Container, bool type >
│ │ │ │ +
│ │ │ │ +
283 void interpolate ( typename Base::template Helper<Func,Container,type> &func ) const
│ │ │ │ +
284 {
│ │ │ │ +
285 const Dune::GeometryType geoType = builder_.type();
│ │ │ │ +
286
│ │ │ │ +
287 std::vector< Field > testBasisVal;
│ │ │ │ +
288
│ │ │ │ +
289 for (unsigned int i=0; i<size(); ++i)
│ │ │ │ +
290 for (unsigned int j=0; j<func.size(); ++j)
│ │ │ │ +
291 func.set(i,j,0);
│ │ │ │ +
292
│ │ │ │ +
293 unsigned int row = 0;
│ │ │ │ +
294
│ │ │ │ +
295 // boundary dofs:
│ │ │ │ +
296 typedef Dune::QuadratureRule<Field, dimension-1> FaceQuadrature;
│ │ │ │ +
297 typedef Dune::QuadratureRules<Field, dimension-1> FaceQuadratureRules;
│ │ │ │ +
298
│ │ │ │ +
299 const auto &refElement = Dune::ReferenceElements< Field, dimension >::general( geoType );
│ │ │ │ +
300
│ │ │ │ +
301 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ +
302 {
│ │ │ │ +
303 if (!builder_.testFaceBasis(f))
│ │ │ │ +
304 continue;
│ │ │ │ +
305 testBasisVal.resize(builder_.testFaceBasis(f)->size());
│ │ │ │ +
306
│ │ │ │ +
307 const auto &geometry = refElement.template geometry< 1 >( f );
│ │ │ │ +
308 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 );
│ │ │ │ +
309 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, 2*order_+2 );
│ │ │ │ +
310
│ │ │ │ +
311 const unsigned int quadratureSize = faceQuad.size();
│ │ │ │ +
312 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ +
313 {
│ │ │ │ +
314 if (dimension>1)
│ │ │ │ +
315 builder_.testFaceBasis(f)->template evaluate<0>(faceQuad[qi].position(),testBasisVal);
│ │ │ │ +
316 else
│ │ │ │ +
317 testBasisVal[0] = 1.;
│ │ │ │ +
318 fillBnd( row, testBasisVal,
│ │ │ │ +
319 func.evaluate( geometry.global( faceQuad[qi].position() ) ),
│ │ │ │ +
320 builder_.normal(f), faceQuad[qi].weight(),
│ │ │ │ +
321 func);
│ │ │ │ +
322 }
│ │ │ │ +
323
│ │ │ │ +
324 row += builder_.testFaceBasis(f)->size();
│ │ │ │ +
325 }
│ │ │ │ +
326 // element dofs
│ │ │ │ +
327 if (builder_.testBasis())
│ │ │ │ +
328 {
│ │ │ │ +
329 testBasisVal.resize(builder_.testBasis()->size());
│ │ │ │ +
330
│ │ │ │ +
331 typedef Dune::QuadratureRule<Field, dimension> Quadrature;
│ │ │ │ +
332 typedef Dune::QuadratureRules<Field, dimension> QuadratureRules;
│ │ │ │ +
333 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*order_+1 );
│ │ │ │ +
334
│ │ │ │ +
335 const unsigned int quadratureSize = elemQuad.size();
│ │ │ │ +
336 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ +
337 {
│ │ │ │ +
338 builder_.testBasis()->template evaluate<0>(elemQuad[qi].position(),testBasisVal);
│ │ │ │ +
339 fillInterior( row, testBasisVal,
│ │ │ │ +
340 func.evaluate(elemQuad[qi].position()),
│ │ │ │ +
341 elemQuad[qi].weight(),
│ │ │ │ +
342 func );
│ │ │ │ +
343 }
│ │ │ │ +
344
│ │ │ │ +
345 row += builder_.testBasis()->size()*dimension;
│ │ │ │ +
346 }
│ │ │ │ +
347 assert(row==size());
│ │ │ │ +
348 }
│ │ │ │ +
│ │ │ │ +
349
│ │ │ │ +
350 private:
│ │ │ │ +
360 template <class MVal, class RTVal,class Matrix>
│ │ │ │ +
361 void fillBnd (unsigned int startRow,
│ │ │ │ +
362 const MVal &mVal,
│ │ │ │ +
363 const RTVal &rtVal,
│ │ │ │ +
364 const FieldVector<Field,dimension> &normal,
│ │ │ │ +
365 const Field &weight,
│ │ │ │ +
366 Matrix &matrix) const
│ │ │ │ +
367 {
│ │ │ │ +
368 const unsigned int endRow = startRow+mVal.size();
│ │ │ │ +
369 typename RTVal::const_iterator rtiter = rtVal.begin();
│ │ │ │ +
370 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col)
│ │ │ │ +
371 {
│ │ │ │ +
372 Field cFactor = (*rtiter)*normal;
│ │ │ │ +
373 typename MVal::const_iterator miter = mVal.begin();
│ │ │ │ +
374 for (unsigned int row = startRow;
│ │ │ │ +
375 row!=endRow; ++miter, ++row )
│ │ │ │ +
376 {
│ │ │ │ +
377 matrix.add(row,col, (weight*cFactor)*(*miter) );
│ │ │ │ +
378 }
│ │ │ │ +
379 assert( miter == mVal.end() );
│ │ │ │ +
380 }
│ │ │ │ +
381 }
│ │ │ │ +
390 template <class MVal, class RTVal,class Matrix>
│ │ │ │ +
391 void fillInterior (unsigned int startRow,
│ │ │ │ +
392 const MVal &mVal,
│ │ │ │ +
393 const RTVal &rtVal,
│ │ │ │ +
394 Field weight,
│ │ │ │ +
395 Matrix &matrix) const
│ │ │ │ +
396 {
│ │ │ │ +
397 const unsigned int endRow = startRow+mVal.size()*dimension;
│ │ │ │ +
398 typename RTVal::const_iterator rtiter = rtVal.begin();
│ │ │ │ +
399 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col)
│ │ │ │ +
400 {
│ │ │ │ +
401 typename MVal::const_iterator miter = mVal.begin();
│ │ │ │ +
402 for (unsigned int row = startRow;
│ │ │ │ +
403 row!=endRow; ++miter,row+=dimension )
│ │ │ │ +
404 {
│ │ │ │ +
405 for (unsigned int i=0; i<dimension; ++i)
│ │ │ │ +
406 {
│ │ │ │ +
407 matrix.add(row+i,col, (weight*(*miter))*(*rtiter)[i] );
│ │ │ │ +
408 }
│ │ │ │ +
409 }
│ │ │ │ +
410 assert( miter == mVal.end() );
│ │ │ │ +
411 }
│ │ │ │ +
412 }
│ │ │ │ +
413
│ │ │ │ +
414 Builder builder_;
│ │ │ │ +
415 std::size_t order_;
│ │ │ │ +
416 std::size_t size_;
│ │ │ │ +
417 };
│ │ │ │ +
│ │ │ │ +
418
│ │ │ │ +
419 template < unsigned int dim, class Field >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
421 {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
424 typedef std::size_t Key;
│ │ │ │ +
425 typedef typename std::remove_const<Object>::type NonConstObject;
│ │ │ │ +
426
│ │ │ │ +
427 template <GeometryType::Id geometryId>
│ │ │ │ +
│ │ │ │ +
428 static Object *create( const Key &key )
│ │ │ │ +
429 {
│ │ │ │ +
430 if ( !supports<geometryId>(key) )
│ │ │ │ +
431 return 0;
│ │ │ │ +
432 NonConstObject *interpol = new NonConstObject();
│ │ │ │ +
433 interpol->template build<geometryId>(key);
│ │ │ │ +
434 return interpol;
│ │ │ │ +
435 }
│ │ │ │ +
│ │ │ │ +
436 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
437 static bool supports ( const Key &key )
│ │ │ │ +
438 {
│ │ │ │ +
439 return GeometryType(geometryId).isSimplex();
│ │ │ │ +
440 }
│ │ │ │ +
│ │ │ │ +
441 static void release( Object *object ) { delete object; }
│ │ │ │ +
442 };
│ │ │ │ +
│ │ │ │ +
443
│ │ │ │ +
444} // namespace Dune
│ │ │ │ +
445
│ │ │ │ +
446#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ -
DerivativeLayout
Definition tensor.hh:168
│ │ │ │ -
Definition basisevaluator.hh:31
│ │ │ │ -
static const int dimRange
Definition basisevaluator.hh:36
│ │ │ │ -
B Basis
Definition basisevaluator.hh:32
│ │ │ │ -
unsigned int order_
Definition basisevaluator.hh:70
│ │ │ │ -
const Basis & basis_
Definition basisevaluator.hh:69
│ │ │ │ -
MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size)
Definition basisevaluator.hh:56
│ │ │ │ -
Basis::Field Field
Definition basisevaluator.hh:33
│ │ │ │ -
unsigned int size_
Definition basisevaluator.hh:70
│ │ │ │ -
Basis::DomainVector DomainVector
Definition basisevaluator.hh:34
│ │ │ │ -
void resize()
Definition basisevaluator.hh:63
│ │ │ │ -
Container container_
Definition basisevaluator.hh:71
│ │ │ │ -
unsigned int size() const
Definition basisevaluator.hh:50
│ │ │ │ -
std::vector< Field > Container
Definition basisevaluator.hh:38
│ │ │ │ -
MonomialEvaluator(const MonomialEvaluator &)
│ │ │ │ -
static const int dimension
Definition basisevaluator.hh:35
│ │ │ │ -
Definition basisevaluator.hh:78
│ │ │ │ -
BaseIterator(Container &container)
Definition basisevaluator.hh:90
│ │ │ │ -
const Deriv & operator*() const
Definition basisevaluator.hh:95
│ │ │ │ -
Dune::FieldVector< Field, blockSize > Block
Definition basisevaluator.hh:82
│ │ │ │ -
bool done() const
Definition basisevaluator.hh:106
│ │ │ │ -
Container::iterator CIter
Definition basisevaluator.hh:88
│ │ │ │ -
const Deriv * operator->() const
Definition basisevaluator.hh:101
│ │ │ │ -
Deriv Derivatives
Definition basisevaluator.hh:79
│ │ │ │ -
std::vector< Field > Container
Definition basisevaluator.hh:87
│ │ │ │ -
Deriv::Field Field
Definition basisevaluator.hh:80
│ │ │ │ -
Definition basisevaluator.hh:45
│ │ │ │ -
BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > > Integrate
Definition basisevaluator.hh:47
│ │ │ │ -
BaseIterator< Derivatives< Field, dimension, dimRange, deriv, DerivativeLayoutNS::derivative > > All
Definition basisevaluator.hh:46
│ │ │ │ -
Definition basisevaluator.hh:131
│ │ │ │ -
Basis::Field Field
Definition basisevaluator.hh:133
│ │ │ │ -
Basis::DomainVector DomainVector
Definition basisevaluator.hh:134
│ │ │ │ -
Iterator< deriv >::All evaluate(const DVector &x)
Definition basisevaluator.hh:148
│ │ │ │ -
MonomialEvaluator< B > Base
Definition basisevaluator.hh:138
│ │ │ │ -
StandardEvaluator(const Basis &basis)
Definition basisevaluator.hh:144
│ │ │ │ -
static const int dimRange
Definition basisevaluator.hh:137
│ │ │ │ -
std::vector< Field > Container
Definition basisevaluator.hh:135
│ │ │ │ -
Iterator< 0 >::Integrate integrate()
Definition basisevaluator.hh:154
│ │ │ │ -
B Basis
Definition basisevaluator.hh:132
│ │ │ │ -
StandardEvaluator(const Basis &basis, unsigned int size)
Definition basisevaluator.hh:162
│ │ │ │ -
static const int dimension
Definition basisevaluator.hh:136
│ │ │ │ -
Definition basisevaluator.hh:142
│ │ │ │ -
Definition tensor.hh:172
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Definition nedelecsimplexinterpolation.hh:38
│ │ │ │ +
LocalCoefficientsContainer(const Setter &setter)
Definition nedelecsimplexinterpolation.hh:43
│ │ │ │ +
const LocalKey & localKey(const unsigned int i) const
Definition raviartthomassimplexinterpolation.hh:48
│ │ │ │ +
std::size_t size() const
Definition nedelecsimplexinterpolation.hh:54
│ │ │ │ +
Definition orthonormalbasis.hh:20
│ │ │ │ +
static void release(Object *object)
Definition orthonormalbasis.hh:57
│ │ │ │ +
Definition raviartthomassimplexinterpolation.hh:421
│ │ │ │ +
std::remove_const< Object >::type NonConstObject
Definition raviartthomassimplexinterpolation.hh:425
│ │ │ │ +
static void release(Object *object)
Definition raviartthomassimplexinterpolation.hh:441
│ │ │ │ +
static bool supports(const Key &key)
Definition raviartthomassimplexinterpolation.hh:437
│ │ │ │ +
static Object * create(const Key &key)
Definition raviartthomassimplexinterpolation.hh:428
│ │ │ │ +
RTL2InterpolationBuilder< dim, Field > Builder
Definition raviartthomassimplexinterpolation.hh:422
│ │ │ │ +
const RaviartThomasL2Interpolation< dim, Field > Object
Definition raviartthomassimplexinterpolation.hh:423
│ │ │ │ +
std::size_t Key
Definition raviartthomassimplexinterpolation.hh:424
│ │ │ │ +
Definition raviartthomassimplexinterpolation.hh:70
│ │ │ │ +
std::size_t Key
Definition raviartthomassimplexinterpolation.hh:71
│ │ │ │ +
static void release(Object *object)
Definition raviartthomassimplexinterpolation.hh:91
│ │ │ │ +
static bool supports(const Key &key)
Definition raviartthomassimplexinterpolation.hh:87
│ │ │ │ +
const LocalCoefficientsContainer Object
Definition raviartthomassimplexinterpolation.hh:72
│ │ │ │ +
static Object * create(const Key &key)
Definition raviartthomassimplexinterpolation.hh:75
│ │ │ │ +
Definition raviartthomassimplexinterpolation.hh:107
│ │ │ │ +
TestBasis * testBasis() const
Definition raviartthomassimplexinterpolation.hh:141
│ │ │ │ +
FieldVector< Field, dimension > Normal
Definition raviartthomassimplexinterpolation.hh:119
│ │ │ │ +
TestBasisFactory::Object TestBasis
Definition raviartthomassimplexinterpolation.hh:112
│ │ │ │ +
TestFaceBasisFactory::Object TestFaceBasis
Definition raviartthomassimplexinterpolation.hh:116
│ │ │ │ +
unsigned int faceSize() const
Definition raviartthomassimplexinterpolation.hh:138
│ │ │ │ +
void build(std::size_t order)
Definition raviartthomassimplexinterpolation.hh:150
│ │ │ │ + │ │ │ │ +
TestFaceBasis * testFaceBasis(unsigned int f) const
Definition raviartthomassimplexinterpolation.hh:144
│ │ │ │ +
GeometryType type() const
Definition raviartthomassimplexinterpolation.hh:133
│ │ │ │ +
const Normal & normal(unsigned int f) const
Definition raviartthomassimplexinterpolation.hh:147
│ │ │ │ +
RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete
│ │ │ │ +
OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory
Definition raviartthomassimplexinterpolation.hh:115
│ │ │ │ +
RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete
│ │ │ │ +
OrthonormalBasisFactory< dimension, Field > TestBasisFactory
Definition raviartthomassimplexinterpolation.hh:111
│ │ │ │ +
std::size_t order() const
Definition raviartthomassimplexinterpolation.hh:135
│ │ │ │ +
static const unsigned int dimension
Definition raviartthomassimplexinterpolation.hh:108
│ │ │ │ +
~RTL2InterpolationBuilder()
Definition raviartthomassimplexinterpolation.hh:126
│ │ │ │ +
An L2-based interpolation for Raviart Thomas.
Definition raviartthomassimplexinterpolation.hh:213
│ │ │ │ +
std::size_t order() const
Definition raviartthomassimplexinterpolation.hh:244
│ │ │ │ +
RaviartThomasL2Interpolation()
Definition raviartthomassimplexinterpolation.hh:220
│ │ │ │ +
void interpolate(typename Base::template Helper< Func, Container, type > &func) const
Definition raviartthomassimplexinterpolation.hh:283
│ │ │ │ +
auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix::Field * >::value, void >
Definition raviartthomassimplexinterpolation.hh:235
│ │ │ │ +
RTL2InterpolationBuilder< dimension, Field > Builder
Definition raviartthomassimplexinterpolation.hh:219
│ │ │ │ +
F Field
Definition raviartthomassimplexinterpolation.hh:218
│ │ │ │ +
void build(std::size_t order)
Definition raviartthomassimplexinterpolation.hh:253
│ │ │ │ +
auto interpolate(const Function &function, Vector &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void >
Definition raviartthomassimplexinterpolation.hh:226
│ │ │ │ +
std::size_t size() const
Definition raviartthomassimplexinterpolation.hh:248
│ │ │ │ +
void setLocalKeys(std::vector< LocalKey > &keys) const
Definition raviartthomassimplexinterpolation.hh:265
│ │ │ │ +
Definition interpolationhelper.hh:22
│ │ │ │ +
Definition interpolationhelper.hh:24
│ │ │ │ +
Definition polynomialbasis.hh:65
│ │ │ │ +
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,323 +1,622 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -basisevaluator.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ +raviartthomassimplexinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_BASISEVALUATOR_HH │ │ │ │ │ -6#define DUNE_BASISEVALUATOR_HH │ │ │ │ │ +5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ +6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include │ │ │ │ │ -15 │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ -19 │ │ │ │ │ -20namespace _D_u_n_e │ │ │ │ │ -21{ │ │ │ │ │ -22 /******************************************* │ │ │ │ │ -23 * Should be removed as soon as the Tensor │ │ │ │ │ -24 * classes have been revisited. See remarks │ │ │ │ │ -25 * in tensor.hh (also hold true here). │ │ │ │ │ -26 *******************************************/ │ │ │ │ │ -27 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include │ │ │ │ │ +14#include │ │ │ │ │ +15#include │ │ │ │ │ +16#include │ │ │ │ │ +17 │ │ │ │ │ +18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ +20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +22 │ │ │ │ │ +23namespace _D_u_n_e │ │ │ │ │ +24{ │ │ │ │ │ +25 │ │ │ │ │ +26 // Internal Forward Declarations │ │ │ │ │ +27 // ----------------------------- │ │ │ │ │ 28 │ │ │ │ │ -29 template │ │ │ │ │ -_3_0 struct _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ -31 { │ │ │ │ │ -_3_2 typedef B _B_a_s_i_s; │ │ │ │ │ -_3_3 typedef typename Basis::Field _F_i_e_l_d; │ │ │ │ │ -_3_4 typedef typename Basis::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_3_5 static const int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ -_3_6 static const int _d_i_m_R_a_n_g_e = Basis::dimRange; │ │ │ │ │ -37 │ │ │ │ │ -_3_8 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ -39 │ │ │ │ │ -40 template< class Deriv > │ │ │ │ │ -41 struct _B_a_s_e_I_t_e_r_a_t_o_r; │ │ │ │ │ -42 │ │ │ │ │ -43 template │ │ │ │ │ -_4_4 struct _I_t_e_r_a_t_o_r │ │ │ │ │ -45 { │ │ │ │ │ -_4_6 typedef │ │ │ │ │ -_B_a_s_e_I_t_e_r_a_t_o_r_<_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_d_i_m_R_a_n_g_e_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_d_e_r_i_v_a_t_i_v_e_> > _A_l_l; │ │ │ │ │ -_4_7 typedef _B_a_s_e_I_t_e_r_a_t_o_r_<_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_1_,_0_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_: │ │ │ │ │ -_v_a_l_u_e_> > _I_n_t_e_g_r_a_t_e; │ │ │ │ │ -48 }; │ │ │ │ │ -49 │ │ │ │ │ -_5_0 unsigned int _s_i_z_e() const │ │ │ │ │ -51 { │ │ │ │ │ -52 return _s_i_z_e__; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -55 protected: │ │ │ │ │ -_5_6 _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r(const _B_a_s_i_s &basis,unsigned int order,unsigned int _s_i_z_e) │ │ │ │ │ -57 : _b_a_s_i_s__(basis), │ │ │ │ │ -58 _o_r_d_e_r__(order), │ │ │ │ │ -59 _s_i_z_e__(_s_i_z_e), │ │ │ │ │ -60 _c_o_n_t_a_i_n_e_r__(0) │ │ │ │ │ -61 {} │ │ │ │ │ -62 template │ │ │ │ │ -_6_3 void _r_e_s_i_z_e() │ │ │ │ │ -64 { │ │ │ │ │ -65 const int totalSize = │ │ │ │ │ -_D_e_r_i_v_a_t_i_v_e_s_<_F_i_e_l_d_,_d_i_m_e_n_s_i_o_n_,_d_i_m_R_a_n_g_e_,_d_e_r_i_v_,_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_d_e_r_i_v_a_t_i_v_e_>_:_: │ │ │ │ │ -_s_i_z_e*_s_i_z_e__; │ │ │ │ │ -66 _c_o_n_t_a_i_n_e_r__.resize(totalSize); │ │ │ │ │ -67 } │ │ │ │ │ -_6_8 _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r(const _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r&); │ │ │ │ │ -_6_9 const _B_a_s_i_s &_b_a_s_i_s__; │ │ │ │ │ -_7_0 unsigned int _o_r_d_e_r__,_s_i_z_e__; │ │ │ │ │ -_7_1 _C_o_n_t_a_i_n_e_r _c_o_n_t_a_i_n_e_r__; │ │ │ │ │ -72 }; │ │ │ │ │ +29 template < unsigned int dim, class Field > │ │ │ │ │ +30 struct RaviartThomasL2InterpolationFactory; │ │ │ │ │ +31 │ │ │ │ │ +32 │ │ │ │ │ +33 │ │ │ │ │ +34 // LocalCoefficientsContainer │ │ │ │ │ +35 // -------------------------- │ │ │ │ │ +36 │ │ │ │ │ +37 class LocalCoefficientsContainer │ │ │ │ │ +38 { │ │ │ │ │ +39 typedef _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r This; │ │ │ │ │ +40 │ │ │ │ │ +41 public: │ │ │ │ │ +42 template │ │ │ │ │ +_4_3 _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r ( const Setter &setter ) │ │ │ │ │ +44 { │ │ │ │ │ +45 setter.setLocalKeys(localKey_); │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_8 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ +49 { │ │ │ │ │ +50 assert( i < _s_i_z_e() ); │ │ │ │ │ +51 return localKey_[ i ]; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 std::size_t _s_i_z_e () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return localKey_.size(); │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +59 private: │ │ │ │ │ +60 std::vector< LocalKey > localKey_; │ │ │ │ │ +61 }; │ │ │ │ │ +62 │ │ │ │ │ +63 │ │ │ │ │ +64 │ │ │ │ │ +65 // RaviartThomasCoefficientsFactory │ │ │ │ │ +66 // -------------------------------- │ │ │ │ │ +67 │ │ │ │ │ +68 template < unsigned int dim > │ │ │ │ │ +_6_9 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +70 { │ │ │ │ │ +_7_1 typedef std::size_t _K_e_y; │ │ │ │ │ +_7_2 typedef const _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r _O_b_j_e_c_t; │ │ │ │ │ 73 │ │ │ │ │ -74 │ │ │ │ │ -75 template< class B > │ │ │ │ │ -76 template< class Deriv > │ │ │ │ │ -_7_7 struct _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r< B >::_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ -78 { │ │ │ │ │ -_7_9 typedef Deriv _D_e_r_i_v_a_t_i_v_e_s; │ │ │ │ │ -_8_0 typedef typename Deriv::Field _F_i_e_l_d; │ │ │ │ │ -_8_1 static const unsigned int blockSize = Deriv::size; │ │ │ │ │ -_8_2 typedef Dune::FieldVector _B_l_o_c_k; │ │ │ │ │ -_8_3 static const _D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t layout = Deriv::layout; │ │ │ │ │ -_8_4 static const unsigned int dimDomain = Deriv::dimDomain; │ │ │ │ │ -_8_5 static const unsigned int _d_i_m_R_a_n_g_e = Deriv::dimRange; │ │ │ │ │ -86 │ │ │ │ │ -_8_7 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ -_8_8 typedef typename Container::iterator _C_I_t_e_r; │ │ │ │ │ -89 │ │ │ │ │ -_9_0 explicit _B_a_s_e_I_t_e_r_a_t_o_r ( _C_o_n_t_a_i_n_e_r &container ) │ │ │ │ │ -91 : pos_( container.begin() ), │ │ │ │ │ -92 end_( container.end() ) │ │ │ │ │ -93 {} │ │ │ │ │ +74 template< GeometryType::Id geometryId > │ │ │ │ │ +_7_5 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ +76 { │ │ │ │ │ +77 typedef _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _d_o_u_b_l_e_ _> │ │ │ │ │ +InterpolationFactory; │ │ │ │ │ +78 if( !supports< geometryId >( key ) ) │ │ │ │ │ +79 return nullptr; │ │ │ │ │ +80 typename InterpolationFactory::Object *interpolation = │ │ │ │ │ +InterpolationFactory::template create< geometryId >( key ); │ │ │ │ │ +81 _O_b_j_e_c_t *localKeys = new _O_b_j_e_c_t( *interpolation ); │ │ │ │ │ +82 InterpolationFactory::release( interpolation ); │ │ │ │ │ +83 return localKeys; │ │ │ │ │ +84 } │ │ │ │ │ +85 │ │ │ │ │ +86 template< GeometryType::Id geometryId > │ │ │ │ │ +_8_7 static bool _s_u_p_p_o_r_t_s ( const _K_e_y &key ) │ │ │ │ │ +88 { │ │ │ │ │ +89 return GeometryType(geometryId).isSimplex(); │ │ │ │ │ +90 } │ │ │ │ │ +_9_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +92 }; │ │ │ │ │ +93 │ │ │ │ │ 94 │ │ │ │ │ -_9_5 const Deriv &_o_p_e_r_a_t_o_r_*() const │ │ │ │ │ -96 { │ │ │ │ │ -97 assert(!done()); │ │ │ │ │ -98 return reinterpret_cast(*pos_); │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -_1_0_1 const Deriv *_o_p_e_r_a_t_o_r_-_>() const │ │ │ │ │ -102 { │ │ │ │ │ -103 return &(_o_p_e_r_a_t_o_r_*()); │ │ │ │ │ -104 } │ │ │ │ │ -105 │ │ │ │ │ -_1_0_6 bool _d_o_n_e () const │ │ │ │ │ +95 │ │ │ │ │ +96 // RTL2InterpolationBuilder │ │ │ │ │ +97 // ------------------------ │ │ │ │ │ +98 │ │ │ │ │ +99 // L2 Interpolation requires: │ │ │ │ │ +100 // - for element │ │ │ │ │ +101 // - test basis │ │ │ │ │ +102 // - for each face (dynamic) │ │ │ │ │ +103 // - test basis │ │ │ │ │ +104 // - normal │ │ │ │ │ +105 template< unsigned int dim, class Field > │ │ │ │ │ +_1_0_6 struct _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ 107 { │ │ │ │ │ -108 return pos_ == end_; │ │ │ │ │ -109 } │ │ │ │ │ -110 │ │ │ │ │ -_1_1_1 _B_a_s_e_I_t_e_r_a_t_o_r &operator++ () │ │ │ │ │ -112 { │ │ │ │ │ -113 pos_ += blockSize; │ │ │ │ │ -114 return *this; │ │ │ │ │ -115 } │ │ │ │ │ -116 │ │ │ │ │ -_1_1_7 _B_a_s_e_I_t_e_r_a_t_o_r &operator+= ( unsigned int skip ) │ │ │ │ │ -118 { │ │ │ │ │ -119 pos_ += skip*blockSize; │ │ │ │ │ -120 return *this; │ │ │ │ │ -121 } │ │ │ │ │ +_1_0_8 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ +109 │ │ │ │ │ +110 // for the dofs associated to the element │ │ │ │ │ +_1_1_1 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_,_ _F_i_e_l_d_ _> _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ +_1_1_2 typedef typename _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_B_a_s_i_s; │ │ │ │ │ +113 │ │ │ │ │ +114 // for the dofs associated to the faces │ │ │ │ │ +_1_1_5 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y< _d_i_m_e_n_s_i_o_n-1, Field > _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ +_1_1_6 typedef typename _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_F_a_c_e_B_a_s_i_s; │ │ │ │ │ +117 │ │ │ │ │ +118 // the normals of the faces │ │ │ │ │ +_1_1_9 typedef FieldVector< Field, dimension > _N_o_r_m_a_l; │ │ │ │ │ +120 │ │ │ │ │ +_1_2_1 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () = default; │ │ │ │ │ 122 │ │ │ │ │ -123 private: │ │ │ │ │ -124 CIter pos_; │ │ │ │ │ -125 const CIter end_; │ │ │ │ │ -126 }; │ │ │ │ │ -127 │ │ │ │ │ -128 template< class B > │ │ │ │ │ -_1_2_9 struct _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -130 : public _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r< B > │ │ │ │ │ -131 { │ │ │ │ │ -_1_3_2 typedef B _B_a_s_i_s; │ │ │ │ │ -_1_3_3 typedef typename Basis::Field _F_i_e_l_d; │ │ │ │ │ -_1_3_4 typedef typename Basis::DomainVector _D_o_m_a_i_n_V_e_c_t_o_r; │ │ │ │ │ -_1_3_5 typedef std::vector _C_o_n_t_a_i_n_e_r; │ │ │ │ │ -_1_3_6 static const int _d_i_m_e_n_s_i_o_n = Basis::dimension; │ │ │ │ │ -_1_3_7 static const int _d_i_m_R_a_n_g_e = Basis::dimRange; │ │ │ │ │ -_1_3_8 typedef _M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_<_B_> _B_a_s_e; │ │ │ │ │ +_1_2_3 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( const _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r & ) = delete; │ │ │ │ │ +_1_2_4 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r && ) = delete; │ │ │ │ │ +125 │ │ │ │ │ +_1_2_6 _~_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () │ │ │ │ │ +127 { │ │ │ │ │ +128 _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( testBasis_ ); │ │ │ │ │ +129 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ +130 _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( f.basis_ ); │ │ │ │ │ +131 } │ │ │ │ │ +132 │ │ │ │ │ +_1_3_3 GeometryType _t_y_p_e () const { return geometry_; } │ │ │ │ │ +134 │ │ │ │ │ +_1_3_5 std::size_t _o_r_d_e_r () const { return order_; } │ │ │ │ │ +136 │ │ │ │ │ +137 // number of faces │ │ │ │ │ +_1_3_8 unsigned int _f_a_c_e_S_i_z_e () const { return faceSize_; } │ │ │ │ │ 139 │ │ │ │ │ -140 template │ │ │ │ │ -_1_4_1 struct _I_t_e_r_a_t_o_r : public Base::template _I_t_e_r_a_t_o_r │ │ │ │ │ -142 {}; │ │ │ │ │ -143 │ │ │ │ │ -_1_4_4 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r(const _B_a_s_i_s &basis) │ │ │ │ │ -145 : _B_a_s_e(basis,basis.order(),basis._s_i_z_e()) │ │ │ │ │ -146 {} │ │ │ │ │ -147 template │ │ │ │ │ -_1_4_8 typename _I_t_e_r_a_t_o_r_<_d_e_r_i_v_>_:_:_A_l_l _e_v_a_l_u_a_t_e(const DVector &x) │ │ │ │ │ -149 { │ │ │ │ │ -150 Base::template resize(); │ │ │ │ │ -151 basis_.template evaluate(x,&(container_[0])); │ │ │ │ │ -152 return typename _I_t_e_r_a_t_o_r_<_d_e_r_i_v_>_:_:_A_l_l(container_); │ │ │ │ │ -153 } │ │ │ │ │ -_1_5_4 typename _I_t_e_r_a_t_o_r_<_0_>_:_:_I_n_t_e_g_r_a_t_e _i_n_t_e_g_r_a_t_e() │ │ │ │ │ -155 { │ │ │ │ │ -156 Base::template resize<0>(); │ │ │ │ │ -157 basis_.integrate(&(container_[0])); │ │ │ │ │ -158 return typename _I_t_e_r_a_t_o_r_<_0_>_:_:_I_n_t_e_g_r_a_t_e(container_); │ │ │ │ │ -159 } │ │ │ │ │ -160 │ │ │ │ │ -161 protected: │ │ │ │ │ -_1_6_2 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r ( const _B_a_s_i_s &basis, unsigned int _s_i_z_e ) │ │ │ │ │ -163 : _B_a_s_e( basis, basis.order(), _s_i_z_e ) │ │ │ │ │ -164 {} │ │ │ │ │ -165 │ │ │ │ │ -166 private: │ │ │ │ │ -167 _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r(const _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r&); │ │ │ │ │ -168 using _B_a_s_e_:_:_b_a_s_i_s__; │ │ │ │ │ -169 using _B_a_s_e_:_:_c_o_n_t_a_i_n_e_r__; │ │ │ │ │ -170 }; │ │ │ │ │ -171 │ │ │ │ │ -172} │ │ │ │ │ -173 │ │ │ │ │ -174#endif │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ -_t_e_n_s_o_r_._h_h │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +140 // basis associated to the element │ │ │ │ │ +_1_4_1 _T_e_s_t_B_a_s_i_s *_t_e_s_t_B_a_s_i_s () const { return testBasis_; } │ │ │ │ │ +142 │ │ │ │ │ +143 // basis associated to face f │ │ │ │ │ +_1_4_4 _T_e_s_t_F_a_c_e_B_a_s_i_s *_t_e_s_t_F_a_c_e_B_a_s_i_s ( unsigned int f ) const { assert( f < │ │ │ │ │ +_f_a_c_e_S_i_z_e() ); return faceStructure_[ f ].basis_; } │ │ │ │ │ +145 │ │ │ │ │ +146 // normal of face f │ │ │ │ │ +_1_4_7 const _N_o_r_m_a_l &_n_o_r_m_a_l ( unsigned int f ) const { assert( f < _f_a_c_e_S_i_z_e() ); │ │ │ │ │ +return *(faceStructure_[ f ].normal_); } │ │ │ │ │ +148 │ │ │ │ │ +149 template< GeometryType::Id geometryId > │ │ │ │ │ +_1_5_0 void _b_u_i_l_d ( std::size_t _o_r_d_e_r ) │ │ │ │ │ +151 { │ │ │ │ │ +152 constexpr GeometryType geometry = geometryId; │ │ │ │ │ +153 geometry_ = geometry; │ │ │ │ │ +154 order_ = _o_r_d_e_r; │ │ │ │ │ +155 │ │ │ │ │ +156 testBasis_ = (_o_r_d_e_r > 0 ? TestBasisFactory::template create< geometry > │ │ │ │ │ +( _o_r_d_e_r-1 ) : nullptr); │ │ │ │ │ +157 │ │ │ │ │ +158 const auto &refElement = ReferenceElements< Field, dimension >::general │ │ │ │ │ +( _t_y_p_e() ); │ │ │ │ │ +159 faceSize_ = refElement.size( 1 ); │ │ │ │ │ +160 faceStructure_.reserve( faceSize_ ); │ │ │ │ │ +161 for( unsigned int face = 0; face < faceSize_; ++face ) │ │ │ │ │ +162 { │ │ │ │ │ +163 /* For simplices or cubes of arbitrary dimension you could just use │ │ │ │ │ +164 * │ │ │ │ │ +165 * ``` │ │ │ │ │ +166 * GeometryType faceGeometry = Impl::getBase(geometry_); │ │ │ │ │ +167 * TestFaceBasis *faceBasis = TestFaceBasisFactory::template create< │ │ │ │ │ +faceGeometry >( order ); │ │ │ │ │ +168 * ``` │ │ │ │ │ +169 * │ │ │ │ │ +170 * For i.e. Prisms and Pyramids in 3d this does not work because they │ │ │ │ │ +contain squares and triangles as faces. │ │ │ │ │ +171 * And depending on the dynamic face index a different face geometry is │ │ │ │ │ +needed. │ │ │ │ │ +172 * │ │ │ │ │ +173 */ │ │ │ │ │ +174 _T_e_s_t_F_a_c_e_B_a_s_i_s *faceBasis = Impl::toGeometryTypeIdConstant<_d_i_m_e_n_s_i_o_n-1> │ │ │ │ │ +(refElement.type( face, 1 ), [&](auto faceGeometryTypeId) { │ │ │ │ │ +175 return TestFaceBasisFactory::template create< decltype │ │ │ │ │ +(faceGeometryTypeId)::value >( _o_r_d_e_r ); │ │ │ │ │ +176 }); │ │ │ │ │ +177 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal │ │ │ │ │ +( face ) ); │ │ │ │ │ +178 } │ │ │ │ │ +179 assert( faceStructure_.size() == faceSize_ ); │ │ │ │ │ +180 } │ │ │ │ │ +181 │ │ │ │ │ +182 private: │ │ │ │ │ +183 struct FaceStructure │ │ │ │ │ +184 { │ │ │ │ │ +185 FaceStructure( _T_e_s_t_F_a_c_e_B_a_s_i_s *tfb, const _N_o_r_m_a_l &n ) │ │ │ │ │ +186 : basis_( tfb ), normal_( &n ) │ │ │ │ │ +187 {} │ │ │ │ │ +188 │ │ │ │ │ +189 _T_e_s_t_F_a_c_e_B_a_s_i_s *basis_; │ │ │ │ │ +190 const Dune::FieldVector< Field, dimension > *normal_; │ │ │ │ │ +191 }; │ │ │ │ │ +192 │ │ │ │ │ +193 std::vector< FaceStructure > faceStructure_; │ │ │ │ │ +194 _T_e_s_t_B_a_s_i_s *testBasis_ = nullptr; │ │ │ │ │ +195 GeometryType geometry_; │ │ │ │ │ +196 unsigned int faceSize_; │ │ │ │ │ +197 std::size_t order_; │ │ │ │ │ +198 }; │ │ │ │ │ +199 │ │ │ │ │ +200 │ │ │ │ │ +201 │ │ │ │ │ +202 // RaviartThomasL2Interpolation │ │ │ │ │ +203 // ---------------------------- │ │ │ │ │ +204 │ │ │ │ │ +210 template< unsigned int dimension, class F> │ │ │ │ │ +_2_1_1 class _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +212 : public _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r< F ,dimension > │ │ │ │ │ +213 { │ │ │ │ │ +214 typedef _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> _T_h_i_s; │ │ │ │ │ +215 typedef _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_F_,_d_i_m_e_n_s_i_o_n_> _B_a_s_e; │ │ │ │ │ +216 │ │ │ │ │ +217 public: │ │ │ │ │ +_2_1_8 typedef F _F_i_e_l_d; │ │ │ │ │ +_2_1_9 typedef _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_e_n_s_i_o_n_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ +_2_2_0 _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n() │ │ │ │ │ +221 : order_(0), │ │ │ │ │ +222 size_(0) │ │ │ │ │ +223 {} │ │ │ │ │ +224 │ │ │ │ │ +225 template< class Function, class Vector > │ │ │ │ │ +_2_2_6 auto _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, Vector &coefficients ) const │ │ │ │ │ +227 -> std::enable_if_t< std::is_same< decltype(std::declval().resize │ │ │ │ │ +(1) ),void >::value,void> │ │ │ │ │ +228 { │ │ │ │ │ +229 coefficients.resize(_s_i_z_e()); │ │ │ │ │ +230 typename Base::template _H_e_l_p_e_r_<_F_u_n_c_t_i_o_n_,_V_e_c_t_o_r_,_t_r_u_e_> func │ │ │ │ │ +( function,coefficients ); │ │ │ │ │ +231 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ +232 } │ │ │ │ │ +233 │ │ │ │ │ +234 template< class Basis, class Matrix > │ │ │ │ │ +_2_3_5 auto _i_n_t_e_r_p_o_l_a_t_e ( const Basis &basis, Matrix &matrix ) const │ │ │ │ │ +236 -> std::enable_if_t< std::is_same< │ │ │ │ │ +237 decltype(std::declval().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ +value,void> │ │ │ │ │ +238 { │ │ │ │ │ +239 matrix.resize( _s_i_z_e(), basis.size() ); │ │ │ │ │ +240 typename Base::template _H_e_l_p_e_r_<_B_a_s_i_s_,_M_a_t_r_i_x_,_f_a_l_s_e_> func( basis,matrix ); │ │ │ │ │ +241 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ +242 } │ │ │ │ │ +243 │ │ │ │ │ +_2_4_4 std::size_t _o_r_d_e_r() const │ │ │ │ │ +245 { │ │ │ │ │ +246 return order_; │ │ │ │ │ +247 } │ │ │ │ │ +_2_4_8 std::size_t _s_i_z_e() const │ │ │ │ │ +249 { │ │ │ │ │ +250 return size_; │ │ │ │ │ +251 } │ │ │ │ │ +252 template │ │ │ │ │ +_2_5_3 void _b_u_i_l_d( std::size_t _o_r_d_e_r ) │ │ │ │ │ +254 { │ │ │ │ │ +255 size_ = 0; │ │ │ │ │ +256 order_ = _o_r_d_e_r; │ │ │ │ │ +257 builder_.template build(order_); │ │ │ │ │ +258 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ +259 size_ += dimension*builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e(); │ │ │ │ │ +260 for ( unsigned int f=0; f_s_i_z_e(); │ │ │ │ │ +263 } │ │ │ │ │ +264 │ │ │ │ │ +_2_6_5 void _s_e_t_L_o_c_a_l_K_e_y_s(std::vector< LocalKey > &keys) const │ │ │ │ │ +266 { │ │ │ │ │ +267 keys.resize(_s_i_z_e()); │ │ │ │ │ +268 unsigned int row = 0; │ │ │ │ │ +269 for (unsigned int f=0; f_s_i_z_e(); ++i,++row) │ │ │ │ │ +273 keys[row] = _L_o_c_a_l_K_e_y(f,1,i); │ │ │ │ │ +274 } │ │ │ │ │ +275 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ +276 for (unsigned int i=0; i_s_i_z_e()*dimension; ++i,++row) │ │ │ │ │ +277 keys[row] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ +278 assert( row == _s_i_z_e() ); │ │ │ │ │ +279 } │ │ │ │ │ +280 │ │ │ │ │ +281 protected: │ │ │ │ │ +282 template< class Func, class Container, bool type > │ │ │ │ │ +_2_8_3 void _i_n_t_e_r_p_o_l_a_t_e ( typename Base::template _H_e_l_p_e_r_<_F_u_n_c_,_C_o_n_t_a_i_n_e_r_,_t_y_p_e_> │ │ │ │ │ +&func ) const │ │ │ │ │ +284 { │ │ │ │ │ +285 const Dune::GeometryType geoType = builder_._t_y_p_e(); │ │ │ │ │ +286 │ │ │ │ │ +287 std::vector< Field > testBasisVal; │ │ │ │ │ +288 │ │ │ │ │ +289 for (unsigned int i=0; i<_s_i_z_e(); ++i) │ │ │ │ │ +290 for (unsigned int j=0; j FaceQuadrature; │ │ │ │ │ +297 typedef Dune::QuadratureRules<_F_i_e_l_d, dimension-1> FaceQuadratureRules; │ │ │ │ │ +298 │ │ │ │ │ +299 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ +general( geoType ); │ │ │ │ │ +300 │ │ │ │ │ +301 for (unsigned int f=0; f_s_i_z_e()); │ │ │ │ │ +306 │ │ │ │ │ +307 const auto &geometry = refElement.template geometry< 1 >( f ); │ │ │ │ │ +308 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 ); │ │ │ │ │ +309 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, │ │ │ │ │ +2*order_+2 ); │ │ │ │ │ +310 │ │ │ │ │ +311 const unsigned int quadratureSize = faceQuad.size(); │ │ │ │ │ +312 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ +313 { │ │ │ │ │ +314 if (dimension>1) │ │ │ │ │ +315 builder_._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->template evaluate<0>(faceQuad[qi].position │ │ │ │ │ +(),testBasisVal); │ │ │ │ │ +316 else │ │ │ │ │ +317 testBasisVal[0] = 1.; │ │ │ │ │ +318 fillBnd( row, testBasisVal, │ │ │ │ │ +319 func.evaluate( geometry.global( faceQuad[qi].position() ) ), │ │ │ │ │ +320 builder_._n_o_r_m_a_l(f), faceQuad[qi].weight(), │ │ │ │ │ +321 func); │ │ │ │ │ +322 } │ │ │ │ │ +323 │ │ │ │ │ +324 row += builder_._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e(); │ │ │ │ │ +325 } │ │ │ │ │ +326 // element dofs │ │ │ │ │ +327 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ +328 { │ │ │ │ │ +329 testBasisVal.resize(builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e()); │ │ │ │ │ +330 │ │ │ │ │ +331 typedef Dune::QuadratureRule Quadrature; │ │ │ │ │ +332 typedef Dune::QuadratureRules QuadratureRules; │ │ │ │ │ +333 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*order_+1 ); │ │ │ │ │ +334 │ │ │ │ │ +335 const unsigned int quadratureSize = elemQuad.size(); │ │ │ │ │ +336 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ +337 { │ │ │ │ │ +338 builder_._t_e_s_t_B_a_s_i_s()->template evaluate<0>(elemQuad[qi].position │ │ │ │ │ +(),testBasisVal); │ │ │ │ │ +339 fillInterior( row, testBasisVal, │ │ │ │ │ +340 func.evaluate(elemQuad[qi].position()), │ │ │ │ │ +341 elemQuad[qi].weight(), │ │ │ │ │ +342 func ); │ │ │ │ │ +343 } │ │ │ │ │ +344 │ │ │ │ │ +345 row += builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e()*dimension; │ │ │ │ │ +346 } │ │ │ │ │ +347 assert(row==_s_i_z_e()); │ │ │ │ │ +348 } │ │ │ │ │ +349 │ │ │ │ │ +350 private: │ │ │ │ │ +360 template │ │ │ │ │ +361 void fillBnd (unsigned int startRow, │ │ │ │ │ +362 const MVal &mVal, │ │ │ │ │ +363 const RTVal &rtVal, │ │ │ │ │ +364 const FieldVector &normal, │ │ │ │ │ +365 const _F_i_e_l_d &weight, │ │ │ │ │ +366 Matrix &matrix) const │ │ │ │ │ +367 { │ │ │ │ │ +368 const unsigned int endRow = startRow+mVal.size(); │ │ │ │ │ +369 typename RTVal::const_iterator rtiter = rtVal.begin(); │ │ │ │ │ +370 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col) │ │ │ │ │ +371 { │ │ │ │ │ +372 _F_i_e_l_d cFactor = (*rtiter)*normal; │ │ │ │ │ +373 typename MVal::const_iterator miter = mVal.begin(); │ │ │ │ │ +374 for (unsigned int row = startRow; │ │ │ │ │ +375 row!=endRow; ++miter, ++row ) │ │ │ │ │ +376 { │ │ │ │ │ +377 matrix.add(row,col, (weight*cFactor)*(*miter) ); │ │ │ │ │ +378 } │ │ │ │ │ +379 assert( miter == mVal.end() ); │ │ │ │ │ +380 } │ │ │ │ │ +381 } │ │ │ │ │ +390 template │ │ │ │ │ +391 void fillInterior (unsigned int startRow, │ │ │ │ │ +392 const MVal &mVal, │ │ │ │ │ +393 const RTVal &rtVal, │ │ │ │ │ +394 _F_i_e_l_d weight, │ │ │ │ │ +395 Matrix &matrix) const │ │ │ │ │ +396 { │ │ │ │ │ +397 const unsigned int endRow = startRow+mVal.size()*dimension; │ │ │ │ │ +398 typename RTVal::const_iterator rtiter = rtVal.begin(); │ │ │ │ │ +399 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col) │ │ │ │ │ +400 { │ │ │ │ │ +401 typename MVal::const_iterator miter = mVal.begin(); │ │ │ │ │ +402 for (unsigned int row = startRow; │ │ │ │ │ +403 row!=endRow; ++miter,row+=dimension ) │ │ │ │ │ +404 { │ │ │ │ │ +405 for (unsigned int i=0; i │ │ │ │ │ +_4_2_0 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +421 { │ │ │ │ │ +_4_2_2 typedef _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ +_4_2_3 typedef const _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_F_i_e_l_d_> _O_b_j_e_c_t; │ │ │ │ │ +_4_2_4 typedef std::size_t _K_e_y; │ │ │ │ │ +_4_2_5 typedef typename std::remove_const::type _N_o_n_C_o_n_s_t_O_b_j_e_c_t; │ │ │ │ │ +426 │ │ │ │ │ +427 template │ │ │ │ │ +_4_2_8 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ +429 { │ │ │ │ │ +430 if ( !supports(key) ) │ │ │ │ │ +431 return 0; │ │ │ │ │ +432 _N_o_n_C_o_n_s_t_O_b_j_e_c_t *interpol = new _N_o_n_C_o_n_s_t_O_b_j_e_c_t(); │ │ │ │ │ +433 interpol->template build(key); │ │ │ │ │ +434 return interpol; │ │ │ │ │ +435 } │ │ │ │ │ +436 template< GeometryType::Id geometryId > │ │ │ │ │ +_4_3_7 static bool _s_u_p_p_o_r_t_s ( const _K_e_y &key ) │ │ │ │ │ +438 { │ │ │ │ │ +439 return GeometryType(geometryId).isSimplex(); │ │ │ │ │ +440 } │ │ │ │ │ +_4_4_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +442 }; │ │ │ │ │ +443 │ │ │ │ │ +444} // namespace Dune │ │ │ │ │ +445 │ │ │ │ │ +446#endif // #ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ +_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ -Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t_N_S_:_:_D_e_r_i_v_a_t_i_v_e_L_a_y_o_u_t │ │ │ │ │ -DerivativeLayout │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:168 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const int dimRange │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_i_s │ │ │ │ │ -B Basis │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_o_r_d_e_r__ │ │ │ │ │ -unsigned int order_ │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_b_a_s_i_s__ │ │ │ │ │ -const Basis & basis_ │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ -MonomialEvaluator(const Basis &basis, unsigned int order, unsigned int size) │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ -Basis::Field Field │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_s_i_z_e__ │ │ │ │ │ -unsigned int size_ │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Basis::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_r_e_s_i_z_e │ │ │ │ │ -void resize() │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_c_o_n_t_a_i_n_e_r__ │ │ │ │ │ -Container container_ │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ +DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ +LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ +DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn orthonormalbasis.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn orthonormalbasis.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_N_o_n_C_o_n_s_t_O_b_j_e_c_t │ │ │ │ │ +std::remove_const< Object >::type NonConstObject │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:425 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:441 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:437 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:428 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_B_u_i_l_d_e_r │ │ │ │ │ +RTL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:422 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const RaviartThomasL2Interpolation< dim, Field > Object │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:423 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +std::size_t Key │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:424 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +std::size_t Key │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +static void release(Object *object) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:91 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ +static bool supports(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ +const LocalCoefficientsContainer Object │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &key) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:75 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_B_a_s_i_s │ │ │ │ │ +TestBasis * testBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_o_r_m_a_l │ │ │ │ │ +FieldVector< Field, dimension > Normal │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:119 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s │ │ │ │ │ +TestBasisFactory::Object TestBasis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:112 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ +TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:116 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_f_a_c_e_S_i_z_e │ │ │ │ │ +unsigned int faceSize() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_b_u_i_l_d │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:150 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ +RTL2InterpolationBuilder()=default │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ +TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:144 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_y_p_e │ │ │ │ │ +GeometryType type() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_n_o_r_m_a_l │ │ │ │ │ +const Normal & normal(unsigned int f) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:147 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ +RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ +RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:111 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_o_r_d_e_r │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ +static const unsigned int dimension │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:108 │ │ │ │ │ +_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_~_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ +~RTL2InterpolationBuilder() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +An L2-based interpolation for Raviart Thomas. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:213 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_o_r_d_e_r │ │ │ │ │ +std::size_t order() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:244 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RaviartThomasL2Interpolation() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:220 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ +const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:283 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< │ │ │ │ │ +std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix:: │ │ │ │ │ +Field * >::value, void > │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:235 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_B_u_i_l_d_e_r │ │ │ │ │ +RTL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:219 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_F_i_e_l_d │ │ │ │ │ +F Field │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_b_u_i_l_d │ │ │ │ │ +void build(std::size_t order) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:253 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +auto interpolate(const Function &function, Vector &coefficients) const -> std:: │ │ │ │ │ +enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void │ │ │ │ │ +>::value, void > │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:226 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:248 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_e_t_L_o_c_a_l_K_e_y_s │ │ │ │ │ +void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:265 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r │ │ │ │ │ +DDeeffiinniittiioonn interpolationhelper.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r │ │ │ │ │ -MonomialEvaluator(const MonomialEvaluator &) │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r │ │ │ │ │ -BaseIterator(Container &container) │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ -const Deriv & operator*() const │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_B_l_o_c_k │ │ │ │ │ -Dune::FieldVector< Field, blockSize > Block │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:82 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_d_o_n_e │ │ │ │ │ -bool done() const │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_C_I_t_e_r │ │ │ │ │ -Container::iterator CIter │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:88 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_o_p_e_r_a_t_o_r_-_> │ │ │ │ │ -const Deriv * operator->() const │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:101 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -Deriv Derivatives │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e_I_t_e_r_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ -Deriv::Field Field │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r_:_:_I_n_t_e_g_r_a_t_e │ │ │ │ │ -BaseIterator< Derivatives< Field, dimension, 1, 0, DerivativeLayoutNS::value > │ │ │ │ │ -> Integrate │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r_:_:_A_l_l │ │ │ │ │ -BaseIterator< Derivatives< Field, dimension, dimRange, deriv, │ │ │ │ │ -DerivativeLayoutNS::derivative > > All │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_F_i_e_l_d │ │ │ │ │ -Basis::Field Field │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_D_o_m_a_i_n_V_e_c_t_o_r │ │ │ │ │ -Basis::DomainVector DomainVector │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -Iterator< deriv >::All evaluate(const DVector &x) │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:148 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_B_a_s_e │ │ │ │ │ -MonomialEvaluator< B > Base │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -StandardEvaluator(const Basis &basis) │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_d_i_m_R_a_n_g_e │ │ │ │ │ -static const int dimRange │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:137 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_C_o_n_t_a_i_n_e_r │ │ │ │ │ -std::vector< Field > Container │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_i_n_t_e_g_r_a_t_e │ │ │ │ │ -Iterator< 0 >::Integrate integrate() │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:154 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_B_a_s_i_s │ │ │ │ │ -B Basis │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -StandardEvaluator(const Basis &basis, unsigned int size) │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:162 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:136 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_:_:_I_t_e_r_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:142 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_s │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:172 │ │ │ │ │ +DDeeffiinniittiioonn polynomialbasis.hh:113 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: defaultbasisfactory.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,37 +65,38 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
defaultbasisfactory.hh File Reference
│ │ │ │ +
raviartthomassimplexprebasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/basismatrix.hh>
│ │ │ │ +#include <utility>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::Identity
struct  Dune::RTPreBasisFactory< dim, Field >
 
struct  Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >
struct  Dune::RTPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF >
 
struct  Dune::DefaultBasisFactory< PreBFactory, InterpolFactory, dim, dimR, SF, CF, PreBasisKeyExtractor >::EvaluationBasisFactory< dd, FF >
struct  Dune::RTVecMatrix< geometryId, Field >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,28 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -defaultbasisfactory.hh File Reference │ │ │ │ │ +raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_m_a_t_r_i_x_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_I_d_e_n_t_i_t_y │ │ │ │ │ +struct   _D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_<_ _P_r_e_B_F_a_c_t_o_r_y_,_ _I_n_t_e_r_p_o_l_F_a_c_t_o_r_y_,_ _d_i_m_,_ _d_i_m_R_, │ │ │ │ │ - _S_F_,_ _C_F_,_ _P_r_e_B_a_s_i_s_K_e_y_E_x_t_r_a_c_t_o_r_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F │ │ │ │ │ + _> │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_<_ _P_r_e_B_F_a_c_t_o_r_y_,_ _I_n_t_e_r_p_o_l_F_a_c_t_o_r_y_,_ _d_i_m_,_ _d_i_m_R_, │ │ │ │ │ - _S_F_,_ _C_F_,_ _P_r_e_B_a_s_i_s_K_e_y_E_x_t_r_a_c_t_o_r_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F_ _> │ │ │ │ │ +struct   _D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_i_e_l_d_ _> │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00194_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: defaultbasisfactory.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplexprebasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,151 +70,283 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
defaultbasisfactory.hh
│ │ │ │ +
raviartthomassimplexprebasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ -
6#define DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │
7
│ │ │ │
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ +
9#include <utility>
│ │ │ │
10
│ │ │ │ - │ │ │ │ +
11#include <dune/geometry/type.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
│ │ │ │ -
15 struct Identity
│ │ │ │ -
16 {
│ │ │ │ -
17 template <class T>
│ │ │ │ -
│ │ │ │ -
18 static T apply( const T &t )
│ │ │ │ -
19 {
│ │ │ │ -
20 return t;
│ │ │ │ -
21 }
│ │ │ │ -
│ │ │ │ -
22 };
│ │ │ │ -
│ │ │ │ -
23 /************************************************
│ │ │ │ -
24 * Class for providing a factory for basis
│ │ │ │ -
25 * functions over the set of reference elements.
│ │ │ │ -
26 * Is based on the TopologyFactory but additionally
│ │ │ │ -
27 * provides rebindes of the field type.
│ │ │ │ -
28 * The user provides factories for the pre basis and the
│ │ │ │ -
29 * interpolations. The default construction process of
│ │ │ │ -
30 * the basis is performed in this class.
│ │ │ │ -
31 ************************************************/
│ │ │ │ -
32 template< class PreBFactory,
│ │ │ │ -
33 class InterpolFactory,
│ │ │ │ -
34 unsigned int dim, unsigned int dimR,
│ │ │ │ -
35 class SF, class CF,
│ │ │ │ -
36 class PreBasisKeyExtractor = Identity >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 {
│ │ │ │ -
39 static const unsigned int dimension = dim;
│ │ │ │ -
40 static const unsigned int dimRange = dimR;
│ │ │ │ -
41 typedef SF StorageField;
│ │ │ │ -
42 typedef CF ComputeField;
│ │ │ │ -
43 typedef PreBFactory PreBasisFactory;
│ │ │ │ -
44 typedef typename PreBasisFactory::Object PreBasis;
│ │ │ │ -
45 typedef InterpolFactory InterpolationFactory;
│ │ │ │ -
46 typedef typename InterpolationFactory::Object Interpolation;
│ │ │ │ -
47 typedef typename PreBasisFactory::template EvaluationBasisFactory<dim,SF>::Type MonomialBasisFactory;
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
51
│ │ │ │ -
52 typedef const Basis Object;
│ │ │ │ -
53 typedef typename InterpolationFactory::Key Key;
│ │ │ │ -
54 template <unsigned int dd, class FF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17 template < GeometryType::Id geometryId, class Field >
│ │ │ │ +
18 struct RTVecMatrix;
│ │ │ │ +
19
│ │ │ │ +
20 template <unsigned int dim, class Field>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
22 {
│ │ │ │ + │ │ │ │ +
24 typedef typename MBasisFactory::Object MBasis;
│ │ │ │ + │ │ │ │ + │ │ │ │ +
27
│ │ │ │ +
28 typedef const Basis Object;
│ │ │ │ +
29 typedef std::size_t Key;
│ │ │ │ +
30
│ │ │ │ +
31 template <unsigned int dd, class FF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {
│ │ │ │ + │ │ │ │ +
35 };
│ │ │ │ +
│ │ │ │ +
36 template< GeometryType::Id geometryId >
│ │ │ │ +
│ │ │ │ +
37 static Object *create ( const Key &order )
│ │ │ │ +
38 {
│ │ │ │ +
39 RTVecMatrix<geometryId,Field> vecMatrix(order);
│ │ │ │ +
40 MBasis *mbasis = MBasisFactory::template create<geometryId>(order+1);
│ │ │ │ +
41 typename std::remove_const<Object>::type *tmBasis = new typename std::remove_const<Object>::type(*mbasis);
│ │ │ │ +
42 tmBasis->fill(vecMatrix);
│ │ │ │ +
43 return tmBasis;
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45 static void release( Object *object ) { delete object; }
│ │ │ │ +
46 };
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
48 template <GeometryType::Id geometryId, class Field>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
50 {
│ │ │ │ +
51 static constexpr GeometryType geometry = geometryId;
│ │ │ │ +
52 static const unsigned int dim = geometry.dim();
│ │ │ │ + │ │ │ │ + │ │ │ │ +
│ │ │ │ +
55 RTVecMatrix(std::size_t order)
│ │ │ │
56 {
│ │ │ │ -
57 typedef typename PreBasisFactory::template EvaluationBasisFactory<dd,FF>::Type
│ │ │ │ - │ │ │ │ -
59 };
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
61 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
62 static Object *create ( const Key &key )
│ │ │ │ -
63 {
│ │ │ │ -
64 const typename PreBasisFactory::Key preBasisKey = PreBasisKeyExtractor::apply(key);
│ │ │ │ -
65 const PreBasis *preBasis = PreBasisFactory::template create<geometryId>( preBasisKey );
│ │ │ │ -
66 const Interpolation *interpol = InterpolationFactory::template create<geometryId>( key );
│ │ │ │ -
67 BasisMatrix< PreBasis, Interpolation, ComputeField > matrix( *preBasis, *interpol );
│ │ │ │ -
68
│ │ │ │ -
69 const MonomialBasis *monomialBasis = MonomialBasisFactory::template create< geometryId >( preBasis->order() );
│ │ │ │ -
70
│ │ │ │ -
71 Basis *basis = new Basis( *monomialBasis );
│ │ │ │ -
72
│ │ │ │ -
73 basis->fill( matrix );
│ │ │ │ -
74
│ │ │ │ -
75 InterpolationFactory::release(interpol);
│ │ │ │ -
76 PreBasisFactory::release(preBasis);
│ │ │ │ -
77
│ │ │ │ -
78 return basis;
│ │ │ │ -
79 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
81 static void release( Object *object)
│ │ │ │ -
82 {
│ │ │ │ -
83 const MonomialBasis *monomialBasis = &(object->basis());
│ │ │ │ -
84 delete object;
│ │ │ │ -
85 MonomialBasisFactory::release( monomialBasis );
│ │ │ │ -
86 }
│ │ │ │ -
│ │ │ │ -
87 };
│ │ │ │ -
│ │ │ │ -
88}
│ │ │ │ -
89
│ │ │ │ -
90#endif // #ifndef DUNE_DEFAULTBASISFACTORY_HH
│ │ │ │ - │ │ │ │ +
57 /*
│ │ │ │ +
58 * Construction of Raviart-Thomas elements in high dimensions see "Mixed Finite Elements in \R^3" by Nedelec, 1980.
│ │ │ │ +
59 *
│ │ │ │ +
60 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree $\leq k$.
│ │ │ │ +
61 * The space of Raviart-Thomas functions in $n$ dimensions with index $k$ is defined as
│ │ │ │ +
62 *
│ │ │ │ +
63 * \begin{equation*}
│ │ │ │ +
64 * RT_k := (\P_{k-1})^n \oplus \widetilde \P_k x
│ │ │ │ +
65 * \end{equation*}
│ │ │ │ +
66 * with $x=(x_1,x_2,\dots, x_n)$ in $n$ dimensions and $\widetilde \P_k$ the homogeneous polynomials of degree $k$.
│ │ │ │ +
67 *
│ │ │ │ +
68 * For $RT_k$ holds
│ │ │ │ +
69 * \begin{equation*}
│ │ │ │ +
70 * (\P_{k-1})^n \subset RT_k \subset (\P_k)^n.
│ │ │ │ +
71 * \end{equation*}
│ │ │ │ +
72 *
│ │ │ │ +
73 * We construct $(\P_k)^n$ and and only use the monomials contained in $RT_k$.
│ │ │ │ +
74 *
│ │ │ │ +
75 */
│ │ │ │ +
76
│ │ │ │ +
77 MIBasis basis(order+1);
│ │ │ │ +
78 FieldVector< MI, dim > x;
│ │ │ │ +
79 /*
│ │ │ │ +
80 * Init MultiIndices
│ │ │ │ +
81 * x[0]=(1,0,0) x
│ │ │ │ +
82 * x[1]=(0,1,0) y
│ │ │ │ +
83 * x[2]=(0,0,1) z
│ │ │ │ +
84 */
│ │ │ │ +
85 for( unsigned int i = 0; i < dim; ++i )
│ │ │ │ +
86 x[ i ].set( i, 1 );
│ │ │ │ +
87 std::vector< MI > val( basis.size() );
│ │ │ │ +
88
│ │ │ │ +
89 // val now contains all monomials in $n$ dimensions with degree $\leq order+1$
│ │ │ │ +
90 basis.evaluate( x, val );
│ │ │ │ +
91
│ │ │ │ +
92 col_ = basis.size();
│ │ │ │ +
93
│ │ │ │ +
94 // get $\dim (\P_{order-1})$
│ │ │ │ +
95 unsigned int notHomogen = 0;
│ │ │ │ +
96 if (order>0)
│ │ │ │ +
97 notHomogen = basis.sizes()[order-1];
│ │ │ │ +
98
│ │ │ │ +
99 // get $\dim \widetilde (\P_order)$
│ │ │ │ +
100 unsigned int homogen = basis.sizes()[order]-notHomogen;
│ │ │ │ +
101
│ │ │ │ +
102 /*
│ │ │ │ +
103 *
│ │ │ │ +
104 * The set $RT_k$ is defined as
│ │ │ │ +
105 *
│ │ │ │ +
106 * \begin{equation}
│ │ │ │ +
107 * RT_k := (\P_k)^dim + \widetilde \P_k x with x\in \R^n.
│ │ │ │ +
108 * \end{equation}
│ │ │ │ +
109 *
│ │ │ │ +
110 * The space $\P_k$ is split in $\P_k = \P_{k-1} + \widetilde \P_k$.
│ │ │ │ +
111 *
│ │ │ │ +
112 * \begin{align}
│ │ │ │ +
113 * RT_k &= (\P_{k-1} + \widetilde \P_k)^dim + \widetilde \P_k x with x\in \R^n
│ │ │ │ +
114 * &= (\P_{k-1})^n + (\widetilde \P_k)^n + \widetilde \P_k x with x\in \R^n
│ │ │ │ +
115 * \end{align}
│ │ │ │ +
116 *
│ │ │ │ +
117 * Thus $\dim RT_k = n * \dim \P_{k-1} + (n+1)*\dim (\widetilde \P_k)$
│ │ │ │ +
118 */
│ │ │ │ +
119
│ │ │ │ +
120 // row_ = \dim RT_k *dim
│ │ │ │ +
121 row_ = (notHomogen*dim+homogen*(dim+1))*dim;
│ │ │ │ +
122 mat_ = new Field*[row_];
│ │ │ │ +
123 int row = 0;
│ │ │ │ +
124
│ │ │ │ +
125 /* Assign the correct values for the nonhomogeneous polymonials $p\in (\P_{oder-1})^dim$
│ │ │ │ +
126 * A basis function is represented by $dim$ rows.
│ │ │ │ +
127 */
│ │ │ │ +
128 for (unsigned int i=0; i<notHomogen+homogen; ++i)
│ │ │ │ +
129 {
│ │ │ │ +
130 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ +
131 {
│ │ │ │ +
132 for (unsigned int rr=0; rr<dim; ++rr)
│ │ │ │ +
133 {
│ │ │ │ +
134 // init row to zero
│ │ │ │ +
135 mat_[row] = new Field[col_];
│ │ │ │ +
136 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ +
137 {
│ │ │ │ +
138 mat_[row][j] = 0.;
│ │ │ │ +
139 }
│ │ │ │ +
140 if (r==rr)
│ │ │ │ +
141 mat_[row][i] = 1.;
│ │ │ │ +
142 ++row;
│ │ │ │ +
143 }
│ │ │ │ +
144 }
│ │ │ │ +
145 }
│ │ │ │ +
146
│ │ │ │ +
147 /* Assign the correct values for the homogeneous polymonials $p\in RT_k \backslash (\P_{oder-1})^dim$
│ │ │ │ +
148 * A basis function is represented by $dim$ rows.
│ │ │ │ +
149 */
│ │ │ │ +
150 for (unsigned int i=0; i<homogen; ++i)
│ │ │ │ +
151 {
│ │ │ │ +
152 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ +
153 {
│ │ │ │ +
154 // init rows to zero
│ │ │ │ +
155 mat_[row] = new Field[col_];
│ │ │ │ +
156 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ +
157 {
│ │ │ │ +
158 mat_[row][j] = 0.;
│ │ │ │ +
159 }
│ │ │ │ +
160
│ │ │ │ +
161 unsigned int w;
│ │ │ │ +
162 // get a monomial $ p \in \widetilde \P_{order}$
│ │ │ │ +
163 MI xval = val[notHomogen+i];
│ │ │ │ +
164 xval *= x[r];
│ │ │ │ +
165 for (w=homogen+notHomogen; w<val.size(); ++w)
│ │ │ │ +
166 {
│ │ │ │ +
167 if (val[w] == xval)
│ │ │ │ +
168 {
│ │ │ │ +
169 mat_[row][w] = 1.;
│ │ │ │ +
170 break;
│ │ │ │ +
171 }
│ │ │ │ +
172 }
│ │ │ │ +
173 assert(w<val.size());
│ │ │ │ +
174 ++row;
│ │ │ │ +
175 }
│ │ │ │ +
176 }
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
180 {
│ │ │ │ +
181 for (unsigned int i=0; i<rows(); ++i) {
│ │ │ │ +
182 delete [] mat_[i];
│ │ │ │ +
183 }
│ │ │ │ +
184 delete [] mat_;
│ │ │ │ +
185 }
│ │ │ │ +
│ │ │ │ +
186
│ │ │ │ +
│ │ │ │ +
187 unsigned int cols() const {
│ │ │ │ +
188 return col_;
│ │ │ │ +
189 }
│ │ │ │ +
│ │ │ │ +
190
│ │ │ │ +
│ │ │ │ +
191 unsigned int rows() const {
│ │ │ │ +
192 return row_;
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
195 template <class Vector>
│ │ │ │ +
│ │ │ │ +
196 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ +
197 {
│ │ │ │ +
198 const unsigned int N = cols();
│ │ │ │ +
199 assert( vec.size() == N );
│ │ │ │ +
200 for (unsigned int i=0; i<N; ++i)
│ │ │ │ +
201 field_cast(mat_[row][i],vec[i]);
│ │ │ │ +
202 }
│ │ │ │ +
│ │ │ │ +
203 unsigned int row_,col_;
│ │ │ │ +
204 Field **mat_;
│ │ │ │ +
205 };
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207
│ │ │ │ +
208}
│ │ │ │ +
209#endif // DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ +
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ +
Definition raviartthomassimplexprebasis.hh:50
│ │ │ │ +
static const unsigned int dim
Definition raviartthomassimplexprebasis.hh:52
│ │ │ │ +
~RTVecMatrix()
Definition raviartthomassimplexprebasis.hh:179
│ │ │ │ +
Field ** mat_
Definition raviartthomassimplexprebasis.hh:204
│ │ │ │ +
RTVecMatrix(std::size_t order)
Definition raviartthomassimplexprebasis.hh:55
│ │ │ │ +
unsigned int cols() const
Definition raviartthomassimplexprebasis.hh:187
│ │ │ │ +
unsigned int row_
Definition raviartthomassimplexprebasis.hh:203
│ │ │ │ +
MultiIndex< dim, Field > MI
Definition raviartthomassimplexprebasis.hh:53
│ │ │ │ +
void row(const unsigned int row, Vector &vec) const
Definition raviartthomassimplexprebasis.hh:196
│ │ │ │ +
MonomialBasis< geometryId, MI > MIBasis
Definition raviartthomassimplexprebasis.hh:54
│ │ │ │ +
static constexpr GeometryType geometry
Definition raviartthomassimplexprebasis.hh:51
│ │ │ │ +
unsigned int rows() const
Definition raviartthomassimplexprebasis.hh:191
│ │ │ │ +
unsigned int col_
Definition raviartthomassimplexprebasis.hh:203
│ │ │ │ +
Definition raviartthomassimplexprebasis.hh:22
│ │ │ │ +
const Basis Object
Definition raviartthomassimplexprebasis.hh:28
│ │ │ │ +
MonomialBasisProvider< dim, Field > MBasisFactory
Definition raviartthomassimplexprebasis.hh:23
│ │ │ │ +
PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis
Definition raviartthomassimplexprebasis.hh:26
│ │ │ │ +
MBasisFactory::Object MBasis
Definition raviartthomassimplexprebasis.hh:24
│ │ │ │ +
std::size_t Key
Definition raviartthomassimplexprebasis.hh:29
│ │ │ │ +
static void release(Object *object)
Definition raviartthomassimplexprebasis.hh:45
│ │ │ │ +
StandardEvaluator< MBasis > EvalMBasis
Definition raviartthomassimplexprebasis.hh:25
│ │ │ │ +
static Object * create(const Key &order)
Definition raviartthomassimplexprebasis.hh:37
│ │ │ │ +
Definition raviartthomassimplexprebasis.hh:33
│ │ │ │ +
MonomialBasisProvider< dd, FF > Type
Definition raviartthomassimplexprebasis.hh:34
│ │ │ │
Definition basisevaluator.hh:131
│ │ │ │ -
Definition basismatrix.hh:27
│ │ │ │ -
Definition defaultbasisfactory.hh:16
│ │ │ │ -
static T apply(const T &t)
Definition defaultbasisfactory.hh:18
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ -
InterpolationFactory::Object Interpolation
Definition defaultbasisfactory.hh:46
│ │ │ │ -
static const unsigned int dimRange
Definition defaultbasisfactory.hh:40
│ │ │ │ -
static void release(Object *object)
release the object returned by the create methods
Definition defaultbasisfactory.hh:81
│ │ │ │ -
CF ComputeField
Definition defaultbasisfactory.hh:42
│ │ │ │ -
PreBFactory PreBasisFactory
Definition defaultbasisfactory.hh:43
│ │ │ │ -
InterpolationFactory::Key Key
Definition defaultbasisfactory.hh:53
│ │ │ │ -
static const unsigned int dimension
Definition defaultbasisfactory.hh:39
│ │ │ │ -
static Object * create(const Key &key)
Definition defaultbasisfactory.hh:62
│ │ │ │ -
SF StorageField
Definition defaultbasisfactory.hh:41
│ │ │ │ -
MonomialBasisFactory::Object MonomialBasis
Definition defaultbasisfactory.hh:48
│ │ │ │ -
PreBasisFactory::Object PreBasis
Definition defaultbasisfactory.hh:44
│ │ │ │ -
const Basis Object
Definition defaultbasisfactory.hh:52
│ │ │ │ -
StandardEvaluator< MonomialBasis > Evaluator
Definition defaultbasisfactory.hh:49
│ │ │ │ -
InterpolFactory InterpolationFactory
Definition defaultbasisfactory.hh:45
│ │ │ │ -
PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type MonomialBasisFactory
Definition defaultbasisfactory.hh:47
│ │ │ │ -
PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis
Definition defaultbasisfactory.hh:50
│ │ │ │ -
Definition defaultbasisfactory.hh:56
│ │ │ │ -
PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type
Definition defaultbasisfactory.hh:58
│ │ │ │ -
Definition monomialbasis.hh:612
│ │ │ │ -
static void release(Object *object)
Definition monomialbasis.hh:769
│ │ │ │ +
Definition monomialbasis.hh:440
│ │ │ │ +
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ +
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ +
const unsigned int * sizes(unsigned int order) const
Definition monomialbasis.hh:465
│ │ │ │ +
Definition monomialbasis.hh:780
│ │ │ │ +
Definition multiindex.hh:37
│ │ │ │
Definition polynomialbasis.hh:348
│ │ │ │ -
void fill(const Matrix &matrix)
Definition polynomialbasis.hh:366
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,188 +1,329 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -defaultbasisfactory.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ +raviartthomassimplexprebasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ -6#define DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ +5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ +6#define DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_b_a_s_i_s_m_a_t_r_i_x_._h_h> │ │ │ │ │ +11#include │ │ │ │ │ 12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -_1_5 struct _I_d_e_n_t_i_t_y │ │ │ │ │ -16 { │ │ │ │ │ -17 template │ │ │ │ │ -_1_8 static T _a_p_p_l_y( const T &t ) │ │ │ │ │ -19 { │ │ │ │ │ -20 return t; │ │ │ │ │ -21 } │ │ │ │ │ -22 }; │ │ │ │ │ -23 /************************************************ │ │ │ │ │ -24 * Class for providing a factory for basis │ │ │ │ │ -25 * functions over the set of reference elements. │ │ │ │ │ -26 * Is based on the TopologyFactory but additionally │ │ │ │ │ -27 * provides rebindes of the field type. │ │ │ │ │ -28 * The user provides factories for the pre basis and the │ │ │ │ │ -29 * interpolations. The default construction process of │ │ │ │ │ -30 * the basis is performed in this class. │ │ │ │ │ -31 ************************************************/ │ │ │ │ │ -32 template< class PreBFactory, │ │ │ │ │ -33 class InterpolFactory, │ │ │ │ │ -34 unsigned int dim, unsigned int dimR, │ │ │ │ │ -35 class SF, class CF, │ │ │ │ │ -36 class PreBasisKeyExtractor = Identity > │ │ │ │ │ -_3_7 struct _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ +18 struct RTVecMatrix; │ │ │ │ │ +19 │ │ │ │ │ +20 template │ │ │ │ │ +_2_1 struct _R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +22 { │ │ │ │ │ +_2_3 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_i_m_,_F_i_e_l_d_> _M_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ +_2_4 typedef typename MBasisFactory::Object _M_B_a_s_i_s; │ │ │ │ │ +_2_5 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_M_B_a_s_i_s_> _E_v_a_l_M_B_a_s_i_s; │ │ │ │ │ +_2_6 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_E_v_a_l_M_B_a_s_i_s_,_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_F_i_e_l_d_,_d_i_m_> > │ │ │ │ │ +_B_a_s_i_s; │ │ │ │ │ +27 │ │ │ │ │ +_2_8 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ +_2_9 typedef std::size_t _K_e_y; │ │ │ │ │ +30 │ │ │ │ │ +31 template │ │ │ │ │ +_3_2 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +33 { │ │ │ │ │ +_3_4 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ +35 }; │ │ │ │ │ +36 template< GeometryType::Id geometryId > │ │ │ │ │ +_3_7 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ 38 { │ │ │ │ │ -_3_9 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_4_0 static const unsigned int _d_i_m_R_a_n_g_e = dimR; │ │ │ │ │ -_4_1 typedef SF _S_t_o_r_a_g_e_F_i_e_l_d; │ │ │ │ │ -_4_2 typedef CF _C_o_m_p_u_t_e_F_i_e_l_d; │ │ │ │ │ -_4_3 typedef PreBFactory _P_r_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_4_4 typedef typename PreBasisFactory::Object _P_r_e_B_a_s_i_s; │ │ │ │ │ -_4_5 typedef InterpolFactory _I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y; │ │ │ │ │ -_4_6 typedef typename InterpolationFactory::Object _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -_4_7 typedef typename PreBasisFactory::template _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_d_i_m_,_S_F_>_:_: │ │ │ │ │ -_T_y_p_e _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_4_8 typedef typename _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _M_o_n_o_m_i_a_l_B_a_s_i_s; │ │ │ │ │ -_4_9 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_ _M_o_n_o_m_i_a_l_B_a_s_i_s_ _> _E_v_a_l_u_a_t_o_r; │ │ │ │ │ -_5_0 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_ _E_v_a_l_u_a_t_o_r_,_ _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_ _S_F_, │ │ │ │ │ -_d_i_m_R_a_n_g_e_ _> > _B_a_s_i_s; │ │ │ │ │ -51 │ │ │ │ │ -_5_2 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ -_5_3 typedef typename InterpolationFactory::Key _K_e_y; │ │ │ │ │ -54 template │ │ │ │ │ -_5_5 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +39 _R_T_V_e_c_M_a_t_r_i_x_<_g_e_o_m_e_t_r_y_I_d_,_F_i_e_l_d_> vecMatrix(order); │ │ │ │ │ +40 _M_B_a_s_i_s *mbasis = MBasisFactory::template create(order+1); │ │ │ │ │ +41 typename std::remove_const::type *tmBasis = new typename std:: │ │ │ │ │ +remove_const::type(*mbasis); │ │ │ │ │ +42 tmBasis->fill(vecMatrix); │ │ │ │ │ +43 return tmBasis; │ │ │ │ │ +44 } │ │ │ │ │ +_4_5 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ +46 }; │ │ │ │ │ +47 │ │ │ │ │ +48 template │ │ │ │ │ +_4_9 struct _R_T_V_e_c_M_a_t_r_i_x │ │ │ │ │ +50 { │ │ │ │ │ +_5_1 static constexpr GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ +_5_2 static const unsigned int _d_i_m = _g_e_o_m_e_t_r_y._d_i_m(); │ │ │ │ │ +_5_3 typedef _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _M_I; │ │ │ │ │ +_5_4 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_<_g_e_o_m_e_t_r_y_I_d_,_M_I_> _M_I_B_a_s_i_s; │ │ │ │ │ +_5_5 _R_T_V_e_c_M_a_t_r_i_x(std::size_t order) │ │ │ │ │ 56 { │ │ │ │ │ -57 typedef typename PreBasisFactory::template _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_d_d_,_F_F_>_:_: │ │ │ │ │ -_T_y_p_e │ │ │ │ │ -_5_8 _T_y_p_e; │ │ │ │ │ -59 }; │ │ │ │ │ -60 │ │ │ │ │ -61 template< GeometryType::Id geometryId > │ │ │ │ │ -_6_2 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &key ) │ │ │ │ │ -63 { │ │ │ │ │ -64 const typename PreBasisFactory::Key preBasisKey = PreBasisKeyExtractor:: │ │ │ │ │ -apply(key); │ │ │ │ │ -65 const _P_r_e_B_a_s_i_s *preBasis = PreBasisFactory::template create │ │ │ │ │ -( preBasisKey ); │ │ │ │ │ -66 const _I_n_t_e_r_p_o_l_a_t_i_o_n *interpol = InterpolationFactory::template │ │ │ │ │ -create( key ); │ │ │ │ │ -67 _B_a_s_i_s_M_a_t_r_i_x_<_ _P_r_e_B_a_s_i_s_,_ _I_n_t_e_r_p_o_l_a_t_i_o_n_,_ _C_o_m_p_u_t_e_F_i_e_l_d_ _> matrix( *preBasis, │ │ │ │ │ -*interpol ); │ │ │ │ │ -68 │ │ │ │ │ -69 const _M_o_n_o_m_i_a_l_B_a_s_i_s *monomialBasis = MonomialBasisFactory::template create< │ │ │ │ │ -geometryId >( preBasis->order() ); │ │ │ │ │ -70 │ │ │ │ │ -71 _B_a_s_i_s *basis = new _B_a_s_i_s( *monomialBasis ); │ │ │ │ │ -72 │ │ │ │ │ -73 basis->_f_i_l_l( matrix ); │ │ │ │ │ -74 │ │ │ │ │ -75 InterpolationFactory::release(interpol); │ │ │ │ │ -76 PreBasisFactory::release(preBasis); │ │ │ │ │ -77 │ │ │ │ │ -78 return basis; │ │ │ │ │ -79 } │ │ │ │ │ -_8_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object) │ │ │ │ │ -82 { │ │ │ │ │ -83 const _M_o_n_o_m_i_a_l_B_a_s_i_s *monomialBasis = &(object->basis()); │ │ │ │ │ -84 delete object; │ │ │ │ │ -85 _M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( monomialBasis ); │ │ │ │ │ -86 } │ │ │ │ │ -87 }; │ │ │ │ │ -88} │ │ │ │ │ -89 │ │ │ │ │ -90#endif // #ifndef DUNE_DEFAULTBASISFACTORY_HH │ │ │ │ │ -_b_a_s_i_s_m_a_t_r_i_x_._h_h │ │ │ │ │ +57 /* │ │ │ │ │ +58 * Construction of Raviart-Thomas elements in high dimensions see "Mixed │ │ │ │ │ +Finite Elements in \R^3" by Nedelec, 1980. │ │ │ │ │ +59 * │ │ │ │ │ +60 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree │ │ │ │ │ +$\leq k$. │ │ │ │ │ +61 * The space of Raviart-Thomas functions in $n$ dimensions with index $k$ is │ │ │ │ │ +defined as │ │ │ │ │ +62 * │ │ │ │ │ +63 * \begin{equation*} │ │ │ │ │ +64 * RT_k := (\P_{k-1})^n \oplus \widetilde \P_k x │ │ │ │ │ +65 * \end{equation*} │ │ │ │ │ +66 * with $x=(x_1,x_2,\dots, x_n)$ in $n$ dimensions and $\widetilde \P_k$ the │ │ │ │ │ +homogeneous polynomials of degree $k$. │ │ │ │ │ +67 * │ │ │ │ │ +68 * For $RT_k$ holds │ │ │ │ │ +69 * \begin{equation*} │ │ │ │ │ +70 * (\P_{k-1})^n \subset RT_k \subset (\P_k)^n. │ │ │ │ │ +71 * \end{equation*} │ │ │ │ │ +72 * │ │ │ │ │ +73 * We construct $(\P_k)^n$ and and only use the monomials contained in │ │ │ │ │ +$RT_k$. │ │ │ │ │ +74 * │ │ │ │ │ +75 */ │ │ │ │ │ +76 │ │ │ │ │ +77 _M_I_B_a_s_i_s basis(order+1); │ │ │ │ │ +78 FieldVector< MI, dim > x; │ │ │ │ │ +79 /* │ │ │ │ │ +80 * Init MultiIndices │ │ │ │ │ +81 * x[0]=(1,0,0) x │ │ │ │ │ +82 * x[1]=(0,1,0) y │ │ │ │ │ +83 * x[2]=(0,0,1) z │ │ │ │ │ +84 */ │ │ │ │ │ +85 for( unsigned int i = 0; i < _d_i_m; ++i ) │ │ │ │ │ +86 x[ i ].set( i, 1 ); │ │ │ │ │ +87 std::vector< MI > val( basis._s_i_z_e() ); │ │ │ │ │ +88 │ │ │ │ │ +89 // val now contains all monomials in $n$ dimensions with degree $\leq │ │ │ │ │ +order+1$ │ │ │ │ │ +90 basis._e_v_a_l_u_a_t_e( x, val ); │ │ │ │ │ +91 │ │ │ │ │ +92 _c_o_l__ = basis._s_i_z_e(); │ │ │ │ │ +93 │ │ │ │ │ +94 // get $\dim (\P_{order-1})$ │ │ │ │ │ +95 unsigned int notHomogen = 0; │ │ │ │ │ +96 if (order>0) │ │ │ │ │ +97 notHomogen = basis._s_i_z_e_s()[order-1]; │ │ │ │ │ +98 │ │ │ │ │ +99 // get $\dim \widetilde (\P_order)$ │ │ │ │ │ +100 unsigned int homogen = basis._s_i_z_e_s()[order]-notHomogen; │ │ │ │ │ +101 │ │ │ │ │ +102 /* │ │ │ │ │ +103 * │ │ │ │ │ +104 * The set $RT_k$ is defined as │ │ │ │ │ +105 * │ │ │ │ │ +106 * \begin{equation} │ │ │ │ │ +107 * RT_k := (\P_k)^dim + \widetilde \P_k x with x\in \R^n. │ │ │ │ │ +108 * \end{equation} │ │ │ │ │ +109 * │ │ │ │ │ +110 * The space $\P_k$ is split in $\P_k = \P_{k-1} + \widetilde \P_k$. │ │ │ │ │ +111 * │ │ │ │ │ +112 * \begin{align} │ │ │ │ │ +113 * RT_k &= (\P_{k-1} + \widetilde \P_k)^dim + \widetilde \P_k x with x\in │ │ │ │ │ +\R^n │ │ │ │ │ +114 * &= (\P_{k-1})^n + (\widetilde \P_k)^n + \widetilde \P_k x with x\in \R^n │ │ │ │ │ +115 * \end{align} │ │ │ │ │ +116 * │ │ │ │ │ +117 * Thus $\dim RT_k = n * \dim \P_{k-1} + (n+1)*\dim (\widetilde \P_k)$ │ │ │ │ │ +118 */ │ │ │ │ │ +119 │ │ │ │ │ +120 // row_ = \dim RT_k *dim │ │ │ │ │ +121 _r_o_w__ = (notHomogen*_d_i_m+homogen*(_d_i_m+1))*_d_i_m; │ │ │ │ │ +122 _m_a_t__ = new Field*[_r_o_w__]; │ │ │ │ │ +123 int _r_o_w = 0; │ │ │ │ │ +124 │ │ │ │ │ +125 /* Assign the correct values for the nonhomogeneous polymonials $p\in (\P_ │ │ │ │ │ +{oder-1})^dim$ │ │ │ │ │ +126 * A basis function is represented by $dim$ rows. │ │ │ │ │ +127 */ │ │ │ │ │ +128 for (unsigned int i=0; i │ │ │ │ │ +_1_9_6 void _r_o_w( const unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ +197 { │ │ │ │ │ +198 const unsigned int N = _c_o_l_s(); │ │ │ │ │ +199 assert( vec.size() == N ); │ │ │ │ │ +200 for (unsigned int i=0; i MI │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ +void row(const unsigned int row, Vector &vec) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_M_I_B_a_s_i_s │ │ │ │ │ +MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ +static constexpr GeometryType geometry │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ +unsigned int rows() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:191 │ │ │ │ │ +_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_c_o_l__ │ │ │ │ │ +unsigned int col_ │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:203 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:22 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ const Basis Object │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_o_r │ │ │ │ │ -StandardEvaluator< MonomialBasis > Evaluator │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -InterpolFactory InterpolationFactory │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -PreBasisFactory::template EvaluationBasisFactory< dim, SF >::Type │ │ │ │ │ -MonomialBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ -PolynomialBasisWithMatrix< Evaluator, SparseCoeffMatrix< SF, dimRange > > Basis │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -PreBasisFactory::template EvaluationBasisFactory< dd, FF >::Type Type │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_V_i_r_t_u_a_l_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:612 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ +PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s │ │ │ │ │ +MBasisFactory::Object MBasis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ +std::size_t Key │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:769 │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_M_B_a_s_i_s │ │ │ │ │ +StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ +static Object * create(const Key &order) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ +MonomialBasisProvider< dd, FF > Type │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ +DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ +void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ +values) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ +const unsigned int * sizes(unsigned int order) const │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:465 │ │ │ │ │ +_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ +_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ +DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ _D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ -void fill(const Matrix &matrix) │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:366 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coeffmatrix.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,40 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
coeffmatrix.hh File Reference
│ │ │ │ +
raviartthomas02d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cassert>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/utility/tensor.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas02d/raviartthomas02dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::Mult< Field, Field2 >
 
struct  Dune::Mult< Field, FieldVector< Field2, dimRange > >
 
class  Dune::SparseCoeffMatrix< F, bSize >
class  Dune::RT02DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -coeffmatrix.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ +raviartthomas02d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_2_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_ _F_,_ _b_S_i_z_e_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  _Z_e_r_o order Raviart-Thomas shape functions on triangles. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00197_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: coeffmatrix.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,338 +70,125 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
coeffmatrix.hh
│ │ │ │ +
raviartthomas02d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_COEFFMATRIX_HH
│ │ │ │ -
6#define DUNE_COEFFMATRIX_HH
│ │ │ │ -
7#include <cassert>
│ │ │ │ -
8#include <iostream>
│ │ │ │ -
9#include <vector>
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ - │ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16 /*************************************************
│ │ │ │ -
17 * Default class for storing a coefficient matrix
│ │ │ │ -
18 * for the PolynomialBasis. Basically a simple
│ │ │ │ -
19 * CRS structure is used. The additional complexity
│ │ │ │ -
20 * is due to the storage and efficient evaluation
│ │ │ │ -
21 * of higher order derivatives. See the remarks
│ │ │ │ -
22 * in tensor.hh which also hold true for this file.
│ │ │ │ -
23 *************************************************/
│ │ │ │ -
24 template <class Field, class Field2>
│ │ │ │ -
│ │ │ │ -
25 struct Mult
│ │ │ │ -
26 {
│ │ │ │ -
27 typedef Field2 BasisEntry;
│ │ │ │ -
│ │ │ │ -
28 static void add(const Field &vec1, const BasisEntry &vec2,
│ │ │ │ -
29 BasisEntry &res)
│ │ │ │ -
30 {
│ │ │ │ -
31 res += vec1*vec2;
│ │ │ │ -
32 }
│ │ │ │ -
│ │ │ │ -
33 };
│ │ │ │ -
│ │ │ │ -
34
│ │ │ │ -
35 template <class Field,class Field2, int dimRange>
│ │ │ │ -
│ │ │ │ -
36 struct Mult< Field,FieldVector<Field2,dimRange> >
│ │ │ │ -
37 {
│ │ │ │ -
38 typedef FieldVector<Field2,dimRange> BasisEntry;
│ │ │ │ -
│ │ │ │ -
39 static void add(const Field &vec1, const BasisEntry &vec2,
│ │ │ │ -
40 BasisEntry &res)
│ │ │ │ -
41 {
│ │ │ │ -
42 res.axpy(vec1,vec2);
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44 };
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46 template< class F , unsigned int bSize >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48 {
│ │ │ │ -
49 public:
│ │ │ │ -
50 typedef F Field;
│ │ │ │ -
51 static const unsigned int blockSize = bSize;
│ │ │ │ - │ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 : coeff_(0),
│ │ │ │ -
56 rows_(0),
│ │ │ │ -
57 skip_(0),
│ │ │ │ -
58 numRows_(0),
│ │ │ │ -
59 numCols_(0)
│ │ │ │ -
60 {}
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
63 {
│ │ │ │ -
64 delete [] coeff_;
│ │ │ │ -
65 delete [] rows_;
│ │ │ │ -
66 delete [] skip_;
│ │ │ │ -
67 }
│ │ │ │ -
│ │ │ │ -
68
│ │ │ │ -
│ │ │ │ -
69 unsigned int size () const
│ │ │ │ -
70 {
│ │ │ │ -
71 return numRows_/blockSize;
│ │ │ │ -
72 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
73 unsigned int baseSize () const
│ │ │ │ -
74 {
│ │ │ │ -
75 return numCols_;
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
78 template< class BasisIterator, class FF>
│ │ │ │ -
│ │ │ │ -
79 void mult ( const BasisIterator &x,
│ │ │ │ -
80 unsigned int numLsg,
│ │ │ │ -
81 FF *y ) const
│ │ │ │ -
82 {
│ │ │ │ -
83 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ -
84 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ -
85 unsigned int row = 0;
│ │ │ │ -
86 Field *pos = rows_[ 0 ];
│ │ │ │ -
87 unsigned int *skipIt = skip_;
│ │ │ │ -
88 XDerivatives val;
│ │ │ │ -
89 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ -
90 {
│ │ │ │ -
91 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ -
92 {
│ │ │ │ -
93 val = 0;
│ │ │ │ -
94 BasisIterator itx = x;
│ │ │ │ -
95 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ -
96 {
│ │ │ │ -
97 itx += *skipIt;
│ │ │ │ -
98 val.axpy(*pos,*itx);
│ │ │ │ -
99 }
│ │ │ │ -
100 DerivativeAssign<XDerivatives,FF>::apply(r,val,*(y+i*XDerivatives::size*blockSize));
│ │ │ │ -
101 }
│ │ │ │ -
102 }
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104 template< class BasisIterator, class Vector>
│ │ │ │ -
│ │ │ │ -
105 void mult ( const BasisIterator &x,
│ │ │ │ -
106 Vector &y ) const
│ │ │ │ -
107 {
│ │ │ │ -
108 typedef typename Vector::value_type YDerivatives;
│ │ │ │ -
109 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ -
110 size_t numLsg = y.size();
│ │ │ │ -
111 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ -
112 unsigned int row = 0;
│ │ │ │ -
113 Field *pos = rows_[ 0 ];
│ │ │ │ -
114 unsigned int *skipIt = skip_;
│ │ │ │ -
115 XDerivatives val;
│ │ │ │ -
116 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ -
117 {
│ │ │ │ -
118 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ -
119 {
│ │ │ │ -
120 val = 0;
│ │ │ │ -
121 BasisIterator itx = x;
│ │ │ │ -
122 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ -
123 {
│ │ │ │ -
124 itx += *skipIt;
│ │ │ │ -
125 val.axpy(*pos,*itx);
│ │ │ │ -
126 }
│ │ │ │ - │ │ │ │ -
128 }
│ │ │ │ -
129 }
│ │ │ │ -
130 }
│ │ │ │ -
│ │ │ │ -
131 template <unsigned int deriv, class BasisIterator, class Vector>
│ │ │ │ -
│ │ │ │ -
132 void mult ( const BasisIterator &x,
│ │ │ │ -
133 Vector &y ) const
│ │ │ │ -
134 {
│ │ │ │ -
135 typedef typename Vector::value_type YDerivatives;
│ │ │ │ -
136 typedef typename BasisIterator::Derivatives XDerivatives;
│ │ │ │ -
137 typedef FieldVector<typename XDerivatives::Field,YDerivatives::dimension> XLFETensor;
│ │ │ │ -
138 size_t numLsg = y.size();
│ │ │ │ -
139 assert( numLsg*blockSize <= (size_t)numRows_ );
│ │ │ │ -
140 unsigned int row = 0;
│ │ │ │ -
141 Field *pos = rows_[ 0 ];
│ │ │ │ -
142 unsigned int *skipIt = skip_;
│ │ │ │ -
143 for( size_t i = 0; i < numLsg; ++i)
│ │ │ │ -
144 {
│ │ │ │ -
145 XLFETensor val(typename XDerivatives::Field(0));
│ │ │ │ -
146 for( unsigned int r = 0; r < blockSize; ++r, ++row )
│ │ │ │ -
147 {
│ │ │ │ -
148 BasisIterator itx = x;
│ │ │ │ -
149 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt )
│ │ │ │ -
150 {
│ │ │ │ -
151 itx += *skipIt;
│ │ │ │ - │ │ │ │ -
153 }
│ │ │ │ -
154 }
│ │ │ │ -
155 field_cast(val,y[i]);
│ │ │ │ -
156 }
│ │ │ │ -
157 }
│ │ │ │ -
│ │ │ │ -
158
│ │ │ │ -
159 template< class RowMatrix >
│ │ │ │ -
│ │ │ │ -
160 void fill ( const RowMatrix &mat, bool verbose=false )
│ │ │ │ -
161 {
│ │ │ │ -
162 numRows_ = mat.rows();
│ │ │ │ -
163 numCols_ = mat.cols();
│ │ │ │ -
164 unsigned int size = numRows_*numCols_;
│ │ │ │ -
165
│ │ │ │ -
166 delete [] coeff_;
│ │ │ │ -
167 delete [] rows_;
│ │ │ │ -
168 delete [] skip_;
│ │ │ │ -
169
│ │ │ │ -
170 Field* coeff = new Field[ size ];
│ │ │ │ -
171 // we always initialize the next skip entry to zero,
│ │ │ │ -
172 // including the one following the end, so allocate
│ │ │ │ -
173 // size+1 entries so we will stay within the bounds.
│ │ │ │ -
174 unsigned int *skip = new unsigned int[ size+1 ];
│ │ │ │ -
175 rows_ = new Field*[ numRows_+1 ];
│ │ │ │ -
176 std::vector<Field> row( numCols_ );
│ │ │ │ -
177
│ │ │ │ -
178 rows_[ 0 ] = coeff;
│ │ │ │ -
179 Field *cit = coeff;
│ │ │ │ -
180 unsigned int *sit = skip;
│ │ │ │ -
181 for( unsigned int r = 0; r < numRows_; ++r )
│ │ │ │ -
182 {
│ │ │ │ -
183 *sit = 0;
│ │ │ │ -
184 mat.row( r, row );
│ │ │ │ -
185 for( unsigned int c = 0; c < numCols_; ++c )
│ │ │ │ -
186 {
│ │ │ │ -
187 const Field &val = row[c];
│ │ │ │ -
188 if (val < Zero<Field>() || Zero<Field>() < val)
│ │ │ │ -
189 {
│ │ │ │ -
190 *cit = val;
│ │ │ │ -
191 ++sit;
│ │ │ │ -
192 ++cit;
│ │ │ │ -
193 *sit = 1;
│ │ │ │ -
194 } else
│ │ │ │ -
195 {
│ │ │ │ -
196 ++(*sit);
│ │ │ │ -
197 }
│ │ │ │ -
198 }
│ │ │ │ -
199 rows_[ r+1 ] = cit;
│ │ │ │ -
200 }
│ │ │ │ -
201 assert( size_t(rows_[numRows_]-rows_[0]) <= size_t(size) );
│ │ │ │ -
202 size = rows_[numRows_]-rows_[0];
│ │ │ │ -
203 coeff_ = new Field[ size ];
│ │ │ │ -
204 skip_ = new unsigned int[ size ];
│ │ │ │ -
205 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
206 {
│ │ │ │ -
207 coeff_[i] = coeff[i];
│ │ │ │ -
208 skip_[i] = skip[i];
│ │ │ │ -
209 }
│ │ │ │ -
210 for (unsigned int i=0; i<=numRows_; ++i)
│ │ │ │ -
211 rows_[ i ] = coeff_ + (rows_[ i ] - coeff);
│ │ │ │ -
212
│ │ │ │ -
213 delete [] coeff;
│ │ │ │ -
214 delete [] skip;
│ │ │ │ -
215
│ │ │ │ -
216 if (verbose)
│ │ │ │ -
217 std::cout << "Entries: " << (rows_[numRows_]-rows_[0])
│ │ │ │ -
218 << " full: " << numCols_*numRows_
│ │ │ │ -
219 << std::endl;
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221 // b += a*C[k]
│ │ │ │ -
222 template <class Vector>
│ │ │ │ -
│ │ │ │ -
223 void addRow( unsigned int k, const Field &a, Vector &b) const
│ │ │ │ -
224 {
│ │ │ │ -
225 assert(k<numRows_);
│ │ │ │ -
226 unsigned int j=0;
│ │ │ │ -
227 unsigned int *skipIt = skip_ + (rows_[ k ]-rows_[ 0 ]);
│ │ │ │ -
228 for( Field *pos = rows_[ k ];
│ │ │ │ -
229 pos != rows_[ k+1 ];
│ │ │ │ -
230 ++pos, ++skipIt )
│ │ │ │ -
231 {
│ │ │ │ -
232 j += *skipIt;
│ │ │ │ -
233 assert( j < b.size() );
│ │ │ │ -
234 b[j] += field_cast<typename Vector::value_type>( (*pos)*a ); // field_cast
│ │ │ │ -
235 }
│ │ │ │ -
236 }
│ │ │ │ -
│ │ │ │ -
237 private:
│ │ │ │ -
238 SparseCoeffMatrix ( const This &other )
│ │ │ │ -
239 : numRows_( other.numRows_ ),
│ │ │ │ -
240 numCols_( other.numCols_ )
│ │ │ │ -
241 {
│ │ │ │ -
242 const unsigned int size = other.rows_[numRows_]-other.rows_[0];
│ │ │ │ -
243 coeff_ = new Field[ size ];
│ │ │ │ -
244 rows_ = new Field*[ numRows_+1 ];
│ │ │ │ -
245 skip_ = new unsigned int[ size ];
│ │ │ │ -
246 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
247 {
│ │ │ │ -
248 coeff_[i] = other.coeff_[i];
│ │ │ │ -
249 skip_[i] = other.skip_[i];
│ │ │ │ -
250 }
│ │ │ │ -
251 for (unsigned int i=0; i<=numRows_; ++i)
│ │ │ │ -
252 rows_[ i ] = coeff_ + (other.rows_[ i ] - other.coeff_);
│ │ │ │ -
253 }
│ │ │ │ -
254
│ │ │ │ -
255 This &operator= (const This&);
│ │ │ │ -
256 Field *coeff_;
│ │ │ │ -
257 Field **rows_;
│ │ │ │ -
258 unsigned int *skip_;
│ │ │ │ -
259 unsigned int numRows_,numCols_;
│ │ │ │ -
260 };
│ │ │ │ -
│ │ │ │ -
261
│ │ │ │ -
262}
│ │ │ │ -
263
│ │ │ │ -
264#endif // DUNE_COEFFMATRIX_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
5#ifndef DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ +
27 class
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
43 RT02DLocalFiniteElement (std::bitset<3> s) :
│ │ │ │ +
44 basis(s),
│ │ │ │ +
45 interpolation(s)
│ │ │ │ +
46 {}
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
49 {
│ │ │ │ +
50 return basis;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 return coefficients;
│ │ │ │ +
56 }
│ │ │ │ +
│ │ │ │ +
57
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 {
│ │ │ │ +
60 return interpolation;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │ +
62
│ │ │ │ +
│ │ │ │ +
63 unsigned int size () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return 3;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 static constexpr GeometryType type ()
│ │ │ │ +
69 {
│ │ │ │ +
70 return GeometryTypes::triangle;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 private:
│ │ │ │ + │ │ │ │ +
75 RT02DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
77 };
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79}
│ │ │ │ +
80
│ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition coeffmatrix.hh:26
│ │ │ │ -
static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res)
Definition coeffmatrix.hh:28
│ │ │ │ -
Field2 BasisEntry
Definition coeffmatrix.hh:27
│ │ │ │ -
FieldVector< Field2, dimRange > BasisEntry
Definition coeffmatrix.hh:38
│ │ │ │ -
static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res)
Definition coeffmatrix.hh:39
│ │ │ │ -
Definition coeffmatrix.hh:48
│ │ │ │ -
static const unsigned int blockSize
Definition coeffmatrix.hh:51
│ │ │ │ -
SparseCoeffMatrix()
Definition coeffmatrix.hh:54
│ │ │ │ -
F Field
Definition coeffmatrix.hh:50
│ │ │ │ -
unsigned int baseSize() const
Definition coeffmatrix.hh:73
│ │ │ │ -
SparseCoeffMatrix< Field, blockSize > This
Definition coeffmatrix.hh:52
│ │ │ │ -
unsigned int size() const
Definition coeffmatrix.hh:69
│ │ │ │ -
void fill(const RowMatrix &mat, bool verbose=false)
Definition coeffmatrix.hh:160
│ │ │ │ -
void addRow(unsigned int k, const Field &a, Vector &b) const
Definition coeffmatrix.hh:223
│ │ │ │ -
void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const
Definition coeffmatrix.hh:79
│ │ │ │ -
void mult(const BasisIterator &x, Vector &y) const
Definition coeffmatrix.hh:132
│ │ │ │ -
void mult(const BasisIterator &x, Vector &y) const
Definition coeffmatrix.hh:105
│ │ │ │ -
~SparseCoeffMatrix()
Definition coeffmatrix.hh:62
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y)
Definition tensor.hh:571
│ │ │ │ -
static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2)
Definition tensor.hh:649
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Zero order Raviart-Thomas shape functions on triangles.
Definition raviartthomas02d.hh:29
│ │ │ │ +
RT02DLocalFiniteElement()
Standard constructor.
Definition raviartthomas02d.hh:35
│ │ │ │ +
LocalFiniteElementTraits< RT02DLocalBasis< D, R >, RT02DLocalCoefficients, RT02DLocalInterpolation< RT02DLocalBasis< D, R > > > Traits
Definition raviartthomas02d.hh:32
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas02d.hh:68
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas02d.hh:58
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas02d.hh:48
│ │ │ │ +
RT02DLocalFiniteElement(std::bitset< 3 > s)
Constructor with explicitly given edge orientations.
Definition raviartthomas02d.hh:43
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas02d.hh:53
│ │ │ │ +
unsigned int size() const
Definition raviartthomas02d.hh:63
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas02dlocalbasis.hh:26
│ │ │ │ +
Layout map for RT0 elements.
Definition raviartthomas02dlocalcoefficients.hh:24
│ │ │ │ +
Definition raviartthomas02dlocalinterpolation.hh:18
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,347 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -coeffmatrix.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas02d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_COEFFMATRIX_HH │ │ │ │ │ -6#define DUNE_COEFFMATRIX_HH │ │ │ │ │ -7#include │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_t_e_n_s_o_r_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 /************************************************* │ │ │ │ │ -17 * Default class for storing a coefficient matrix │ │ │ │ │ -18 * for the PolynomialBasis. Basically a simple │ │ │ │ │ -19 * CRS structure is used. The additional complexity │ │ │ │ │ -20 * is due to the storage and efficient evaluation │ │ │ │ │ -21 * of higher order derivatives. See the remarks │ │ │ │ │ -22 * in tensor.hh which also hold true for this file. │ │ │ │ │ -23 *************************************************/ │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 struct _M_u_l_t │ │ │ │ │ -26 { │ │ │ │ │ -_2_7 typedef Field2 _B_a_s_i_s_E_n_t_r_y; │ │ │ │ │ -_2_8 static void _a_d_d(const Field &vec1, const _B_a_s_i_s_E_n_t_r_y &vec2, │ │ │ │ │ -29 _B_a_s_i_s_E_n_t_r_y &res) │ │ │ │ │ -30 { │ │ │ │ │ -31 res += vec1*vec2; │ │ │ │ │ -32 } │ │ │ │ │ -33 }; │ │ │ │ │ -34 │ │ │ │ │ -35 template │ │ │ │ │ -_3_6 struct _M_u_l_t< Field,FieldVector > │ │ │ │ │ -37 { │ │ │ │ │ -_3_8 typedef FieldVector _B_a_s_i_s_E_n_t_r_y; │ │ │ │ │ -_3_9 static void _a_d_d(const Field &vec1, const _B_a_s_i_s_E_n_t_r_y &vec2, │ │ │ │ │ -40 _B_a_s_i_s_E_n_t_r_y &res) │ │ │ │ │ -41 { │ │ │ │ │ -42 res.axpy(vec1,vec2); │ │ │ │ │ -43 } │ │ │ │ │ -44 }; │ │ │ │ │ -45 │ │ │ │ │ -46 template< class F , unsigned int bSize > │ │ │ │ │ -_4_7 class _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ -48 { │ │ │ │ │ -49 public: │ │ │ │ │ -_5_0 typedef F _F_i_e_l_d; │ │ │ │ │ -_5_1 static const unsigned int _b_l_o_c_k_S_i_z_e = bSize; │ │ │ │ │ -_5_2 typedef _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_F_i_e_l_d_,_b_l_o_c_k_S_i_z_e_> _T_h_i_s; │ │ │ │ │ -53 │ │ │ │ │ -_5_4 _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x() │ │ │ │ │ -55 : coeff_(0), │ │ │ │ │ -56 rows_(0), │ │ │ │ │ -57 skip_(0), │ │ │ │ │ -58 numRows_(0), │ │ │ │ │ -59 numCols_(0) │ │ │ │ │ -60 {} │ │ │ │ │ -61 │ │ │ │ │ -_6_2 _~_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x() │ │ │ │ │ -63 { │ │ │ │ │ -64 delete [] coeff_; │ │ │ │ │ -65 delete [] rows_; │ │ │ │ │ -66 delete [] skip_; │ │ │ │ │ -67 } │ │ │ │ │ -68 │ │ │ │ │ -_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ -70 { │ │ │ │ │ -71 return numRows_/_b_l_o_c_k_S_i_z_e; │ │ │ │ │ -72 } │ │ │ │ │ -_7_3 unsigned int _b_a_s_e_S_i_z_e () const │ │ │ │ │ -74 { │ │ │ │ │ -75 return numCols_; │ │ │ │ │ -76 } │ │ │ │ │ -77 │ │ │ │ │ -78 template< class BasisIterator, class FF> │ │ │ │ │ -_7_9 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ -80 unsigned int numLsg, │ │ │ │ │ -81 FF *y ) const │ │ │ │ │ -82 { │ │ │ │ │ -83 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ -84 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ -85 unsigned int row = 0; │ │ │ │ │ -86 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ -87 unsigned int *skipIt = skip_; │ │ │ │ │ -88 XDerivatives val; │ │ │ │ │ -89 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ -90 { │ │ │ │ │ -91 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ -92 { │ │ │ │ │ -93 val = 0; │ │ │ │ │ -94 BasisIterator itx = x; │ │ │ │ │ -95 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ -96 { │ │ │ │ │ -97 itx += *skipIt; │ │ │ │ │ -98 val.axpy(*pos,*itx); │ │ │ │ │ -99 } │ │ │ │ │ -100 _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_X_D_e_r_i_v_a_t_i_v_e_s_,_F_F_>_:_:_a_p_p_l_y(r,val,*(y+i*XDerivatives:: │ │ │ │ │ -size*_b_l_o_c_k_S_i_z_e)); │ │ │ │ │ -101 } │ │ │ │ │ -102 } │ │ │ │ │ -103 } │ │ │ │ │ -104 template< class BasisIterator, class Vector> │ │ │ │ │ -_1_0_5 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ -106 Vector &y ) const │ │ │ │ │ -107 { │ │ │ │ │ -108 typedef typename Vector::value_type YDerivatives; │ │ │ │ │ -109 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ -110 size_t numLsg = y.size(); │ │ │ │ │ -111 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ -112 unsigned int row = 0; │ │ │ │ │ -113 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ -114 unsigned int *skipIt = skip_; │ │ │ │ │ -115 XDerivatives val; │ │ │ │ │ -116 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ -117 { │ │ │ │ │ -118 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ -119 { │ │ │ │ │ -120 val = 0; │ │ │ │ │ -121 BasisIterator itx = x; │ │ │ │ │ -122 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ -123 { │ │ │ │ │ -124 itx += *skipIt; │ │ │ │ │ -125 val.axpy(*pos,*itx); │ │ │ │ │ -126 } │ │ │ │ │ -127 _D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_<_X_D_e_r_i_v_a_t_i_v_e_s_,_Y_D_e_r_i_v_a_t_i_v_e_s_>_:_:_a_p_p_l_y(r,val,y[i]); │ │ │ │ │ -128 } │ │ │ │ │ -129 } │ │ │ │ │ -130 } │ │ │ │ │ -131 template │ │ │ │ │ -_1_3_2 void _m_u_l_t ( const BasisIterator &x, │ │ │ │ │ -133 Vector &y ) const │ │ │ │ │ -134 { │ │ │ │ │ -135 typedef typename Vector::value_type YDerivatives; │ │ │ │ │ -136 typedef typename BasisIterator::Derivatives XDerivatives; │ │ │ │ │ -137 typedef FieldVector │ │ │ │ │ -XLFETensor; │ │ │ │ │ -138 size_t numLsg = y.size(); │ │ │ │ │ -139 assert( numLsg*_b_l_o_c_k_S_i_z_e <= (size_t)numRows_ ); │ │ │ │ │ -140 unsigned int row = 0; │ │ │ │ │ -141 _F_i_e_l_d *pos = rows_[ 0 ]; │ │ │ │ │ -142 unsigned int *skipIt = skip_; │ │ │ │ │ -143 for( size_t i = 0; i < numLsg; ++i) │ │ │ │ │ -144 { │ │ │ │ │ -145 XLFETensor val(typename XDerivatives::Field(0)); │ │ │ │ │ -146 for( unsigned int r = 0; r < _b_l_o_c_k_S_i_z_e; ++r, ++row ) │ │ │ │ │ -147 { │ │ │ │ │ -148 BasisIterator itx = x; │ │ │ │ │ -149 for( ; pos != rows_[ row+1 ]; ++pos, ++skipIt ) │ │ │ │ │ -150 { │ │ │ │ │ -151 itx += *skipIt; │ │ │ │ │ -152 _L_F_E_T_e_n_s_o_r_A_x_p_y_<_X_D_e_r_i_v_a_t_i_v_e_s_,_X_L_F_E_T_e_n_s_o_r_,_d_e_r_i_v_>_:_:_a_p_p_l_y(r,*pos,*itx,val); │ │ │ │ │ -153 } │ │ │ │ │ -154 } │ │ │ │ │ -155 _f_i_e_l_d___c_a_s_t(val,y[i]); │ │ │ │ │ -156 } │ │ │ │ │ -157 } │ │ │ │ │ -158 │ │ │ │ │ -159 template< class RowMatrix > │ │ │ │ │ -_1_6_0 void _f_i_l_l ( const RowMatrix &mat, bool verbose=false ) │ │ │ │ │ -161 { │ │ │ │ │ -162 numRows_ = mat.rows(); │ │ │ │ │ -163 numCols_ = mat.cols(); │ │ │ │ │ -164 unsigned int _s_i_z_e = numRows_*numCols_; │ │ │ │ │ -165 │ │ │ │ │ -166 delete [] coeff_; │ │ │ │ │ -167 delete [] rows_; │ │ │ │ │ -168 delete [] skip_; │ │ │ │ │ -169 │ │ │ │ │ -170 _F_i_e_l_d* coeff = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ -171 // we always initialize the next skip entry to zero, │ │ │ │ │ -172 // including the one following the end, so allocate │ │ │ │ │ -173 // size+1 entries so we will stay within the bounds. │ │ │ │ │ -174 unsigned int *skip = new unsigned int[ _s_i_z_e+1 ]; │ │ │ │ │ -175 rows_ = new _F_i_e_l_d*[ numRows_+1 ]; │ │ │ │ │ -176 std::vector row( numCols_ ); │ │ │ │ │ -177 │ │ │ │ │ -178 rows_[ 0 ] = coeff; │ │ │ │ │ -179 _F_i_e_l_d *cit = coeff; │ │ │ │ │ -180 unsigned int *sit = skip; │ │ │ │ │ -181 for( unsigned int r = 0; r < numRows_; ++r ) │ │ │ │ │ -182 { │ │ │ │ │ -183 *sit = 0; │ │ │ │ │ -184 mat.row( r, row ); │ │ │ │ │ -185 for( unsigned int c = 0; c < numCols_; ++c ) │ │ │ │ │ -186 { │ │ │ │ │ -187 const _F_i_e_l_d &val = row[c]; │ │ │ │ │ -188 if (val < _Z_e_r_o_<_F_i_e_l_d_>() || _Z_e_r_o_<_F_i_e_l_d_>() < val) │ │ │ │ │ -189 { │ │ │ │ │ -190 *cit = val; │ │ │ │ │ -191 ++sit; │ │ │ │ │ -192 ++cit; │ │ │ │ │ -193 *sit = 1; │ │ │ │ │ -194 } else │ │ │ │ │ -195 { │ │ │ │ │ -196 ++(*sit); │ │ │ │ │ -197 } │ │ │ │ │ -198 } │ │ │ │ │ -199 rows_[ r+1 ] = cit; │ │ │ │ │ -200 } │ │ │ │ │ -201 assert( size_t(rows_[numRows_]-rows_[0]) <= size_t(_s_i_z_e) ); │ │ │ │ │ -202 _s_i_z_e = rows_[numRows_]-rows_[0]; │ │ │ │ │ -203 coeff_ = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ -204 skip_ = new unsigned int[ _s_i_z_e ]; │ │ │ │ │ -205 for (unsigned int i=0; i<_s_i_z_e; ++i) │ │ │ │ │ -206 { │ │ │ │ │ -207 coeff_[i] = coeff[i]; │ │ │ │ │ -208 skip_[i] = skip[i]; │ │ │ │ │ -209 } │ │ │ │ │ -210 for (unsigned int i=0; i<=numRows_; ++i) │ │ │ │ │ -211 rows_[ i ] = coeff_ + (rows_[ i ] - coeff); │ │ │ │ │ -212 │ │ │ │ │ -213 delete [] coeff; │ │ │ │ │ -214 delete [] skip; │ │ │ │ │ -215 │ │ │ │ │ -216 if (verbose) │ │ │ │ │ -217 std::cout << "Entries: " << (rows_[numRows_]-rows_[0]) │ │ │ │ │ -218 << " full: " << numCols_*numRows_ │ │ │ │ │ -219 << std::endl; │ │ │ │ │ -220 } │ │ │ │ │ -221 // b += a*C[k] │ │ │ │ │ -222 template │ │ │ │ │ -_2_2_3 void _a_d_d_R_o_w( unsigned int k, const _F_i_e_l_d &a, Vector &b) const │ │ │ │ │ -224 { │ │ │ │ │ -225 assert(k( (*pos)*a ); // field_cast │ │ │ │ │ -235 } │ │ │ │ │ -236 } │ │ │ │ │ -237 private: │ │ │ │ │ -238 _S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x ( const _T_h_i_s &other ) │ │ │ │ │ -239 : numRows_( other.numRows_ ), │ │ │ │ │ -240 numCols_( other.numCols_ ) │ │ │ │ │ -241 { │ │ │ │ │ -242 const unsigned int _s_i_z_e = other.rows_[numRows_]-other.rows_[0]; │ │ │ │ │ -243 coeff_ = new _F_i_e_l_d[ _s_i_z_e ]; │ │ │ │ │ -244 rows_ = new _F_i_e_l_d*[ numRows_+1 ]; │ │ │ │ │ -245 skip_ = new unsigned int[ _s_i_z_e ]; │ │ │ │ │ -246 for (unsigned int i=0; i<_s_i_z_e; ++i) │ │ │ │ │ -247 { │ │ │ │ │ -248 coeff_[i] = other.coeff_[i]; │ │ │ │ │ -249 skip_[i] = other.skip_[i]; │ │ │ │ │ -250 } │ │ │ │ │ -251 for (unsigned int i=0; i<=numRows_; ++i) │ │ │ │ │ -252 rows_[ i ] = coeff_ + (other.rows_[ i ] - other.coeff_); │ │ │ │ │ -253 } │ │ │ │ │ -254 │ │ │ │ │ -255 _T_h_i_s &operator= (const _T_h_i_s&); │ │ │ │ │ -256 _F_i_e_l_d *coeff_; │ │ │ │ │ -257 _F_i_e_l_d **rows_; │ │ │ │ │ -258 unsigned int *skip_; │ │ │ │ │ -259 unsigned int numRows_,numCols_; │ │ │ │ │ -260 }; │ │ │ │ │ -261 │ │ │ │ │ -262} │ │ │ │ │ -263 │ │ │ │ │ -264#endif // DUNE_COEFFMATRIX_HH │ │ │ │ │ -_t_e_n_s_o_r_._h_h │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ +5#ifndef DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_RAVIARTTHOMAS02DLOCALFINITEELEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class │ │ │ │ │ +28 _R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 { │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>,_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_2 _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +_4_3 _R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset<3> s) : │ │ │ │ │ +44 basis(s), │ │ │ │ │ +45 interpolation(s) │ │ │ │ │ +46 {} │ │ │ │ │ +47 │ │ │ │ │ +_4_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +49 { │ │ │ │ │ +50 return basis; │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +_5_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +54 { │ │ │ │ │ +55 return coefficients; │ │ │ │ │ +56 } │ │ │ │ │ +57 │ │ │ │ │ +_5_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +59 { │ │ │ │ │ +60 return interpolation; │ │ │ │ │ +61 } │ │ │ │ │ +62 │ │ │ │ │ +_6_3 unsigned int _s_i_z_e () const │ │ │ │ │ +64 { │ │ │ │ │ +65 return 3; │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +69 { │ │ │ │ │ +70 return GeometryTypes::triangle; │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 private: │ │ │ │ │ +74 _R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +75 _R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +76 _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +77 }; │ │ │ │ │ +78 │ │ │ │ │ +79} │ │ │ │ │ +80 │ │ │ │ │ +81#endif │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_:_:_a_d_d │ │ │ │ │ -static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_:_:_B_a_s_i_s_E_n_t_r_y │ │ │ │ │ -Field2 BasisEntry │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _>_:_:_B_a_s_i_s_E_n_t_r_y │ │ │ │ │ -FieldVector< Field2, dimRange > BasisEntry │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_<_ _F_i_e_l_d_,_ _F_i_e_l_d_V_e_c_t_o_r_<_ _F_i_e_l_d_2_,_ _d_i_m_R_a_n_g_e_ _>_ _>_:_:_a_d_d │ │ │ │ │ -static void add(const Field &vec1, const BasisEntry &vec2, BasisEntry &res) │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_b_l_o_c_k_S_i_z_e │ │ │ │ │ -static const unsigned int blockSize │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ -SparseCoeffMatrix() │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_b_a_s_e_S_i_z_e │ │ │ │ │ -unsigned int baseSize() const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:73 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_T_h_i_s │ │ │ │ │ -SparseCoeffMatrix< Field, blockSize > This │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on triangles. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT02DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT02DLocalBasis< D, R >, RT02DLocalCoefficients, │ │ │ │ │ +RT02DLocalInterpolation< RT02DLocalBasis< D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT02DLocalFiniteElement(std::bitset< 3 > s) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_f_i_l_l │ │ │ │ │ -void fill(const RowMatrix &mat, bool verbose=false) │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_a_d_d_R_o_w │ │ │ │ │ -void addRow(unsigned int k, const Field &a, Vector &b) const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:223 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ -void mult(const BasisIterator &x, unsigned int numLsg, FF *y) const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ -void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:132 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_m_u_l_t │ │ │ │ │ -void mult(const BasisIterator &x, Vector &y) const │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:105 │ │ │ │ │ -_D_u_n_e_:_:_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_:_:_~_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x │ │ │ │ │ -~SparseCoeffMatrix() │ │ │ │ │ -DDeeffiinniittiioonn coeffmatrix.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_L_F_E_T_e_n_s_o_r_A_x_p_y_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Field &a, const Vec1 &x, Vec2 &y) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:571 │ │ │ │ │ -_D_u_n_e_:_:_D_e_r_i_v_a_t_i_v_e_A_s_s_i_g_n_:_:_a_p_p_l_y │ │ │ │ │ -static void apply(unsigned int r, const Vec1 &vec1, Vec2 &vec2) │ │ │ │ │ -DDeeffiinniittiioonn tensor.hh:649 │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02d.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: field.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,128 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
field.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas4cube2d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/common/gmpfield.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas4cube2d/raviartthomas4cube2dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas4cube2d/raviartthomas4cube2dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas4cube2d/raviartthomas4cube2dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::Unity< Field >
 A class representing the unit of a given Field. More...
 
struct  Dune::Zero< Field >
 A class representing the zero of a given Field. More...
 
struct  Dune::FieldCast< F2, V >
 
struct  Dune::FieldCast< F2, Dune::FieldVector< F1, dim > >
 
struct  Dune::FieldCast< F2, Dune::FieldMatrix< F1, dim1, dim2 > >
 
struct  Dune::Precision< double >
 
struct  Dune::Precision< long double >
 
struct  Dune::Precision< float >
 
struct  Dune::ComputeField< Field, sum >
class  Dune::RT4Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<class Field >
Field Dune::operator+ (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator- (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator* (const Unity< Field > &u, const Field &f)
 
template<class Field >
Field Dune::operator/ (const Unity< Field > &u, const Field &f)
 
template<class Field >
bool Dune::operator== (const Zero< Field > &, const Field &f)
 
template<class Field >
bool Dune::operator== (const Field &f, const Zero< Field > &z)
 
template<class Field >
bool Dune::operator< (const Zero< Field > &, const Field &f)
 
template<class Field >
bool Dune::operator< (const Field &f, const Zero< Field > &)
 
template<class Field >
bool Dune::operator> (const Zero< Field > &z, const Field &f)
 
template<class Field >
bool Dune::operator> (const Field &f, const Zero< Field > &z)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, F2 &f2)
 a helper class to cast from one field to another
 
template<class F2 , class F1 , int dim>
void Dune::field_cast (const Dune::FieldVector< F1, dim > &f1, Dune::FieldVector< F2, dim > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, F2 &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class F1 , int rdim, int cdim>
void Dune::field_cast (const Dune::FieldMatrix< F1, rdim, cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, F2 &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const F1 &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, Dune::FieldMatrix< F2, 1, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldMatrix< F1, 1, 1 > &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class F1 >
void Dune::field_cast (const Dune::FieldVector< F1, 1 > &f1, Dune::FieldVector< F2, 1 > &f2)
 
template<class F2 , class V >
FieldCast< F2, V >::type Dune::field_cast (const V &f1)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,127 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -field.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas4cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_U_n_i_t_y_<_ _F_i_e_l_d_ _> │ │ │ │ │ -  A class representing the unit of a given Field. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_Z_e_r_o_<_ _F_i_e_l_d_ _> │ │ │ │ │ -  A class representing the zero of a given Field. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _V_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _F_1_,_ _d_i_m_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_M_a_t_r_i_x_<_ _F_1_,_ _d_i_m_1_,_ _d_i_m_2_ _>_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _d_o_u_b_l_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _l_o_n_g_ _d_o_u_b_l_e_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_r_e_c_i_s_i_o_n_<_ _f_l_o_a_t_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d_<_ _F_i_e_l_d_,_ _s_u_m_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ - Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_+ (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_- (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_* (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - Field  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ (const _U_n_i_t_y< Field > &u, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= (const _Z_e_r_o< Field > &, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ - &z) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const _Z_e_r_o< Field > &, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_< (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ - &) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_> (const _Z_e_r_o< Field > &z, const Field │ │ │ │ │ - &f) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - bool  _D_u_n_e_:_:_o_p_e_r_a_t_o_r_> (const Field &f, const _Z_e_r_o< Field > │ │ │ │ │ - &z) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, F2 &f2) │ │ │ │ │ -  a helper class to cast from one field to another │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, dim > │ │ │ │ │ - &f1, Dune::FieldVector< F2, dim > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, F2 &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, Dune::FieldVector< │ │ │ │ │ - F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, rdim, │ │ │ │ │ - cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, F2 &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const F1 &f1, Dune::FieldMatrix< │ │ │ │ │ - F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, Dune::FieldMatrix< F2, 1, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldMatrix< F1, 1, 1 > │ │ │ │ │ - &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ - void  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const Dune::FieldVector< F1, 1 > │ │ │ │ │ - &f1, Dune::FieldVector< F2, 1 > &f2) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -_F_i_e_l_d_C_a_s_t< F2, V >::type  _D_u_n_e_:_:_f_i_e_l_d___c_a_s_t (const V &f1) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00200_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: field.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,385 +70,123 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
field.hh
│ │ │ │ +
raviartthomas4cube2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/gmpfield.hh>
│ │ │ │ -
9#include <dune/common/fvector.hh>
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
15 // Unity
│ │ │ │ -
16 // -----
│ │ │ │ -
17
│ │ │ │ -
28 template< class Field >
│ │ │ │ -
│ │ │ │ -
29 struct Unity
│ │ │ │ -
30 {
│ │ │ │ -
│ │ │ │ -
31 operator Field () const
│ │ │ │ -
32 {
│ │ │ │ -
33 return Field( 1 );
│ │ │ │ -
34 }
│ │ │ │ -
│ │ │ │ -
35 };
│ │ │ │ -
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
36
│ │ │ │ -
37 template< class Field >
│ │ │ │
│ │ │ │ -
38 Field operator+ ( const Unity< Field > &u, const Field &f )
│ │ │ │ -
39 {
│ │ │ │ -
40 return (Field)u + f;
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
43 template< class Field >
│ │ │ │ -
│ │ │ │ -
44 Field operator- ( const Unity< Field > &u, const Field &f )
│ │ │ │ -
45 {
│ │ │ │ -
46 return (Field)u - f;
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49 template< class Field >
│ │ │ │ -
│ │ │ │ -
50 Field operator* ( const Unity< Field > &u, const Field &f )
│ │ │ │ -
51 {
│ │ │ │ -
52 return f;
│ │ │ │ -
53 }
│ │ │ │ + │ │ │ │ +
39 {}
│ │ │ │
│ │ │ │ -
54
│ │ │ │ -
55 template< class Field >
│ │ │ │ +
40
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 basis(s),
│ │ │ │ +
48 interpolation(s)
│ │ │ │ +
49 {}
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
51 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
52 {
│ │ │ │ +
53 return basis;
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │
│ │ │ │ -
56 Field operator/ ( const Unity< Field > &u, const Field &f )
│ │ │ │ -
57 {
│ │ │ │ -
58 return (Field)u / f;
│ │ │ │ -
59 }
│ │ │ │ + │ │ │ │ +
57 {
│ │ │ │ +
58 return coefficients;
│ │ │ │ +
59 }
│ │ │ │
│ │ │ │
60
│ │ │ │ -
61
│ │ │ │ -
62
│ │ │ │ -
63 // Zero
│ │ │ │ -
64 // ----
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
62 {
│ │ │ │ +
63 return interpolation;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │
65
│ │ │ │ -
77 template< class Field >
│ │ │ │ -
│ │ │ │ -
78 struct Zero
│ │ │ │ -
79 {
│ │ │ │ -
│ │ │ │ -
80 operator Field () const
│ │ │ │ -
81 {
│ │ │ │ -
82 return Field( 0 );
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
84 static const Field epsilon()
│ │ │ │ -
85 {
│ │ │ │ -
86 return Field(1e-12);
│ │ │ │ -
87 }
│ │ │ │ -
│ │ │ │ -
88 };
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
90#if HAVE_GMP
│ │ │ │ -
91 template< unsigned int precision >
│ │ │ │ -
92 struct Zero< GMPField< precision > >
│ │ │ │ -
93 {
│ │ │ │ -
94 typedef GMPField< precision > Field;
│ │ │ │ -
95 operator Field () const
│ │ │ │ -
96 {
│ │ │ │ -
97 return Field( 0 );
│ │ │ │ -
98 }
│ │ │ │ -
99 static const Field epsilon()
│ │ │ │ -
100 {
│ │ │ │ -
101 return Field(1e-20);
│ │ │ │ -
102 }
│ │ │ │ -
103 };
│ │ │ │ -
104#endif
│ │ │ │ -
105
│ │ │ │ -
106 template< class Field >
│ │ │ │ -
│ │ │ │ -
107 inline bool operator == ( const Zero< Field > &, const Field &f )
│ │ │ │ -
108 {
│ │ │ │ -
109 return ( f < Zero<Field>::epsilon() && f > -Zero<Field>::epsilon() );
│ │ │ │ -
110 }
│ │ │ │ -
│ │ │ │ -
111
│ │ │ │ -
112 template< class Field >
│ │ │ │ -
│ │ │ │ -
113 inline bool operator == ( const Field &f, const Zero< Field > &z)
│ │ │ │ -
114 {
│ │ │ │ -
115 return ( z == f );
│ │ │ │ -
116 }
│ │ │ │ -
│ │ │ │ -
117
│ │ │ │ -
118 template< class Field >
│ │ │ │ -
│ │ │ │ -
119 inline bool operator< ( const Zero< Field > &, const Field &f )
│ │ │ │ -
120 {
│ │ │ │ -
121 return f > Zero<Field>::epsilon();
│ │ │ │ -
122 }
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
124 template< class Field >
│ │ │ │ -
│ │ │ │ -
125 inline bool operator< ( const Field &f, const Zero< Field > & )
│ │ │ │ -
126 {
│ │ │ │ -
127 return f < -Zero<Field>::epsilon();
│ │ │ │ -
128 }
│ │ │ │ -
│ │ │ │ -
129
│ │ │ │ -
130 template< class Field >
│ │ │ │ -
│ │ │ │ -
131 inline bool operator> ( const Zero< Field > &z, const Field &f )
│ │ │ │ -
132 {
│ │ │ │ -
133 return f < z;
│ │ │ │ -
134 }
│ │ │ │ -
│ │ │ │ -
135
│ │ │ │ -
136 template< class Field >
│ │ │ │ -
│ │ │ │ -
137 inline bool operator> ( const Field &f, const Zero< Field > &z )
│ │ │ │ -
138 {
│ │ │ │ -
139 return z < f;
│ │ │ │ -
140 }
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
142
│ │ │ │ -
143 // field_cast
│ │ │ │ -
144 // ----------
│ │ │ │ -
145
│ │ │ │ -
158 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
159 inline void field_cast ( const F1 &f1, F2 &f2 )
│ │ │ │ -
160 {
│ │ │ │ -
161 f2 = f1;
│ │ │ │ -
162 }
│ │ │ │ -
│ │ │ │ -
163
│ │ │ │ -
164#if HAVE_GMP
│ │ │ │ -
165 template< unsigned int precision >
│ │ │ │ -
166 inline void field_cast ( const Dune::GMPField< precision > &f1, double &f2 )
│ │ │ │ -
167 {
│ │ │ │ -
168 f2 = f1.get_d();
│ │ │ │ -
169 }
│ │ │ │ -
170
│ │ │ │ -
171 template< unsigned int precision >
│ │ │ │ -
172 inline void field_cast ( const Dune::GMPField< precision > &f1, long double &f2 )
│ │ │ │ -
173 {
│ │ │ │ -
174 f2 = f1.get_d();
│ │ │ │ -
175 }
│ │ │ │ -
176#endif
│ │ │ │ -
177
│ │ │ │ -
178 template< class F2, class F1, int dim >
│ │ │ │ -
│ │ │ │ -
179 inline void field_cast ( const Dune::FieldVector< F1, dim > &f1, Dune::FieldVector< F2, dim > &f2 )
│ │ │ │ -
180 {
│ │ │ │ -
181 for( int d = 0; d < dim; ++d )
│ │ │ │ -
182 field_cast( f1[ d ], f2[ d ] );
│ │ │ │ -
183 }
│ │ │ │ -
│ │ │ │ -
184 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
185 inline void field_cast ( const Dune::FieldVector< F1, 1 > &f1, F2 &f2 )
│ │ │ │ -
186 {
│ │ │ │ -
187 field_cast( f1[ 0 ], f2 );
│ │ │ │ -
188 }
│ │ │ │ -
│ │ │ │ -
189 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
190 inline void field_cast ( const F1 &f1, Dune::FieldVector< F2, 1 > &f2 )
│ │ │ │ -
191 {
│ │ │ │ -
192 field_cast( f1, f2[ 0 ] );
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
195 template< class F2, class F1, int rdim, int cdim >
│ │ │ │ -
│ │ │ │ -
196 inline void field_cast ( const Dune::FieldMatrix< F1, rdim, cdim > &f1, Dune::FieldMatrix< F2, rdim, cdim > &f2 )
│ │ │ │ -
197 {
│ │ │ │ -
198 for( int r = 0; r < rdim; ++r )
│ │ │ │ -
199 field_cast( f1[ r ], f2[ r ] );
│ │ │ │ -
200 }
│ │ │ │ -
│ │ │ │ -
201 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
202 inline void field_cast ( const Dune::FieldMatrix<F1,1,1> &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ -
203 {
│ │ │ │ -
204 field_cast( f1[ 0 ][ 0 ], f2[ 0 ][ 0 ] );
│ │ │ │ -
205 }
│ │ │ │ -
│ │ │ │ -
206 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
207 inline void field_cast ( const Dune::FieldMatrix< F1, 1,1 > &f1, F2 &f2 )
│ │ │ │ -
208 {
│ │ │ │ -
209 field_cast( f1[ 0 ][ 0 ], f2 );
│ │ │ │ -
210 }
│ │ │ │ -
│ │ │ │ -
211 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
212 inline void field_cast ( const F1 &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ -
213 {
│ │ │ │ -
214 field_cast( f1, f2[ 0 ][ 0 ] );
│ │ │ │ -
215 }
│ │ │ │ -
│ │ │ │ -
216 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
217 inline void field_cast ( const Dune::FieldVector<F1,1> &f1, Dune::FieldMatrix< F2, 1,1 > &f2 )
│ │ │ │ -
218 {
│ │ │ │ -
219 field_cast( f1[ 0 ], f2[ 0 ][ 0 ] );
│ │ │ │ -
220 }
│ │ │ │ -
│ │ │ │ -
221 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
222 inline void field_cast ( const Dune::FieldMatrix<F1,1,1> &f1, Dune::FieldVector< F2, 1 > &f2 )
│ │ │ │ -
223 {
│ │ │ │ -
224 field_cast( f1[ 0 ][ 0 ], f2[ 0 ] );
│ │ │ │ -
225 }
│ │ │ │ -
│ │ │ │ -
226
│ │ │ │ -
227 template< class F2, class F1 >
│ │ │ │ -
│ │ │ │ -
228 inline void field_cast ( const Dune::FieldVector< F1, 1 > &f1, Dune::FieldVector<F2, 1> &f2 )
│ │ │ │ -
229 {
│ │ │ │ -
230 field_cast( f1[ 0 ], f2[ 0 ] );
│ │ │ │ -
231 }
│ │ │ │ -
│ │ │ │ -
232
│ │ │ │ -
233 template< class F2,class V >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
235 {
│ │ │ │ -
236 typedef F2 type;
│ │ │ │ -
237 };
│ │ │ │ -
│ │ │ │ -
238 template< class F2,class F1,int dim >
│ │ │ │ -
│ │ │ │ -
239 struct FieldCast< F2, Dune::FieldVector<F1,dim> >
│ │ │ │ -
240 {
│ │ │ │ -
241 typedef Dune::FieldVector<F2,dim> type;
│ │ │ │ -
242 };
│ │ │ │ -
│ │ │ │ -
243 template< class F2,class F1,int dim1, int dim2>
│ │ │ │ -
│ │ │ │ -
244 struct FieldCast< F2, Dune::FieldMatrix<F1,dim1,dim2> >
│ │ │ │ -
245 {
│ │ │ │ -
246 typedef Dune::FieldMatrix<F2,dim1,dim2> type;
│ │ │ │ -
247 };
│ │ │ │ -
│ │ │ │ -
248 template< class F2,class V >
│ │ │ │ -
│ │ │ │ -
249 inline typename FieldCast<F2,V>::type field_cast ( const V &f1 )
│ │ │ │ -
250 {
│ │ │ │ -
251 typename FieldCast<F2,V>::type f2;
│ │ │ │ -
252 field_cast( f1, f2 );
│ │ │ │ -
253 return f2;
│ │ │ │ -
254 }
│ │ │ │ -
│ │ │ │ -
255
│ │ │ │ -
256
│ │ │ │ -
257 // Precision
│ │ │ │ -
258 // this is not a perfect solution to obtain the
│ │ │ │ -
259 // precision of a field - definition is not clear
│ │ │ │ -
260 // to be removed
│ │ │ │ -
261 // ---------
│ │ │ │ -
262
│ │ │ │ -
263 template <class Field>
│ │ │ │ -
264 struct Precision;
│ │ │ │ -
265
│ │ │ │ -
266 template<>
│ │ │ │ -
│ │ │ │ -
267 struct Precision< double >
│ │ │ │ -
268 {
│ │ │ │ -
269 static const unsigned int value = 64;
│ │ │ │ -
270 };
│ │ │ │ -
│ │ │ │ -
271
│ │ │ │ -
272 template<>
│ │ │ │ -
│ │ │ │ -
273 struct Precision< long double >
│ │ │ │ -
274 {
│ │ │ │ -
275 static const unsigned int value = 80;
│ │ │ │ -
276 };
│ │ │ │ -
│ │ │ │ -
277
│ │ │ │ -
278 template<>
│ │ │ │ -
│ │ │ │ -
279 struct Precision< float >
│ │ │ │ -
280 {
│ │ │ │ -
281 static const unsigned int value = 32;
│ │ │ │ -
282 };
│ │ │ │ -
│ │ │ │ -
283
│ │ │ │ -
284#if HAVE_GMP
│ │ │ │ -
285 template< unsigned int precision >
│ │ │ │ -
286 struct Precision< GMPField< precision > >
│ │ │ │ -
287 {
│ │ │ │ -
288 static const unsigned int value = precision;
│ │ │ │ -
289 };
│ │ │ │ -
290#endif
│ │ │ │ -
291
│ │ │ │ -
292 // ComputeField
│ │ │ │ -
293 // ------------
│ │ │ │ -
294
│ │ │ │ -
295 template <class Field,unsigned int sum>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
297 {
│ │ │ │ -
298 typedef Field Type;
│ │ │ │ -
299 };
│ │ │ │ -
│ │ │ │ -
300
│ │ │ │ -
301#if HAVE_GMP
│ │ │ │ -
302 template< unsigned int precision, unsigned int sum >
│ │ │ │ -
303 struct ComputeField< GMPField< precision >, sum >
│ │ │ │ -
304 {
│ │ │ │ -
305 typedef GMPField<precision+sum> Type;
│ │ │ │ -
306 };
│ │ │ │ -
307#endif
│ │ │ │ -
308} // namespace Dune
│ │ │ │ -
309
│ │ │ │ -
310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH
│ │ │ │ +
│ │ │ │ +
67 unsigned int size () const
│ │ │ │ +
68 {
│ │ │ │ +
69 return basis.size();
│ │ │ │ +
70 }
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
│ │ │ │ +
72 static constexpr GeometryType type ()
│ │ │ │ +
73 {
│ │ │ │ +
74 return GeometryTypes::quadrilateral;
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
77 private:
│ │ │ │ + │ │ │ │ +
79 RT4Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
81 };
│ │ │ │ +
│ │ │ │ +
82}
│ │ │ │ +
83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Field operator-(const Unity< Field > &u, const Field &f)
Definition field.hh:44
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
bool operator<(const Zero< Field > &, const Field &f)
Definition field.hh:119
│ │ │ │ -
bool operator==(const Zero< Field > &, const Field &f)
Definition field.hh:107
│ │ │ │ -
bool operator>(const Zero< Field > &z, const Field &f)
Definition field.hh:131
│ │ │ │ -
Field operator+(const Unity< Field > &u, const Field &f)
Definition field.hh:38
│ │ │ │ -
Field operator/(const Unity< Field > &u, const Field &f)
Definition field.hh:56
│ │ │ │ -
Field operator*(const Unity< Field > &u, const Field &f)
Definition field.hh:50
│ │ │ │ -
A class representing the unit of a given Field.
Definition field.hh:30
│ │ │ │ -
A class representing the zero of a given Field.
Definition field.hh:79
│ │ │ │ -
static const Field epsilon()
Definition field.hh:84
│ │ │ │ -
Definition field.hh:235
│ │ │ │ -
F2 type
Definition field.hh:236
│ │ │ │ -
Dune::FieldVector< F2, dim > type
Definition field.hh:241
│ │ │ │ -
Dune::FieldMatrix< F2, dim1, dim2 > type
Definition field.hh:246
│ │ │ │ -
Definition field.hh:264
│ │ │ │ -
Definition field.hh:297
│ │ │ │ -
Field Type
Definition field.hh:298
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas4cube2d.hh:29
│ │ │ │ +
LocalFiniteElementTraits< RT4Cube2DLocalBasis< D, R >, RT4Cube2DLocalCoefficients, RT4Cube2DLocalInterpolation< RT4Cube2DLocalBasis< D, R > > > Traits
Definition raviartthomas4cube2d.hh:35
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas4cube2d.hh:67
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas4cube2d.hh:56
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas4cube2d.hh:61
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas4cube2d.hh:51
│ │ │ │ +
RT4Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition raviartthomas4cube2d.hh:46
│ │ │ │ +
RT4Cube2DLocalFiniteElement()
Standard constructor.
Definition raviartthomas4cube2d.hh:38
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas4cube2d.hh:72
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas4cube2dlocalbasis.hh:29
│ │ │ │ +
Layout map for Raviart-Thomas-4 elements on quadrilaterals.
Definition raviartthomas4cube2dlocalcoefficients.hh:23
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas4cube2dlocalinterpolation.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,351 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -field.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas4cube2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 14 │ │ │ │ │ -15 // Unity │ │ │ │ │ -16 // ----- │ │ │ │ │ -17 │ │ │ │ │ -28 template< class Field > │ │ │ │ │ -_2_9 struct _U_n_i_t_y │ │ │ │ │ -30 { │ │ │ │ │ -_3_1 operator Field () const │ │ │ │ │ -32 { │ │ │ │ │ -33 return Field( 1 ); │ │ │ │ │ -34 } │ │ │ │ │ -35 }; │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +33 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +34 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_5 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ 36 │ │ │ │ │ -37 template< class Field > │ │ │ │ │ -_3_8 Field _o_p_e_r_a_t_o_r_+_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ -39 { │ │ │ │ │ -40 return (Field)u + f; │ │ │ │ │ -41 } │ │ │ │ │ -42 │ │ │ │ │ -43 template< class Field > │ │ │ │ │ -_4_4 Field _o_p_e_r_a_t_o_r_-_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ -45 { │ │ │ │ │ -46 return (Field)u - f; │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -49 template< class Field > │ │ │ │ │ -_5_0 Field _o_p_e_r_a_t_o_r_*_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ -51 { │ │ │ │ │ -52 return f; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -55 template< class Field > │ │ │ │ │ -_5_6 Field _o_p_e_r_a_t_o_r_/_ ( const _U_n_i_t_y_<_ _F_i_e_l_d_ _> &u, const Field &f ) │ │ │ │ │ +_3_8 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +39 {} │ │ │ │ │ +40 │ │ │ │ │ +_4_6 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +47 basis(s), │ │ │ │ │ +48 interpolation(s) │ │ │ │ │ +49 {} │ │ │ │ │ +50 │ │ │ │ │ +_5_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +52 { │ │ │ │ │ +53 return basis; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +_5_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ 57 { │ │ │ │ │ -58 return (Field)u / f; │ │ │ │ │ +58 return coefficients; │ │ │ │ │ 59 } │ │ │ │ │ 60 │ │ │ │ │ -61 │ │ │ │ │ -62 │ │ │ │ │ -63 // Zero │ │ │ │ │ -64 // ---- │ │ │ │ │ +_6_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +62 { │ │ │ │ │ +63 return interpolation; │ │ │ │ │ +64 } │ │ │ │ │ 65 │ │ │ │ │ -77 template< class Field > │ │ │ │ │ -_7_8 struct _Z_e_r_o │ │ │ │ │ -79 { │ │ │ │ │ -_8_0 operator Field () const │ │ │ │ │ -81 { │ │ │ │ │ -82 return Field( 0 ); │ │ │ │ │ -83 } │ │ │ │ │ -_8_4 static const Field _e_p_s_i_l_o_n() │ │ │ │ │ -85 { │ │ │ │ │ -86 return Field(1e-12); │ │ │ │ │ -87 } │ │ │ │ │ -88 }; │ │ │ │ │ -89 │ │ │ │ │ -90#if HAVE_GMP │ │ │ │ │ -91 template< unsigned int precision > │ │ │ │ │ -92 struct Zero< GMPField< precision > > │ │ │ │ │ -93 { │ │ │ │ │ -94 typedef GMPField< precision > Field; │ │ │ │ │ -95 operator Field () const │ │ │ │ │ -96 { │ │ │ │ │ -97 return Field( 0 ); │ │ │ │ │ -98 } │ │ │ │ │ -99 static const Field _e_p_s_i_l_o_n() │ │ │ │ │ -100 { │ │ │ │ │ -101 return Field(1e-20); │ │ │ │ │ -102 } │ │ │ │ │ -103 }; │ │ │ │ │ -104#endif │ │ │ │ │ -105 │ │ │ │ │ -106 template< class Field > │ │ │ │ │ -_1_0_7 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &, const Field &f ) │ │ │ │ │ -108 { │ │ │ │ │ -109 return ( f < _Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n() && f > -_Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n() ); │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 template< class Field > │ │ │ │ │ -_1_1_3 inline bool _o_p_e_r_a_t_o_r_ _=_=_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z) │ │ │ │ │ -114 { │ │ │ │ │ -115 return ( z == f ); │ │ │ │ │ -116 } │ │ │ │ │ -117 │ │ │ │ │ -118 template< class Field > │ │ │ │ │ -_1_1_9 inline bool _o_p_e_r_a_t_o_r_<_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &, const Field &f ) │ │ │ │ │ -120 { │ │ │ │ │ -121 return f > _Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n(); │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -124 template< class Field > │ │ │ │ │ -_1_2_5 inline bool _o_p_e_r_a_t_o_r_<_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> & ) │ │ │ │ │ -126 { │ │ │ │ │ -127 return f < -_Z_e_r_o_<_F_i_e_l_d_>_:_:_e_p_s_i_l_o_n(); │ │ │ │ │ -128 } │ │ │ │ │ -129 │ │ │ │ │ -130 template< class Field > │ │ │ │ │ -_1_3_1 inline bool _o_p_e_r_a_t_o_r_>_ ( const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z, const Field &f ) │ │ │ │ │ -132 { │ │ │ │ │ -133 return f < z; │ │ │ │ │ -134 } │ │ │ │ │ -135 │ │ │ │ │ -136 template< class Field > │ │ │ │ │ -_1_3_7 inline bool _o_p_e_r_a_t_o_r_>_ ( const Field &f, const _Z_e_r_o_<_ _F_i_e_l_d_ _> &z ) │ │ │ │ │ -138 { │ │ │ │ │ -139 return z < f; │ │ │ │ │ -140 } │ │ │ │ │ -141 │ │ │ │ │ -142 │ │ │ │ │ -143 // field_cast │ │ │ │ │ -144 // ---------- │ │ │ │ │ -145 │ │ │ │ │ -158 template< class F2, class F1 > │ │ │ │ │ -_1_5_9 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, F2 &f2 ) │ │ │ │ │ -160 { │ │ │ │ │ -161 f2 = f1; │ │ │ │ │ -162 } │ │ │ │ │ -163 │ │ │ │ │ -164#if HAVE_GMP │ │ │ │ │ -165 template< unsigned int precision > │ │ │ │ │ -166 inline void _f_i_e_l_d___c_a_s_t ( const Dune::GMPField< precision > &f1, double &f2 │ │ │ │ │ -) │ │ │ │ │ -167 { │ │ │ │ │ -168 f2 = f1.get_d(); │ │ │ │ │ -169 } │ │ │ │ │ -170 │ │ │ │ │ -171 template< unsigned int precision > │ │ │ │ │ -172 inline void _f_i_e_l_d___c_a_s_t ( const Dune::GMPField< precision > &f1, long double │ │ │ │ │ -&f2 ) │ │ │ │ │ -173 { │ │ │ │ │ -174 f2 = f1.get_d(); │ │ │ │ │ -175 } │ │ │ │ │ -176#endif │ │ │ │ │ -177 │ │ │ │ │ -178 template< class F2, class F1, int dim > │ │ │ │ │ -_1_7_9 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, dim > &f1, Dune:: │ │ │ │ │ -FieldVector< F2, dim > &f2 ) │ │ │ │ │ -180 { │ │ │ │ │ -181 for( int d = 0; d < dim; ++d ) │ │ │ │ │ -182 _f_i_e_l_d___c_a_s_t( f1[ d ], f2[ d ] ); │ │ │ │ │ -183 } │ │ │ │ │ -184 template< class F2, class F1 > │ │ │ │ │ -_1_8_5 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, 1 > &f1, F2 &f2 ) │ │ │ │ │ -186 { │ │ │ │ │ -187 _f_i_e_l_d___c_a_s_t( f1[ 0 ], f2 ); │ │ │ │ │ -188 } │ │ │ │ │ -189 template< class F2, class F1 > │ │ │ │ │ -_1_9_0 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, Dune::FieldVector< F2, 1 > &f2 ) │ │ │ │ │ -191 { │ │ │ │ │ -192 _f_i_e_l_d___c_a_s_t( f1, f2[ 0 ] ); │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -195 template< class F2, class F1, int rdim, int cdim > │ │ │ │ │ -_1_9_6 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix< F1, rdim, cdim > &f1, │ │ │ │ │ -Dune::FieldMatrix< F2, rdim, cdim > &f2 ) │ │ │ │ │ -197 { │ │ │ │ │ -198 for( int r = 0; r < rdim; ++r ) │ │ │ │ │ -199 _f_i_e_l_d___c_a_s_t( f1[ r ], f2[ r ] ); │ │ │ │ │ -200 } │ │ │ │ │ -201 template< class F2, class F1 > │ │ │ │ │ -_2_0_2 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix &f1, Dune:: │ │ │ │ │ -FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ -203 { │ │ │ │ │ -204 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2[ 0 ][ 0 ] ); │ │ │ │ │ -205 } │ │ │ │ │ -206 template< class F2, class F1 > │ │ │ │ │ -_2_0_7 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix< F1, 1,1 > &f1, F2 &f2 ) │ │ │ │ │ -208 { │ │ │ │ │ -209 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2 ); │ │ │ │ │ -210 } │ │ │ │ │ -211 template< class F2, class F1 > │ │ │ │ │ -_2_1_2 inline void _f_i_e_l_d___c_a_s_t ( const F1 &f1, Dune::FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ -213 { │ │ │ │ │ -214 _f_i_e_l_d___c_a_s_t( f1, f2[ 0 ][ 0 ] ); │ │ │ │ │ -215 } │ │ │ │ │ -216 template< class F2, class F1 > │ │ │ │ │ -_2_1_7 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector &f1, Dune:: │ │ │ │ │ -FieldMatrix< F2, 1,1 > &f2 ) │ │ │ │ │ -218 { │ │ │ │ │ -219 _f_i_e_l_d___c_a_s_t( f1[ 0 ], f2[ 0 ][ 0 ] ); │ │ │ │ │ -220 } │ │ │ │ │ -221 template< class F2, class F1 > │ │ │ │ │ -_2_2_2 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldMatrix &f1, Dune:: │ │ │ │ │ -FieldVector< F2, 1 > &f2 ) │ │ │ │ │ -223 { │ │ │ │ │ -224 _f_i_e_l_d___c_a_s_t( f1[ 0 ][ 0 ], f2[ 0 ] ); │ │ │ │ │ -225 } │ │ │ │ │ -226 │ │ │ │ │ -227 template< class F2, class F1 > │ │ │ │ │ -_2_2_8 inline void _f_i_e_l_d___c_a_s_t ( const Dune::FieldVector< F1, 1 > &f1, Dune:: │ │ │ │ │ -FieldVector &f2 ) │ │ │ │ │ -229 { │ │ │ │ │ -230 _f_i_e_l_d___c_a_s_t( f1[ 0 ], f2[ 0 ] ); │ │ │ │ │ -231 } │ │ │ │ │ -232 │ │ │ │ │ -233 template< class F2,class V > │ │ │ │ │ -_2_3_4 struct _F_i_e_l_d_C_a_s_t │ │ │ │ │ -235 { │ │ │ │ │ -_2_3_6 typedef F2 _t_y_p_e; │ │ │ │ │ -237 }; │ │ │ │ │ -238 template< class F2,class F1,int dim > │ │ │ │ │ -_2_3_9 struct _F_i_e_l_d_C_a_s_t< F2, _D_u_n_e::FieldVector > │ │ │ │ │ -240 { │ │ │ │ │ -_2_4_1 typedef Dune::FieldVector _t_y_p_e; │ │ │ │ │ -242 }; │ │ │ │ │ -243 template< class F2,class F1,int dim1, int dim2> │ │ │ │ │ -_2_4_4 struct _F_i_e_l_d_C_a_s_t< F2, _D_u_n_e::FieldMatrix > │ │ │ │ │ -245 { │ │ │ │ │ -_2_4_6 typedef Dune::FieldMatrix _t_y_p_e; │ │ │ │ │ -247 }; │ │ │ │ │ -248 template< class F2,class V > │ │ │ │ │ -_2_4_9 inline typename _F_i_e_l_d_C_a_s_t_<_F_2_,_V_>_:_:_t_y_p_e _f_i_e_l_d___c_a_s_t ( const V &f1 ) │ │ │ │ │ -250 { │ │ │ │ │ -251 typename _F_i_e_l_d_C_a_s_t_<_F_2_,_V_>_:_:_t_y_p_e f2; │ │ │ │ │ -252 _f_i_e_l_d___c_a_s_t( f1, f2 ); │ │ │ │ │ -253 return f2; │ │ │ │ │ -254 } │ │ │ │ │ -255 │ │ │ │ │ -256 │ │ │ │ │ -257 // Precision │ │ │ │ │ -258 // this is not a perfect solution to obtain the │ │ │ │ │ -259 // precision of a field - definition is not clear │ │ │ │ │ -260 // to be removed │ │ │ │ │ -261 // --------- │ │ │ │ │ -262 │ │ │ │ │ -263 template │ │ │ │ │ -_2_6_4 struct _P_r_e_c_i_s_i_o_n; │ │ │ │ │ -265 │ │ │ │ │ -266 template<> │ │ │ │ │ -_2_6_7 struct _P_r_e_c_i_s_i_o_n< double > │ │ │ │ │ -268 { │ │ │ │ │ -_2_6_9 static const unsigned int value = 64; │ │ │ │ │ -270 }; │ │ │ │ │ -271 │ │ │ │ │ -272 template<> │ │ │ │ │ -_2_7_3 struct _P_r_e_c_i_s_i_o_n< long double > │ │ │ │ │ -274 { │ │ │ │ │ -_2_7_5 static const unsigned int value = 80; │ │ │ │ │ -276 }; │ │ │ │ │ -277 │ │ │ │ │ -278 template<> │ │ │ │ │ -_2_7_9 struct _P_r_e_c_i_s_i_o_n< float > │ │ │ │ │ -280 { │ │ │ │ │ -_2_8_1 static const unsigned int value = 32; │ │ │ │ │ -282 }; │ │ │ │ │ -283 │ │ │ │ │ -284#if HAVE_GMP │ │ │ │ │ -285 template< unsigned int precision > │ │ │ │ │ -286 struct _P_r_e_c_i_s_i_o_n< GMPField< precision > > │ │ │ │ │ -287 { │ │ │ │ │ -288 static const unsigned int value = precision; │ │ │ │ │ -289 }; │ │ │ │ │ -290#endif │ │ │ │ │ -291 │ │ │ │ │ -292 // ComputeField │ │ │ │ │ -293 // ------------ │ │ │ │ │ -294 │ │ │ │ │ -295 template │ │ │ │ │ -_2_9_6 struct _C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ -297 { │ │ │ │ │ -_2_9_8 typedef Field _T_y_p_e; │ │ │ │ │ -299 }; │ │ │ │ │ -300 │ │ │ │ │ -301#if HAVE_GMP │ │ │ │ │ -302 template< unsigned int precision, unsigned int sum > │ │ │ │ │ -303 struct _C_o_m_p_u_t_e_F_i_e_l_d< GMPField< precision >, sum > │ │ │ │ │ -304 { │ │ │ │ │ -305 typedef GMPField _T_y_p_e; │ │ │ │ │ -306 }; │ │ │ │ │ -307#endif │ │ │ │ │ -308} // namespace Dune │ │ │ │ │ -309 │ │ │ │ │ -310#endif // #ifndef DUNE_LOCALFUNCTIONS_UTILITY_FIELD_HH │ │ │ │ │ +_6_7 unsigned int _s_i_z_e () const │ │ │ │ │ +68 { │ │ │ │ │ +69 return basis.size(); │ │ │ │ │ +70 } │ │ │ │ │ +71 │ │ │ │ │ +_7_2 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +73 { │ │ │ │ │ +74 return GeometryTypes::quadrilateral; │ │ │ │ │ +75 } │ │ │ │ │ +76 │ │ │ │ │ +77 private: │ │ │ │ │ +78 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +79 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +80 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +81 }; │ │ │ │ │ +82} │ │ │ │ │ +83#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_- │ │ │ │ │ -Field operator-(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_< │ │ │ │ │ -bool operator<(const Zero< Field > &, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_=_= │ │ │ │ │ -bool operator==(const Zero< Field > &, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_> │ │ │ │ │ -bool operator>(const Zero< Field > &z, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_+ │ │ │ │ │ -Field operator+(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_/ │ │ │ │ │ -Field operator/(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_o_p_e_r_a_t_o_r_* │ │ │ │ │ -Field operator*(const Unity< Field > &u, const Field &f) │ │ │ │ │ -DDeeffiinniittiioonn field.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_U_n_i_t_y │ │ │ │ │ -A class representing the unit of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o │ │ │ │ │ -A class representing the zero of a given Field. │ │ │ │ │ -DDeeffiinniittiioonn field.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_Z_e_r_o_:_:_e_p_s_i_l_o_n │ │ │ │ │ -static const Field epsilon() │ │ │ │ │ -DDeeffiinniittiioonn field.hh:84 │ │ │ │ │ -_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t │ │ │ │ │ -DDeeffiinniittiioonn field.hh:235 │ │ │ │ │ -_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_:_:_t_y_p_e │ │ │ │ │ -F2 type │ │ │ │ │ -DDeeffiinniittiioonn field.hh:236 │ │ │ │ │ -_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_ _F_1_,_ _d_i_m_ _>_ _>_:_:_t_y_p_e │ │ │ │ │ -Dune::FieldVector< F2, dim > type │ │ │ │ │ -DDeeffiinniittiioonn field.hh:241 │ │ │ │ │ -_D_u_n_e_:_:_F_i_e_l_d_C_a_s_t_<_ _F_2_,_ _D_u_n_e_:_:_F_i_e_l_d_M_a_t_r_i_x_<_ _F_1_,_ _d_i_m_1_,_ _d_i_m_2_ _>_ _>_:_:_t_y_p_e │ │ │ │ │ -Dune::FieldMatrix< F2, dim1, dim2 > type │ │ │ │ │ -DDeeffiinniittiioonn field.hh:246 │ │ │ │ │ -_D_u_n_e_:_:_P_r_e_c_i_s_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn field.hh:264 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d │ │ │ │ │ -DDeeffiinniittiioonn field.hh:297 │ │ │ │ │ -_D_u_n_e_:_:_C_o_m_p_u_t_e_F_i_e_l_d_:_:_T_y_p_e │ │ │ │ │ -Field Type │ │ │ │ │ -DDeeffiinniittiioonn field.hh:298 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT4Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT4Cube2DLocalCoefficients, RT4Cube2DLocalInterpolation< RT4Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:51 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT4Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT4Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisprint.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
basisprint.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas1cube3d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/utility/multiindex.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas1cube3d/raviartthomas1cube3dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas1cube3d/raviartthomas1cube3dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas1cube3d/raviartthomas1cube3dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT1Cube3DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

template<int deriv, class BasisFactory , class PrintField , GeometryType::Id geometryId>
void Dune::basisPrint (std::ostream &out, typename BasisFactory::Object &basis)
 
template<int deriv, class BasisFactory , class PrintField = typename BasisFactory::StorageField>
void Dune::basisPrint (std::ostream &out, typename BasisFactory::Key &key)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -basisprint.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas1cube3d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ -template │ │ │ │ │ -void  _D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t (std::ostream &out, typename BasisFactory::Object │ │ │ │ │ - &basis) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -void  _D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t (std::ostream &out, typename BasisFactory::Key &key) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00203_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: basisprint.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,105 +70,123 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
basisprint.hh
│ │ │ │ +
raviartthomas1cube3d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef BASISPRINT
│ │ │ │ -
6#define BASISPRINT
│ │ │ │ - │ │ │ │ - │ │ │ │ -
9namespace Dune {
│ │ │ │ -
10 /**********************************************
│ │ │ │ -
11 * Methods for printing a PolynomialBasis.
│ │ │ │ -
12 * Is achieved by using the MultiIndex class as
│ │ │ │ -
13 * Field type and printing the results.
│ │ │ │ -
14 * The basis and higher order derivatives can be
│ │ │ │ -
15 * printed. This could be the basis for printing
│ │ │ │ -
16 * routings providing C++ or matlab methods
│ │ │ │ -
17 * for computing the basisfunctions for given
│ │ │ │ -
18 * orders or reference elements.
│ │ │ │ -
19 **********************************************/
│ │ │ │ -
20 // default argument does not work for gcc 4.1.2
│ │ │ │ -
21 // template <int deriv,class BasisFactory,class PrintField=typename BasisFactory::StorageField>
│ │ │ │ -
22 template <int deriv,class BasisFactory,class PrintField,GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
23 void basisPrint(std::ostream &out,
│ │ │ │ -
24 typename BasisFactory::Object &basis)
│ │ │ │ -
25 {
│ │ │ │ -
26 typedef typename BasisFactory::Object Basis;
│ │ │ │ -
27 const int dimension = Basis::dimension;
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │
28
│ │ │ │ - │ │ │ │ -
30 typedef typename BasisFactory::template EvaluationBasisFactory<dimension,Field>::Type
│ │ │ │ -
31 MIBasisFactory;
│ │ │ │ -
32 typedef typename MIBasisFactory::Object MIBasis;
│ │ │ │ -
33 typedef typename Basis::CoefficientMatrix CMatrix;
│ │ │ │ -
34 typedef PolynomialBasis<StandardEvaluator<MIBasis>, CMatrix > PrintBasis;
│ │ │ │ -
35
│ │ │ │ -
36 MIBasis *miBasis = MIBasisFactory::template create<geometryId>( basis.basis().order());
│ │ │ │ -
37 PrintBasis printBasis(*miBasis,basis.matrix(),basis.size());
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │
38
│ │ │ │ -
39 unsigned int size = printBasis.size();
│ │ │ │ -
40
│ │ │ │ -
41 out << "% Number of base functions: " << size << std::endl;
│ │ │ │ -
42 out << "% Derivative order: " << deriv << std::endl;
│ │ │ │ -
43
│ │ │ │ -
44 std::vector< FieldVector<
│ │ │ │ -
45 FieldVector<Field,LFETensor<Field,dimension,deriv>::size>,
│ │ │ │ -
46 PrintBasis::dimRange> > y( size );
│ │ │ │ -
47
│ │ │ │ -
48 FieldVector< Field, dimension > x;
│ │ │ │ -
49 for( int i = 0; i < dimension; ++i )
│ │ │ │ -
50 x[ i ].set( i, 1 );
│ │ │ │ -
51 printBasis.template evaluateSingle<deriv>( x, y );
│ │ │ │ -
52 for (unsigned int i=0; i<size; ++i)
│ │ │ │ -
53 {
│ │ │ │ -
54 out << "$\\varphi_" << i << "(a,b,c)$&$=$&$" << std::endl;
│ │ │ │ -
55 out << "( ";
│ │ │ │ -
56 for (unsigned int r=0; r<PrintBasis::dimRange; ++r)
│ │ │ │ -
57 out << y[i][r] << (r<PrintBasis::dimRange-1 ? " , $ \\\\ && $" : " )$ \\\\");
│ │ │ │ -
58 out << std::endl;
│ │ │ │ -
59 }
│ │ │ │ -
60 MIBasisFactory::release(miBasis);
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
63 template <int deriv,class BasisFactory,class PrintField=typename BasisFactory::StorageField>
│ │ │ │ -
│ │ │ │ -
64 void basisPrint(std::ostream &out,
│ │ │ │ -
65 typename BasisFactory::Key &key)
│ │ │ │ -
66 {
│ │ │ │ -
67 typename BasisFactory::Object *basis = BasisFactory::create(key);
│ │ │ │ -
68 basisPrint<deriv,BasisFactory,PrintField>(out,*basis);
│ │ │ │ -
69 BasisFactory::release(basis);
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ -
71}
│ │ │ │ -
72
│ │ │ │ -
73
│ │ │ │ -
74#endif // BASISPRINT
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 basis(s),
│ │ │ │ +
46 interpolation(s)
│ │ │ │ +
47 {}
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
50 {
│ │ │ │ +
51 return basis;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return coefficients;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60 {
│ │ │ │ +
61 return interpolation;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
65 unsigned int size () const
│ │ │ │ +
66 {
│ │ │ │ +
67 return basis.size();
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::hexahedron;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT1Cube3DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void basisPrint(std::ostream &out, typename BasisFactory::Object &basis)
Definition basisprint.hh:23
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on cubes.
Definition raviartthomas1cube3d.hh:27
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas1cube3d.hh:59
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas1cube3d.hh:54
│ │ │ │ +
RT1Cube3DLocalFiniteElement()
Standard constructor.
Definition raviartthomas1cube3d.hh:36
│ │ │ │ +
RT1Cube3DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 64.
Definition raviartthomas1cube3d.hh:44
│ │ │ │ +
LocalFiniteElementTraits< RT1Cube3DLocalBasis< D, R >, RT1Cube3DLocalCoefficients, RT1Cube3DLocalInterpolation< RT1Cube3DLocalBasis< D, R > > > Traits
Definition raviartthomas1cube3d.hh:33
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas1cube3d.hh:65
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas1cube3d.hh:70
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas1cube3d.hh:49
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas1cube3dlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on quadrilaterals.
Definition raviartthomas1cube3dlocalcoefficients.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas1cube3dlocalinterpolation.hh:25
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,103 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _u_t_i_l_i_t_y │ │ │ │ │ -basisprint.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas1cube3d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef BASISPRINT │ │ │ │ │ -6#define BASISPRINT │ │ │ │ │ -7#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_u_l_t_i_i_n_d_e_x_._h_h> │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -9namespace _D_u_n_e { │ │ │ │ │ -10 /********************************************** │ │ │ │ │ -11 * Methods for printing a PolynomialBasis. │ │ │ │ │ -12 * Is achieved by using the MultiIndex class as │ │ │ │ │ -13 * Field type and printing the results. │ │ │ │ │ -14 * The basis and higher order derivatives can be │ │ │ │ │ -15 * printed. This could be the basis for printing │ │ │ │ │ -16 * routings providing C++ or matlab methods │ │ │ │ │ -17 * for computing the basisfunctions for given │ │ │ │ │ -18 * orders or reference elements. │ │ │ │ │ -19 **********************************************/ │ │ │ │ │ -20 // default argument does not work for gcc 4.1.2 │ │ │ │ │ -21 // template │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 void _b_a_s_i_s_P_r_i_n_t(std::ostream &out, │ │ │ │ │ -24 typename BasisFactory::Object &basis) │ │ │ │ │ -25 { │ │ │ │ │ -26 typedef typename BasisFactory::Object Basis; │ │ │ │ │ -27 const int dimension = Basis::dimension; │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 { │ │ │ │ │ 28 │ │ │ │ │ -29 typedef _M_u_l_t_i_I_n_d_e_x_<_ _d_i_m_e_n_s_i_o_n_,_ _P_r_i_n_t_F_i_e_l_d_ _> Field; │ │ │ │ │ -30 typedef typename BasisFactory::template │ │ │ │ │ -EvaluationBasisFactory::Type │ │ │ │ │ -31 MIBasisFactory; │ │ │ │ │ -32 typedef typename MIBasisFactory::Object MIBasis; │ │ │ │ │ -33 typedef typename Basis::CoefficientMatrix CMatrix; │ │ │ │ │ -34 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_<_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_M_I_B_a_s_i_s_>, CMatrix > PrintBasis; │ │ │ │ │ -35 │ │ │ │ │ -36 MIBasis *miBasis = MIBasisFactory::template create( basis.basis │ │ │ │ │ -().order()); │ │ │ │ │ -37 PrintBasis printBasis(*miBasis,basis.matrix(),basis.size()); │ │ │ │ │ +29 public: │ │ │ │ │ +30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +31 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +32 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_3 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +37 {} │ │ │ │ │ 38 │ │ │ │ │ -39 unsigned int size = printBasis.size(); │ │ │ │ │ -40 │ │ │ │ │ -41 out << "% Number of base functions: " << size << std::endl; │ │ │ │ │ -42 out << "% Derivative order: " << deriv << std::endl; │ │ │ │ │ -43 │ │ │ │ │ -44 std::vector< FieldVector< │ │ │ │ │ -45 FieldVector::size>, │ │ │ │ │ -46 PrintBasis::dimRange> > y( size ); │ │ │ │ │ -47 │ │ │ │ │ -48 FieldVector< Field, dimension > x; │ │ │ │ │ -49 for( int i = 0; i < dimension; ++i ) │ │ │ │ │ -50 x[ i ].set( i, 1 ); │ │ │ │ │ -51 printBasis.template evaluateSingle( x, y ); │ │ │ │ │ -52 for (unsigned int i=0; i │ │ │ │ │ -_6_4 void _b_a_s_i_s_P_r_i_n_t(std::ostream &out, │ │ │ │ │ -65 typename BasisFactory::Key &key) │ │ │ │ │ +_4_4 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +45 basis(s), │ │ │ │ │ +46 interpolation(s) │ │ │ │ │ +47 {} │ │ │ │ │ +48 │ │ │ │ │ +_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +50 { │ │ │ │ │ +51 return basis; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return coefficients; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_5_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +60 { │ │ │ │ │ +61 return interpolation; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 unsigned int _s_i_z_e () const │ │ │ │ │ 66 { │ │ │ │ │ -67 typename BasisFactory::Object *basis = BasisFactory::create(key); │ │ │ │ │ -68 basisPrint(out,*basis); │ │ │ │ │ -69 BasisFactory::release(basis); │ │ │ │ │ -70 } │ │ │ │ │ -71} │ │ │ │ │ -72 │ │ │ │ │ -73 │ │ │ │ │ -74#endif // BASISPRINT │ │ │ │ │ -_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_m_u_l_t_i_i_n_d_e_x_._h_h │ │ │ │ │ +67 return basis.size(); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +71 { │ │ │ │ │ +72 return GeometryTypes::hexahedron; │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 private: │ │ │ │ │ +76 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +77 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +78 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +79 }; │ │ │ │ │ +80} │ │ │ │ │ +81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_b_a_s_i_s_P_r_i_n_t │ │ │ │ │ -void basisPrint(std::ostream &out, typename BasisFactory::Object &basis) │ │ │ │ │ -DDeeffiinniittiioonn basisprint.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT1Cube3DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT1Cube3DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT1Cube3DLocalBasis< D, R >, │ │ │ │ │ +RT1Cube3DLocalCoefficients, RT1Cube3DLocalInterpolation< RT1Cube3DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas02dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/raviartthomas/raviartthomascube.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomassimplex.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas02d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas12d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas03d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas0cube2d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas1cube2d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas2cube2d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas3cube2d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas0cube3d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas1cube3d.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas0pyramid.hh>
│ │ │ │ -#include <dune/localfunctions/raviartthomas/raviartthomas0prism.hh>
│ │ │ │ +
#include <cmath>
│ │ │ │ +#include <array>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT02DLocalInterpolation< LB >
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -raviartthomas.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_c_u_b_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00206_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,59 +70,97 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas.hh
│ │ │ │ +
raviartthomas02dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMASFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8// Raviart-Thomas implementations with run-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12// Raviart-Thomas implementations with compile-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25#endif // #ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Convenience header that includes all available Raviart-Thomas local finite elements for cubes.
│ │ │ │ - │ │ │ │ +
8#include <cmath>
│ │ │ │ +
9#include <array>
│ │ │ │ +
10#include <bitset>
│ │ │ │ +
11#include <vector>
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
19 public:
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ +
22 RT02DLocalInterpolation (std::bitset<3> s = 0)
│ │ │ │ +
23 {
│ │ │ │ +
24 using std::sqrt;
│ │ │ │ +
25 for (std::size_t i=0; i<sign_.size(); i++)
│ │ │ │ +
26 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
27
│ │ │ │ +
28 m_[0] = {0.5, 0.0};
│ │ │ │ +
29 m_[1] = {0.0, 0.5};
│ │ │ │ +
30 m_[2] = {0.5, 0.5};
│ │ │ │ +
31 n_[0] = {0.0, -1.0};
│ │ │ │ +
32 n_[1] = {-1.0, 0.0};
│ │ │ │ +
33 n_[2] = {1.0/sqrt(2.0), 1.0/sqrt(2.0)};
│ │ │ │ +
34 c_[0] = ( 0.5*n_[0][0] - 1.0*n_[0][1]);
│ │ │ │ +
35 c_[1] = (-1.0*n_[1][0] + 0.5*n_[1][1]);
│ │ │ │ +
36 c_[2] = ( 0.5*n_[2][0] + 0.5*n_[2][1]);
│ │ │ │ +
37 }
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
39 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
40 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
41 {
│ │ │ │ +
42 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
43 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
44
│ │ │ │ +
45 out.resize(3);
│ │ │ │ +
46
│ │ │ │ +
47 for (int i=0; i<3; i++)
│ │ │ │ +
48 {
│ │ │ │ +
49 auto y = f(m_[i]);
│ │ │ │ +
50 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1])*sign_[i]/c_[i];
│ │ │ │ +
51 }
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 // Edge orientations
│ │ │ │ +
56 std::array<typename LB::Traits::RangeFieldType,3> sign_;
│ │ │ │ +
57 // Edge midpoints of the reference triangle
│ │ │ │ +
58 std::array<typename LB::Traits::DomainType,3> m_;
│ │ │ │ +
59 // Unit outer normals of the reference triangle
│ │ │ │ +
60 std::array<typename LB::Traits::DomainType,3> n_;
│ │ │ │ +
61 // Inverse triangle edge length
│ │ │ │ +
62 std::array<typename LB::Traits::RangeFieldType,3> c_;
│ │ │ │ +
63 };
│ │ │ │ +
│ │ │ │ +
64}
│ │ │ │ +
65
│ │ │ │ +
66#endif
│ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Definition raviartthomas02dlocalinterpolation.hh:18
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas02dlocalinterpolation.hh:40
│ │ │ │ +
RT02DLocalInterpolation(std::bitset< 3 > s=0)
Constructor with given set of edge orientations.
Definition raviartthomas02dlocalinterpolation.hh:22
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,53 +1,91 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -raviartthomas.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ +raviartthomas02dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8// Raviart-Thomas implementations with run-time order │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_c_u_b_e_._h_h> │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12// Raviart-Thomas implementations with compile-time order │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h> │ │ │ │ │ -22#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -23#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_._h_h> │ │ │ │ │ -24 │ │ │ │ │ -25#endif // #ifndef DUNE_RAVIARTTHOMASFINITEELEMENT_HH │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_c_u_b_e_._h_h │ │ │ │ │ -Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ -elements for cubes. │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_._h_h │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 public: │ │ │ │ │ +20 │ │ │ │ │ +_2_2 _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<3> s = 0) │ │ │ │ │ +23 { │ │ │ │ │ +24 using std::sqrt; │ │ │ │ │ +25 for (std::size_t i=0; i │ │ │ │ │ +_4_0 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +41 { │ │ │ │ │ +42 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +43 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +44 │ │ │ │ │ +45 out.resize(3); │ │ │ │ │ +46 │ │ │ │ │ +47 for (int i=0; i<3; i++) │ │ │ │ │ +48 { │ │ │ │ │ +49 auto y = f(m_[i]); │ │ │ │ │ +50 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1])*sign_[i]/c_[i]; │ │ │ │ │ +51 } │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 // Edge orientations │ │ │ │ │ +56 std::array sign_; │ │ │ │ │ +57 // Edge midpoints of the reference triangle │ │ │ │ │ +58 std::array m_; │ │ │ │ │ +59 // Unit outer normals of the reference triangle │ │ │ │ │ +60 std::array n_; │ │ │ │ │ +61 // Inverse triangle edge length │ │ │ │ │ +62 std::array c_; │ │ │ │ │ +63 }; │ │ │ │ │ +64} │ │ │ │ │ +65 │ │ │ │ │ +66#endif │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT02DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ +Constructor with given set of edge orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:22 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,25 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini.hh File Reference
│ │ │ │ +
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas02dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinicube.hh>
│ │ │ │ -#include <dune/localfunctions/brezzidouglasmarini/brezzidouglasmarinisimplex.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT02DLocalCoefficients
 Layout map for RT0 elements. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Namespaces

namespace  Dune
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,13 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -brezzidouglasmarini.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/ │ │ │ │ │ -_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for RT0 elements. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +NNaammeessppaacceess │ │ │ │ │ +namespace   _D_u_n_e │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00209_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: brezzidouglasmarini.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,35 +70,78 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
brezzidouglasmarini.hh
│ │ │ │ +
raviartthomas02dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ +
5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8// BDM implementations with compile-time order
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <vector>
│ │ │ │
11
│ │ │ │ -
12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i=0; i<3; i++)
│ │ │ │ +
30 li[i] = LocalKey(i,1,0);
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ +
34 std::size_t size () const
│ │ │ │ +
35 {
│ │ │ │ +
36 return 3;
│ │ │ │ +
37 }
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
40 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
41 {
│ │ │ │ +
42 return li[i];
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45 private:
│ │ │ │ +
46 std::vector<LocalKey> li;
│ │ │ │ +
47 };
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49}
│ │ │ │ +
50
│ │ │ │ +
51#endif
│ │ │ │ + │ │ │ │ +
Definition bdfmcube.hh:18
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for RT0 elements.
Definition raviartthomas02dlocalcoefficients.hh:24
│ │ │ │ +
RT02DLocalCoefficients()
Standard constructor.
Definition raviartthomas02dlocalcoefficients.hh:27
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas02dlocalcoefficients.hh:40
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas02dlocalcoefficients.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,26 +1,76 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -brezzidouglasmarini.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ +raviartthomas02dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ +5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8// BDM implementations with compile-time order │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h> │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_/ │ │ │ │ │ -_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12#endif // #ifndef DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI_HH │ │ │ │ │ -_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_c_u_b_e_._h_h │ │ │ │ │ -_b_r_e_z_z_i_d_o_u_g_l_a_s_m_a_r_i_n_i_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +_2_3 class _R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(3) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i=0; i<3; i++) │ │ │ │ │ +30 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +31 } │ │ │ │ │ +32 │ │ │ │ │ +_3_4 std::size_t _s_i_z_e () const │ │ │ │ │ +35 { │ │ │ │ │ +36 return 3; │ │ │ │ │ +37 } │ │ │ │ │ +38 │ │ │ │ │ +_4_0 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +41 { │ │ │ │ │ +42 return li[i]; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +45 private: │ │ │ │ │ +46 std::vector li; │ │ │ │ │ +47 }; │ │ │ │ │ +48 │ │ │ │ │ +49} │ │ │ │ │ +50 │ │ │ │ │ +51#endif │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_D_u_n_e │ │ │ │ │ +DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT02DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:34 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: crouzeixraviart.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
crouzeixraviart.hh File Reference
│ │ │ │ +
raviartthomas02dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ #include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::CrouzeixRaviartLocalFiniteElement< D, R, dim >
 Crouzeix-Raviart finite element. More...
class  Dune::RT02DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -crouzeixraviart.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │ -  Crouzeix-Raviart finite element. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00212_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: crouzeixraviart.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas02dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,234 +70,138 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
crouzeixraviart.hh
│ │ │ │ +
raviartthomas02dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH
│ │ │ │ +
5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ +
6#define DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │
13
│ │ │ │ -
14#include <dune/geometry/type.hh>
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune { namespace Impl
│ │ │ │ -
23{
│ │ │ │ -
30 template<class D, class R, unsigned int dim>
│ │ │ │ -
31 class CrouzeixRaviartLocalBasis
│ │ │ │ -
32 {
│ │ │ │ -
33 public:
│ │ │ │ -
34 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,R,1,FieldVector<R,1>,FieldMatrix<R,1,dim> >;
│ │ │ │ -
35
│ │ │ │ -
38 static constexpr unsigned int size ()
│ │ │ │ -
39 {
│ │ │ │ -
40 return dim+1;
│ │ │ │ -
41 }
│ │ │ │ -
42
│ │ │ │ -
44 void evaluateFunction(const typename Traits::DomainType& x,
│ │ │ │ -
45 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
46 {
│ │ │ │ -
47 out.resize(size());
│ │ │ │ -
48
│ │ │ │ -
49 std::fill(out.begin(), out.end()-1, 1.0);
│ │ │ │ -
50 out.back() = 1.0-dim;
│ │ │ │ -
51
│ │ │ │ -
52 for (unsigned int i=0; i<dim; i++)
│ │ │ │ -
53 {
│ │ │ │ -
54 out[i] -= dim * x[dim-i-1];
│ │ │ │ -
55 out.back() += dim*x[i];
│ │ │ │ -
56 }
│ │ │ │ -
57 }
│ │ │ │ -
58
│ │ │ │ -
64 void evaluateJacobian(const typename Traits::DomainType& x,
│ │ │ │ -
65 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
66 {
│ │ │ │ -
67 out.resize(size());
│ │ │ │ -
68
│ │ │ │ -
69 for (unsigned i=0; i<dim; i++)
│ │ │ │ -
70 for (unsigned j=0; j<dim; j++)
│ │ │ │ -
71 out[i][0][j] = (i==(dim-1-j)) ? -(double)dim : 0;
│ │ │ │ -
72
│ │ │ │ -
73 std::fill(out.back()[0].begin(), out.back()[0].end(), dim);
│ │ │ │ -
74 }
│ │ │ │ -
75
│ │ │ │ -
82 void partial(const std::array<unsigned int,dim>& order,
│ │ │ │ -
83 const typename Traits::DomainType& in,
│ │ │ │ -
84 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
85 {
│ │ │ │ -
86 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
87
│ │ │ │ -
88 out.resize(size());
│ │ │ │ -
89
│ │ │ │ -
90 if (totalOrder == 0) {
│ │ │ │ -
91 evaluateFunction(in, out);
│ │ │ │ -
92 return;
│ │ │ │ -
93 }
│ │ │ │ -
94
│ │ │ │ -
95 if (totalOrder==1)
│ │ │ │ -
96 {
│ │ │ │ -
97 auto direction = std::find(order.begin(), order.end(), 1)-order.begin();
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
24 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
29 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
30
│ │ │ │ +
│ │ │ │ +
32 RT02DLocalBasis (std::bitset<3> s = 0)
│ │ │ │ +
33 {
│ │ │ │ +
34 for (int i=0; i<3; i++)
│ │ │ │ +
35 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
36 }
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 unsigned int size () const
│ │ │ │ +
40 {
│ │ │ │ +
41 return 3;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
46 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
47 {
│ │ │ │ +
48 out.resize(3);
│ │ │ │ +
49 out[0] = {sign_[0]*in[0], sign_[0]*(in[1]-D(1))};
│ │ │ │ +
50 out[1] = {sign_[1]*(in[0]-D(1)), sign_[1]*in[1]};
│ │ │ │ +
51 out[2] = {sign_[2]*in[0], sign_[2]*in[1]};
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
55 inline void
│ │ │ │ +
│ │ │ │ +
56 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
57 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
58 {
│ │ │ │ +
59 out.resize(3);
│ │ │ │ +
60 for (int i=0; i<3; i++)
│ │ │ │ +
61 {
│ │ │ │ +
62 out[i][0] = {sign_[i], 0};
│ │ │ │ +
63 out[i][1] = { 0, sign_[i]};
│ │ │ │ +
64 }
│ │ │ │ +
65 }
│ │ │ │ +
│ │ │ │ +
66
│ │ │ │ +
│ │ │ │ +
68 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
69 const typename Traits::DomainType& in, // position
│ │ │ │ +
70 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
71 {
│ │ │ │ +
72 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
73 if (totalOrder == 0) {
│ │ │ │ +
74 evaluateFunction(in, out);
│ │ │ │ +
75 } else if (totalOrder == 1) {
│ │ │ │ +
76 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
77 out.resize(size());
│ │ │ │ +
78
│ │ │ │ +
79 for (int i=0; i<3; i++)
│ │ │ │ +
80 {
│ │ │ │ +
81 out[i][direction] = sign_[i];
│ │ │ │ +
82 out[i][1-direction] = 0;
│ │ │ │ +
83 }
│ │ │ │ +
84 } else {
│ │ │ │ +
85 out.resize(size());
│ │ │ │ +
86 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
87 for (std::size_t j = 0; j < 2; ++j)
│ │ │ │ +
88 out[i][j] = 0;
│ │ │ │ +
89 }
│ │ │ │ +
90
│ │ │ │ +
91 }
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
│ │ │ │ +
94 unsigned int order () const
│ │ │ │ +
95 {
│ │ │ │ +
96 return 1;
│ │ │ │ +
97 }
│ │ │ │ +
│ │ │ │
98
│ │ │ │ -
99 for (unsigned int i=0; i<dim; i++)
│ │ │ │ -
100 out[i] = (i==(dim-1-direction)) ? -(double)dim : 0.0;
│ │ │ │ -
101
│ │ │ │ -
102 out.back()[0] = dim;
│ │ │ │ -
103 }
│ │ │ │ -
104 else // all higher order derivatives are zero
│ │ │ │ -
105 std::fill(out.begin(), out.end(), 0);
│ │ │ │ -
106 }
│ │ │ │ -
107
│ │ │ │ -
109 static constexpr unsigned int order ()
│ │ │ │ -
110 {
│ │ │ │ -
111 return 1;
│ │ │ │ -
112 }
│ │ │ │ -
113 };
│ │ │ │ -
114
│ │ │ │ -
119 template<unsigned int dim>
│ │ │ │ -
120 class CrouzeixRaviartLocalCoefficients
│ │ │ │ -
121 {
│ │ │ │ -
122 public:
│ │ │ │ -
124 CrouzeixRaviartLocalCoefficients ()
│ │ │ │ -
125 : localKeys_(size())
│ │ │ │ -
126 {
│ │ │ │ -
127 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
128 localKeys_[i] = LocalKey(i,dim-1,0);
│ │ │ │ -
129 }
│ │ │ │ -
130
│ │ │ │ -
132 static constexpr std::size_t size ()
│ │ │ │ -
133 {
│ │ │ │ -
134 return dim+1;
│ │ │ │ -
135 }
│ │ │ │ -
136
│ │ │ │ -
138 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
139 {
│ │ │ │ -
140 return localKeys_[i];
│ │ │ │ -
141 }
│ │ │ │ -
142
│ │ │ │ -
143 private:
│ │ │ │ -
144 std::vector<LocalKey> localKeys_;
│ │ │ │ -
145 };
│ │ │ │ -
146
│ │ │ │ -
151 template<class LocalBasis>
│ │ │ │ -
152 class CrouzeixRaviartLocalInterpolation
│ │ │ │ -
153 {
│ │ │ │ -
154 public:
│ │ │ │ -
155
│ │ │ │ -
163 template<typename F, typename C>
│ │ │ │ -
164 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
165 {
│ │ │ │ -
166 constexpr auto dim = LocalBasis::Traits::dimDomain;
│ │ │ │ -
167
│ │ │ │ -
168 auto&& f = Impl::makeFunctionWithCallOperator<typename LocalBasis::Traits::DomainType>(ff);
│ │ │ │ -
169
│ │ │ │ -
170 out.resize(LocalBasis::size());
│ │ │ │ -
171
│ │ │ │ -
172 // Evaluate at the facet midpoints
│ │ │ │ -
173 auto refSimplex = ReferenceElements<typename LocalBasis::Traits::DomainFieldType,dim>::simplex();
│ │ │ │ -
174 for (int i=0; i<refSimplex.size(1); i++)
│ │ │ │ -
175 out[i] = f(refSimplex.template geometry<1>(i).center());
│ │ │ │ -
176 }
│ │ │ │ -
177 };
│ │ │ │ -
178
│ │ │ │ -
179} } // namespace Dune::Impl
│ │ │ │ -
180
│ │ │ │ -
181namespace Dune
│ │ │ │ -
182{
│ │ │ │ -
189 template<class D, class R, int dim>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
191 {
│ │ │ │ -
192 public:
│ │ │ │ - │ │ │ │ -
196 Impl::CrouzeixRaviartLocalCoefficients<dim>,
│ │ │ │ -
197 Impl::CrouzeixRaviartLocalInterpolation<Impl::CrouzeixRaviartLocalBasis<D,R,dim> > >;
│ │ │ │ -
198
│ │ │ │ -
│ │ │ │ -
201 const typename Traits::LocalBasisType& localBasis() const
│ │ │ │ -
202 {
│ │ │ │ -
203 return basis_;
│ │ │ │ -
204 }
│ │ │ │ -
│ │ │ │ -
205
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
209 {
│ │ │ │ -
210 return coefficients_;
│ │ │ │ -
211 }
│ │ │ │ -
│ │ │ │ -
212
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
216 {
│ │ │ │ -
217 return interpolation_;
│ │ │ │ -
218 }
│ │ │ │ -
│ │ │ │ -
219
│ │ │ │ -
│ │ │ │ -
221 static constexpr std::size_t size()
│ │ │ │ -
222 {
│ │ │ │ -
223 return dim+1;
│ │ │ │ -
224 }
│ │ │ │ -
│ │ │ │ -
225
│ │ │ │ -
│ │ │ │ -
228 static constexpr GeometryType type()
│ │ │ │ -
229 {
│ │ │ │ -
230 return GeometryTypes::simplex(dim);
│ │ │ │ -
231 }
│ │ │ │ -
│ │ │ │ -
232
│ │ │ │ -
233 private:
│ │ │ │ -
234 Impl::CrouzeixRaviartLocalBasis<D,R,dim> basis_;
│ │ │ │ -
235 Impl::CrouzeixRaviartLocalCoefficients<dim> coefficients_;
│ │ │ │ -
236 Impl::CrouzeixRaviartLocalInterpolation<Impl::CrouzeixRaviartLocalBasis<D,R,dim> > interpolation_;
│ │ │ │ -
237 };
│ │ │ │ -
│ │ │ │ -
238
│ │ │ │ -
239} // namespace Dune
│ │ │ │ -
240
│ │ │ │ -
241#endif // DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
99 private:
│ │ │ │ +
100
│ │ │ │ +
101 // Signs of the edge normals
│ │ │ │ +
102 std::array<R,3> sign_;
│ │ │ │ +
103 };
│ │ │ │ +
│ │ │ │ +
104}
│ │ │ │ +
105#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Crouzeix-Raviart finite element.
Definition crouzeixraviart.hh:191
│ │ │ │ -
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition crouzeixraviart.hh:228
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition crouzeixraviart.hh:208
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition crouzeixraviart.hh:215
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition crouzeixraviart.hh:201
│ │ │ │ -
static constexpr std::size_t size()
The number of shape functions.
Definition crouzeixraviart.hh:221
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas02dlocalbasis.hh:26
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas02dlocalbasis.hh:94
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas02dlocalbasis.hh:56
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas02dlocalbasis.hh:29
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas02dlocalbasis.hh:45
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas02dlocalbasis.hh:39
│ │ │ │ +
RT02DLocalBasis(std::bitset< 3 > s=0)
Make set number s, where 0 <= s < 8.
Definition raviartthomas02dlocalbasis.hh:32
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas02dlocalbasis.hh:68
│ │ │ │ │ │ │ │ - │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,248 +1,150 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ -crouzeixraviart.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ +raviartthomas02dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ +5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ +6#define DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ 13 │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { namespace Impl │ │ │ │ │ -23{ │ │ │ │ │ -30 template │ │ │ │ │ -31 class CrouzeixRaviartLocalBasis │ │ │ │ │ -32 { │ │ │ │ │ -33 public: │ │ │ │ │ -34 using Traits = │ │ │ │ │ -LocalBasisTraits,R,1,FieldVector,FieldMatrix │ │ │ │ │ ->; │ │ │ │ │ -35 │ │ │ │ │ -38 static constexpr unsigned int size () │ │ │ │ │ -39 { │ │ │ │ │ -40 return dim+1; │ │ │ │ │ -41 } │ │ │ │ │ -42 │ │ │ │ │ -44 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ -45 std::vector& out) const │ │ │ │ │ -46 { │ │ │ │ │ -47 out.resize(size()); │ │ │ │ │ -48 │ │ │ │ │ -49 std::fill(out.begin(), out.end()-1, 1.0); │ │ │ │ │ -50 out.back() = 1.0-dim; │ │ │ │ │ -51 │ │ │ │ │ -52 for (unsigned int i=0; i& out) const │ │ │ │ │ -66 { │ │ │ │ │ -67 out.resize(size()); │ │ │ │ │ -68 │ │ │ │ │ -69 for (unsigned i=0; i& order, │ │ │ │ │ -83 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -84 std::vector& out) const │ │ │ │ │ -85 { │ │ │ │ │ -86 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -87 │ │ │ │ │ -88 out.resize(size()); │ │ │ │ │ -89 │ │ │ │ │ -90 if (totalOrder == 0) { │ │ │ │ │ -91 evaluateFunction(in, out); │ │ │ │ │ -92 return; │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -95 if (totalOrder==1) │ │ │ │ │ -96 { │ │ │ │ │ -97 auto direction = std::find(order.begin(), order.end(), 1)-order.begin(); │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +26 { │ │ │ │ │ +27 public: │ │ │ │ │ +28 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_2_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +30 │ │ │ │ │ +_3_2 _R_T_0_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<3> s = 0) │ │ │ │ │ +33 { │ │ │ │ │ +34 for (int i=0; i<3; i++) │ │ │ │ │ +35 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ +36 } │ │ │ │ │ +37 │ │ │ │ │ +_3_9 unsigned int _s_i_z_e () const │ │ │ │ │ +40 { │ │ │ │ │ +41 return 3; │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_5 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +46 std::vector& out) const │ │ │ │ │ +47 { │ │ │ │ │ +48 out.resize(3); │ │ │ │ │ +49 out[0] = {sign_[0]*in[0], sign_[0]*(in[1]-D(1))}; │ │ │ │ │ +50 out[1] = {sign_[1]*(in[0]-D(1)), sign_[1]*in[1]}; │ │ │ │ │ +51 out[2] = {sign_[2]*in[0], sign_[2]*in[1]}; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +55 inline void │ │ │ │ │ +_5_6 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +57 std::vector& out) const // return value │ │ │ │ │ +58 { │ │ │ │ │ +59 out.resize(3); │ │ │ │ │ +60 for (int i=0; i<3; i++) │ │ │ │ │ +61 { │ │ │ │ │ +62 out[i][0] = {sign_[i], 0}; │ │ │ │ │ +63 out[i][1] = { 0, sign_[i]}; │ │ │ │ │ +64 } │ │ │ │ │ +65 } │ │ │ │ │ +66 │ │ │ │ │ +_6_8 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +69 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +70 std::vector& out) const // return value │ │ │ │ │ +71 { │ │ │ │ │ +72 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +73 if (totalOrder == 0) { │ │ │ │ │ +74 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +75 } else if (totalOrder == 1) { │ │ │ │ │ +76 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ +_o_r_d_e_r.end(), 1)); │ │ │ │ │ +77 out.resize(_s_i_z_e()); │ │ │ │ │ +78 │ │ │ │ │ +79 for (int i=0; i<3; i++) │ │ │ │ │ +80 { │ │ │ │ │ +81 out[i][direction] = sign_[i]; │ │ │ │ │ +82 out[i][1-direction] = 0; │ │ │ │ │ +83 } │ │ │ │ │ +84 } else { │ │ │ │ │ +85 out.resize(_s_i_z_e()); │ │ │ │ │ +86 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +87 for (std::size_t j = 0; j < 2; ++j) │ │ │ │ │ +88 out[i][j] = 0; │ │ │ │ │ +89 } │ │ │ │ │ +90 │ │ │ │ │ +91 } │ │ │ │ │ +92 │ │ │ │ │ +_9_4 unsigned int _o_r_d_e_r () const │ │ │ │ │ +95 { │ │ │ │ │ +96 return 1; │ │ │ │ │ +97 } │ │ │ │ │ 98 │ │ │ │ │ -99 for (unsigned int i=0; i │ │ │ │ │ -120 class CrouzeixRaviartLocalCoefficients │ │ │ │ │ -121 { │ │ │ │ │ -122 public: │ │ │ │ │ -124 CrouzeixRaviartLocalCoefficients () │ │ │ │ │ -125 : localKeys_(size()) │ │ │ │ │ -126 { │ │ │ │ │ -127 for (std::size_t i=0; i localKeys_; │ │ │ │ │ -145 }; │ │ │ │ │ -146 │ │ │ │ │ -151 template │ │ │ │ │ -152 class CrouzeixRaviartLocalInterpolation │ │ │ │ │ -153 { │ │ │ │ │ -154 public: │ │ │ │ │ -155 │ │ │ │ │ -163 template │ │ │ │ │ -164 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -165 { │ │ │ │ │ -166 constexpr auto dim = LocalBasis::Traits::dimDomain; │ │ │ │ │ -167 │ │ │ │ │ -168 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -169 │ │ │ │ │ -170 out.resize(LocalBasis::size()); │ │ │ │ │ -171 │ │ │ │ │ -172 // Evaluate at the facet midpoints │ │ │ │ │ -173 auto refSimplex = ReferenceElements::simplex(); │ │ │ │ │ -174 for (int i=0; i(i).center()); │ │ │ │ │ -176 } │ │ │ │ │ -177 }; │ │ │ │ │ -178 │ │ │ │ │ -179} } // namespace Dune::Impl │ │ │ │ │ -180 │ │ │ │ │ -181namespace _D_u_n_e │ │ │ │ │ -182{ │ │ │ │ │ -189 template │ │ │ │ │ -_1_9_0 class _C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -191 { │ │ │ │ │ -192 public: │ │ │ │ │ -_1_9_5 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_>, │ │ │ │ │ -196 Impl::CrouzeixRaviartLocalCoefficients, │ │ │ │ │ -197 Impl::CrouzeixRaviartLocalInterpolation > >; │ │ │ │ │ -198 │ │ │ │ │ -_2_0_1 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s() const │ │ │ │ │ -202 { │ │ │ │ │ -203 return basis_; │ │ │ │ │ -204 } │ │ │ │ │ -205 │ │ │ │ │ -_2_0_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ -209 { │ │ │ │ │ -210 return coefficients_; │ │ │ │ │ -211 } │ │ │ │ │ -212 │ │ │ │ │ -_2_1_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ -216 { │ │ │ │ │ -217 return interpolation_; │ │ │ │ │ -218 } │ │ │ │ │ -219 │ │ │ │ │ -_2_2_1 static constexpr std::size_t _s_i_z_e() │ │ │ │ │ -222 { │ │ │ │ │ -223 return dim+1; │ │ │ │ │ -224 } │ │ │ │ │ -225 │ │ │ │ │ -_2_2_8 static constexpr GeometryType _t_y_p_e() │ │ │ │ │ -229 { │ │ │ │ │ -230 return GeometryTypes::simplex(dim); │ │ │ │ │ -231 } │ │ │ │ │ -232 │ │ │ │ │ -233 private: │ │ │ │ │ -234 Impl::CrouzeixRaviartLocalBasis basis_; │ │ │ │ │ -235 Impl::CrouzeixRaviartLocalCoefficients coefficients_; │ │ │ │ │ -236 Impl::CrouzeixRaviartLocalInterpolation > interpolation_; │ │ │ │ │ -237 }; │ │ │ │ │ -238 │ │ │ │ │ -239} // namespace Dune │ │ │ │ │ -240 │ │ │ │ │ -241#endif // DUNE_LOCALFUNCTIONS_CROUZEIXRAVIART_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +99 private: │ │ │ │ │ +100 │ │ │ │ │ +101 // Signs of the edge normals │ │ │ │ │ +102 std::array sign_; │ │ │ │ │ +103 }; │ │ │ │ │ +104} │ │ │ │ │ +105#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Crouzeix-Raviart finite element. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:228 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:208 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:215 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_C_r_o_u_z_e_i_x_R_a_v_i_a_r_t_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn crouzeixraviart.hh:221 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT02DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:68 │ │ │ │ │ _l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangelfecache.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
lagrangelfecache.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas1cube2dlocalcoefficients.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <tuple>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementvariantcache.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT1Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , std::size_t dim, std::size_t order>
using Dune::LagrangeLocalFiniteElementCache = LocalFiniteElementVariantCache< Impl::ImplementedLagrangeFiniteElements< D, R, dim, order > >
 A cache that stores all available Pk/Qk like local finite elements for the given dimension and order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,32 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -lagrangelfecache.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas1cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_L_a_g_r_a_n_g_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e< │ │ │ │ │ - Impl::ImplementedLagrangeFiniteElements< D, R, dim, order > > │ │ │ │ │ -  A cache that stores all available Pk/Qk like local finite elements for │ │ │ │ │ - the given dimension and order. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00215_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangelfecache.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,145 +70,83 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangelfecache.hh
│ │ │ │ +
raviartthomas1cube2dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <tuple>
│ │ │ │ -
9#include <utility>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ -
12#include <dune/geometry/typeindex.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21
│ │ │ │ -
22namespace Dune {
│ │ │ │ -
23
│ │ │ │ -
24
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │
25
│ │ │ │ -
26namespace Impl {
│ │ │ │ -
27
│ │ │ │ -
28 // Provide implemented Lagrange local finite elements
│ │ │ │ -
29
│ │ │ │ -
30 template<class D, class R, std::size_t dim, std::size_t order>
│ │ │ │ -
31 struct ImplementedLagrangeFiniteElements : public FixedDimLocalGeometryTypeIndex<dim>
│ │ │ │ -
32 {
│ │ │ │ -
33 using FixedDimLocalGeometryTypeIndex<dim>::index;
│ │ │ │ -
34 static auto getImplementations()
│ │ │ │ -
35 {
│ │ │ │ -
36 return std::make_tuple(
│ │ │ │ -
37 std::make_pair(index(GeometryTypes::simplex(dim)), []() { return LagrangeSimplexLocalFiniteElement<D,R,dim,order>(); }),
│ │ │ │ -
38 std::make_pair(index(GeometryTypes::cube(dim)), []() { return LagrangeCubeLocalFiniteElement<D,R,dim,order>(); })
│ │ │ │ -
39 );
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for (std::size_t i=0; i < 4; i++)
│ │ │ │ +
31 {
│ │ │ │ +
32 li[2*i] = LocalKey(i,1,0);
│ │ │ │ +
33 li[2*i + 1] = LocalKey(i,1,1);
│ │ │ │ +
34 }
│ │ │ │ +
35
│ │ │ │ +
36 li[8] = LocalKey(0,0,0);
│ │ │ │ +
37 li[9] = LocalKey(0,0,1);
│ │ │ │ +
38 li[10] = LocalKey(0,0,2);
│ │ │ │ +
39 li[11] = LocalKey(0,0,3);
│ │ │ │
40 }
│ │ │ │ -
41 };
│ │ │ │ -
42
│ │ │ │ -
43 template<class D, class R, std::size_t dim>
│ │ │ │ -
44 struct ImplementedLagrangeFiniteElements<D,R,dim,0> : public FixedDimLocalGeometryTypeIndex<dim>
│ │ │ │ -
45 {
│ │ │ │ -
46 using FixedDimLocalGeometryTypeIndex<dim>::index;
│ │ │ │ -
47 static auto getImplementations()
│ │ │ │ -
48 {
│ │ │ │ -
49 return std::make_tuple(
│ │ │ │ -
50 std::make_pair(index(GeometryTypes::simplex(dim)), []() { return P0LocalFiniteElement<D,R,dim>(GeometryTypes::simplex(dim)); }),
│ │ │ │ -
51 std::make_pair(index(GeometryTypes::cube(dim)), []() { return P0LocalFiniteElement<D,R,dim>(GeometryTypes::cube(dim)); }),
│ │ │ │ -
52 std::make_pair(index(GeometryTypes::none(dim)), []() { return P0LocalFiniteElement<D,R,dim>(GeometryTypes::none(dim)); })
│ │ │ │ -
53 );
│ │ │ │ -
54 }
│ │ │ │ -
55 };
│ │ │ │ -
56
│ │ │ │ -
57 template<class D, class R>
│ │ │ │ -
58 struct ImplementedLagrangeFiniteElements<D,R,3,0> : public FixedDimLocalGeometryTypeIndex<3>
│ │ │ │ -
59 {
│ │ │ │ -
60 using FixedDimLocalGeometryTypeIndex<3>::index;
│ │ │ │ -
61 static auto getImplementations()
│ │ │ │ -
62 {
│ │ │ │ -
63 return std::make_tuple(
│ │ │ │ -
64 std::make_pair(index(GeometryTypes::tetrahedron), []() { return P0LocalFiniteElement<D,R,3>(GeometryTypes::tetrahedron); }),
│ │ │ │ -
65 std::make_pair(index(GeometryTypes::hexahedron), []() { return P0LocalFiniteElement<D,R,3>(GeometryTypes::hexahedron); }),
│ │ │ │ -
66 std::make_pair(index(GeometryTypes::prism), []() { return P0LocalFiniteElement<D,R,3>(GeometryTypes::prism); }),
│ │ │ │ -
67 std::make_pair(index(GeometryTypes::pyramid), []() { return P0LocalFiniteElement<D,R,3>(GeometryTypes::pyramid); })
│ │ │ │ -
68 );
│ │ │ │ -
69 }
│ │ │ │ -
70 };
│ │ │ │ -
71
│ │ │ │ -
72 template<class D, class R>
│ │ │ │ -
73 struct ImplementedLagrangeFiniteElements<D,R,3,1> : public FixedDimLocalGeometryTypeIndex<3>
│ │ │ │ -
74 {
│ │ │ │ -
75 using FixedDimLocalGeometryTypeIndex<3>::index;
│ │ │ │ -
76 static auto getImplementations()
│ │ │ │ -
77 {
│ │ │ │ -
78 return std::make_tuple(
│ │ │ │ -
79 std::make_pair(index(GeometryTypes::tetrahedron), []() { return LagrangeSimplexLocalFiniteElement<D,R,3,1>(); }),
│ │ │ │ -
80 std::make_pair(index(GeometryTypes::hexahedron), []() { return LagrangeCubeLocalFiniteElement<D,R,3,1>(); }),
│ │ │ │ -
81 std::make_pair(index(GeometryTypes::prism), []() { return LagrangePrismLocalFiniteElement<D,R,1>(); }),
│ │ │ │ -
82 std::make_pair(index(GeometryTypes::pyramid), []() { return LagrangePyramidLocalFiniteElement<D,R,1>(); })
│ │ │ │ -
83 );
│ │ │ │ -
84 }
│ │ │ │ -
85 };
│ │ │ │ -
86
│ │ │ │ -
87 template<class D, class R>
│ │ │ │ -
88 struct ImplementedLagrangeFiniteElements<D,R,3,2> : public FixedDimLocalGeometryTypeIndex<3>
│ │ │ │ -
89 {
│ │ │ │ -
90 using FixedDimLocalGeometryTypeIndex<3>::index;
│ │ │ │ -
91 static auto getImplementations()
│ │ │ │ -
92 {
│ │ │ │ -
93 return std::make_tuple(
│ │ │ │ -
94 std::make_pair(index(GeometryTypes::tetrahedron), []() { return LagrangeSimplexLocalFiniteElement<D,R,3,2>(); }),
│ │ │ │ -
95 std::make_pair(index(GeometryTypes::hexahedron), []() { return LagrangeCubeLocalFiniteElement<D,R,3,2>(); }),
│ │ │ │ -
96 std::make_pair(index(GeometryTypes::prism), []() { return LagrangePrismLocalFiniteElement<D,R,2>(); }),
│ │ │ │ -
97 std::make_pair(index(GeometryTypes::pyramid), []() { return LagrangePyramidLocalFiniteElement<D,R,2>(); })
│ │ │ │ -
98 );
│ │ │ │ -
99 }
│ │ │ │ -
100 };
│ │ │ │ -
101
│ │ │ │ -
102} // namespace Impl
│ │ │ │ -
103
│ │ │ │ -
104
│ │ │ │ -
105
│ │ │ │ -
117template<class D, class R, std::size_t dim, std::size_t order>
│ │ │ │ - │ │ │ │ -
119
│ │ │ │ -
120
│ │ │ │ -
121
│ │ │ │ -
122} // namespace Dune
│ │ │ │ -
123
│ │ │ │ -
124
│ │ │ │ -
125
│ │ │ │ -
126
│ │ │ │ -
127#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
43 std::size_t size () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return 12;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
50 {
│ │ │ │ +
51 return li[i];
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 std::vector<LocalKey> li;
│ │ │ │ +
56 };
│ │ │ │ +
│ │ │ │ +
57}
│ │ │ │ +
58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on quadrilaterals.
Definition raviartthomas1cube2dlocalcoefficients.hh:24
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas1cube2dlocalcoefficients.hh:49
│ │ │ │ +
RT1Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas1cube2dlocalcoefficients.hh:28
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas1cube2dlocalcoefficients.hh:43
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,164 +1,81 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangelfecache.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ +raviartthomas1cube2dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { │ │ │ │ │ -23 │ │ │ │ │ -24 │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +_2_3 class _R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ 25 │ │ │ │ │ -26namespace Impl { │ │ │ │ │ -27 │ │ │ │ │ -28 // Provide implemented Lagrange local finite elements │ │ │ │ │ -29 │ │ │ │ │ -30 template │ │ │ │ │ -31 struct ImplementedLagrangeFiniteElements : public │ │ │ │ │ -FixedDimLocalGeometryTypeIndex │ │ │ │ │ -32 { │ │ │ │ │ -33 using FixedDimLocalGeometryTypeIndex::index; │ │ │ │ │ -34 static auto getImplementations() │ │ │ │ │ -35 { │ │ │ │ │ -36 return std::make_tuple( │ │ │ │ │ -37 std::make_pair(index(GeometryTypes::simplex(dim)), []() { return │ │ │ │ │ -LagrangeSimplexLocalFiniteElement(); }), │ │ │ │ │ -38 std::make_pair(index(GeometryTypes::cube(dim)), []() { return │ │ │ │ │ -LagrangeCubeLocalFiniteElement(); }) │ │ │ │ │ -39 ); │ │ │ │ │ +26 public: │ │ │ │ │ +_2_8 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(12) │ │ │ │ │ +29 { │ │ │ │ │ +30 for (std::size_t i=0; i < 4; i++) │ │ │ │ │ +31 { │ │ │ │ │ +32 li[2*i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +33 li[2*i + 1] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +34 } │ │ │ │ │ +35 │ │ │ │ │ +36 li[8] = _L_o_c_a_l_K_e_y(0,0,0); │ │ │ │ │ +37 li[9] = _L_o_c_a_l_K_e_y(0,0,1); │ │ │ │ │ +38 li[10] = _L_o_c_a_l_K_e_y(0,0,2); │ │ │ │ │ +39 li[11] = _L_o_c_a_l_K_e_y(0,0,3); │ │ │ │ │ 40 } │ │ │ │ │ -41 }; │ │ │ │ │ -42 │ │ │ │ │ -43 template │ │ │ │ │ -44 struct ImplementedLagrangeFiniteElements : public │ │ │ │ │ -FixedDimLocalGeometryTypeIndex │ │ │ │ │ -45 { │ │ │ │ │ -46 using FixedDimLocalGeometryTypeIndex::index; │ │ │ │ │ -47 static auto getImplementations() │ │ │ │ │ -48 { │ │ │ │ │ -49 return std::make_tuple( │ │ │ │ │ -50 std::make_pair(index(GeometryTypes::simplex(dim)), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::simplex(dim)); }), │ │ │ │ │ -51 std::make_pair(index(GeometryTypes::cube(dim)), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::cube(dim)); }), │ │ │ │ │ -52 std::make_pair(index(GeometryTypes::none(dim)), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::none(dim)); }) │ │ │ │ │ -53 ); │ │ │ │ │ -54 } │ │ │ │ │ -55 }; │ │ │ │ │ -56 │ │ │ │ │ -57 template │ │ │ │ │ -58 struct ImplementedLagrangeFiniteElements : public │ │ │ │ │ -FixedDimLocalGeometryTypeIndex<3> │ │ │ │ │ -59 { │ │ │ │ │ -60 using FixedDimLocalGeometryTypeIndex<3>::index; │ │ │ │ │ -61 static auto getImplementations() │ │ │ │ │ -62 { │ │ │ │ │ -63 return std::make_tuple( │ │ │ │ │ -64 std::make_pair(index(GeometryTypes::tetrahedron), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::tetrahedron); }), │ │ │ │ │ -65 std::make_pair(index(GeometryTypes::hexahedron), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::hexahedron); }), │ │ │ │ │ -66 std::make_pair(index(GeometryTypes::prism), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::prism); }), │ │ │ │ │ -67 std::make_pair(index(GeometryTypes::pyramid), []() { return │ │ │ │ │ -P0LocalFiniteElement(GeometryTypes::pyramid); }) │ │ │ │ │ -68 ); │ │ │ │ │ -69 } │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72 template │ │ │ │ │ -73 struct ImplementedLagrangeFiniteElements : public │ │ │ │ │ -FixedDimLocalGeometryTypeIndex<3> │ │ │ │ │ -74 { │ │ │ │ │ -75 using FixedDimLocalGeometryTypeIndex<3>::index; │ │ │ │ │ -76 static auto getImplementations() │ │ │ │ │ -77 { │ │ │ │ │ -78 return std::make_tuple( │ │ │ │ │ -79 std::make_pair(index(GeometryTypes::tetrahedron), []() { return │ │ │ │ │ -LagrangeSimplexLocalFiniteElement(); }), │ │ │ │ │ -80 std::make_pair(index(GeometryTypes::hexahedron), []() { return │ │ │ │ │ -LagrangeCubeLocalFiniteElement(); }), │ │ │ │ │ -81 std::make_pair(index(GeometryTypes::prism), []() { return │ │ │ │ │ -LagrangePrismLocalFiniteElement(); }), │ │ │ │ │ -82 std::make_pair(index(GeometryTypes::pyramid), []() { return │ │ │ │ │ -LagrangePyramidLocalFiniteElement(); }) │ │ │ │ │ -83 ); │ │ │ │ │ -84 } │ │ │ │ │ -85 }; │ │ │ │ │ -86 │ │ │ │ │ -87 template │ │ │ │ │ -88 struct ImplementedLagrangeFiniteElements : public │ │ │ │ │ -FixedDimLocalGeometryTypeIndex<3> │ │ │ │ │ -89 { │ │ │ │ │ -90 using FixedDimLocalGeometryTypeIndex<3>::index; │ │ │ │ │ -91 static auto getImplementations() │ │ │ │ │ -92 { │ │ │ │ │ -93 return std::make_tuple( │ │ │ │ │ -94 std::make_pair(index(GeometryTypes::tetrahedron), []() { return │ │ │ │ │ -LagrangeSimplexLocalFiniteElement(); }), │ │ │ │ │ -95 std::make_pair(index(GeometryTypes::hexahedron), []() { return │ │ │ │ │ -LagrangeCubeLocalFiniteElement(); }), │ │ │ │ │ -96 std::make_pair(index(GeometryTypes::prism), []() { return │ │ │ │ │ -LagrangePrismLocalFiniteElement(); }), │ │ │ │ │ -97 std::make_pair(index(GeometryTypes::pyramid), []() { return │ │ │ │ │ -LagrangePyramidLocalFiniteElement(); }) │ │ │ │ │ -98 ); │ │ │ │ │ -99 } │ │ │ │ │ -100 }; │ │ │ │ │ -101 │ │ │ │ │ -102} // namespace Impl │ │ │ │ │ -103 │ │ │ │ │ -104 │ │ │ │ │ -105 │ │ │ │ │ -117template │ │ │ │ │ -_1_1_8using _L_a_g_r_a_n_g_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e = │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e_<_I_m_p_l_:_: │ │ │ │ │ -_I_m_p_l_e_m_e_n_t_e_d_L_a_g_r_a_n_g_e_F_i_n_i_t_e_E_l_e_m_e_n_t_s_<_D_,_R_,_d_i_m_,_o_r_d_e_r_>>; │ │ │ │ │ -119 │ │ │ │ │ -120 │ │ │ │ │ -121 │ │ │ │ │ -122} // namespace Dune │ │ │ │ │ -123 │ │ │ │ │ -124 │ │ │ │ │ -125 │ │ │ │ │ -126 │ │ │ │ │ -127#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGELFECACHE_HH │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_p_0_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h │ │ │ │ │ +41 │ │ │ │ │ +_4_3 std::size_t _s_i_z_e () const │ │ │ │ │ +44 { │ │ │ │ │ +45 return 12; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_9 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +50 { │ │ │ │ │ +51 return li[i]; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 std::vector li; │ │ │ │ │ +56 }; │ │ │ │ │ +57} │ │ │ │ │ +58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e │ │ │ │ │ -A cache storing a compile time selection of local finite element │ │ │ │ │ -implementations. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariantcache.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalcoefficients.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT1Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalcoefficients.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalcoefficients.hh:43 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangebasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangebasis.hh File Reference
│ │ │ │ +
raviartthomas1cube2dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ -#include <dune/localfunctions/utility/monomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/interpolation.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::LagrangeBasisFactory< LP, dim, SF, CF >
class  Dune::RT1Cube2DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +raviartthomas1cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _L_P_,_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00218_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangebasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,58 +70,127 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangebasis.hh
│ │ │ │ +
raviartthomas1cube2dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ -
6#define DUNE_LAGRANGEBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │
13
│ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16namespace Dune
│ │ │ │ -
17{
│ │ │ │ -
18
│ │ │ │ -
19 template< template <class,unsigned int> class LP,
│ │ │ │ -
20 unsigned int dim, class SF, class CF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 : public DefaultBasisFactory< MonomialBasisFactory<dim,CF>,
│ │ │ │ -
23 LagrangeInterpolationFactory<LP,dim,CF>,
│ │ │ │ -
24 dim,1,SF,CF >
│ │ │ │ -
25 {};
│ │ │ │ -
│ │ │ │ -
26
│ │ │ │ -
27}
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
25 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │
28
│ │ │ │ -
29#endif // #ifndef DUNE_LAGRANGEBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
29 public:
│ │ │ │ +
│ │ │ │ +
35 RT1Cube2DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ +
36 {
│ │ │ │ +
37 for (size_t i=0; i<4; i++)
│ │ │ │ +
38 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
39
│ │ │ │ +
40 n_[0] = {-1.0, 0.0};
│ │ │ │ +
41 n_[1] = { 1.0, 0.0};
│ │ │ │ +
42 n_[2] = { 0.0, -1.0};
│ │ │ │ +
43 n_[3] = { 0.0, 1.0};
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
54 template<class F, class C>
│ │ │ │ +
│ │ │ │ +
55 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
56 {
│ │ │ │ +
57 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
58 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
59 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
60
│ │ │ │ +
61 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
62
│ │ │ │ +
63 out.resize(12);
│ │ │ │ +
64 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
65
│ │ │ │ +
66 const int qOrder = 3;
│ │ │ │ +
67 const auto& rule1 = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
68
│ │ │ │ +
69 for (auto&& qp : rule1)
│ │ │ │ +
70 {
│ │ │ │ +
71 Scalar qPos = qp.position();
│ │ │ │ +
72 typename LB::Traits::DomainType localPos = {0.0, qPos};
│ │ │ │ +
73
│ │ │ │ +
74 auto y = f(localPos);
│ │ │ │ +
75 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0];
│ │ │ │ +
76 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
77
│ │ │ │ +
78 localPos = {1.0, qPos};
│ │ │ │ +
79 y = f(localPos);
│ │ │ │ +
80 out[2] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1];
│ │ │ │ +
81 out[3] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
82
│ │ │ │ +
83 localPos = {qPos, 0.0};
│ │ │ │ +
84 y = f(localPos);
│ │ │ │ +
85 out[4] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2];
│ │ │ │ +
86 out[5] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
87
│ │ │ │ +
88 localPos = {qPos, 1.0};
│ │ │ │ +
89 y = f(localPos);
│ │ │ │ +
90 out[6] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3];
│ │ │ │ +
91 out[7] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
92 }
│ │ │ │ +
93
│ │ │ │ +
94 const auto& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
95
│ │ │ │ +
96 for (auto&& qp : rule2)
│ │ │ │ +
97 {
│ │ │ │ +
98 auto qPos = qp.position();
│ │ │ │ +
99
│ │ │ │ +
100 auto y = f(qPos);
│ │ │ │ +
101 out[8] += y[0]*qp.weight();
│ │ │ │ +
102 out[9] += y[1]*qp.weight();
│ │ │ │ +
103 out[10] += y[0]*qPos[1]*qp.weight();
│ │ │ │ +
104 out[11] += y[1]*qPos[0]*qp.weight();
│ │ │ │ +
105 }
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
108 private:
│ │ │ │ +
109 // Edge orientations
│ │ │ │ +
110 std::array<typename LB::Traits::RangeFieldType, 4> sign_;
│ │ │ │ +
111
│ │ │ │ +
112 // Edge normals
│ │ │ │ +
113 std::array<typename LB::Traits::DomainType, 4> n_;
│ │ │ │ +
114 };
│ │ │ │ +
│ │ │ │ +
115}
│ │ │ │ +
116#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition lagrangebasis.hh:25
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ - │ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas1cube2dlocalinterpolation.hh:27
│ │ │ │ +
RT1Cube2DLocalInterpolation(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas1cube2dlocalinterpolation.hh:35
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas1cube2dlocalinterpolation.hh:55
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,50 +1,125 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangebasis.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ +raviartthomas1cube2dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ -6#define DUNE_LAGRANGEBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ 13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16namespace _D_u_n_e │ │ │ │ │ -17{ │ │ │ │ │ -18 │ │ │ │ │ -19 template< template class LP, │ │ │ │ │ -20 unsigned int dim, class SF, class CF > │ │ │ │ │ -_2_1 struct _L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -22 : public _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y< MonomialBasisFactory, │ │ │ │ │ -23 LagrangeInterpolationFactory, │ │ │ │ │ -24 dim,1,SF,CF > │ │ │ │ │ -25 {}; │ │ │ │ │ -26 │ │ │ │ │ -27} │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +27 { │ │ │ │ │ 28 │ │ │ │ │ -29#endif // #ifndef DUNE_LAGRANGEBASIS_HH │ │ │ │ │ -_m_o_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h │ │ │ │ │ +29 public: │ │ │ │ │ +_3_5 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ +36 { │ │ │ │ │ +37 for (size_t i=0; i<4; i++) │ │ │ │ │ +38 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +39 │ │ │ │ │ +40 n_[0] = {-1.0, 0.0}; │ │ │ │ │ +41 n_[1] = { 1.0, 0.0}; │ │ │ │ │ +42 n_[2] = { 0.0, -1.0}; │ │ │ │ │ +43 n_[3] = { 0.0, 1.0}; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +54 template │ │ │ │ │ +_5_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +56 { │ │ │ │ │ +57 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +58 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +59 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +60 │ │ │ │ │ +61 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +62 │ │ │ │ │ +63 out.resize(12); │ │ │ │ │ +64 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +65 │ │ │ │ │ +66 const int qOrder = 3; │ │ │ │ │ +67 const auto& rule1 = QuadratureRules::rule(GeometryTypes::cube(1), │ │ │ │ │ +qOrder); │ │ │ │ │ +68 │ │ │ │ │ +69 for (auto&& qp : rule1) │ │ │ │ │ +70 { │ │ │ │ │ +71 Scalar qPos = qp.position(); │ │ │ │ │ +72 typename LB::Traits::DomainType localPos = {0.0, qPos}; │ │ │ │ │ +73 │ │ │ │ │ +74 auto y = f(localPos); │ │ │ │ │ +75 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0]; │ │ │ │ │ +76 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +77 │ │ │ │ │ +78 localPos = {1.0, qPos}; │ │ │ │ │ +79 y = f(localPos); │ │ │ │ │ +80 out[2] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1]; │ │ │ │ │ +81 out[3] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +82 │ │ │ │ │ +83 localPos = {qPos, 0.0}; │ │ │ │ │ +84 y = f(localPos); │ │ │ │ │ +85 out[4] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2]; │ │ │ │ │ +86 out[5] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +87 │ │ │ │ │ +88 localPos = {qPos, 1.0}; │ │ │ │ │ +89 y = f(localPos); │ │ │ │ │ +90 out[6] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3]; │ │ │ │ │ +91 out[7] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +94 const auto& rule2 = QuadratureRules::rule(GeometryTypes::cube(2), │ │ │ │ │ +qOrder); │ │ │ │ │ +95 │ │ │ │ │ +96 for (auto&& qp : rule2) │ │ │ │ │ +97 { │ │ │ │ │ +98 auto qPos = qp.position(); │ │ │ │ │ +99 │ │ │ │ │ +100 auto y = f(qPos); │ │ │ │ │ +101 out[8] += y[0]*qp.weight(); │ │ │ │ │ +102 out[9] += y[1]*qp.weight(); │ │ │ │ │ +103 out[10] += y[0]*qPos[1]*qp.weight(); │ │ │ │ │ +104 out[11] += y[1]*qPos[0]*qp.weight(); │ │ │ │ │ +105 } │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +108 private: │ │ │ │ │ +109 // Edge orientations │ │ │ │ │ +110 std::array sign_; │ │ │ │ │ +111 │ │ │ │ │ +112 // Edge normals │ │ │ │ │ +113 std::array n_; │ │ │ │ │ +114 }; │ │ │ │ │ +115} │ │ │ │ │ +116#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn lagrangebasis.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT1Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalinterpolation.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalinterpolation.hh:55 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: emptypoints.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
emptypoints.hh File Reference
│ │ │ │ +
raviartthomas1cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LagrangePoint< F, dim >
 
class  Dune::EmptyPointSet< F, dim >
class  Dune::RT1Cube2DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -emptypoints.hh File Reference │ │ │ │ │ +raviartthomas1cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _F_,_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -class   _D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00221_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: emptypoints.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,185 +70,200 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
emptypoints.hh
│ │ │ │ +
raviartthomas1cube2dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LAGRANGE_EMPTYPOINTS_HH
│ │ │ │ -
6#define DUNE_LAGRANGE_EMPTYPOINTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 template< class F, unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21 template< class, class >
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24 public:
│ │ │ │ -
25 static const int dimension = dim;
│ │ │ │ -
26
│ │ │ │ -
27 typedef F Field;
│ │ │ │ -
28
│ │ │ │ -
29 typedef FieldVector< Field, dimension > Vector;
│ │ │ │ -
30
│ │ │ │ -
│ │ │ │ -
31 const Vector &point () const
│ │ │ │ -
32 {
│ │ │ │ -
33 return point_;
│ │ │ │ -
34 }
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
36 const LocalKey &localKey () const
│ │ │ │ -
37 {
│ │ │ │ -
38 return localKey_;
│ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 const Field weight () const
│ │ │ │ -
42 {
│ │ │ │ -
43 return weight_;
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
49 };
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
32 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT1Cube2DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 for (size_t i=0; i<4; i++)
│ │ │ │ +
42 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
46 unsigned int size () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return 12;
│ │ │ │ +
49 }
│ │ │ │
│ │ │ │
50
│ │ │ │ -
51 // EmptyPointSet
│ │ │ │ -
52 // --------------
│ │ │ │ -
53
│ │ │ │ -
54 template< class F, unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
56 {
│ │ │ │ - │ │ │ │ -
58
│ │ │ │ -
59 public:
│ │ │ │ -
60 typedef F Field;
│ │ │ │ +
│ │ │ │ +
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
59 {
│ │ │ │ +
60 out.resize(12);
│ │ │ │
61
│ │ │ │ -
62 static const unsigned int dimension = dim;
│ │ │ │ -
63
│ │ │ │ - │ │ │ │ -
65
│ │ │ │ -
66 typedef typename std::vector< LagrangePoint >::const_iterator iterator;
│ │ │ │ -
67
│ │ │ │ -
68 protected:
│ │ │ │ -
│ │ │ │ -
69 EmptyPointSet ( const std::size_t order )
│ │ │ │ -
70 : order_( order )
│ │ │ │ -
71 {}
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 public:
│ │ │ │ -
│ │ │ │ -
74 const LagrangePoint &operator[] ( const unsigned int i ) const
│ │ │ │ -
75 {
│ │ │ │ -
76 assert( i < size() );
│ │ │ │ -
77 return points_[ i ];
│ │ │ │ -
78 }
│ │ │ │ -
│ │ │ │ -
79
│ │ │ │ -
│ │ │ │ -
80 iterator begin () const
│ │ │ │ -
81 {
│ │ │ │ -
82 return points_.begin();
│ │ │ │ -
83 }
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
│ │ │ │ -
85 iterator end () const
│ │ │ │ -
86 {
│ │ │ │ -
87 return points_.end();
│ │ │ │ -
88 }
│ │ │ │ -
│ │ │ │ -
89
│ │ │ │ -
│ │ │ │ -
90 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ -
91 {
│ │ │ │ -
92 return (*this)[ i ].localKey();
│ │ │ │ -
93 }
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
│ │ │ │ -
95 std::size_t order () const
│ │ │ │ +
62 out[0][0] = sign_[0]*(-1.0 + 4.0*in[0]-3*in[0]*in[0]);
│ │ │ │ +
63 out[0][1] = 0.0;
│ │ │ │ +
64 out[1][0] = 3.0 - 12.0*in[0] - 6.0*in[1] + 24.0*in[0]*in[1]+9*in[0]*in[0] - 18.0*in[0]*in[0]*in[1];
│ │ │ │ +
65 out[1][1] = 0.0;
│ │ │ │ +
66 out[2][0] = sign_[1]*(-2.0*in[0] + 3.0*in[0]*in[0]);
│ │ │ │ +
67 out[2][1] = 0.0;
│ │ │ │ +
68 out[3][0] = -6.0*in[0] + 12.0*in[0]*in[1] + 9.0*in[0]*in[0] - 18.0*in[0]*in[0]*in[1];
│ │ │ │ +
69 out[3][1] = 0.0;
│ │ │ │ +
70 out[4][0] = 0.0;
│ │ │ │ +
71 out[4][1] = sign_[2]*(-1.0 + 4.0*in[1] - 3.0*in[1]*in[1]);
│ │ │ │ +
72 out[5][0] = 0.0;
│ │ │ │ +
73 out[5][1] = -3.0 + 6.0*in[0] + 12.0*in[1] - 24.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in[1]*in[1];
│ │ │ │ +
74 out[6][0] = 0.0;
│ │ │ │ +
75 out[6][1] = sign_[3]*(-2.0*in[1] + 3.0*in[1]*in[1]);
│ │ │ │ +
76 out[7][0] = 0.0;
│ │ │ │ +
77 out[7][1] = 6.0*in[1] - 12.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in[1]*in[1];
│ │ │ │ +
78 out[8][0] = 24.0*in[0] - 36.0*in[0]*in[1] - 24.0*in[0]*in[0] + 36.0*in[0]*in[0]*in[1];
│ │ │ │ +
79 out[8][1] = 0.0;
│ │ │ │ +
80 out[9][0] = 0.0;
│ │ │ │ +
81 out[9][1] = 24.0*in[1] - 36.0*in[0]*in[1] - 24.0*in[1]*in[1] + 36.0*in[0]*in[1]*in[1];
│ │ │ │ +
82 out[10][0] = -36.0*in[0] + 72.0*in[0]*in[1] + 36.0*in[0]*in[0] - 72.0*in[0]*in[0]*in[1];
│ │ │ │ +
83 out[10][1] = 0.0;
│ │ │ │ +
84 out[11][0] = 0.0;
│ │ │ │ +
85 out[11][1] = -36.0*in[1] + 72.0*in[0]*in[1] + 36*in[1]*in[1] - 72.0*in[0]*in[1]*in[1];
│ │ │ │ +
86 }
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
│ │ │ │ +
94 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
95 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │
96 {
│ │ │ │ -
97 return order_;
│ │ │ │ -
98 }
│ │ │ │ +
97 out.resize(12);
│ │ │ │ +
98
│ │ │ │ +
99 out[0][0][0] = sign_[0]*(4.0 - 6.0*in[0]);
│ │ │ │ +
100 out[0][0][1] = 0.0;
│ │ │ │ +
101 out[0][1][0] = 0.0;
│ │ │ │ +
102 out[0][1][1] = 0.0;
│ │ │ │ +
103
│ │ │ │ +
104 out[1][0][0] = -12.0 + 24.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1];
│ │ │ │ +
105 out[1][0][1] = -6 + 24.0*in[0] - 18.0*in[0]*in[0];
│ │ │ │ +
106 out[1][1][0] = 0.0;
│ │ │ │ +
107 out[1][1][1] = 0.0;
│ │ │ │ +
108
│ │ │ │ +
109 out[2][0][0] = sign_[1]*(-2.0 + 6.0*in[0]);
│ │ │ │ +
110 out[2][0][1] = 0.0;
│ │ │ │ +
111 out[2][1][0] = 0.0;
│ │ │ │ +
112 out[2][1][1] = 0.0;
│ │ │ │ +
113
│ │ │ │ +
114 out[3][0][0] = -6.0 + 12.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1];
│ │ │ │ +
115 out[3][0][1] = 12.0*in[0] - 18.0*in[0]*in[0];
│ │ │ │ +
116 out[3][1][0] = 0.0;
│ │ │ │ +
117 out[3][1][1] = 0.0;
│ │ │ │ +
118
│ │ │ │ +
119 out[4][0][0] = 0.0;
│ │ │ │ +
120 out[4][0][1] = 0.0;
│ │ │ │ +
121 out[4][1][0] = 0.0;
│ │ │ │ +
122 out[4][1][1] = sign_[2]*(4.0 - 6.0*in[1]);
│ │ │ │ +
123
│ │ │ │ +
124 out[5][0][0] = 0.0;
│ │ │ │ +
125 out[5][0][1] = 0.0;
│ │ │ │ +
126 out[5][1][0] = 6.0 - 24.0*in[1] + 18.0*in[1]*in[1];
│ │ │ │ +
127 out[5][1][1] = 12.0 - 24.0*in[0] - 18.0*in[1] + 36.0*in[0]*in[1];
│ │ │ │ +
128
│ │ │ │ +
129 out[6][0][0] = 0.0;
│ │ │ │ +
130 out[6][0][1] = 0.0;
│ │ │ │ +
131 out[6][1][0] = 0.0;
│ │ │ │ +
132 out[6][1][1] = sign_[3]*(-2.0 + 6.0*in[1]);
│ │ │ │ +
133
│ │ │ │ +
134 out[7][0][0] = 0.0;
│ │ │ │ +
135 out[7][0][1] = 0.0;
│ │ │ │ +
136 out[7][1][0] = -12.0*in[1] + 18.0*in[1]*in[1];
│ │ │ │ +
137 out[7][1][1] = 6.0 - 12.0*in[0] - 18.0*in[1] + 36.0*in[1]*in[0];
│ │ │ │ +
138
│ │ │ │ +
139 out[8][0][0] = 24.0 - 36.0*in[1] - 48.0*in[0] + 72.0*in[0]*in[1];
│ │ │ │ +
140 out[8][0][1] = -36.0*in[0] + 36.0*in[0]*in[0];
│ │ │ │ +
141 out[8][1][0] = 0.0;
│ │ │ │ +
142 out[8][1][1] = 0.0;
│ │ │ │ +
143
│ │ │ │ +
144 out[9][0][0] = 0.0;
│ │ │ │ +
145 out[9][0][1] = 0.0;
│ │ │ │ +
146 out[9][1][0] = -36.0*in[1] + 36.0*in[1]*in[1];
│ │ │ │ +
147 out[9][1][1] = 24.0 - 36.0*in[0] - 48.0*in[1] + 72.0*in[0]*in[1];
│ │ │ │ +
148
│ │ │ │ +
149 out[10][0][0] = -36.0 + 72.0*in[1] + 72.0*in[0] - 144.0*in[0]*in[1];
│ │ │ │ +
150 out[10][0][1] = 72.0*in[0] - 72.0*in[0]*in[0];
│ │ │ │ +
151 out[10][1][0] = 0.0;
│ │ │ │ +
152 out[10][1][1] = 0.0;
│ │ │ │ +
153
│ │ │ │ +
154 out[11][0][0] = 0.0;
│ │ │ │ +
155 out[11][0][1] = 0.0;
│ │ │ │ +
156 out[11][1][0] = 72.0*in[1] - 72.0*in[1]*in[1];
│ │ │ │ +
157 out[11][1][1] = -36.0 + 72.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1];
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
161 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
162 const typename Traits::DomainType& in, // position
│ │ │ │ +
163 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
164 {
│ │ │ │ +
165 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
166 if (totalOrder == 0) {
│ │ │ │ +
167 evaluateFunction(in, out);
│ │ │ │ +
168 } else {
│ │ │ │ +
169 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
170 }
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
│ │ │ │ +
174 unsigned int order () const
│ │ │ │ +
175 {
│ │ │ │ +
176 return 3;
│ │ │ │ +
177 }
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
179 private:
│ │ │ │ +
180 std::array<R,4> sign_;
│ │ │ │ +
181 };
│ │ │ │
│ │ │ │ -
99
│ │ │ │ -
│ │ │ │ -
100 std::size_t size () const
│ │ │ │ -
101 {
│ │ │ │ -
102 return points_.size();
│ │ │ │ -
103 }
│ │ │ │ -
│ │ │ │ -
104
│ │ │ │ -
105 protected:
│ │ │ │ -
106 std::size_t order_;
│ │ │ │ -
107 std::vector< LagrangePoint > points_;
│ │ │ │ -
108 };
│ │ │ │ -
│ │ │ │ -
109
│ │ │ │ -
110}
│ │ │ │ -
111
│ │ │ │ -
112#endif // DUNE_LAGRANGE_EMPTYPOINTS_HH
│ │ │ │ - │ │ │ │ +
182}
│ │ │ │ +
183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Definition emptypoints.hh:18
│ │ │ │ -
const LocalKey & localKey() const
Definition emptypoints.hh:36
│ │ │ │ -
Field weight_
Definition emptypoints.hh:48
│ │ │ │ -
static const int dimension
Definition emptypoints.hh:25
│ │ │ │ -
friend class LagrangePointSetImpl
Definition emptypoints.hh:22
│ │ │ │ -
Vector point_
Definition emptypoints.hh:46
│ │ │ │ -
const Field weight() const
Definition emptypoints.hh:41
│ │ │ │ -
FieldVector< Field, dimension > Vector
Definition emptypoints.hh:29
│ │ │ │ -
F Field
Definition emptypoints.hh:27
│ │ │ │ -
const Vector & point() const
Definition emptypoints.hh:31
│ │ │ │ -
LocalKey localKey_
Definition emptypoints.hh:47
│ │ │ │ -
Definition emptypoints.hh:56
│ │ │ │ -
std::size_t order() const
Definition emptypoints.hh:95
│ │ │ │ -
std::size_t order_
Definition emptypoints.hh:106
│ │ │ │ -
static const unsigned int dimension
Definition emptypoints.hh:62
│ │ │ │ -
EmptyPointSet(const std::size_t order)
Definition emptypoints.hh:69
│ │ │ │ -
const LagrangePoint & operator[](const unsigned int i) const
Definition emptypoints.hh:74
│ │ │ │ -
std::size_t size() const
Definition emptypoints.hh:100
│ │ │ │ -
Dune::LagrangePoint< Field, dimension > LagrangePoint
Definition emptypoints.hh:64
│ │ │ │ -
const LocalKey & localKey(const unsigned int i) const
Definition emptypoints.hh:90
│ │ │ │ -
iterator begin() const
Definition emptypoints.hh:80
│ │ │ │ -
iterator end() const
Definition emptypoints.hh:85
│ │ │ │ -
F Field
Definition emptypoints.hh:60
│ │ │ │ -
std::vector< LagrangePoint > points_
Definition emptypoints.hh:107
│ │ │ │ -
std::vector< LagrangePoint >::const_iterator iterator
Definition emptypoints.hh:66
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas1cube2dlocalbasis.hh:28
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas1cube2dlocalbasis.hh:94
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas1cube2dlocalbasis.hh:32
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas1cube2dlocalbasis.hh:174
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas1cube2dlocalbasis.hh:57
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas1cube2dlocalbasis.hh:46
│ │ │ │ +
RT1Cube2DLocalBasis(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas1cube2dlocalbasis.hh:39
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas1cube2dlocalbasis.hh:161
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,203 +1,219 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -emptypoints.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d │ │ │ │ │ +raviartthomas1cube2dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LAGRANGE_EMPTYPOINTS_HH │ │ │ │ │ -6#define DUNE_LAGRANGE_EMPTYPOINTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ 12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 template< class F, unsigned int dim > │ │ │ │ │ -_1_7 class _L_a_g_r_a_n_g_e_P_o_i_n_t │ │ │ │ │ -18 { │ │ │ │ │ -19 typedef _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _F_,_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -20 │ │ │ │ │ -21 template< class, class > │ │ │ │ │ -_2_2 friend class _L_a_g_r_a_n_g_e_P_o_i_n_t_S_e_t_I_m_p_l; │ │ │ │ │ -23 │ │ │ │ │ -24 public: │ │ │ │ │ -_2_5 static const int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -26 │ │ │ │ │ -_2_7 typedef F _F_i_e_l_d; │ │ │ │ │ -28 │ │ │ │ │ -_2_9 typedef FieldVector< Field, dimension > _V_e_c_t_o_r; │ │ │ │ │ -30 │ │ │ │ │ -_3_1 const _V_e_c_t_o_r &_p_o_i_n_t () const │ │ │ │ │ -32 { │ │ │ │ │ -33 return _p_o_i_n_t__; │ │ │ │ │ -34 } │ │ │ │ │ -35 │ │ │ │ │ -_3_6 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y () const │ │ │ │ │ -37 { │ │ │ │ │ -38 return _l_o_c_a_l_K_e_y__; │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -_4_1 const _F_i_e_l_d _w_e_i_g_h_t () const │ │ │ │ │ -42 { │ │ │ │ │ -43 return _w_e_i_g_h_t__; │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_6 _V_e_c_t_o_r _p_o_i_n_t__ = {}; │ │ │ │ │ -_4_7 _L_o_c_a_l_K_e_y _l_o_c_a_l_K_e_y__ = {}; │ │ │ │ │ -_4_8 _F_i_e_l_d _w_e_i_g_h_t__ = {}; │ │ │ │ │ -49 }; │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +28 { │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 for (size_t i=0; i<4; i++) │ │ │ │ │ +42 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_6 unsigned int _s_i_z_e () const │ │ │ │ │ +47 { │ │ │ │ │ +48 return 12; │ │ │ │ │ +49 } │ │ │ │ │ 50 │ │ │ │ │ -51 // EmptyPointSet │ │ │ │ │ -52 // -------------- │ │ │ │ │ -53 │ │ │ │ │ -54 template< class F, unsigned int dim > │ │ │ │ │ -_5_5 class _E_m_p_t_y_P_o_i_n_t_S_e_t │ │ │ │ │ -56 { │ │ │ │ │ -57 typedef _E_m_p_t_y_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> _T_h_i_s; │ │ │ │ │ -58 │ │ │ │ │ -59 public: │ │ │ │ │ -_6_0 typedef F _F_i_e_l_d; │ │ │ │ │ +_5_7 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +58 std::vector& out) const │ │ │ │ │ +59 { │ │ │ │ │ +60 out.resize(12); │ │ │ │ │ 61 │ │ │ │ │ -_6_2 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -63 │ │ │ │ │ -_6_4 typedef _D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _F_i_e_l_d_,_ _d_i_m_e_n_s_i_o_n_ _> _L_a_g_r_a_n_g_e_P_o_i_n_t; │ │ │ │ │ -65 │ │ │ │ │ -_6_6 typedef typename std::vector< LagrangePoint >::const_iterator _i_t_e_r_a_t_o_r; │ │ │ │ │ -67 │ │ │ │ │ -68 protected: │ │ │ │ │ -_6_9 _E_m_p_t_y_P_o_i_n_t_S_e_t ( const std::size_t _o_r_d_e_r ) │ │ │ │ │ -70 : _o_r_d_e_r__( _o_r_d_e_r ) │ │ │ │ │ -71 {} │ │ │ │ │ -72 │ │ │ │ │ -73 public: │ │ │ │ │ -_7_4 const _L_a_g_r_a_n_g_e_P_o_i_n_t &_o_p_e_r_a_t_o_r_[_]_ ( const unsigned int i ) const │ │ │ │ │ -75 { │ │ │ │ │ -76 assert( i < _s_i_z_e() ); │ │ │ │ │ -77 return _p_o_i_n_t_s__[ i ]; │ │ │ │ │ -78 } │ │ │ │ │ -79 │ │ │ │ │ -_8_0 _i_t_e_r_a_t_o_r _b_e_g_i_n () const │ │ │ │ │ -81 { │ │ │ │ │ -82 return _p_o_i_n_t_s__.begin(); │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -_8_5 _i_t_e_r_a_t_o_r _e_n_d () const │ │ │ │ │ -86 { │ │ │ │ │ -87 return _p_o_i_n_t_s__.end(); │ │ │ │ │ -88 } │ │ │ │ │ -89 │ │ │ │ │ -_9_0 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ -91 { │ │ │ │ │ -92 return (*this)[ i ].localKey(); │ │ │ │ │ -93 } │ │ │ │ │ -94 │ │ │ │ │ -_9_5 std::size_t _o_r_d_e_r () const │ │ │ │ │ +62 out[0][0] = sign_[0]*(-1.0 + 4.0*in[0]-3*in[0]*in[0]); │ │ │ │ │ +63 out[0][1] = 0.0; │ │ │ │ │ +64 out[1][0] = 3.0 - 12.0*in[0] - 6.0*in[1] + 24.0*in[0]*in[1]+9*in[0]*in[0] - │ │ │ │ │ +18.0*in[0]*in[0]*in[1]; │ │ │ │ │ +65 out[1][1] = 0.0; │ │ │ │ │ +66 out[2][0] = sign_[1]*(-2.0*in[0] + 3.0*in[0]*in[0]); │ │ │ │ │ +67 out[2][1] = 0.0; │ │ │ │ │ +68 out[3][0] = -6.0*in[0] + 12.0*in[0]*in[1] + 9.0*in[0]*in[0] - 18.0*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +69 out[3][1] = 0.0; │ │ │ │ │ +70 out[4][0] = 0.0; │ │ │ │ │ +71 out[4][1] = sign_[2]*(-1.0 + 4.0*in[1] - 3.0*in[1]*in[1]); │ │ │ │ │ +72 out[5][0] = 0.0; │ │ │ │ │ +73 out[5][1] = -3.0 + 6.0*in[0] + 12.0*in[1] - 24.0*in[0]*in[1] - 9.0*in[1]*in │ │ │ │ │ +[1] + 18.0*in[0]*in[1]*in[1]; │ │ │ │ │ +74 out[6][0] = 0.0; │ │ │ │ │ +75 out[6][1] = sign_[3]*(-2.0*in[1] + 3.0*in[1]*in[1]); │ │ │ │ │ +76 out[7][0] = 0.0; │ │ │ │ │ +77 out[7][1] = 6.0*in[1] - 12.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +78 out[8][0] = 24.0*in[0] - 36.0*in[0]*in[1] - 24.0*in[0]*in[0] + 36.0*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +79 out[8][1] = 0.0; │ │ │ │ │ +80 out[9][0] = 0.0; │ │ │ │ │ +81 out[9][1] = 24.0*in[1] - 36.0*in[0]*in[1] - 24.0*in[1]*in[1] + 36.0*in[0]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +82 out[10][0] = -36.0*in[0] + 72.0*in[0]*in[1] + 36.0*in[0]*in[0] - 72.0*in │ │ │ │ │ +[0]*in[0]*in[1]; │ │ │ │ │ +83 out[10][1] = 0.0; │ │ │ │ │ +84 out[11][0] = 0.0; │ │ │ │ │ +85 out[11][1] = -36.0*in[1] + 72.0*in[0]*in[1] + 36*in[1]*in[1] - 72.0*in[0]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +86 } │ │ │ │ │ +87 │ │ │ │ │ +_9_4 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +95 std::vector& out) const │ │ │ │ │ 96 { │ │ │ │ │ -97 return _o_r_d_e_r__; │ │ │ │ │ -98 } │ │ │ │ │ -99 │ │ │ │ │ -_1_0_0 std::size_t _s_i_z_e () const │ │ │ │ │ -101 { │ │ │ │ │ -102 return _p_o_i_n_t_s__.size(); │ │ │ │ │ -103 } │ │ │ │ │ -104 │ │ │ │ │ -105 protected: │ │ │ │ │ -_1_0_6 std::size_t _o_r_d_e_r__; │ │ │ │ │ -_1_0_7 std::vector< LagrangePoint > _p_o_i_n_t_s__; │ │ │ │ │ -108 }; │ │ │ │ │ -109 │ │ │ │ │ -110} │ │ │ │ │ -111 │ │ │ │ │ -112#endif // DUNE_LAGRANGE_EMPTYPOINTS_HH │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +97 out.resize(12); │ │ │ │ │ +98 │ │ │ │ │ +99 out[0][0][0] = sign_[0]*(4.0 - 6.0*in[0]); │ │ │ │ │ +100 out[0][0][1] = 0.0; │ │ │ │ │ +101 out[0][1][0] = 0.0; │ │ │ │ │ +102 out[0][1][1] = 0.0; │ │ │ │ │ +103 │ │ │ │ │ +104 out[1][0][0] = -12.0 + 24.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1]; │ │ │ │ │ +105 out[1][0][1] = -6 + 24.0*in[0] - 18.0*in[0]*in[0]; │ │ │ │ │ +106 out[1][1][0] = 0.0; │ │ │ │ │ +107 out[1][1][1] = 0.0; │ │ │ │ │ +108 │ │ │ │ │ +109 out[2][0][0] = sign_[1]*(-2.0 + 6.0*in[0]); │ │ │ │ │ +110 out[2][0][1] = 0.0; │ │ │ │ │ +111 out[2][1][0] = 0.0; │ │ │ │ │ +112 out[2][1][1] = 0.0; │ │ │ │ │ +113 │ │ │ │ │ +114 out[3][0][0] = -6.0 + 12.0*in[1] + 18.0*in[0] - 36.0*in[0]*in[1]; │ │ │ │ │ +115 out[3][0][1] = 12.0*in[0] - 18.0*in[0]*in[0]; │ │ │ │ │ +116 out[3][1][0] = 0.0; │ │ │ │ │ +117 out[3][1][1] = 0.0; │ │ │ │ │ +118 │ │ │ │ │ +119 out[4][0][0] = 0.0; │ │ │ │ │ +120 out[4][0][1] = 0.0; │ │ │ │ │ +121 out[4][1][0] = 0.0; │ │ │ │ │ +122 out[4][1][1] = sign_[2]*(4.0 - 6.0*in[1]); │ │ │ │ │ +123 │ │ │ │ │ +124 out[5][0][0] = 0.0; │ │ │ │ │ +125 out[5][0][1] = 0.0; │ │ │ │ │ +126 out[5][1][0] = 6.0 - 24.0*in[1] + 18.0*in[1]*in[1]; │ │ │ │ │ +127 out[5][1][1] = 12.0 - 24.0*in[0] - 18.0*in[1] + 36.0*in[0]*in[1]; │ │ │ │ │ +128 │ │ │ │ │ +129 out[6][0][0] = 0.0; │ │ │ │ │ +130 out[6][0][1] = 0.0; │ │ │ │ │ +131 out[6][1][0] = 0.0; │ │ │ │ │ +132 out[6][1][1] = sign_[3]*(-2.0 + 6.0*in[1]); │ │ │ │ │ +133 │ │ │ │ │ +134 out[7][0][0] = 0.0; │ │ │ │ │ +135 out[7][0][1] = 0.0; │ │ │ │ │ +136 out[7][1][0] = -12.0*in[1] + 18.0*in[1]*in[1]; │ │ │ │ │ +137 out[7][1][1] = 6.0 - 12.0*in[0] - 18.0*in[1] + 36.0*in[1]*in[0]; │ │ │ │ │ +138 │ │ │ │ │ +139 out[8][0][0] = 24.0 - 36.0*in[1] - 48.0*in[0] + 72.0*in[0]*in[1]; │ │ │ │ │ +140 out[8][0][1] = -36.0*in[0] + 36.0*in[0]*in[0]; │ │ │ │ │ +141 out[8][1][0] = 0.0; │ │ │ │ │ +142 out[8][1][1] = 0.0; │ │ │ │ │ +143 │ │ │ │ │ +144 out[9][0][0] = 0.0; │ │ │ │ │ +145 out[9][0][1] = 0.0; │ │ │ │ │ +146 out[9][1][0] = -36.0*in[1] + 36.0*in[1]*in[1]; │ │ │ │ │ +147 out[9][1][1] = 24.0 - 36.0*in[0] - 48.0*in[1] + 72.0*in[0]*in[1]; │ │ │ │ │ +148 │ │ │ │ │ +149 out[10][0][0] = -36.0 + 72.0*in[1] + 72.0*in[0] - 144.0*in[0]*in[1]; │ │ │ │ │ +150 out[10][0][1] = 72.0*in[0] - 72.0*in[0]*in[0]; │ │ │ │ │ +151 out[10][1][0] = 0.0; │ │ │ │ │ +152 out[10][1][1] = 0.0; │ │ │ │ │ +153 │ │ │ │ │ +154 out[11][0][0] = 0.0; │ │ │ │ │ +155 out[11][0][1] = 0.0; │ │ │ │ │ +156 out[11][1][0] = 72.0*in[1] - 72.0*in[1]*in[1]; │ │ │ │ │ +157 out[11][1][1] = -36.0 + 72.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1]; │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +162 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +163 std::vector& out) const // return value │ │ │ │ │ +164 { │ │ │ │ │ +165 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +166 if (totalOrder == 0) { │ │ │ │ │ +167 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +168 } else { │ │ │ │ │ +169 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +170 } │ │ │ │ │ +171 } │ │ │ │ │ +172 │ │ │ │ │ +_1_7_4 unsigned int _o_r_d_e_r () const │ │ │ │ │ +175 { │ │ │ │ │ +176 return 3; │ │ │ │ │ +177 } │ │ │ │ │ +178 │ │ │ │ │ +179 private: │ │ │ │ │ +180 std::array sign_; │ │ │ │ │ +181 }; │ │ │ │ │ +182} │ │ │ │ │ +183#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_w_e_i_g_h_t__ │ │ │ │ │ -Field weight_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const int dimension │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_S_e_t_I_m_p_l │ │ │ │ │ -friend class LagrangePointSetImpl │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_p_o_i_n_t__ │ │ │ │ │ -Vector point_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_w_e_i_g_h_t │ │ │ │ │ -const Field weight() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:41 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_V_e_c_t_o_r │ │ │ │ │ -FieldVector< Field, dimension > Vector │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_p_o_i_n_t │ │ │ │ │ -const Vector & point() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_l_o_c_a_l_K_e_y__ │ │ │ │ │ -LocalKey localKey_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r__ │ │ │ │ │ -std::size_t order_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:106 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t │ │ │ │ │ -EmptyPointSet(const std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:69 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_o_p_e_r_a_t_o_r_[_] │ │ │ │ │ -const LagrangePoint & operator[](const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:100 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t │ │ │ │ │ -Dune::LagrangePoint< Field, dimension > LagrangePoint │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:64 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_b_e_g_i_n │ │ │ │ │ -iterator begin() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:80 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_e_n_d │ │ │ │ │ -iterator end() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:85 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_p_o_i_n_t_s__ │ │ │ │ │ -std::vector< LagrangePoint > points_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_i_t_e_r_a_t_o_r │ │ │ │ │ -std::vector< LagrangePoint >::const_iterator iterator │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:94 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:174 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT1Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:161 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p2.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,42 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
p2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas2cube2d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas2cube2d/raviartthomas2cube2dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas2cube2d/raviartthomas2cube2dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas2cube2d/raviartthomas2cube2dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT2Cube2DLocalFiniteElement< D, R >
 Second order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , int d>
using Dune::P2LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, 2 >
 Second-order Lagrange finite element on the reference simplex with compile-time dimension.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -p2.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas2cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, │ │ │ │ │ - 2 > │ │ │ │ │ -  Second-order Lagrange finite element on the reference simplex with │ │ │ │ │ - compile-time dimension. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00224_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p2.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,123 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p2.hh
│ │ │ │ +
raviartthomas2cube2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_P2_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
19 template<class D, class R, int d>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 basis(s),
│ │ │ │ +
46 interpolation(s)
│ │ │ │ +
47 {}
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
50 {
│ │ │ │ +
51 return basis;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return coefficients;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60 {
│ │ │ │ +
61 return interpolation;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
65 unsigned int size () const
│ │ │ │ +
66 {
│ │ │ │ +
67 return basis.size();
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::quadrilateral;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT2Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas2cube2d.hh:27
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas2cube2d.hh:49
│ │ │ │ +
LocalFiniteElementTraits< RT2Cube2DLocalBasis< D, R >, RT2Cube2DLocalCoefficients, RT2Cube2DLocalInterpolation< RT2Cube2DLocalBasis< D, R > > > Traits
Definition raviartthomas2cube2d.hh:33
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas2cube2d.hh:54
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas2cube2d.hh:65
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas2cube2d.hh:70
│ │ │ │ +
RT2Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition raviartthomas2cube2d.hh:44
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas2cube2d.hh:59
│ │ │ │ +
RT2Cube2DLocalFiniteElement()
Standard constructor.
Definition raviartthomas2cube2d.hh:36
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas2cube2dlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-2 elements on quadrilaterals.
Definition raviartthomas2cube2dlocalcoefficients.hh:23
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas2cube2dlocalinterpolation.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -p2.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas2cube2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_P2_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 14 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 using _P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -22 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_,_2_>; │ │ │ │ │ -23 │ │ │ │ │ -24} │ │ │ │ │ -25 │ │ │ │ │ -26#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 { │ │ │ │ │ +28 │ │ │ │ │ +29 public: │ │ │ │ │ +30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +31 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +32 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_3 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_4 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +45 basis(s), │ │ │ │ │ +46 interpolation(s) │ │ │ │ │ +47 {} │ │ │ │ │ +48 │ │ │ │ │ +_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +50 { │ │ │ │ │ +51 return basis; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return coefficients; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_5_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +60 { │ │ │ │ │ +61 return interpolation; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 unsigned int _s_i_z_e () const │ │ │ │ │ +66 { │ │ │ │ │ +67 return basis.size(); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +71 { │ │ │ │ │ +72 return GeometryTypes::quadrilateral; │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 private: │ │ │ │ │ +76 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +77 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +78 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +79 }; │ │ │ │ │ +80} │ │ │ │ │ +81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT2Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT2Cube2DLocalCoefficients, RT2Cube2DLocalInterpolation< RT2Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT2Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT2Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk2d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomascube.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,68 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk2d.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
raviartthomascube.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ + │ │ │ │ +

Convenience header that includes all available Raviart-Thomas local finite elements for cubes. │ │ │ │ +More...

│ │ │ │ +
#include "raviartthomas0cube2d.hh"
│ │ │ │ +#include "raviartthomas0cube3d.hh"
│ │ │ │ +#include "raviartthomas1cube2d.hh"
│ │ │ │ +#include "raviartthomas1cube3d.hh"
│ │ │ │ +#include "raviartthomas2cube2d.hh"
│ │ │ │ +#include "raviartthomas3cube2d.hh"
│ │ │ │ +#include "raviartthomas4cube2d.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Pk2DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 0 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 0. More...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 1 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 1. More...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 2 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 2. More...
 
struct  Dune::Pk2DFiniteElement< Geometry, RF, k >::Traits
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 3 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 3. More...
 
struct  Dune::Pk2DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk2DFiniteElement objects. More...
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 2, 4 >
 Raviart-Thomas local finite elements for cubes with dimension 2 and order 4. More...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 0 >
 Raviart-Thomas local finite elements for cubes with dimension 3 and order 0. More...
 
class  Dune::RaviartThomasCubeLocalFiniteElement< D, R, 3, 1 >
 Raviart-Thomas local finite elements for cubes with dimension 3 and order 1. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk2DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 2, k >
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Convenience header that includes all available Raviart-Thomas local finite elements for cubes.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,34 +1,56 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pk2d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomascube.hh File Reference │ │ │ │ │ +Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ +elements for cubes. _M_o_r_e_._._. │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ -  Langrange finite element of arbitrary order on triangles. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _0_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 0. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _1_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 1. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ -struct   _D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ -  Factory for _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t objects. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 2. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _3_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 3. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _4_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 2 and │ │ │ │ │ + order 4. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _0_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 3 and │ │ │ │ │ + order 0. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _1_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements for cubes with dimension 3 and │ │ │ │ │ + order 1. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_k_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 2, k > │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Convenience header that includes all available Raviart-Thomas local finite │ │ │ │ │ +elements for cubes. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00227_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk2d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomascube.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,152 +70,213 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk2d.hh
│ │ │ │ +
raviartthomascube.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PK2DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
15
│ │ │ │ -
16#warning This header is deprecated
│ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20
│ │ │ │ -
25 template<class D, class R, unsigned int k>
│ │ │ │ - │ │ │ │ -
27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30
│ │ │ │ -
32
│ │ │ │ -
39 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 typedef typename Geometry::ctype DF;
│ │ │ │ -
42 typedef Impl::LagrangeSimplexLocalBasis<DF,RF,2,k> LocalBasis;
│ │ │ │ -
43 typedef Impl::LagrangeSimplexLocalInterpolation<LocalBasis> LocalInterpolation;
│ │ │ │ -
44
│ │ │ │ -
45 public:
│ │ │ │ -
│ │ │ │ -
49 struct Traits {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
52 LocalInterpolation,
│ │ │ │ -
53 typename Basis::Traits
│ │ │ │ - │ │ │ │ -
55 typedef Impl::LagrangeSimplexLocalCoefficients<2,k> Coefficients;
│ │ │ │ -
56 };
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 static const GeometryType gt;
│ │ │ │ -
60 static const LocalBasis localBasis;
│ │ │ │ -
61 static const LocalInterpolation localInterpolation;
│ │ │ │ -
62
│ │ │ │ -
63 typename Traits::Basis basis_;
│ │ │ │ -
64 typename Traits::Interpolation interpolation_;
│ │ │ │ -
65 typename Traits::Coefficients coefficients_;
│ │ │ │ -
66
│ │ │ │ -
67 public:
│ │ │ │ -
69
│ │ │ │ -
82 template<class VertexOrder>
│ │ │ │ -
│ │ │ │ -
83 Pk2DFiniteElement(const Geometry &geometry,
│ │ │ │ -
84 const VertexOrder& vertexOrder) :
│ │ │ │ -
85 basis_(localBasis, geometry), interpolation_(localInterpolation),
│ │ │ │ -
86 coefficients_(vertexOrder.begin(0, 0))
│ │ │ │ -
87 { }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
89 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ -
│ │ │ │ -
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ -
91 { return interpolation_; }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
92 const typename Traits::Coefficients& coefficients() const
│ │ │ │ -
93 { return coefficients_; }
│ │ │ │ -
│ │ │ │ -
94 const GeometryType &type() const { return gt; }
│ │ │ │ -
95 };
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
98 const GeometryType
│ │ │ │ -
99 Pk2DFiniteElement<Geometry, RF, k>::gt(GeometryTypes::simplex(2));
│ │ │ │ -
100
│ │ │ │ -
101 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
102 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalBasis
│ │ │ │ -
103 Pk2DFiniteElement<Geometry, RF, k>::localBasis = LocalBasis();
│ │ │ │ +
22namespace Dune
│ │ │ │ +
23{
│ │ │ │ +
39 template<class D, class R, unsigned int dim, unsigned int order>
│ │ │ │ + │ │ │ │ +
41
│ │ │ │ +
45 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
47 : public RT0Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
48 {
│ │ │ │ +
49 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
52 {}
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
56 {}
│ │ │ │ +
│ │ │ │ +
57 };
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
62 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
64 : public RT1Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
65 {
│ │ │ │ +
66 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
69 {}
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
73 {}
│ │ │ │ +
│ │ │ │ +
74 };
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
79 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
81 : public RT2Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
82 {
│ │ │ │ +
83 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
86 {}
│ │ │ │ +
│ │ │ │ +
87
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
90 {}
│ │ │ │ +
│ │ │ │ +
91 };
│ │ │ │ +
│ │ │ │ +
92
│ │ │ │ +
96 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
98 : public RT3Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
99 {
│ │ │ │ +
100 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
103 {}
│ │ │ │ +
│ │ │ │
104
│ │ │ │ -
105 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
106 const typename Pk2DFiniteElement<Geometry, RF, k>::LocalInterpolation
│ │ │ │ -
107 Pk2DFiniteElement<Geometry, RF, k>::localInterpolation =
│ │ │ │ -
108 LocalInterpolation();
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
107 {}
│ │ │ │ +
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │
109
│ │ │ │ -
111
│ │ │ │ -
121 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
124
│ │ │ │ +
113 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
115 : public RT4Cube2DLocalFiniteElement<D, R>
│ │ │ │ +
116 {
│ │ │ │ +
117 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
120 {}
│ │ │ │ +
│ │ │ │ +
121
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
124 {}
│ │ │ │ +
│ │ │ │ +
125 };
│ │ │ │ +
│ │ │ │
126
│ │ │ │ -
140 template<class VertexOrder>
│ │ │ │ -
│ │ │ │ -
141 const FiniteElement make(const Geometry& geometry,
│ │ │ │ -
142 const VertexOrder& vertexOrder)
│ │ │ │ -
143 { return FiniteElement(geometry, vertexOrder); }
│ │ │ │ -
│ │ │ │ -
144 };
│ │ │ │ -
│ │ │ │ -
145}
│ │ │ │ -
146
│ │ │ │ -
147#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
130 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
132 : public RT0Cube3DLocalFiniteElement<D, R>
│ │ │ │ +
133 {
│ │ │ │ +
134 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
137 {}
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
141 {}
│ │ │ │ +
│ │ │ │ +
142 };
│ │ │ │ +
│ │ │ │ +
143
│ │ │ │ +
147 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
149 : public RT1Cube3DLocalFiniteElement<D, R>
│ │ │ │ +
150 {
│ │ │ │ +
151 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
154 {}
│ │ │ │ +
│ │ │ │ +
155
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ +
158 {}
│ │ │ │ +
│ │ │ │ +
159 };
│ │ │ │ +
│ │ │ │ +
160} // namespace Dune
│ │ │ │ +
161
│ │ │ │ +
162#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ -
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ -
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
Langrange finite element of arbitrary order on triangles.
Definition pk2d.hh:40
│ │ │ │ -
Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder)
construct a Pk2DFiniteElement
Definition pk2d.hh:83
│ │ │ │ -
const Traits::Interpolation & interpolation() const
Definition pk2d.hh:90
│ │ │ │ -
const Traits::Basis & basis() const
Definition pk2d.hh:89
│ │ │ │ -
const Traits::Coefficients & coefficients() const
Definition pk2d.hh:92
│ │ │ │ -
const GeometryType & type() const
Definition pk2d.hh:94
│ │ │ │ -
Definition pk2d.hh:49
│ │ │ │ -
ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis
Definition pk2d.hh:50
│ │ │ │ -
Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients
Definition pk2d.hh:55
│ │ │ │ -
LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > Interpolation
Definition pk2d.hh:54
│ │ │ │ -
Factory for Pk2DFiniteElement objects.
Definition pk2d.hh:122
│ │ │ │ -
Pk2DFiniteElement< Geometry, RF, k > FiniteElement
Definition pk2d.hh:123
│ │ │ │ -
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct Pk2DFiniteElementFactory
Definition pk2d.hh:141
│ │ │ │ +
Zero order Raviart-Thomas shape functions on rectangles.
Definition raviartthomas0cube2d.hh:25
│ │ │ │ +
Zero order Raviart-Thomas shape functions on cubes.
Definition raviartthomas0cube3d.hh:25
│ │ │ │ +
First order Raviart-Thomas shape functions on quadrilaterals.
Definition raviartthomas1cube2d.hh:28
│ │ │ │ +
First order Raviart-Thomas shape functions on cubes.
Definition raviartthomas1cube3d.hh:27
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas2cube2d.hh:27
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas3cube2d.hh:29
│ │ │ │ +
Second order Raviart-Thomas shape functions on cubes.
Definition raviartthomas4cube2d.hh:29
│ │ │ │ +
Raviart-Thomas local finite elements for cubes.
Definition raviartthomascube.hh:40
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:54
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:50
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:67
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:71
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:84
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:88
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:105
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:101
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:122
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:118
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:135
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:139
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement()
Definition raviartthomascube.hh:152
│ │ │ │ +
RaviartThomasCubeLocalFiniteElement(int s)
Definition raviartthomascube.hh:156
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,169 +1,221 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pk2d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomascube.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_PK2DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +8#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h" │ │ │ │ │ +9#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h" │ │ │ │ │ +10#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h" │ │ │ │ │ +14#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_._h_h" │ │ │ │ │ 15 │ │ │ │ │ -16#warning This header is deprecated │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 using _P_k_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -28 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_k_>; │ │ │ │ │ -29 │ │ │ │ │ -30 │ │ │ │ │ -32 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 class _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ -41 typedef typename Geometry::ctype DF; │ │ │ │ │ -42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ -43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ -LocalInterpolation; │ │ │ │ │ -44 │ │ │ │ │ -45 public: │ │ │ │ │ -_4_9 struct _T_r_a_i_t_s { │ │ │ │ │ -_5_0 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_<_L_o_c_a_l_B_a_s_i_s_,_ _G_e_o_m_e_t_r_y_> _B_a_s_i_s; │ │ │ │ │ -51 typedef _L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r< │ │ │ │ │ -52 LocalInterpolation, │ │ │ │ │ -53 typename _B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -_5_4 > _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -_5_5 typedef Impl::LagrangeSimplexLocalCoefficients<2,k> _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ -56 }; │ │ │ │ │ -57 │ │ │ │ │ -58 private: │ │ │ │ │ -59 static const GeometryType gt; │ │ │ │ │ -60 static const LocalBasis localBasis; │ │ │ │ │ -61 static const LocalInterpolation localInterpolation; │ │ │ │ │ -62 │ │ │ │ │ -63 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ -64 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ -65 typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s coefficients_; │ │ │ │ │ -66 │ │ │ │ │ -67 public: │ │ │ │ │ -69 │ │ │ │ │ -82 template │ │ │ │ │ -_8_3 _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t(const Geometry &geometry, │ │ │ │ │ -84 const VertexOrder& vertexOrder) : │ │ │ │ │ -85 basis_(localBasis, geometry), interpolation_(localInterpolation), │ │ │ │ │ -86 coefficients_(vertexOrder.begin(0, 0)) │ │ │ │ │ -87 { } │ │ │ │ │ -88 │ │ │ │ │ -_8_9 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ -_9_0 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ -91 { return interpolation_; } │ │ │ │ │ -_9_2 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ -93 { return coefficients_; } │ │ │ │ │ -_9_4 const GeometryType &_t_y_p_e() const { return gt; } │ │ │ │ │ -95 }; │ │ │ │ │ -96 │ │ │ │ │ -97 template │ │ │ │ │ -98 const GeometryType │ │ │ │ │ -99 Pk2DFiniteElement::gt(GeometryTypes::simplex(2)); │ │ │ │ │ -100 │ │ │ │ │ -101 template │ │ │ │ │ -102 const typename Pk2DFiniteElement::LocalBasis │ │ │ │ │ -103 Pk2DFiniteElement::localBasis = LocalBasis(); │ │ │ │ │ +22namespace _D_u_n_e │ │ │ │ │ +23{ │ │ │ │ │ +39 template │ │ │ │ │ +_4_0 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ +41 │ │ │ │ │ +45 template │ │ │ │ │ +_4_6 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +47 : public _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +48 { │ │ │ │ │ +49 public: │ │ │ │ │ +_5_0 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +51 : _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +52 {} │ │ │ │ │ +53 │ │ │ │ │ +_5_4 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +55 : _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +56 {} │ │ │ │ │ +57 }; │ │ │ │ │ +58 │ │ │ │ │ +62 template │ │ │ │ │ +_6_3 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +64 : public _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +65 { │ │ │ │ │ +66 public: │ │ │ │ │ +_6_7 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +68 : _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +69 {} │ │ │ │ │ +70 │ │ │ │ │ +_7_1 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +72 : _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +73 {} │ │ │ │ │ +74 }; │ │ │ │ │ +75 │ │ │ │ │ +79 template │ │ │ │ │ +_8_0 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +81 : public _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +82 { │ │ │ │ │ +83 public: │ │ │ │ │ +_8_4 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +85 : _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +86 {} │ │ │ │ │ +87 │ │ │ │ │ +_8_8 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +89 : _R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +90 {} │ │ │ │ │ +91 }; │ │ │ │ │ +92 │ │ │ │ │ +96 template │ │ │ │ │ +_9_7 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +98 : public _R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +99 { │ │ │ │ │ +100 public: │ │ │ │ │ +_1_0_1 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +102 : _R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +103 {} │ │ │ │ │ 104 │ │ │ │ │ -105 template │ │ │ │ │ -106 const typename Pk2DFiniteElement::LocalInterpolation │ │ │ │ │ -107 Pk2DFiniteElement::localInterpolation = │ │ │ │ │ -108 LocalInterpolation(); │ │ │ │ │ +_1_0_5 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +106 : _R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +107 {} │ │ │ │ │ +108 }; │ │ │ │ │ 109 │ │ │ │ │ -111 │ │ │ │ │ -121 template │ │ │ │ │ -_1_2_2 struct _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ -_1_2_3 typedef _P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ -124 │ │ │ │ │ +113 template │ │ │ │ │ +_1_1_4 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +115 : public _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +116 { │ │ │ │ │ +117 public: │ │ │ │ │ +_1_1_8 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +119 : _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +120 {} │ │ │ │ │ +121 │ │ │ │ │ +_1_2_2 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +123 : _R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +124 {} │ │ │ │ │ +125 }; │ │ │ │ │ 126 │ │ │ │ │ -140 template │ │ │ │ │ -_1_4_1 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry, │ │ │ │ │ -142 const VertexOrder& vertexOrder) │ │ │ │ │ -143 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(geometry, vertexOrder); } │ │ │ │ │ -144 }; │ │ │ │ │ -145} │ │ │ │ │ -146 │ │ │ │ │ -147#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ +130 template │ │ │ │ │ +_1_3_1 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +132 : public _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +133 { │ │ │ │ │ +134 public: │ │ │ │ │ +_1_3_5 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +136 : _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +137 {} │ │ │ │ │ +138 │ │ │ │ │ +_1_3_9 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +140 : _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +141 {} │ │ │ │ │ +142 }; │ │ │ │ │ +143 │ │ │ │ │ +147 template │ │ │ │ │ +_1_4_8 class _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +149 : public _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +150 { │ │ │ │ │ +151 public: │ │ │ │ │ +_1_5_2 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +153 : _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() │ │ │ │ │ +154 {} │ │ │ │ │ +155 │ │ │ │ │ +_1_5_6 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(int s) │ │ │ │ │ +157 : _R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t::_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(s) │ │ │ │ │ +158 {} │ │ │ │ │ +159 }; │ │ │ │ │ +160} // namespace Dune │ │ │ │ │ +161 │ │ │ │ │ +162#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_CUBE_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_T_r_a_i_t_s │ │ │ │ │ -Traits class for local-to-global basis adaptors. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r │ │ │ │ │ -Convert a local interpolation into a global interpolation. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Langrange finite element of arbitrary order on triangles. │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Pk2DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ -construct a Pk2DFiniteElement │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -const GeometryType & type() const │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Impl::LagrangeSimplexLocalCoefficients< 2, k > Coefficients │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ -Interpolation │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for Pk2DFiniteElement objects. │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Pk2DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_P_k_2_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ -&vertexOrder) │ │ │ │ │ -construct Pk2DFiniteElementFactory │ │ │ │ │ -DDeeffiinniittiioonn pk2d.hh:141 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3d.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2d.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Second order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Raviart-Thomas local finite elements for cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _0_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _0_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _1_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:67 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _1_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:84 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _3_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _3_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:101 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _4_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _4_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:118 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _0_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:135 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _0_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:139 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _1_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:152 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _3_,_ _1_ _>_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasCubeLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomascube.hh:156 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk1d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,55 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk1d.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas03d.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Pk1DFiniteElement< Geometry, RF, k >
 Langrange finite element of arbitrary order on triangles. More...
 
struct  Dune::Pk1DFiniteElement< Geometry, RF, k >::Traits
 
struct  Dune::Pk1DFiniteElementFactory< Geometry, RF, k >
 Factory for Pk1DFiniteElement objects. More...
class  Dune::RT03DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on tetrahedra. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk1DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 1, k >
 Lagrange finite element on the unit interval with arbitrary compile-time order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,36 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pk1d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas03d.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ -  Langrange finite element of arbitrary order on triangles. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_ _> │ │ │ │ │ -  Factory for _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t objects. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  _Z_e_r_o order Raviart-Thomas shape functions on tetrahedra. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_k_1_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 1, k > │ │ │ │ │ -  Lagrange finite element on the unit interval with arbitrary compile-time │ │ │ │ │ - order. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00230_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk1d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,152 +70,125 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk1d.hh
│ │ │ │ +
raviartthomas03d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PK1DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
15
│ │ │ │ -
16#warning This header is deprecated
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
20
│ │ │ │ -
25 template<class D, class R, unsigned int k>
│ │ │ │ - │ │ │ │ -
27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30
│ │ │ │ -
32
│ │ │ │ -
39 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
41 typedef typename Geometry::ctype DF;
│ │ │ │ -
42 typedef Impl::LagrangeSimplexLocalBasis<DF,RF,1,k> LocalBasis;
│ │ │ │ -
43 typedef Impl::LagrangeSimplexLocalInterpolation<LocalBasis> LocalInterpolation;
│ │ │ │ -
44
│ │ │ │ -
45 public:
│ │ │ │ -
│ │ │ │ -
49 struct Traits {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
52 LocalInterpolation,
│ │ │ │ -
53 typename Basis::Traits
│ │ │ │ - │ │ │ │ -
55 typedef Impl::LagrangeSimplexLocalCoefficients<1,k> Coefficients;
│ │ │ │ -
56 };
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ +
27 class
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
33
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 {}
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
43 RT03DLocalFiniteElement (std::bitset<4> s) :
│ │ │ │ +
44 basis(s),
│ │ │ │ +
45 interpolation(s)
│ │ │ │ +
46 {}
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
48 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
49 {
│ │ │ │ +
50 return basis;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
54 {
│ │ │ │ +
55 return coefficients;
│ │ │ │ +
56 }
│ │ │ │
│ │ │ │
57
│ │ │ │ -
58 private:
│ │ │ │ -
59 static const GeometryType gt;
│ │ │ │ -
60 static const LocalBasis localBasis;
│ │ │ │ -
61 static const LocalInterpolation localInterpolation;
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
59 {
│ │ │ │ +
60 return interpolation;
│ │ │ │ +
61 }
│ │ │ │ +
│ │ │ │
62
│ │ │ │ -
63 typename Traits::Basis basis_;
│ │ │ │ -
64 typename Traits::Interpolation interpolation_;
│ │ │ │ -
65 typename Traits::Coefficients coefficients_;
│ │ │ │ -
66
│ │ │ │ -
67 public:
│ │ │ │ -
69
│ │ │ │ -
82 template<class VertexOrder>
│ │ │ │ -
│ │ │ │ -
83 Pk1DFiniteElement(const Geometry &geometry,
│ │ │ │ -
84 const VertexOrder& vertexOrder) :
│ │ │ │ -
85 basis_(localBasis, geometry), interpolation_(localInterpolation),
│ │ │ │ -
86 coefficients_(vertexOrder.begin(0, 0))
│ │ │ │ -
87 { }
│ │ │ │ -
│ │ │ │ -
88
│ │ │ │ -
89 const typename Traits::Basis& basis() const { return basis_; }
│ │ │ │ -
│ │ │ │ -
90 const typename Traits::Interpolation& interpolation() const
│ │ │ │ -
91 { return interpolation_; }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
92 const typename Traits::Coefficients& coefficients() const
│ │ │ │ -
93 { return coefficients_; }
│ │ │ │ -
│ │ │ │ -
94 const GeometryType &type() const { return gt; }
│ │ │ │ -
95 };
│ │ │ │ -
│ │ │ │ -
96
│ │ │ │ -
97 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
98 const GeometryType
│ │ │ │ -
99 Pk1DFiniteElement<Geometry, RF, k>::gt(GeometryTypes::simplex(2));
│ │ │ │ -
100
│ │ │ │ -
101 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
102 const typename Pk1DFiniteElement<Geometry, RF, k>::LocalBasis
│ │ │ │ -
103 Pk1DFiniteElement<Geometry, RF, k>::localBasis = LocalBasis();
│ │ │ │ -
104
│ │ │ │ -
105 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
106 const typename Pk1DFiniteElement<Geometry, RF, k>::LocalInterpolation
│ │ │ │ -
107 Pk1DFiniteElement<Geometry, RF, k>::localInterpolation =
│ │ │ │ -
108 LocalInterpolation();
│ │ │ │ -
109
│ │ │ │ -
111
│ │ │ │ -
121 template<class Geometry, class RF, std::size_t k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
124
│ │ │ │ -
126
│ │ │ │ -
140 template<class VertexOrder>
│ │ │ │ -
│ │ │ │ -
141 const FiniteElement make(const Geometry& geometry,
│ │ │ │ -
142 const VertexOrder& vertexOrder)
│ │ │ │ -
143 { return FiniteElement(geometry, vertexOrder); }
│ │ │ │ -
│ │ │ │ -
144 };
│ │ │ │ -
│ │ │ │ -
145}
│ │ │ │ -
146
│ │ │ │ -
147#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
63 unsigned int size () const
│ │ │ │ +
64 {
│ │ │ │ +
65 return 4;
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
68 static constexpr GeometryType type ()
│ │ │ │ +
69 {
│ │ │ │ +
70 return GeometryTypes::tetrahedron;
│ │ │ │ +
71 }
│ │ │ │ +
│ │ │ │ +
72
│ │ │ │ +
73 private:
│ │ │ │ + │ │ │ │ +
75 RT03DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
77 };
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79}
│ │ │ │ +
80
│ │ │ │ +
81#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Traits class for local-to-global basis adaptors.
Definition localtoglobaladaptors.hh:30
│ │ │ │ -
Convert a simple scalar local basis into a global basis.
Definition localtoglobaladaptors.hh:65
│ │ │ │ -
Convert a local interpolation into a global interpolation.
Definition localtoglobaladaptors.hh:149
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
Langrange finite element of arbitrary order on triangles.
Definition pk1d.hh:40
│ │ │ │ -
Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder)
construct a Pk1DFiniteElement
Definition pk1d.hh:83
│ │ │ │ -
const Traits::Basis & basis() const
Definition pk1d.hh:89
│ │ │ │ -
const GeometryType & type() const
Definition pk1d.hh:94
│ │ │ │ -
const Traits::Coefficients & coefficients() const
Definition pk1d.hh:92
│ │ │ │ -
const Traits::Interpolation & interpolation() const
Definition pk1d.hh:90
│ │ │ │ -
Definition pk1d.hh:49
│ │ │ │ -
ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis
Definition pk1d.hh:50
│ │ │ │ -
LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > Interpolation
Definition pk1d.hh:54
│ │ │ │ -
Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients
Definition pk1d.hh:55
│ │ │ │ -
Factory for Pk1DFiniteElement objects.
Definition pk1d.hh:122
│ │ │ │ -
const FiniteElement make(const Geometry &geometry, const VertexOrder &vertexOrder)
construct Pk1DFiniteElementFactory
Definition pk1d.hh:141
│ │ │ │ -
Pk1DFiniteElement< Geometry, RF, k > FiniteElement
Definition pk1d.hh:123
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Zero order Raviart-Thomas shape functions on tetrahedra.
Definition raviartthomas03d.hh:29
│ │ │ │ +
LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits
Definition raviartthomas03d.hh:32
│ │ │ │ +
unsigned int size() const
Definition raviartthomas03d.hh:63
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas03d.hh:68
│ │ │ │ +
RT03DLocalFiniteElement(std::bitset< 4 > s)
Constructor with explicitly given face orientations.
Definition raviartthomas03d.hh:43
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas03d.hh:53
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas03d.hh:48
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas03d.hh:58
│ │ │ │ +
RT03DLocalFiniteElement()
Standard constructor.
Definition raviartthomas03d.hh:35
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference tetrahedron.
Definition raviartthomas03dlocalbasis.hh:26
│ │ │ │ +
Layout map for RT0 elements.
Definition raviartthomas03dlocalcoefficients.hh:24
│ │ │ │ +
Definition raviartthomas03dlocalinterpolation.hh:18
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,169 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pk1d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas03d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_PK1DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -15 │ │ │ │ │ -16#warning This header is deprecated │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ 17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -20 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 using _P_k_1_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -28 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_,_k_>; │ │ │ │ │ -29 │ │ │ │ │ -30 │ │ │ │ │ -32 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 class _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t { │ │ │ │ │ -41 typedef typename Geometry::ctype DF; │ │ │ │ │ -42 typedef Impl::LagrangeSimplexLocalBasis LocalBasis; │ │ │ │ │ -43 typedef Impl::LagrangeSimplexLocalInterpolation │ │ │ │ │ -LocalInterpolation; │ │ │ │ │ -44 │ │ │ │ │ -45 public: │ │ │ │ │ -_4_9 struct _T_r_a_i_t_s { │ │ │ │ │ -_5_0 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_<_L_o_c_a_l_B_a_s_i_s_,_ _G_e_o_m_e_t_r_y_> _B_a_s_i_s; │ │ │ │ │ -51 typedef _L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r< │ │ │ │ │ -52 LocalInterpolation, │ │ │ │ │ -53 typename _B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -_5_4 > _I_n_t_e_r_p_o_l_a_t_i_o_n; │ │ │ │ │ -_5_5 typedef Impl::LagrangeSimplexLocalCoefficients<1,k> _C_o_e_f_f_i_c_i_e_n_t_s; │ │ │ │ │ -56 }; │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class │ │ │ │ │ +28 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 { │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>,_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_2 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_5 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +36 {} │ │ │ │ │ +37 │ │ │ │ │ +_4_3 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset<4> s) : │ │ │ │ │ +44 basis(s), │ │ │ │ │ +45 interpolation(s) │ │ │ │ │ +46 {} │ │ │ │ │ +47 │ │ │ │ │ +_4_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +49 { │ │ │ │ │ +50 return basis; │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +_5_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +54 { │ │ │ │ │ +55 return coefficients; │ │ │ │ │ +56 } │ │ │ │ │ 57 │ │ │ │ │ -58 private: │ │ │ │ │ -59 static const GeometryType gt; │ │ │ │ │ -60 static const LocalBasis localBasis; │ │ │ │ │ -61 static const LocalInterpolation localInterpolation; │ │ │ │ │ +_5_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +59 { │ │ │ │ │ +60 return interpolation; │ │ │ │ │ +61 } │ │ │ │ │ 62 │ │ │ │ │ -63 typename _T_r_a_i_t_s_:_:_B_a_s_i_s basis_; │ │ │ │ │ -64 typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n interpolation_; │ │ │ │ │ -65 typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s coefficients_; │ │ │ │ │ -66 │ │ │ │ │ -67 public: │ │ │ │ │ -69 │ │ │ │ │ -82 template │ │ │ │ │ -_8_3 _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t(const Geometry &geometry, │ │ │ │ │ -84 const VertexOrder& vertexOrder) : │ │ │ │ │ -85 basis_(localBasis, geometry), interpolation_(localInterpolation), │ │ │ │ │ -86 coefficients_(vertexOrder.begin(0, 0)) │ │ │ │ │ -87 { } │ │ │ │ │ -88 │ │ │ │ │ -_8_9 const typename _T_r_a_i_t_s_:_:_B_a_s_i_s& _b_a_s_i_s() const { return basis_; } │ │ │ │ │ -_9_0 const typename _T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n& _i_n_t_e_r_p_o_l_a_t_i_o_n() const │ │ │ │ │ -91 { return interpolation_; } │ │ │ │ │ -_9_2 const typename _T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s& _c_o_e_f_f_i_c_i_e_n_t_s() const │ │ │ │ │ -93 { return coefficients_; } │ │ │ │ │ -_9_4 const GeometryType &_t_y_p_e() const { return gt; } │ │ │ │ │ -95 }; │ │ │ │ │ -96 │ │ │ │ │ -97 template │ │ │ │ │ -98 const GeometryType │ │ │ │ │ -99 Pk1DFiniteElement::gt(GeometryTypes::simplex(2)); │ │ │ │ │ -100 │ │ │ │ │ -101 template │ │ │ │ │ -102 const typename Pk1DFiniteElement::LocalBasis │ │ │ │ │ -103 Pk1DFiniteElement::localBasis = LocalBasis(); │ │ │ │ │ -104 │ │ │ │ │ -105 template │ │ │ │ │ -106 const typename Pk1DFiniteElement::LocalInterpolation │ │ │ │ │ -107 Pk1DFiniteElement::localInterpolation = │ │ │ │ │ -108 LocalInterpolation(); │ │ │ │ │ -109 │ │ │ │ │ -111 │ │ │ │ │ -121 template │ │ │ │ │ -_1_2_2 struct _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y { │ │ │ │ │ -_1_2_3 typedef _P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_<_G_e_o_m_e_t_r_y_,_ _R_F_,_ _k_> _F_i_n_i_t_e_E_l_e_m_e_n_t; │ │ │ │ │ -124 │ │ │ │ │ -126 │ │ │ │ │ -140 template │ │ │ │ │ -_1_4_1 const _F_i_n_i_t_e_E_l_e_m_e_n_t _m_a_k_e(const Geometry& geometry, │ │ │ │ │ -142 const VertexOrder& vertexOrder) │ │ │ │ │ -143 { return _F_i_n_i_t_e_E_l_e_m_e_n_t(geometry, vertexOrder); } │ │ │ │ │ -144 }; │ │ │ │ │ -145} │ │ │ │ │ -146 │ │ │ │ │ -147#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +_6_3 unsigned int _s_i_z_e () const │ │ │ │ │ +64 { │ │ │ │ │ +65 return 4; │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_8 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +69 { │ │ │ │ │ +70 return GeometryTypes::tetrahedron; │ │ │ │ │ +71 } │ │ │ │ │ +72 │ │ │ │ │ +73 private: │ │ │ │ │ +74 _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +75 _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +76 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +77 }; │ │ │ │ │ +78 │ │ │ │ │ +79} │ │ │ │ │ +80 │ │ │ │ │ +81#endif │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r_T_r_a_i_t_s │ │ │ │ │ -Traits class for local-to-global basis adaptors. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_B_a_s_i_s_A_d_a_p_t_o_r │ │ │ │ │ -Convert a simple scalar local basis into a global basis. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_T_o_G_l_o_b_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_A_d_a_p_t_o_r │ │ │ │ │ -Convert a local interpolation into a global interpolation. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:149 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Langrange finite element of arbitrary order on triangles. │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Pk1DFiniteElement(const Geometry &geometry, const VertexOrder &vertexOrder) │ │ │ │ │ -construct a Pk1DFiniteElement │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_b_a_s_i_s │ │ │ │ │ -const Traits::Basis & basis() const │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:89 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -const GeometryType & type() const │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_c_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::Coefficients & coefficients() const │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:92 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_i_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::Interpolation & interpolation() const │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:90 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_B_a_s_i_s │ │ │ │ │ -ScalarLocalToGlobalBasisAdaptor< LocalBasis, Geometry > Basis │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -LocalToGlobalInterpolationAdaptor< LocalInterpolation, typename Basis::Traits > │ │ │ │ │ -Interpolation │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s_:_:_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Impl::LagrangeSimplexLocalCoefficients< 1, k > Coefficients │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for Pk1DFiniteElement objects. │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:122 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_m_a_k_e │ │ │ │ │ -const FiniteElement make(const Geometry &geometry, const VertexOrder │ │ │ │ │ -&vertexOrder) │ │ │ │ │ -construct Pk1DFiniteElementFactory │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_P_k_1_D_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Pk1DFiniteElement< Geometry, RF, k > FiniteElement │ │ │ │ │ -DDeeffiinniittiioonn pk1d.hh:123 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on tetrahedra. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, │ │ │ │ │ +RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT03DLocalFiniteElement(std::bitset< 4 > s) │ │ │ │ │ +Constructor with explicitly given face orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:53 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT03DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangeprism.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangeprism.hh File Reference
│ │ │ │ +
raviartthomas12d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas12d/raviartthomas12dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas12d/raviartthomas12dlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas12d/raviartthomas12dlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LagrangePrismLocalFiniteElement< D, R, k >
 Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order. More...
class  Dune::RT12DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on triangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangeprism.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomas12d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _k_ _> │ │ │ │ │ -  Lagrange finite element for 3d prisms with arbitrary compile-time │ │ │ │ │ - polynomial order. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on triangles. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00233_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangeprism.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,695 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangeprism.hh
│ │ │ │ +
raviartthomas12d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
13#include <dune/common/math.hh>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune { namespace Impl
│ │ │ │ -
23{
│ │ │ │ -
33 template<class D, class R, unsigned int k>
│ │ │ │ -
34 class LagrangePrismLocalBasis
│ │ │ │ -
35 {
│ │ │ │ -
36 static constexpr std::size_t dim = 3;
│ │ │ │ -
37 public:
│ │ │ │ -
38 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,R,1,FieldVector<R,1>,FieldMatrix<R,1,dim> >;
│ │ │ │ -
39
│ │ │ │ -
42 static constexpr unsigned int size ()
│ │ │ │ -
43 {
│ │ │ │ -
44 return binomial(k+2,2u) * (k+1);
│ │ │ │ -
45 }
│ │ │ │ -
46
│ │ │ │ -
48 void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
49 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ +
27 class
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 basis(s),
│ │ │ │ +
46 interpolation(s)
│ │ │ │ +
47 {}
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │
50 {
│ │ │ │ -
51 out.resize(size());
│ │ │ │ -
52
│ │ │ │ -
53 // Specialization for zero-order case
│ │ │ │ -
54 if (k==0)
│ │ │ │ -
55 {
│ │ │ │ -
56 out[0] = 1;
│ │ │ │ -
57 return;
│ │ │ │ -
58 }
│ │ │ │ -
59
│ │ │ │ -
60 if (k==1)
│ │ │ │ -
61 {
│ │ │ │ -
62 out[0] = (1.0-in[0]-in[1])*(1.0-in[2]);
│ │ │ │ -
63 out[1] = in[0]*(1-in[2]);
│ │ │ │ -
64 out[2] = in[1]*(1-in[2]);
│ │ │ │ -
65 out[3] = in[2]*(1.0-in[0]-in[1]);
│ │ │ │ -
66 out[4] = in[0]*in[2];
│ │ │ │ -
67 out[5] = in[1]*in[2];
│ │ │ │ -
68
│ │ │ │ -
69 return;
│ │ │ │ -
70 }
│ │ │ │ -
71
│ │ │ │ -
72 if (k==2)
│ │ │ │ -
73 {
│ │ │ │ -
74 FieldVector<R,k+1> segmentShapeFunction;
│ │ │ │ -
75 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]);
│ │ │ │ -
76 segmentShapeFunction[1] = in[2] * (4 - 4*in[2]);
│ │ │ │ -
77 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]);
│ │ │ │ -
78
│ │ │ │ -
79 FieldVector<R, 6> triangleShapeFunction;
│ │ │ │ -
80 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]);
│ │ │ │ -
81 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]);
│ │ │ │ -
82 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]);
│ │ │ │ -
83 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]);
│ │ │ │ -
84 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]);
│ │ │ │ -
85 triangleShapeFunction[5] = 4*in[0]*in[1];
│ │ │ │ -
86
│ │ │ │ -
87 // lower triangle:
│ │ │ │ -
88 out[0] = triangleShapeFunction[0] * segmentShapeFunction[0];
│ │ │ │ -
89 out[1] = triangleShapeFunction[1] * segmentShapeFunction[0];
│ │ │ │ -
90 out[2] = triangleShapeFunction[2] * segmentShapeFunction[0];
│ │ │ │ -
91
│ │ │ │ -
92 //upper triangle
│ │ │ │ -
93 out[3] = triangleShapeFunction[0] * segmentShapeFunction[2];
│ │ │ │ -
94 out[4] = triangleShapeFunction[1] * segmentShapeFunction[2];
│ │ │ │ -
95 out[5] = triangleShapeFunction[2] * segmentShapeFunction[2];
│ │ │ │ -
96
│ │ │ │ -
97 // vertical edges
│ │ │ │ -
98 out[6] = triangleShapeFunction[0] * segmentShapeFunction[1];
│ │ │ │ -
99 out[7] = triangleShapeFunction[1] * segmentShapeFunction[1];
│ │ │ │ -
100 out[8] = triangleShapeFunction[2] * segmentShapeFunction[1];
│ │ │ │ -
101
│ │ │ │ -
102 // lower triangle edges
│ │ │ │ -
103 out[9] = triangleShapeFunction[3] * segmentShapeFunction[0];
│ │ │ │ -
104 out[10] = triangleShapeFunction[4] * segmentShapeFunction[0];
│ │ │ │ -
105 out[11] = triangleShapeFunction[5] * segmentShapeFunction[0];
│ │ │ │ -
106
│ │ │ │ -
107 // upper triangle edges
│ │ │ │ -
108 out[12] = triangleShapeFunction[3] * segmentShapeFunction[2];
│ │ │ │ -
109 out[13] = triangleShapeFunction[4] * segmentShapeFunction[2];
│ │ │ │ -
110 out[14] = triangleShapeFunction[5] * segmentShapeFunction[2];
│ │ │ │ -
111
│ │ │ │ -
112 // quadrilateral sides
│ │ │ │ -
113 out[15] = triangleShapeFunction[3] * segmentShapeFunction[1];
│ │ │ │ -
114 out[16] = triangleShapeFunction[4] * segmentShapeFunction[1];
│ │ │ │ -
115 out[17] = triangleShapeFunction[5] * segmentShapeFunction[1];
│ │ │ │ -
116
│ │ │ │ -
117 return;
│ │ │ │ -
118 }
│ │ │ │ -
119
│ │ │ │ -
120 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::evaluateFunction for order " << k);
│ │ │ │ -
121 }
│ │ │ │ -
122
│ │ │ │ -
128 void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
129 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
130 {
│ │ │ │ -
131 out.resize(size());
│ │ │ │ -
132
│ │ │ │ -
133 // Specialization for k==0
│ │ │ │ -
134 if (k==0)
│ │ │ │ -
135 {
│ │ │ │ -
136 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ -
137 return;
│ │ │ │ -
138 }
│ │ │ │ -
139
│ │ │ │ -
140 if (k==1)
│ │ │ │ -
141 {
│ │ │ │ -
142 out[0][0] = {in[2]-1, in[2]-1, in[0]+in[1]-1};
│ │ │ │ -
143 out[1][0] = {1-in[2], 0, -in[0]};
│ │ │ │ -
144 out[2][0] = { 0, 1-in[2], -in[1]};
│ │ │ │ -
145 out[3][0] = { -in[2], -in[2], 1-in[0]-in[1]};
│ │ │ │ -
146 out[4][0] = { in[2], 0, in[0]};
│ │ │ │ -
147 out[5][0] = { 0, in[2], in[1]};
│ │ │ │ -
148
│ │ │ │ -
149 return;
│ │ │ │ -
150 }
│ │ │ │ -
151
│ │ │ │ -
152 if (k==2)
│ │ │ │ -
153 {
│ │ │ │ -
154 // Second-order shape functions on a triangle, and the first derivatives
│ │ │ │ -
155 FieldVector<R, 6> triangleShapeFunction;
│ │ │ │ -
156 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]);
│ │ │ │ -
157 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]);
│ │ │ │ -
158 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]);
│ │ │ │ -
159 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]);
│ │ │ │ -
160 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]);
│ │ │ │ -
161 triangleShapeFunction[5] = 4*in[0]*in[1];
│ │ │ │ -
162
│ │ │ │ -
163 std::array<std::array<R,2>,6> triangleShapeFunctionDer;
│ │ │ │ -
164 triangleShapeFunctionDer[0] = {-3 + 4*(in[0] + in[1]), -3 + 4*(in[0] + in[1])};
│ │ │ │ -
165 triangleShapeFunctionDer[1] = { -1 + 4*in[0], 0};
│ │ │ │ -
166 triangleShapeFunctionDer[2] = { 0, -1 + 4*in[1]};
│ │ │ │ -
167 triangleShapeFunctionDer[3] = { 4 - 8*in[0] - 4*in[1], -4*in[0]};
│ │ │ │ -
168 triangleShapeFunctionDer[4] = { -4*in[1], 4 - 4*in[0] - 8*in[1]};
│ │ │ │ -
169 triangleShapeFunctionDer[5] = { 4*in[1], 4*in[0]};
│ │ │ │ -
170
│ │ │ │ -
171 // Second-order shape functions on a line, and the first derivatives
│ │ │ │ -
172 FieldVector<R,k+1> segmentShapeFunction;
│ │ │ │ -
173 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]);
│ │ │ │ -
174 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]);
│ │ │ │ -
175 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]);
│ │ │ │ -
176
│ │ │ │ -
177 FieldVector<R,k+1> segmentShapeFunctionDer;
│ │ │ │ -
178 segmentShapeFunctionDer[0] = -3 + 4*in[2];
│ │ │ │ -
179 segmentShapeFunctionDer[1] = 4 - 8*in[2];
│ │ │ │ -
180 segmentShapeFunctionDer[2] = -1 + 4*in[2];
│ │ │ │ -
181
│ │ │ │ -
182 // lower triangle:
│ │ │ │ -
183 out[0][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[0];
│ │ │ │ -
184 out[0][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[0];
│ │ │ │ -
185 out[0][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[0];
│ │ │ │ -
186
│ │ │ │ -
187 out[1][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[0];
│ │ │ │ -
188 out[1][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[0];
│ │ │ │ -
189 out[1][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[0];
│ │ │ │ -
190
│ │ │ │ -
191 out[2][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[0];
│ │ │ │ -
192 out[2][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[0];
│ │ │ │ -
193 out[2][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[0];
│ │ │ │ -
194
│ │ │ │ -
195 //upper triangle
│ │ │ │ -
196 out[3][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[2];
│ │ │ │ -
197 out[3][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[2];
│ │ │ │ -
198 out[3][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[2];
│ │ │ │ -
199
│ │ │ │ -
200 out[4][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[2];
│ │ │ │ -
201 out[4][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[2];
│ │ │ │ -
202 out[4][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[2];
│ │ │ │ -
203
│ │ │ │ -
204 out[5][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[2];
│ │ │ │ -
205 out[5][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[2];
│ │ │ │ -
206 out[5][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[2];
│ │ │ │ -
207
│ │ │ │ -
208 // vertical edges
│ │ │ │ -
209 out[6][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[1];
│ │ │ │ -
210 out[6][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[1];
│ │ │ │ -
211 out[6][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[1];
│ │ │ │ -
212
│ │ │ │ -
213 out[7][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[1];
│ │ │ │ -
214 out[7][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[1];
│ │ │ │ -
215 out[7][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[1];
│ │ │ │ -
216
│ │ │ │ -
217 out[8][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[1];
│ │ │ │ -
218 out[8][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[1];
│ │ │ │ -
219 out[8][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[1];
│ │ │ │ -
220
│ │ │ │ -
221 // lower triangle edges
│ │ │ │ -
222 out[9][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[0];
│ │ │ │ -
223 out[9][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[0];
│ │ │ │ -
224 out[9][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[0];
│ │ │ │ -
225
│ │ │ │ -
226 out[10][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[0];
│ │ │ │ -
227 out[10][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[0];
│ │ │ │ -
228 out[10][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[0];
│ │ │ │ -
229
│ │ │ │ -
230 out[11][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[0];
│ │ │ │ -
231 out[11][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[0];
│ │ │ │ -
232 out[11][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[0];
│ │ │ │ -
233
│ │ │ │ -
234 // upper triangle edges
│ │ │ │ -
235 out[12][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[2];
│ │ │ │ -
236 out[12][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[2];
│ │ │ │ -
237 out[12][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[2];
│ │ │ │ -
238
│ │ │ │ -
239 out[13][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[2];
│ │ │ │ -
240 out[13][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[2];
│ │ │ │ -
241 out[13][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[2];
│ │ │ │ -
242
│ │ │ │ -
243 out[14][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[2];
│ │ │ │ -
244 out[14][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[2];
│ │ │ │ -
245 out[14][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[2];
│ │ │ │ -
246
│ │ │ │ -
247 // quadrilateral sides
│ │ │ │ -
248 out[15][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[1];
│ │ │ │ -
249 out[15][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[1];
│ │ │ │ -
250 out[15][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[1];
│ │ │ │ -
251
│ │ │ │ -
252 out[16][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[1];
│ │ │ │ -
253 out[16][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[1];
│ │ │ │ -
254 out[16][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[1];
│ │ │ │ -
255
│ │ │ │ -
256 out[17][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[1];
│ │ │ │ -
257 out[17][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[1];
│ │ │ │ -
258 out[17][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[1];
│ │ │ │ -
259
│ │ │ │ -
260 return;
│ │ │ │ -
261 }
│ │ │ │ -
262
│ │ │ │ -
263 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::evaluateJacobian for order " << k);
│ │ │ │ -
264 }
│ │ │ │ -
265
│ │ │ │ -
272 void partial(const std::array<unsigned int,dim>& order,
│ │ │ │ -
273 const typename Traits::DomainType& in,
│ │ │ │ -
274 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
275 {
│ │ │ │ -
276 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
277
│ │ │ │ -
278 out.resize(size());
│ │ │ │ -
279
│ │ │ │ -
280 if (totalOrder == 0)
│ │ │ │ -
281 {
│ │ │ │ -
282 evaluateFunction(in, out);
│ │ │ │ -
283 return;
│ │ │ │ -
284 }
│ │ │ │ -
285
│ │ │ │ -
286 // Specialization for zero-order finite elements
│ │ │ │ -
287 if (k==0)
│ │ │ │ -
288 {
│ │ │ │ -
289 out[0] = 0;
│ │ │ │ -
290 return;
│ │ │ │ -
291 }
│ │ │ │ -
292
│ │ │ │ -
293 // Specialization for first-order finite elements
│ │ │ │ -
294 if (k==1)
│ │ │ │ -
295 {
│ │ │ │ -
296 if (totalOrder == 1)
│ │ │ │ -
297 {
│ │ │ │ -
298 auto direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
299
│ │ │ │ -
300 switch (direction) {
│ │ │ │ -
301 case 0:
│ │ │ │ -
302 out[0] = in[2]-1;
│ │ │ │ -
303 out[1] = 1-in[2];
│ │ │ │ -
304 out[2] = 0;
│ │ │ │ -
305 out[3] = -in[2];
│ │ │ │ -
306 out[4] = in[2];
│ │ │ │ -
307 out[5] = 0;
│ │ │ │ -
308 break;
│ │ │ │ -
309 case 1:
│ │ │ │ -
310 out[0] = in[2]-1;
│ │ │ │ -
311 out[1] = 0;
│ │ │ │ -
312 out[2] = 1-in[2];
│ │ │ │ -
313 out[3] = -in[2];
│ │ │ │ -
314 out[4] = 0;
│ │ │ │ -
315 out[5] = in[2];
│ │ │ │ -
316 break;
│ │ │ │ -
317 case 2:
│ │ │ │ -
318 out[0] = in[0]+in[1]-1;
│ │ │ │ -
319 out[1] = -in[0];
│ │ │ │ -
320 out[2] = -in[1];
│ │ │ │ -
321 out[3] = 1-in[0]-in[1];
│ │ │ │ -
322 out[4] = in[0];
│ │ │ │ -
323 out[5] = in[1];
│ │ │ │ -
324 break;
│ │ │ │ -
325 default:
│ │ │ │ -
326 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
327 }
│ │ │ │ -
328 } else if (totalOrder == 2) {
│ │ │ │ -
329 out.resize(size());
│ │ │ │ -
330 if (order[0] == 1 && order[2] == 1) {
│ │ │ │ -
331 out[0] = 1;
│ │ │ │ -
332 out[1] =-1;
│ │ │ │ -
333 out[2] = 0;
│ │ │ │ -
334 out[3] =-1;
│ │ │ │ -
335 out[4] = 1;
│ │ │ │ -
336 out[5] = 0;
│ │ │ │ -
337 } else if (order[1] == 1 && order[2] == 1) {
│ │ │ │ -
338 out[0] = 1;
│ │ │ │ -
339 out[1] = 0;
│ │ │ │ -
340 out[2] =-1;
│ │ │ │ -
341 out[3] =-1;
│ │ │ │ -
342 out[4] = 0;
│ │ │ │ -
343 out[5] = 1;
│ │ │ │ -
344 } else {
│ │ │ │ -
345 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
346 out[i] = 0;
│ │ │ │ -
347 }
│ │ │ │ -
348 } else {
│ │ │ │ -
349 out.resize(size());
│ │ │ │ -
350 std::fill(out.begin(), out.end(), 0.0);
│ │ │ │ -
351 }
│ │ │ │ -
352
│ │ │ │ -
353 return;
│ │ │ │ -
354 }
│ │ │ │ -
355
│ │ │ │ -
356 // Specialization for second-order finite elements
│ │ │ │ -
357 if (k==2)
│ │ │ │ -
358 {
│ │ │ │ -
359 if (totalOrder == 1)
│ │ │ │ -
360 {
│ │ │ │ -
361 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
362 switch (direction)
│ │ │ │ -
363 {
│ │ │ │ -
364 case 0:
│ │ │ │ -
365 {
│ │ │ │ -
366 FieldVector<R,6> triangleShapeFunctionDerX;
│ │ │ │ -
367 triangleShapeFunctionDerX[0] = -3 + 4*(in[0] + in[1]);
│ │ │ │ -
368 triangleShapeFunctionDerX[1] = -1 + 4* in[0];
│ │ │ │ -
369 triangleShapeFunctionDerX[2] = 0;
│ │ │ │ -
370 triangleShapeFunctionDerX[3] = 4 - 8* in[0] - 4*in[1];
│ │ │ │ -
371 triangleShapeFunctionDerX[4] = -4*in[1];
│ │ │ │ -
372 triangleShapeFunctionDerX[5] = 4*in[1];
│ │ │ │ -
373
│ │ │ │ -
374 FieldVector<R,k+1> segmentShapeFunction;
│ │ │ │ -
375 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]);
│ │ │ │ -
376 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]);
│ │ │ │ -
377 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]);
│ │ │ │ -
378
│ │ │ │ -
379 out[0] = triangleShapeFunctionDerX[0] * segmentShapeFunction[0];
│ │ │ │ -
380 out[1] = triangleShapeFunctionDerX[1] * segmentShapeFunction[0];
│ │ │ │ -
381 out[2] = triangleShapeFunctionDerX[2] * segmentShapeFunction[0];
│ │ │ │ -
382 out[3] = triangleShapeFunctionDerX[0] * segmentShapeFunction[2];
│ │ │ │ -
383 out[4] = triangleShapeFunctionDerX[1] * segmentShapeFunction[2];
│ │ │ │ -
384 out[5] = triangleShapeFunctionDerX[2] * segmentShapeFunction[2];
│ │ │ │ -
385 out[6] = triangleShapeFunctionDerX[0] * segmentShapeFunction[1];
│ │ │ │ -
386 out[7] = triangleShapeFunctionDerX[1] * segmentShapeFunction[1];
│ │ │ │ -
387 out[8] = triangleShapeFunctionDerX[2] * segmentShapeFunction[1];
│ │ │ │ -
388 out[9] = triangleShapeFunctionDerX[3] * segmentShapeFunction[0];
│ │ │ │ -
389 out[10] = triangleShapeFunctionDerX[4] * segmentShapeFunction[0];
│ │ │ │ -
390 out[11] = triangleShapeFunctionDerX[5] * segmentShapeFunction[0];
│ │ │ │ -
391 out[12] = triangleShapeFunctionDerX[3] * segmentShapeFunction[2];
│ │ │ │ -
392 out[13] = triangleShapeFunctionDerX[4] * segmentShapeFunction[2];
│ │ │ │ -
393 out[14] = triangleShapeFunctionDerX[5] * segmentShapeFunction[2];
│ │ │ │ -
394 out[15] = triangleShapeFunctionDerX[3] * segmentShapeFunction[1];
│ │ │ │ -
395 out[16] = triangleShapeFunctionDerX[4] * segmentShapeFunction[1];
│ │ │ │ -
396 out[17] = triangleShapeFunctionDerX[5] * segmentShapeFunction[1];
│ │ │ │ -
397 break;
│ │ │ │ -
398 }
│ │ │ │ -
399 case 1:
│ │ │ │ -
400 {
│ │ │ │ -
401 FieldVector<R,6> triangleShapeFunctionDerY;
│ │ │ │ -
402 triangleShapeFunctionDerY[0] = -3 + 4*(in[0] + in[1]);
│ │ │ │ -
403 triangleShapeFunctionDerY[1] = 0;
│ │ │ │ -
404 triangleShapeFunctionDerY[2] = -1 + 4* in[1];
│ │ │ │ -
405 triangleShapeFunctionDerY[3] = -4* in[0];
│ │ │ │ -
406 triangleShapeFunctionDerY[4] = 4 - 4* in[0] - 8*in[1];
│ │ │ │ -
407 triangleShapeFunctionDerY[5] = 4* in[0];
│ │ │ │ -
408
│ │ │ │ -
409 FieldVector<R,k+1> segmentShapeFunction;
│ │ │ │ -
410 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]);
│ │ │ │ -
411 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]);
│ │ │ │ -
412 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]);
│ │ │ │ -
413
│ │ │ │ -
414 out[0] = triangleShapeFunctionDerY[0] * segmentShapeFunction[0];
│ │ │ │ -
415 out[1] = triangleShapeFunctionDerY[1] * segmentShapeFunction[0];
│ │ │ │ -
416 out[2] = triangleShapeFunctionDerY[2] * segmentShapeFunction[0];
│ │ │ │ -
417 out[3] = triangleShapeFunctionDerY[0] * segmentShapeFunction[2];
│ │ │ │ -
418 out[4] = triangleShapeFunctionDerY[1] * segmentShapeFunction[2];
│ │ │ │ -
419 out[5] = triangleShapeFunctionDerY[2] * segmentShapeFunction[2];
│ │ │ │ -
420 out[6] = triangleShapeFunctionDerY[0] * segmentShapeFunction[1];
│ │ │ │ -
421 out[7] = triangleShapeFunctionDerY[1] * segmentShapeFunction[1];
│ │ │ │ -
422 out[8] = triangleShapeFunctionDerY[2] * segmentShapeFunction[1];
│ │ │ │ -
423 out[9] = triangleShapeFunctionDerY[3] * segmentShapeFunction[0];
│ │ │ │ -
424 out[10] = triangleShapeFunctionDerY[4] * segmentShapeFunction[0];
│ │ │ │ -
425 out[11] = triangleShapeFunctionDerY[5] * segmentShapeFunction[0];
│ │ │ │ -
426 out[12] = triangleShapeFunctionDerY[3] * segmentShapeFunction[2];
│ │ │ │ -
427 out[13] = triangleShapeFunctionDerY[4] * segmentShapeFunction[2];
│ │ │ │ -
428 out[14] = triangleShapeFunctionDerY[5] * segmentShapeFunction[2];
│ │ │ │ -
429 out[15] = triangleShapeFunctionDerY[3] * segmentShapeFunction[1];
│ │ │ │ -
430 out[16] = triangleShapeFunctionDerY[4] * segmentShapeFunction[1];
│ │ │ │ -
431 out[17] = triangleShapeFunctionDerY[5] * segmentShapeFunction[1];
│ │ │ │ -
432 break;
│ │ │ │ -
433 }
│ │ │ │ -
434 case 2:
│ │ │ │ -
435 {
│ │ │ │ -
436 FieldVector<R, 6> triangleShapeFunction;
│ │ │ │ -
437 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]);
│ │ │ │ -
438 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]);
│ │ │ │ -
439 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]);
│ │ │ │ -
440 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]);
│ │ │ │ -
441 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]);
│ │ │ │ -
442 triangleShapeFunction[5] = 4*in[0]*in[1];
│ │ │ │ -
443
│ │ │ │ -
444 FieldVector<R,k+1> segmentShapeFunctionDer;
│ │ │ │ -
445 segmentShapeFunctionDer[0] = -3 + 4*in[2];
│ │ │ │ -
446 segmentShapeFunctionDer[1] = 4 - 8*in[2];
│ │ │ │ -
447 segmentShapeFunctionDer[2] = -1 + 4*in[2];
│ │ │ │ -
448
│ │ │ │ -
449 out[0] = triangleShapeFunction[0] * segmentShapeFunctionDer[0];
│ │ │ │ -
450 out[1] = triangleShapeFunction[1] * segmentShapeFunctionDer[0];
│ │ │ │ -
451 out[2] = triangleShapeFunction[2] * segmentShapeFunctionDer[0];
│ │ │ │ -
452 out[3] = triangleShapeFunction[0] * segmentShapeFunctionDer[2];
│ │ │ │ -
453 out[4] = triangleShapeFunction[1] * segmentShapeFunctionDer[2];
│ │ │ │ -
454 out[5] = triangleShapeFunction[2] * segmentShapeFunctionDer[2];
│ │ │ │ -
455 out[6] = triangleShapeFunction[0] * segmentShapeFunctionDer[1];
│ │ │ │ -
456 out[7] = triangleShapeFunction[1] * segmentShapeFunctionDer[1];
│ │ │ │ -
457 out[8] = triangleShapeFunction[2] * segmentShapeFunctionDer[1];
│ │ │ │ -
458 out[9] = triangleShapeFunction[3] * segmentShapeFunctionDer[0];
│ │ │ │ -
459 out[10] = triangleShapeFunction[4] * segmentShapeFunctionDer[0];
│ │ │ │ -
460 out[11] = triangleShapeFunction[5] * segmentShapeFunctionDer[0];
│ │ │ │ -
461 out[12] = triangleShapeFunction[3] * segmentShapeFunctionDer[2];
│ │ │ │ -
462 out[13] = triangleShapeFunction[4] * segmentShapeFunctionDer[2];
│ │ │ │ -
463 out[14] = triangleShapeFunction[5] * segmentShapeFunctionDer[2];
│ │ │ │ -
464 out[15] = triangleShapeFunction[3] * segmentShapeFunctionDer[1];
│ │ │ │ -
465 out[16] = triangleShapeFunction[4] * segmentShapeFunctionDer[1];
│ │ │ │ -
466 out[17] = triangleShapeFunction[5] * segmentShapeFunctionDer[1];
│ │ │ │ -
467 break;
│ │ │ │ -
468 }
│ │ │ │ -
469 default:
│ │ │ │ -
470 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
471 }
│ │ │ │ -
472 } else {
│ │ │ │ -
473 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
474 }
│ │ │ │ -
475
│ │ │ │ -
476 return;
│ │ │ │ -
477 }
│ │ │ │ -
478
│ │ │ │ -
479 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::partial not implemented for order " << k);
│ │ │ │ -
480 }
│ │ │ │ -
481
│ │ │ │ -
483 static constexpr unsigned int order ()
│ │ │ │ -
484 {
│ │ │ │ -
485 return k;
│ │ │ │ -
486 }
│ │ │ │ -
487 };
│ │ │ │ -
488
│ │ │ │ -
493 template<unsigned int k>
│ │ │ │ -
494 class LagrangePrismLocalCoefficients
│ │ │ │ -
495 {
│ │ │ │ -
496 public:
│ │ │ │ -
498 LagrangePrismLocalCoefficients ()
│ │ │ │ -
499 : localKeys_(size())
│ │ │ │ -
500 {
│ │ │ │ -
501 if (k==0)
│ │ │ │ -
502 {
│ │ │ │ -
503 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ -
504 return;
│ │ │ │ -
505 }
│ │ │ │ -
506
│ │ │ │ -
507 if (k==1)
│ │ │ │ -
508 {
│ │ │ │ -
509 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
510 localKeys_[i] = LocalKey(i,3,0);
│ │ │ │ -
511 return;
│ │ │ │ -
512 }
│ │ │ │ -
513
│ │ │ │ -
514 if (k==2)
│ │ │ │ -
515 {
│ │ │ │ -
516 // Vertex shape functions
│ │ │ │ -
517 localKeys_[0] = LocalKey(0,3,0);
│ │ │ │ -
518 localKeys_[1] = LocalKey(1,3,0);
│ │ │ │ -
519 localKeys_[2] = LocalKey(2,3,0);
│ │ │ │ -
520 localKeys_[3] = LocalKey(3,3,0);
│ │ │ │ -
521 localKeys_[4] = LocalKey(4,3,0);
│ │ │ │ -
522 localKeys_[5] = LocalKey(5,3,0);
│ │ │ │ -
523
│ │ │ │ -
524 // Edge shape functions
│ │ │ │ -
525 localKeys_[6] = LocalKey(0,2,0);
│ │ │ │ -
526 localKeys_[7] = LocalKey(1,2,0);
│ │ │ │ -
527 localKeys_[8] = LocalKey(2,2,0);
│ │ │ │ -
528 localKeys_[9] = LocalKey(3,2,0);
│ │ │ │ -
529 localKeys_[10] = LocalKey(4,2,0);
│ │ │ │ -
530 localKeys_[11] = LocalKey(5,2,0);
│ │ │ │ -
531 localKeys_[12] = LocalKey(6,2,0);
│ │ │ │ -
532 localKeys_[13] = LocalKey(7,2,0);
│ │ │ │ -
533 localKeys_[14] = LocalKey(8,2,0);
│ │ │ │ -
534
│ │ │ │ -
535 // Quadrilateral sides shape functions
│ │ │ │ -
536 localKeys_[15] = LocalKey(0,1,0);
│ │ │ │ -
537 localKeys_[16] = LocalKey(1,1,0);
│ │ │ │ -
538 localKeys_[17] = LocalKey(2,1,0);
│ │ │ │ -
539
│ │ │ │ -
540 return;
│ │ │ │ -
541 }
│ │ │ │ -
542
│ │ │ │ -
543 // Now: the general case
│ │ │ │ -
544 DUNE_THROW(NotImplemented, "LagrangePrismLocalCoefficients not implemented for order " << k);
│ │ │ │ -
545
│ │ │ │ -
546 }
│ │ │ │ -
547
│ │ │ │ -
549 static constexpr std::size_t size ()
│ │ │ │ -
550 {
│ │ │ │ -
551 return binomial(k+2,2u) * (k+1);
│ │ │ │ -
552 }
│ │ │ │ -
553
│ │ │ │ -
555 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
556 {
│ │ │ │ -
557 return localKeys_[i];
│ │ │ │ -
558 }
│ │ │ │ -
559
│ │ │ │ -
560 private:
│ │ │ │ -
561 std::vector<LocalKey> localKeys_;
│ │ │ │ -
562 };
│ │ │ │ -
563
│ │ │ │ -
568 template<class LocalBasis>
│ │ │ │ -
569 class LagrangePrismLocalInterpolation
│ │ │ │ -
570 {
│ │ │ │ -
571 public:
│ │ │ │ -
572
│ │ │ │ -
580 template<typename F, typename C>
│ │ │ │ -
581 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
582 {
│ │ │ │ -
583 constexpr auto dim = LocalBasis::Traits::dimDomain;
│ │ │ │ -
584 constexpr auto k = LocalBasis::order();
│ │ │ │ -
585 using D = typename LocalBasis::Traits::DomainType;
│ │ │ │ -
586 using DF = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ -
587
│ │ │ │ -
588 auto&& f = Impl::makeFunctionWithCallOperator<D>(ff);
│ │ │ │ -
589
│ │ │ │ -
590 out.resize(LocalBasis::size());
│ │ │ │ -
591
│ │ │ │ -
592 // Specialization for zero-order case
│ │ │ │ -
593 if (k==0)
│ │ │ │ -
594 {
│ │ │ │ -
595 auto center = ReferenceElements<DF,dim>::general(GeometryTypes::prism).position(0,0);
│ │ │ │ -
596 out[0] = f(center);
│ │ │ │ -
597 return;
│ │ │ │ -
598 }
│ │ │ │ -
599
│ │ │ │ -
600 // Specialization for first-order case
│ │ │ │ -
601 if (k==1)
│ │ │ │ -
602 {
│ │ │ │ -
603 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ -
604 {
│ │ │ │ -
605 auto vertex = ReferenceElements<DF,3>::general(GeometryTypes::prism).position(i,3);
│ │ │ │ -
606 out[i] = f(vertex);
│ │ │ │ -
607 }
│ │ │ │ -
608 return;
│ │ │ │ -
609 }
│ │ │ │ -
610
│ │ │ │ -
611 if (k==2)
│ │ │ │ -
612 {
│ │ │ │ -
613 out[0] = f( D( {0.0, 0.0, 0.0} ) );
│ │ │ │ -
614 out[1] = f( D( {1.0, 0.0, 0.0} ) );
│ │ │ │ -
615 out[2] = f( D( {0.0, 1.0, 0.0} ) );
│ │ │ │ -
616 out[3] = f( D( {0.0, 0.0, 1.0} ) );
│ │ │ │ -
617 out[4] = f( D( {1.0, 0.0, 1.0} ) );
│ │ │ │ -
618 out[5] = f( D( {0.0, 1.0, 1.0} ) );
│ │ │ │ -
619 out[6] = f( D( {0.0, 0.0, 0.5} ) );
│ │ │ │ -
620 out[7] = f( D( {1.0, 0.0, 0.5} ) );
│ │ │ │ -
621 out[8] = f( D( {0.0, 1.0, 0.5} ) );
│ │ │ │ -
622 out[9] = f( D( {0.5, 0.0, 0.0} ) );
│ │ │ │ -
623 out[10] = f( D( {0.0, 0.5, 0.0} ) );
│ │ │ │ -
624 out[11] = f( D( {0.5, 0.5, 0.0} ) );
│ │ │ │ -
625 out[12] = f( D( {0.5, 0.0, 1.0} ) );
│ │ │ │ -
626 out[13] = f( D( {0.0, 0.5, 1.0} ) );
│ │ │ │ -
627 out[14] = f( D( {0.5, 0.5, 1.0} ) );
│ │ │ │ -
628 out[15] = f( D( {0.5, 0.0, 0.5} ) );
│ │ │ │ -
629 out[16] = f( D( {0.0, 0.5, 0.5} ) );
│ │ │ │ -
630 out[17] = f( D( {0.5, 0.5, 0.5} ) );
│ │ │ │ -
631
│ │ │ │ -
632 return;
│ │ │ │ -
633 }
│ │ │ │ -
634
│ │ │ │ -
635 DUNE_THROW(NotImplemented, "LagrangePrismLocalInterpolation not implemented for order " << k);
│ │ │ │ -
636 }
│ │ │ │ -
637
│ │ │ │ -
638 };
│ │ │ │ -
639
│ │ │ │ -
640} } // namespace Dune::Impl
│ │ │ │ -
641
│ │ │ │ -
642namespace Dune
│ │ │ │ -
643{
│ │ │ │ -
650 template<class D, class R, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
652 {
│ │ │ │ -
653 public:
│ │ │ │ - │ │ │ │ -
657 Impl::LagrangePrismLocalCoefficients<k>,
│ │ │ │ -
658 Impl::LagrangePrismLocalInterpolation<Impl::LagrangePrismLocalBasis<D,R,k> > >;
│ │ │ │ -
659
│ │ │ │ - │ │ │ │ -
666
│ │ │ │ -
│ │ │ │ -
669 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
670 {
│ │ │ │ -
671 return basis_;
│ │ │ │ -
672 }
│ │ │ │ -
│ │ │ │ -
673
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
677 {
│ │ │ │ -
678 return coefficients_;
│ │ │ │ -
679 }
│ │ │ │ -
│ │ │ │ -
680
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
684 {
│ │ │ │ -
685 return interpolation_;
│ │ │ │ -
686 }
│ │ │ │ -
│ │ │ │ -
687
│ │ │ │ -
│ │ │ │ -
689 static constexpr std::size_t size ()
│ │ │ │ -
690 {
│ │ │ │ -
691 return binomial(k+2,2) * (k+1);
│ │ │ │ -
692 }
│ │ │ │ -
│ │ │ │ -
693
│ │ │ │ -
│ │ │ │ -
696 static constexpr GeometryType type ()
│ │ │ │ -
697 {
│ │ │ │ -
698 return GeometryTypes::prism;
│ │ │ │ -
699 }
│ │ │ │ -
│ │ │ │ -
700
│ │ │ │ -
701 private:
│ │ │ │ -
702 Impl::LagrangePrismLocalBasis<D,R,k> basis_;
│ │ │ │ -
703 Impl::LagrangePrismLocalCoefficients<k> coefficients_;
│ │ │ │ -
704 Impl::LagrangePrismLocalInterpolation<Impl::LagrangePrismLocalBasis<D,R,k> > interpolation_;
│ │ │ │ -
705 };
│ │ │ │ -
│ │ │ │ -
706
│ │ │ │ -
707} // namespace Dune
│ │ │ │ -
708
│ │ │ │ -
709#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
51 return basis;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return coefficients;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60 {
│ │ │ │ +
61 return interpolation;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
65 unsigned int size () const
│ │ │ │ +
66 {
│ │ │ │ +
67 return basis.size();
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::triangle;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT12DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81
│ │ │ │ +
82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ -
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangeprism.hh:689
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangeprism.hh:683
│ │ │ │ -
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangeprism.hh:696
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangeprism.hh:676
│ │ │ │ -
LagrangePrismLocalFiniteElement()
Default constructor.
Definition lagrangeprism.hh:665
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangeprism.hh:669
│ │ │ │ - │ │ │ │ - │ │ │ │ +
First order Raviart-Thomas shape functions on triangles.
Definition raviartthomas12d.hh:29
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas12d.hh:65
│ │ │ │ +
LocalFiniteElementTraits< RT12DLocalBasis< D, R >, RT12DLocalCoefficients, RT12DLocalInterpolation< RT12DLocalBasis< D, R > > > Traits
Definition raviartthomas12d.hh:33
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas12d.hh:49
│ │ │ │ +
RT12DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 8.
Definition raviartthomas12d.hh:44
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas12d.hh:54
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas12d.hh:70
│ │ │ │ +
RT12DLocalFiniteElement()
Standard constructor.
Definition raviartthomas12d.hh:36
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas12d.hh:59
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas12dlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on the reference triangle.
Definition raviartthomas12dlocalcoefficients.hh:23
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas12dlocalinterpolation.hh:26
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,722 +1,137 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangeprism.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas12d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { namespace Impl │ │ │ │ │ -23{ │ │ │ │ │ -33 template │ │ │ │ │ -34 class LagrangePrismLocalBasis │ │ │ │ │ -35 { │ │ │ │ │ -36 static constexpr std::size_t dim = 3; │ │ │ │ │ -37 public: │ │ │ │ │ -38 using Traits = │ │ │ │ │ -LocalBasisTraits,R,1,FieldVector,FieldMatrix │ │ │ │ │ ->; │ │ │ │ │ -39 │ │ │ │ │ -42 static constexpr unsigned int size () │ │ │ │ │ -43 { │ │ │ │ │ -44 return binomial(k+2,2u) * (k+1); │ │ │ │ │ -45 } │ │ │ │ │ -46 │ │ │ │ │ -48 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -49 std::vector& out) const │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class │ │ │ │ │ +28 _R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>,_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_3 _R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_4 _R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +45 basis(s), │ │ │ │ │ +46 interpolation(s) │ │ │ │ │ +47 {} │ │ │ │ │ +48 │ │ │ │ │ +_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ 50 { │ │ │ │ │ -51 out.resize(size()); │ │ │ │ │ -52 │ │ │ │ │ -53 // Specialization for zero-order case │ │ │ │ │ -54 if (k==0) │ │ │ │ │ +51 return basis; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ 55 { │ │ │ │ │ -56 out[0] = 1; │ │ │ │ │ -57 return; │ │ │ │ │ -58 } │ │ │ │ │ -59 │ │ │ │ │ -60 if (k==1) │ │ │ │ │ -61 { │ │ │ │ │ -62 out[0] = (1.0-in[0]-in[1])*(1.0-in[2]); │ │ │ │ │ -63 out[1] = in[0]*(1-in[2]); │ │ │ │ │ -64 out[2] = in[1]*(1-in[2]); │ │ │ │ │ -65 out[3] = in[2]*(1.0-in[0]-in[1]); │ │ │ │ │ -66 out[4] = in[0]*in[2]; │ │ │ │ │ -67 out[5] = in[1]*in[2]; │ │ │ │ │ -68 │ │ │ │ │ -69 return; │ │ │ │ │ -70 } │ │ │ │ │ -71 │ │ │ │ │ -72 if (k==2) │ │ │ │ │ -73 { │ │ │ │ │ -74 FieldVector segmentShapeFunction; │ │ │ │ │ -75 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]); │ │ │ │ │ -76 segmentShapeFunction[1] = in[2] * (4 - 4*in[2]); │ │ │ │ │ -77 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]); │ │ │ │ │ -78 │ │ │ │ │ -79 FieldVector triangleShapeFunction; │ │ │ │ │ -80 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]); │ │ │ │ │ -81 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]); │ │ │ │ │ -82 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]); │ │ │ │ │ -83 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]); │ │ │ │ │ -84 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]); │ │ │ │ │ -85 triangleShapeFunction[5] = 4*in[0]*in[1]; │ │ │ │ │ -86 │ │ │ │ │ -87 // lower triangle: │ │ │ │ │ -88 out[0] = triangleShapeFunction[0] * segmentShapeFunction[0]; │ │ │ │ │ -89 out[1] = triangleShapeFunction[1] * segmentShapeFunction[0]; │ │ │ │ │ -90 out[2] = triangleShapeFunction[2] * segmentShapeFunction[0]; │ │ │ │ │ -91 │ │ │ │ │ -92 //upper triangle │ │ │ │ │ -93 out[3] = triangleShapeFunction[0] * segmentShapeFunction[2]; │ │ │ │ │ -94 out[4] = triangleShapeFunction[1] * segmentShapeFunction[2]; │ │ │ │ │ -95 out[5] = triangleShapeFunction[2] * segmentShapeFunction[2]; │ │ │ │ │ -96 │ │ │ │ │ -97 // vertical edges │ │ │ │ │ -98 out[6] = triangleShapeFunction[0] * segmentShapeFunction[1]; │ │ │ │ │ -99 out[7] = triangleShapeFunction[1] * segmentShapeFunction[1]; │ │ │ │ │ -100 out[8] = triangleShapeFunction[2] * segmentShapeFunction[1]; │ │ │ │ │ -101 │ │ │ │ │ -102 // lower triangle edges │ │ │ │ │ -103 out[9] = triangleShapeFunction[3] * segmentShapeFunction[0]; │ │ │ │ │ -104 out[10] = triangleShapeFunction[4] * segmentShapeFunction[0]; │ │ │ │ │ -105 out[11] = triangleShapeFunction[5] * segmentShapeFunction[0]; │ │ │ │ │ -106 │ │ │ │ │ -107 // upper triangle edges │ │ │ │ │ -108 out[12] = triangleShapeFunction[3] * segmentShapeFunction[2]; │ │ │ │ │ -109 out[13] = triangleShapeFunction[4] * segmentShapeFunction[2]; │ │ │ │ │ -110 out[14] = triangleShapeFunction[5] * segmentShapeFunction[2]; │ │ │ │ │ -111 │ │ │ │ │ -112 // quadrilateral sides │ │ │ │ │ -113 out[15] = triangleShapeFunction[3] * segmentShapeFunction[1]; │ │ │ │ │ -114 out[16] = triangleShapeFunction[4] * segmentShapeFunction[1]; │ │ │ │ │ -115 out[17] = triangleShapeFunction[5] * segmentShapeFunction[1]; │ │ │ │ │ -116 │ │ │ │ │ -117 return; │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::evaluateFunction for │ │ │ │ │ -order " << k); │ │ │ │ │ -121 } │ │ │ │ │ -122 │ │ │ │ │ -128 void evaluateJacobian(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -129 std::vector& out) const │ │ │ │ │ -130 { │ │ │ │ │ -131 out.resize(size()); │ │ │ │ │ -132 │ │ │ │ │ -133 // Specialization for k==0 │ │ │ │ │ -134 if (k==0) │ │ │ │ │ -135 { │ │ │ │ │ -136 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ -137 return; │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -140 if (k==1) │ │ │ │ │ -141 { │ │ │ │ │ -142 out[0][0] = {in[2]-1, in[2]-1, in[0]+in[1]-1}; │ │ │ │ │ -143 out[1][0] = {1-in[2], 0, -in[0]}; │ │ │ │ │ -144 out[2][0] = { 0, 1-in[2], -in[1]}; │ │ │ │ │ -145 out[3][0] = { -in[2], -in[2], 1-in[0]-in[1]}; │ │ │ │ │ -146 out[4][0] = { in[2], 0, in[0]}; │ │ │ │ │ -147 out[5][0] = { 0, in[2], in[1]}; │ │ │ │ │ -148 │ │ │ │ │ -149 return; │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ -152 if (k==2) │ │ │ │ │ -153 { │ │ │ │ │ -154 // Second-order shape functions on a triangle, and the first derivatives │ │ │ │ │ -155 FieldVector triangleShapeFunction; │ │ │ │ │ -156 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]); │ │ │ │ │ -157 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]); │ │ │ │ │ -158 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]); │ │ │ │ │ -159 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]); │ │ │ │ │ -160 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]); │ │ │ │ │ -161 triangleShapeFunction[5] = 4*in[0]*in[1]; │ │ │ │ │ -162 │ │ │ │ │ -163 std::array,6> triangleShapeFunctionDer; │ │ │ │ │ -164 triangleShapeFunctionDer[0] = {-3 + 4*(in[0] + in[1]), -3 + 4*(in[0] + in │ │ │ │ │ -[1])}; │ │ │ │ │ -165 triangleShapeFunctionDer[1] = { -1 + 4*in[0], 0}; │ │ │ │ │ -166 triangleShapeFunctionDer[2] = { 0, -1 + 4*in[1]}; │ │ │ │ │ -167 triangleShapeFunctionDer[3] = { 4 - 8*in[0] - 4*in[1], -4*in[0]}; │ │ │ │ │ -168 triangleShapeFunctionDer[4] = { -4*in[1], 4 - 4*in[0] - 8*in[1]}; │ │ │ │ │ -169 triangleShapeFunctionDer[5] = { 4*in[1], 4*in[0]}; │ │ │ │ │ -170 │ │ │ │ │ -171 // Second-order shape functions on a line, and the first derivatives │ │ │ │ │ -172 FieldVector segmentShapeFunction; │ │ │ │ │ -173 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]); │ │ │ │ │ -174 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]); │ │ │ │ │ -175 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]); │ │ │ │ │ -176 │ │ │ │ │ -177 FieldVector segmentShapeFunctionDer; │ │ │ │ │ -178 segmentShapeFunctionDer[0] = -3 + 4*in[2]; │ │ │ │ │ -179 segmentShapeFunctionDer[1] = 4 - 8*in[2]; │ │ │ │ │ -180 segmentShapeFunctionDer[2] = -1 + 4*in[2]; │ │ │ │ │ -181 │ │ │ │ │ -182 // lower triangle: │ │ │ │ │ -183 out[0][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[0]; │ │ │ │ │ -184 out[0][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[0]; │ │ │ │ │ -185 out[0][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[0]; │ │ │ │ │ -186 │ │ │ │ │ -187 out[1][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[0]; │ │ │ │ │ -188 out[1][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[0]; │ │ │ │ │ -189 out[1][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[0]; │ │ │ │ │ -190 │ │ │ │ │ -191 out[2][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[0]; │ │ │ │ │ -192 out[2][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[0]; │ │ │ │ │ -193 out[2][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[0]; │ │ │ │ │ -194 │ │ │ │ │ -195 //upper triangle │ │ │ │ │ -196 out[3][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[2]; │ │ │ │ │ -197 out[3][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[2]; │ │ │ │ │ -198 out[3][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[2]; │ │ │ │ │ -199 │ │ │ │ │ -200 out[4][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[2]; │ │ │ │ │ -201 out[4][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[2]; │ │ │ │ │ -202 out[4][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[2]; │ │ │ │ │ -203 │ │ │ │ │ -204 out[5][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[2]; │ │ │ │ │ -205 out[5][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[2]; │ │ │ │ │ -206 out[5][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[2]; │ │ │ │ │ -207 │ │ │ │ │ -208 // vertical edges │ │ │ │ │ -209 out[6][0][0] = triangleShapeFunctionDer[0][0] * segmentShapeFunction[1]; │ │ │ │ │ -210 out[6][0][1] = triangleShapeFunctionDer[0][1] * segmentShapeFunction[1]; │ │ │ │ │ -211 out[6][0][2] = triangleShapeFunction[0] * segmentShapeFunctionDer[1]; │ │ │ │ │ -212 │ │ │ │ │ -213 out[7][0][0] = triangleShapeFunctionDer[1][0] * segmentShapeFunction[1]; │ │ │ │ │ -214 out[7][0][1] = triangleShapeFunctionDer[1][1] * segmentShapeFunction[1]; │ │ │ │ │ -215 out[7][0][2] = triangleShapeFunction[1] * segmentShapeFunctionDer[1]; │ │ │ │ │ -216 │ │ │ │ │ -217 out[8][0][0] = triangleShapeFunctionDer[2][0] * segmentShapeFunction[1]; │ │ │ │ │ -218 out[8][0][1] = triangleShapeFunctionDer[2][1] * segmentShapeFunction[1]; │ │ │ │ │ -219 out[8][0][2] = triangleShapeFunction[2] * segmentShapeFunctionDer[1]; │ │ │ │ │ -220 │ │ │ │ │ -221 // lower triangle edges │ │ │ │ │ -222 out[9][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[0]; │ │ │ │ │ -223 out[9][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[0]; │ │ │ │ │ -224 out[9][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[0]; │ │ │ │ │ -225 │ │ │ │ │ -226 out[10][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[0]; │ │ │ │ │ -227 out[10][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[0]; │ │ │ │ │ -228 out[10][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[0]; │ │ │ │ │ -229 │ │ │ │ │ -230 out[11][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[0]; │ │ │ │ │ -231 out[11][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[0]; │ │ │ │ │ -232 out[11][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[0]; │ │ │ │ │ -233 │ │ │ │ │ -234 // upper triangle edges │ │ │ │ │ -235 out[12][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[2]; │ │ │ │ │ -236 out[12][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[2]; │ │ │ │ │ -237 out[12][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[2]; │ │ │ │ │ -238 │ │ │ │ │ -239 out[13][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[2]; │ │ │ │ │ -240 out[13][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[2]; │ │ │ │ │ -241 out[13][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[2]; │ │ │ │ │ -242 │ │ │ │ │ -243 out[14][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[2]; │ │ │ │ │ -244 out[14][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[2]; │ │ │ │ │ -245 out[14][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[2]; │ │ │ │ │ -246 │ │ │ │ │ -247 // quadrilateral sides │ │ │ │ │ -248 out[15][0][0] = triangleShapeFunctionDer[3][0] * segmentShapeFunction[1]; │ │ │ │ │ -249 out[15][0][1] = triangleShapeFunctionDer[3][1] * segmentShapeFunction[1]; │ │ │ │ │ -250 out[15][0][2] = triangleShapeFunction[3] * segmentShapeFunctionDer[1]; │ │ │ │ │ -251 │ │ │ │ │ -252 out[16][0][0] = triangleShapeFunctionDer[4][0] * segmentShapeFunction[1]; │ │ │ │ │ -253 out[16][0][1] = triangleShapeFunctionDer[4][1] * segmentShapeFunction[1]; │ │ │ │ │ -254 out[16][0][2] = triangleShapeFunction[4] * segmentShapeFunctionDer[1]; │ │ │ │ │ -255 │ │ │ │ │ -256 out[17][0][0] = triangleShapeFunctionDer[5][0] * segmentShapeFunction[1]; │ │ │ │ │ -257 out[17][0][1] = triangleShapeFunctionDer[5][1] * segmentShapeFunction[1]; │ │ │ │ │ -258 out[17][0][2] = triangleShapeFunction[5] * segmentShapeFunctionDer[1]; │ │ │ │ │ -259 │ │ │ │ │ -260 return; │ │ │ │ │ -261 } │ │ │ │ │ -262 │ │ │ │ │ -263 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::evaluateJacobian for │ │ │ │ │ -order " << k); │ │ │ │ │ -264 } │ │ │ │ │ -265 │ │ │ │ │ -272 void partial(const std::array& order, │ │ │ │ │ -273 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -274 std::vector& out) const │ │ │ │ │ -275 { │ │ │ │ │ -276 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -277 │ │ │ │ │ -278 out.resize(size()); │ │ │ │ │ -279 │ │ │ │ │ -280 if (totalOrder == 0) │ │ │ │ │ -281 { │ │ │ │ │ -282 evaluateFunction(in, out); │ │ │ │ │ -283 return; │ │ │ │ │ -284 } │ │ │ │ │ -285 │ │ │ │ │ -286 // Specialization for zero-order finite elements │ │ │ │ │ -287 if (k==0) │ │ │ │ │ -288 { │ │ │ │ │ -289 out[0] = 0; │ │ │ │ │ -290 return; │ │ │ │ │ -291 } │ │ │ │ │ -292 │ │ │ │ │ -293 // Specialization for first-order finite elements │ │ │ │ │ -294 if (k==1) │ │ │ │ │ -295 { │ │ │ │ │ -296 if (totalOrder == 1) │ │ │ │ │ -297 { │ │ │ │ │ -298 auto direction = std::distance(order.begin(), std::find(order.begin(), │ │ │ │ │ -order.end(), 1)); │ │ │ │ │ -299 │ │ │ │ │ -300 switch (direction) { │ │ │ │ │ -301 case 0: │ │ │ │ │ -302 out[0] = in[2]-1; │ │ │ │ │ -303 out[1] = 1-in[2]; │ │ │ │ │ -304 out[2] = 0; │ │ │ │ │ -305 out[3] = -in[2]; │ │ │ │ │ -306 out[4] = in[2]; │ │ │ │ │ -307 out[5] = 0; │ │ │ │ │ -308 break; │ │ │ │ │ -309 case 1: │ │ │ │ │ -310 out[0] = in[2]-1; │ │ │ │ │ -311 out[1] = 0; │ │ │ │ │ -312 out[2] = 1-in[2]; │ │ │ │ │ -313 out[3] = -in[2]; │ │ │ │ │ -314 out[4] = 0; │ │ │ │ │ -315 out[5] = in[2]; │ │ │ │ │ -316 break; │ │ │ │ │ -317 case 2: │ │ │ │ │ -318 out[0] = in[0]+in[1]-1; │ │ │ │ │ -319 out[1] = -in[0]; │ │ │ │ │ -320 out[2] = -in[1]; │ │ │ │ │ -321 out[3] = 1-in[0]-in[1]; │ │ │ │ │ -322 out[4] = in[0]; │ │ │ │ │ -323 out[5] = in[1]; │ │ │ │ │ -324 break; │ │ │ │ │ -325 default: │ │ │ │ │ -326 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -327 } │ │ │ │ │ -328 } else if (totalOrder == 2) { │ │ │ │ │ -329 out.resize(size()); │ │ │ │ │ -330 if (order[0] == 1 && order[2] == 1) { │ │ │ │ │ -331 out[0] = 1; │ │ │ │ │ -332 out[1] =-1; │ │ │ │ │ -333 out[2] = 0; │ │ │ │ │ -334 out[3] =-1; │ │ │ │ │ -335 out[4] = 1; │ │ │ │ │ -336 out[5] = 0; │ │ │ │ │ -337 } else if (order[1] == 1 && order[2] == 1) { │ │ │ │ │ -338 out[0] = 1; │ │ │ │ │ -339 out[1] = 0; │ │ │ │ │ -340 out[2] =-1; │ │ │ │ │ -341 out[3] =-1; │ │ │ │ │ -342 out[4] = 0; │ │ │ │ │ -343 out[5] = 1; │ │ │ │ │ -344 } else { │ │ │ │ │ -345 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -346 out[i] = 0; │ │ │ │ │ -347 } │ │ │ │ │ -348 } else { │ │ │ │ │ -349 out.resize(size()); │ │ │ │ │ -350 std::fill(out.begin(), out.end(), 0.0); │ │ │ │ │ -351 } │ │ │ │ │ -352 │ │ │ │ │ -353 return; │ │ │ │ │ -354 } │ │ │ │ │ -355 │ │ │ │ │ -356 // Specialization for second-order finite elements │ │ │ │ │ -357 if (k==2) │ │ │ │ │ -358 { │ │ │ │ │ -359 if (totalOrder == 1) │ │ │ │ │ -360 { │ │ │ │ │ -361 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -362 switch (direction) │ │ │ │ │ -363 { │ │ │ │ │ -364 case 0: │ │ │ │ │ -365 { │ │ │ │ │ -366 FieldVector triangleShapeFunctionDerX; │ │ │ │ │ -367 triangleShapeFunctionDerX[0] = -3 + 4*(in[0] + in[1]); │ │ │ │ │ -368 triangleShapeFunctionDerX[1] = -1 + 4* in[0]; │ │ │ │ │ -369 triangleShapeFunctionDerX[2] = 0; │ │ │ │ │ -370 triangleShapeFunctionDerX[3] = 4 - 8* in[0] - 4*in[1]; │ │ │ │ │ -371 triangleShapeFunctionDerX[4] = -4*in[1]; │ │ │ │ │ -372 triangleShapeFunctionDerX[5] = 4*in[1]; │ │ │ │ │ -373 │ │ │ │ │ -374 FieldVector segmentShapeFunction; │ │ │ │ │ -375 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]); │ │ │ │ │ -376 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]); │ │ │ │ │ -377 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]); │ │ │ │ │ -378 │ │ │ │ │ -379 out[0] = triangleShapeFunctionDerX[0] * segmentShapeFunction[0]; │ │ │ │ │ -380 out[1] = triangleShapeFunctionDerX[1] * segmentShapeFunction[0]; │ │ │ │ │ -381 out[2] = triangleShapeFunctionDerX[2] * segmentShapeFunction[0]; │ │ │ │ │ -382 out[3] = triangleShapeFunctionDerX[0] * segmentShapeFunction[2]; │ │ │ │ │ -383 out[4] = triangleShapeFunctionDerX[1] * segmentShapeFunction[2]; │ │ │ │ │ -384 out[5] = triangleShapeFunctionDerX[2] * segmentShapeFunction[2]; │ │ │ │ │ -385 out[6] = triangleShapeFunctionDerX[0] * segmentShapeFunction[1]; │ │ │ │ │ -386 out[7] = triangleShapeFunctionDerX[1] * segmentShapeFunction[1]; │ │ │ │ │ -387 out[8] = triangleShapeFunctionDerX[2] * segmentShapeFunction[1]; │ │ │ │ │ -388 out[9] = triangleShapeFunctionDerX[3] * segmentShapeFunction[0]; │ │ │ │ │ -389 out[10] = triangleShapeFunctionDerX[4] * segmentShapeFunction[0]; │ │ │ │ │ -390 out[11] = triangleShapeFunctionDerX[5] * segmentShapeFunction[0]; │ │ │ │ │ -391 out[12] = triangleShapeFunctionDerX[3] * segmentShapeFunction[2]; │ │ │ │ │ -392 out[13] = triangleShapeFunctionDerX[4] * segmentShapeFunction[2]; │ │ │ │ │ -393 out[14] = triangleShapeFunctionDerX[5] * segmentShapeFunction[2]; │ │ │ │ │ -394 out[15] = triangleShapeFunctionDerX[3] * segmentShapeFunction[1]; │ │ │ │ │ -395 out[16] = triangleShapeFunctionDerX[4] * segmentShapeFunction[1]; │ │ │ │ │ -396 out[17] = triangleShapeFunctionDerX[5] * segmentShapeFunction[1]; │ │ │ │ │ -397 break; │ │ │ │ │ -398 } │ │ │ │ │ -399 case 1: │ │ │ │ │ -400 { │ │ │ │ │ -401 FieldVector triangleShapeFunctionDerY; │ │ │ │ │ -402 triangleShapeFunctionDerY[0] = -3 + 4*(in[0] + in[1]); │ │ │ │ │ -403 triangleShapeFunctionDerY[1] = 0; │ │ │ │ │ -404 triangleShapeFunctionDerY[2] = -1 + 4* in[1]; │ │ │ │ │ -405 triangleShapeFunctionDerY[3] = -4* in[0]; │ │ │ │ │ -406 triangleShapeFunctionDerY[4] = 4 - 4* in[0] - 8*in[1]; │ │ │ │ │ -407 triangleShapeFunctionDerY[5] = 4* in[0]; │ │ │ │ │ -408 │ │ │ │ │ -409 FieldVector segmentShapeFunction; │ │ │ │ │ -410 segmentShapeFunction[0] = 1 + in[2] * (-3 + 2*in[2]); │ │ │ │ │ -411 segmentShapeFunction[1] = in[2] * ( 4 - 4*in[2]); │ │ │ │ │ -412 segmentShapeFunction[2] = in[2] * (-1 + 2*in[2]); │ │ │ │ │ -413 │ │ │ │ │ -414 out[0] = triangleShapeFunctionDerY[0] * segmentShapeFunction[0]; │ │ │ │ │ -415 out[1] = triangleShapeFunctionDerY[1] * segmentShapeFunction[0]; │ │ │ │ │ -416 out[2] = triangleShapeFunctionDerY[2] * segmentShapeFunction[0]; │ │ │ │ │ -417 out[3] = triangleShapeFunctionDerY[0] * segmentShapeFunction[2]; │ │ │ │ │ -418 out[4] = triangleShapeFunctionDerY[1] * segmentShapeFunction[2]; │ │ │ │ │ -419 out[5] = triangleShapeFunctionDerY[2] * segmentShapeFunction[2]; │ │ │ │ │ -420 out[6] = triangleShapeFunctionDerY[0] * segmentShapeFunction[1]; │ │ │ │ │ -421 out[7] = triangleShapeFunctionDerY[1] * segmentShapeFunction[1]; │ │ │ │ │ -422 out[8] = triangleShapeFunctionDerY[2] * segmentShapeFunction[1]; │ │ │ │ │ -423 out[9] = triangleShapeFunctionDerY[3] * segmentShapeFunction[0]; │ │ │ │ │ -424 out[10] = triangleShapeFunctionDerY[4] * segmentShapeFunction[0]; │ │ │ │ │ -425 out[11] = triangleShapeFunctionDerY[5] * segmentShapeFunction[0]; │ │ │ │ │ -426 out[12] = triangleShapeFunctionDerY[3] * segmentShapeFunction[2]; │ │ │ │ │ -427 out[13] = triangleShapeFunctionDerY[4] * segmentShapeFunction[2]; │ │ │ │ │ -428 out[14] = triangleShapeFunctionDerY[5] * segmentShapeFunction[2]; │ │ │ │ │ -429 out[15] = triangleShapeFunctionDerY[3] * segmentShapeFunction[1]; │ │ │ │ │ -430 out[16] = triangleShapeFunctionDerY[4] * segmentShapeFunction[1]; │ │ │ │ │ -431 out[17] = triangleShapeFunctionDerY[5] * segmentShapeFunction[1]; │ │ │ │ │ -432 break; │ │ │ │ │ -433 } │ │ │ │ │ -434 case 2: │ │ │ │ │ -435 { │ │ │ │ │ -436 FieldVector triangleShapeFunction; │ │ │ │ │ -437 triangleShapeFunction[0] = 2 * (1 - in[0] - in[1]) * (0.5 - in[0] - in[1]); │ │ │ │ │ -438 triangleShapeFunction[1] = 2 * in[0] * (-0.5 + in[0]); │ │ │ │ │ -439 triangleShapeFunction[2] = 2 * in[1] * (-0.5 + in[1]); │ │ │ │ │ -440 triangleShapeFunction[3] = 4*in[0] * (1 - in[0] - in[1]); │ │ │ │ │ -441 triangleShapeFunction[4] = 4*in[1] * (1 - in[0] - in[1]); │ │ │ │ │ -442 triangleShapeFunction[5] = 4*in[0]*in[1]; │ │ │ │ │ -443 │ │ │ │ │ -444 FieldVector segmentShapeFunctionDer; │ │ │ │ │ -445 segmentShapeFunctionDer[0] = -3 + 4*in[2]; │ │ │ │ │ -446 segmentShapeFunctionDer[1] = 4 - 8*in[2]; │ │ │ │ │ -447 segmentShapeFunctionDer[2] = -1 + 4*in[2]; │ │ │ │ │ -448 │ │ │ │ │ -449 out[0] = triangleShapeFunction[0] * segmentShapeFunctionDer[0]; │ │ │ │ │ -450 out[1] = triangleShapeFunction[1] * segmentShapeFunctionDer[0]; │ │ │ │ │ -451 out[2] = triangleShapeFunction[2] * segmentShapeFunctionDer[0]; │ │ │ │ │ -452 out[3] = triangleShapeFunction[0] * segmentShapeFunctionDer[2]; │ │ │ │ │ -453 out[4] = triangleShapeFunction[1] * segmentShapeFunctionDer[2]; │ │ │ │ │ -454 out[5] = triangleShapeFunction[2] * segmentShapeFunctionDer[2]; │ │ │ │ │ -455 out[6] = triangleShapeFunction[0] * segmentShapeFunctionDer[1]; │ │ │ │ │ -456 out[7] = triangleShapeFunction[1] * segmentShapeFunctionDer[1]; │ │ │ │ │ -457 out[8] = triangleShapeFunction[2] * segmentShapeFunctionDer[1]; │ │ │ │ │ -458 out[9] = triangleShapeFunction[3] * segmentShapeFunctionDer[0]; │ │ │ │ │ -459 out[10] = triangleShapeFunction[4] * segmentShapeFunctionDer[0]; │ │ │ │ │ -460 out[11] = triangleShapeFunction[5] * segmentShapeFunctionDer[0]; │ │ │ │ │ -461 out[12] = triangleShapeFunction[3] * segmentShapeFunctionDer[2]; │ │ │ │ │ -462 out[13] = triangleShapeFunction[4] * segmentShapeFunctionDer[2]; │ │ │ │ │ -463 out[14] = triangleShapeFunction[5] * segmentShapeFunctionDer[2]; │ │ │ │ │ -464 out[15] = triangleShapeFunction[3] * segmentShapeFunctionDer[1]; │ │ │ │ │ -465 out[16] = triangleShapeFunction[4] * segmentShapeFunctionDer[1]; │ │ │ │ │ -466 out[17] = triangleShapeFunction[5] * segmentShapeFunctionDer[1]; │ │ │ │ │ -467 break; │ │ │ │ │ -468 } │ │ │ │ │ -469 default: │ │ │ │ │ -470 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -471 } │ │ │ │ │ -472 } else { │ │ │ │ │ -473 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -474 } │ │ │ │ │ -475 │ │ │ │ │ -476 return; │ │ │ │ │ -477 } │ │ │ │ │ -478 │ │ │ │ │ -479 DUNE_THROW(NotImplemented, "LagrangePrismLocalBasis::partial not │ │ │ │ │ -implemented for order " << k); │ │ │ │ │ -480 } │ │ │ │ │ -481 │ │ │ │ │ -483 static constexpr unsigned int order () │ │ │ │ │ -484 { │ │ │ │ │ -485 return k; │ │ │ │ │ -486 } │ │ │ │ │ -487 }; │ │ │ │ │ -488 │ │ │ │ │ -493 template │ │ │ │ │ -494 class LagrangePrismLocalCoefficients │ │ │ │ │ -495 { │ │ │ │ │ -496 public: │ │ │ │ │ -498 LagrangePrismLocalCoefficients () │ │ │ │ │ -499 : localKeys_(size()) │ │ │ │ │ -500 { │ │ │ │ │ -501 if (k==0) │ │ │ │ │ -502 { │ │ │ │ │ -503 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ -504 return; │ │ │ │ │ -505 } │ │ │ │ │ -506 │ │ │ │ │ -507 if (k==1) │ │ │ │ │ -508 { │ │ │ │ │ -509 for (std::size_t i=0; i localKeys_; │ │ │ │ │ -562 }; │ │ │ │ │ -563 │ │ │ │ │ -568 template │ │ │ │ │ -569 class LagrangePrismLocalInterpolation │ │ │ │ │ -570 { │ │ │ │ │ -571 public: │ │ │ │ │ -572 │ │ │ │ │ -580 template │ │ │ │ │ -581 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -582 { │ │ │ │ │ -583 constexpr auto dim = LocalBasis::Traits::dimDomain; │ │ │ │ │ -584 constexpr auto k = LocalBasis::order(); │ │ │ │ │ -585 using D = typename LocalBasis::Traits::DomainType; │ │ │ │ │ -586 using DF = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ -587 │ │ │ │ │ -588 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -589 │ │ │ │ │ -590 out.resize(LocalBasis::size()); │ │ │ │ │ -591 │ │ │ │ │ -592 // Specialization for zero-order case │ │ │ │ │ -593 if (k==0) │ │ │ │ │ -594 { │ │ │ │ │ -595 auto center = ReferenceElements::general(GeometryTypes:: │ │ │ │ │ -prism).position(0,0); │ │ │ │ │ -596 out[0] = f(center); │ │ │ │ │ -597 return; │ │ │ │ │ -598 } │ │ │ │ │ -599 │ │ │ │ │ -600 // Specialization for first-order case │ │ │ │ │ -601 if (k==1) │ │ │ │ │ -602 { │ │ │ │ │ -603 for (unsigned int i=0; i::general(GeometryTypes:: │ │ │ │ │ -prism).position(i,3); │ │ │ │ │ -606 out[i] = f(vertex); │ │ │ │ │ -607 } │ │ │ │ │ -608 return; │ │ │ │ │ -609 } │ │ │ │ │ -610 │ │ │ │ │ -611 if (k==2) │ │ │ │ │ -612 { │ │ │ │ │ -613 out[0] = f( D( {0.0, 0.0, 0.0} ) ); │ │ │ │ │ -614 out[1] = f( D( {1.0, 0.0, 0.0} ) ); │ │ │ │ │ -615 out[2] = f( D( {0.0, 1.0, 0.0} ) ); │ │ │ │ │ -616 out[3] = f( D( {0.0, 0.0, 1.0} ) ); │ │ │ │ │ -617 out[4] = f( D( {1.0, 0.0, 1.0} ) ); │ │ │ │ │ -618 out[5] = f( D( {0.0, 1.0, 1.0} ) ); │ │ │ │ │ -619 out[6] = f( D( {0.0, 0.0, 0.5} ) ); │ │ │ │ │ -620 out[7] = f( D( {1.0, 0.0, 0.5} ) ); │ │ │ │ │ -621 out[8] = f( D( {0.0, 1.0, 0.5} ) ); │ │ │ │ │ -622 out[9] = f( D( {0.5, 0.0, 0.0} ) ); │ │ │ │ │ -623 out[10] = f( D( {0.0, 0.5, 0.0} ) ); │ │ │ │ │ -624 out[11] = f( D( {0.5, 0.5, 0.0} ) ); │ │ │ │ │ -625 out[12] = f( D( {0.5, 0.0, 1.0} ) ); │ │ │ │ │ -626 out[13] = f( D( {0.0, 0.5, 1.0} ) ); │ │ │ │ │ -627 out[14] = f( D( {0.5, 0.5, 1.0} ) ); │ │ │ │ │ -628 out[15] = f( D( {0.5, 0.0, 0.5} ) ); │ │ │ │ │ -629 out[16] = f( D( {0.0, 0.5, 0.5} ) ); │ │ │ │ │ -630 out[17] = f( D( {0.5, 0.5, 0.5} ) ); │ │ │ │ │ -631 │ │ │ │ │ -632 return; │ │ │ │ │ -633 } │ │ │ │ │ -634 │ │ │ │ │ -635 DUNE_THROW(NotImplemented, "LagrangePrismLocalInterpolation not implemented │ │ │ │ │ -for order " << k); │ │ │ │ │ -636 } │ │ │ │ │ -637 │ │ │ │ │ -638 }; │ │ │ │ │ -639 │ │ │ │ │ -640} } // namespace Dune::Impl │ │ │ │ │ -641 │ │ │ │ │ -642namespace _D_u_n_e │ │ │ │ │ -643{ │ │ │ │ │ -650 template │ │ │ │ │ -_6_5_1 class _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -652 { │ │ │ │ │ -653 public: │ │ │ │ │ -_6_5_6 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_k_>, │ │ │ │ │ -657 Impl::LagrangePrismLocalCoefficients, │ │ │ │ │ -658 Impl::LagrangePrismLocalInterpolation │ │ │ │ │ -> >; │ │ │ │ │ -659 │ │ │ │ │ -_6_6_5 _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ -666 │ │ │ │ │ -_6_6_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -670 { │ │ │ │ │ -671 return basis_; │ │ │ │ │ -672 } │ │ │ │ │ -673 │ │ │ │ │ -_6_7_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -677 { │ │ │ │ │ -678 return coefficients_; │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -_6_8_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -684 { │ │ │ │ │ -685 return interpolation_; │ │ │ │ │ -686 } │ │ │ │ │ -687 │ │ │ │ │ -_6_8_9 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ -690 { │ │ │ │ │ -691 return binomial(k+2,2) * (k+1); │ │ │ │ │ -692 } │ │ │ │ │ -693 │ │ │ │ │ -_6_9_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -697 { │ │ │ │ │ -698 return GeometryTypes::prism; │ │ │ │ │ -699 } │ │ │ │ │ -700 │ │ │ │ │ -701 private: │ │ │ │ │ -702 Impl::LagrangePrismLocalBasis basis_; │ │ │ │ │ -703 Impl::LagrangePrismLocalCoefficients coefficients_; │ │ │ │ │ -704 Impl::LagrangePrismLocalInterpolation │ │ │ │ │ -> interpolation_; │ │ │ │ │ -705 }; │ │ │ │ │ -706 │ │ │ │ │ -707} // namespace Dune │ │ │ │ │ -708 │ │ │ │ │ -709#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPRISM_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +56 return coefficients; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_5_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +60 { │ │ │ │ │ +61 return interpolation; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 unsigned int _s_i_z_e () const │ │ │ │ │ +66 { │ │ │ │ │ +67 return basis.size(); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +71 { │ │ │ │ │ +72 return GeometryTypes::triangle; │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 private: │ │ │ │ │ +76 _R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +77 _R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +78 _R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +79 }; │ │ │ │ │ +80} │ │ │ │ │ +81 │ │ │ │ │ +82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ traits helper struct │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ LB LocalBasisType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ LC LocalCoefficientsType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ LI LocalInterpolationType │ │ │ │ │ DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:689 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:683 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:696 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:676 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -LagrangePrismLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:665 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on triangles. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT12DLocalBasis< D, R >, RT12DLocalCoefficients, │ │ │ │ │ +RT12DLocalInterpolation< RT12DLocalBasis< D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:669 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT12DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT12DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12d.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramid.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localcoefficients.hh File Reference
│ │ │ │ +
raviartthomas0pyramid.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ -#include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh"
│ │ │ │ +#include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::P0LocalCoefficients
 Layout map for P0 elements. More...
class  Dune::RT0PyramidLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on pyramids. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -p0localcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomas0pyramid.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  Layout map for P0 elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on pyramids. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00236_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramid.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,74 +70,123 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localcoefficients.hh
│ │ │ │ +
raviartthomas0pyramid.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_P0LOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 public:
│ │ │ │ -
│ │ │ │ -
27 P0LocalCoefficients () : index(0,0,0)
│ │ │ │ -
28 {}
│ │ │ │ -
│ │ │ │ -
29
│ │ │ │ -
│ │ │ │ -
31 std::size_t size () const
│ │ │ │ -
32 {
│ │ │ │ -
33 return 1;
│ │ │ │ -
34 }
│ │ │ │ -
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
37 const LocalKey& localKey ([[maybe_unused]] std::size_t i) const
│ │ │ │ -
38 {
│ │ │ │ -
39 return index;
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
42 private:
│ │ │ │ -
43 LocalKey index;
│ │ │ │ -
44 };
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
46}
│ │ │ │ -
47#endif
│ │ │ │ - │ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
37 {}
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
45 basis(s),
│ │ │ │ +
46 interpolation(s)
│ │ │ │ +
47 {}
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
│ │ │ │ +
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
50 {
│ │ │ │ +
51 return basis;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
55 {
│ │ │ │ +
56 return coefficients;
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
60 {
│ │ │ │ +
61 return interpolation;
│ │ │ │ +
62 }
│ │ │ │ +
│ │ │ │ +
63
│ │ │ │ +
│ │ │ │ +
65 unsigned int size () const
│ │ │ │ +
66 {
│ │ │ │ +
67 return basis.size();
│ │ │ │ +
68 }
│ │ │ │ +
│ │ │ │ +
69
│ │ │ │ +
│ │ │ │ +
70 static constexpr GeometryType type ()
│ │ │ │ +
71 {
│ │ │ │ +
72 return GeometryTypes::pyramid;
│ │ │ │ +
73 }
│ │ │ │ +
│ │ │ │ +
74
│ │ │ │ +
75 private:
│ │ │ │ + │ │ │ │ +
77 RT0PyramidLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
79 };
│ │ │ │ +
│ │ │ │ +
80}
│ │ │ │ +
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for P0 elements.
Definition p0localcoefficients.hh:24
│ │ │ │ -
P0LocalCoefficients()
Standard constructor.
Definition p0localcoefficients.hh:27
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition p0localcoefficients.hh:37
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition p0localcoefficients.hh:31
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on pyramids.
Definition raviartthomas0pyramid.hh:27
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0pyramid.hh:54
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0pyramid.hh:65
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas0pyramid.hh:70
│ │ │ │ +
RT0PyramidLocalFiniteElement(int s)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0pyramid.hh:44
│ │ │ │ +
LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< RT0PyramidLocalBasis< D, R > > > Traits
Definition raviartthomas0pyramid.hh:33
│ │ │ │ +
RT0PyramidLocalFiniteElement()
Standard constructor.
Definition raviartthomas0pyramid.hh:36
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0pyramid.hh:49
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0pyramid.hh:59
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference pyramid.
Definition raviartthomas0pyramidlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on pyramids.
Definition raviartthomas0pyramidlocalcoefficients.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0pyramidlocalinterpolation.hh:24
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,72 +1,136 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ -p0localcoefficients.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas0pyramid.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_P0LOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -_2_3 class _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -24 { │ │ │ │ │ -25 public: │ │ │ │ │ -_2_7 _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : index(0,0,0) │ │ │ │ │ -28 {} │ │ │ │ │ -29 │ │ │ │ │ -_3_1 std::size_t _s_i_z_e () const │ │ │ │ │ -32 { │ │ │ │ │ -33 return 1; │ │ │ │ │ -34 } │ │ │ │ │ -35 │ │ │ │ │ -_3_7 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y ([[maybe_unused]] std::size_t i) const │ │ │ │ │ -38 { │ │ │ │ │ -39 return index; │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -42 private: │ │ │ │ │ -43 _L_o_c_a_l_K_e_y index; │ │ │ │ │ -44 }; │ │ │ │ │ -45 │ │ │ │ │ -46} │ │ │ │ │ -47#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 { │ │ │ │ │ +28 │ │ │ │ │ +29 public: │ │ │ │ │ +30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +31 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +32 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_3 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +37 {} │ │ │ │ │ +38 │ │ │ │ │ +_4_4 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +45 basis(s), │ │ │ │ │ +46 interpolation(s) │ │ │ │ │ +47 {} │ │ │ │ │ +48 │ │ │ │ │ +_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +50 { │ │ │ │ │ +51 return basis; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +55 { │ │ │ │ │ +56 return coefficients; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +_5_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +60 { │ │ │ │ │ +61 return interpolation; │ │ │ │ │ +62 } │ │ │ │ │ +63 │ │ │ │ │ +_6_5 unsigned int _s_i_z_e () const │ │ │ │ │ +66 { │ │ │ │ │ +67 return basis.size(); │ │ │ │ │ +68 } │ │ │ │ │ +69 │ │ │ │ │ +_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +71 { │ │ │ │ │ +72 return GeometryTypes::pyramid; │ │ │ │ │ +73 } │ │ │ │ │ +74 │ │ │ │ │ +75 private: │ │ │ │ │ +76 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +77 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +78 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +79 }; │ │ │ │ │ +80} │ │ │ │ │ +81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for P0 elements. │ │ │ │ │ -DDeeffiinniittiioonn p0localcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -P0LocalCoefficients() │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on pyramids. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:65 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0PyramidLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, │ │ │ │ │ +RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< │ │ │ │ │ +RT0PyramidLocalBasis< D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0PyramidLocalFiniteElement() │ │ │ │ │ Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn p0localcoefficients.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn p0localcoefficients.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn p0localcoefficients.hh:31 │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramid.hh:59 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,33 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localinterpolation.hh File Reference
│ │ │ │ +
raviartthomas1cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas1cube2d/raviartthomas1cube2dlocalbasis.hh"
│ │ │ │ +#include "raviartthomas1cube2d/raviartthomas1cube2dlocalinterpolation.hh"
│ │ │ │ +#include "raviartthomas1cube2d/raviartthomas1cube2dlocalcoefficients.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::P0LocalInterpolation< LB >
class  Dune::RT1Cube2DLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -p0localinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +raviartthomas1cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00239_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,76 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localinterpolation.hh
│ │ │ │ +
raviartthomas1cube2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_P0LOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9#include <dune/geometry/referenceelements.hh>
│ │ │ │ - │ │ │ │ -
11
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
15
│ │ │ │ -
16 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
19 public:
│ │ │ │ -
│ │ │ │ -
20 P0LocalInterpolation (const GeometryType& gt) : gt_(gt)
│ │ │ │ -
21 {}
│ │ │ │ -
│ │ │ │ -
22
│ │ │ │ -
24 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
25 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
26 {
│ │ │ │ -
27 typedef typename LB::Traits::DomainType DomainType;
│ │ │ │ -
28 typedef typename LB::Traits::DomainFieldType DF;
│ │ │ │ -
29 const int dim=LB::Traits::dimDomain;
│ │ │ │ -
30
│ │ │ │ -
31 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
32
│ │ │ │ -
33 DomainType x = Dune::ReferenceElements<DF,dim>::general(gt_).position(0,0);
│ │ │ │ -
34
│ │ │ │ -
35 out.resize(1);
│ │ │ │ -
36 out[0] = f(x);
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
39 private:
│ │ │ │ -
40 GeometryType gt_;
│ │ │ │ -
41 };
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
43}
│ │ │ │ -
44
│ │ │ │ -
45#endif
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
17
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 basis(s),
│ │ │ │ +
47 interpolation(s)
│ │ │ │ +
48 {}
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
51 {
│ │ │ │ +
52 return basis;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 return coefficients;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
61 {
│ │ │ │ +
62 return interpolation;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ +
66 unsigned int size () const
│ │ │ │ +
67 {
│ │ │ │ +
68 return basis.size();
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 static constexpr GeometryType type ()
│ │ │ │ +
72 {
│ │ │ │ +
73 return GeometryTypes::quadrilateral;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76 private:
│ │ │ │ + │ │ │ │ +
78 RT1Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81}
│ │ │ │ +
82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition p0localinterpolation.hh:18
│ │ │ │ -
P0LocalInterpolation(const GeometryType &gt)
Definition p0localinterpolation.hh:20
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
determine coefficients interpolating a given function
Definition p0localinterpolation.hh:25
│ │ │ │ - │ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on quadrilaterals.
Definition raviartthomas1cube2d.hh:28
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas1cube2d.hh:71
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas1cube2d.hh:55
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas1cube2d.hh:60
│ │ │ │ +
LocalFiniteElementTraits< RT1Cube2DLocalBasis< D, R >, RT1Cube2DLocalCoefficients, RT1Cube2DLocalInterpolation< RT1Cube2DLocalBasis< D, R > > > Traits
Definition raviartthomas1cube2d.hh:34
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas1cube2d.hh:66
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas1cube2d.hh:50
│ │ │ │ +
RT1Cube2DLocalFiniteElement(int s)
Make set number s, where 0 <= s < 16.
Definition raviartthomas1cube2d.hh:45
│ │ │ │ +
RT1Cube2DLocalFiniteElement()
Standard constructor.
Definition raviartthomas1cube2d.hh:37
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas1cube2dlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on quadrilaterals.
Definition raviartthomas1cube2dlocalcoefficients.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas1cube2dlocalinterpolation.hh:27
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,70 +1,137 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ -p0localinterpolation.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas1cube2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_P0LOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -11 │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -15 │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -18 { │ │ │ │ │ -19 public: │ │ │ │ │ -_2_0 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (const GeometryType& gt) : gt_(gt) │ │ │ │ │ -21 {} │ │ │ │ │ -22 │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -26 { │ │ │ │ │ -27 typedef typename LB::Traits::DomainType DomainType; │ │ │ │ │ -28 typedef typename LB::Traits::DomainFieldType DF; │ │ │ │ │ -29 const int dim=LB::Traits::dimDomain; │ │ │ │ │ -30 │ │ │ │ │ -31 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -32 │ │ │ │ │ -33 DomainType x = Dune::ReferenceElements::general(gt_).position(0,0); │ │ │ │ │ -34 │ │ │ │ │ -35 out.resize(1); │ │ │ │ │ -36 out[0] = f(x); │ │ │ │ │ -37 } │ │ │ │ │ -38 │ │ │ │ │ -39 private: │ │ │ │ │ -40 GeometryType gt_; │ │ │ │ │ -41 }; │ │ │ │ │ -42 │ │ │ │ │ -43} │ │ │ │ │ -44 │ │ │ │ │ -45#endif │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +17 │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +28 { │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +32 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +33 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_4 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +35 │ │ │ │ │ +_3_7 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_5 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +46 basis(s), │ │ │ │ │ +47 interpolation(s) │ │ │ │ │ +48 {} │ │ │ │ │ +49 │ │ │ │ │ +_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return basis; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +56 { │ │ │ │ │ +57 return coefficients; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +61 { │ │ │ │ │ +62 return interpolation; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +_6_6 unsigned int _s_i_z_e () const │ │ │ │ │ +67 { │ │ │ │ │ +68 return basis.size(); │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +72 { │ │ │ │ │ +73 return GeometryTypes::quadrilateral; │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +76 private: │ │ │ │ │ +77 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +78 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +79 _R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +80 }; │ │ │ │ │ +81} │ │ │ │ │ +82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_2_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn p0localinterpolation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -P0LocalInterpolation(const GeometryType >) │ │ │ │ │ -DDeeffiinniittiioonn p0localinterpolation.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -determine coefficients interpolating a given function │ │ │ │ │ -DDeeffiinniittiioonn p0localinterpolation.hh:25 │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT1Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT1Cube2DLocalCoefficients, RT1Cube2DLocalInterpolation< RT1Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT1Cube2DLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT1Cube2DLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2d.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube2dlocalinterpolation.hh:27 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0localbasis.hh File Reference
│ │ │ │ +
raviartthomas1cube3dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::P0LocalBasis< D, R, d >
 Constant shape function. More...
class  Dune::RT1Cube3DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -p0localbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas1cube3dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_ _> │ │ │ │ │ -  Constant shape function. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00242_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0localbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,109 +70,158 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0localbasis.hh
│ │ │ │ +
raviartthomas1cube3dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P0LOCALBASIS_HH
│ │ │ │ -
6#define DUNE_P0LOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
28 template<class D, class R, int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 public:
│ │ │ │ -
33 typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>,
│ │ │ │ -
34 Dune::FieldMatrix<R,1,d> > Traits;
│ │ │ │ -
35
│ │ │ │ -
│ │ │ │ -
37 unsigned int size () const
│ │ │ │ -
38 {
│ │ │ │ -
39 return 1;
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
43 inline void evaluateFunction (const typename Traits::DomainType&,
│ │ │ │ -
44 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
45 {
│ │ │ │ -
46 out.resize(1);
│ │ │ │ -
47 out[0] = 1;
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
51 inline void
│ │ │ │ -
│ │ │ │ -
52 evaluateJacobian (const typename Traits::DomainType&, // position
│ │ │ │ -
53 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
54 {
│ │ │ │ -
55 out.resize(1);
│ │ │ │ -
56 for (int i=0; i<d; i++)
│ │ │ │ -
57 out[0][0][i] = 0;
│ │ │ │ -
58 }
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
│ │ │ │ -
65 void partial(const std::array<unsigned int,d>& order,
│ │ │ │ -
66 const typename Traits::DomainType& in,
│ │ │ │ -
67 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
68 {
│ │ │ │ -
69 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
70 if (totalOrder == 0) {
│ │ │ │ -
71 evaluateFunction(in, out);
│ │ │ │ -
72 } else {
│ │ │ │ -
73 out.resize(1);
│ │ │ │ -
74 out[0] = 0;
│ │ │ │ -
75 }
│ │ │ │ -
76 }
│ │ │ │ -
│ │ │ │ -
77
│ │ │ │ -
│ │ │ │ -
79 unsigned int order () const
│ │ │ │ -
80 {
│ │ │ │ -
81 return 0;
│ │ │ │ -
82 }
│ │ │ │ -
│ │ │ │ -
83 };
│ │ │ │ -
│ │ │ │ -
84
│ │ │ │ -
85}
│ │ │ │ -
86
│ │ │ │ -
87#endif
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
23 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26
│ │ │ │ +
27 public:
│ │ │ │ +
28
│ │ │ │ +
│ │ │ │ +
34 RT1Cube3DLocalInterpolation (std::bitset<6> s = 0)
│ │ │ │ +
35 {
│ │ │ │ +
36 for (size_t i=0; i<6; i++)
│ │ │ │ +
37 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
38
│ │ │ │ +
39 n_[0] = {-1.0, 0.0, 0.0};
│ │ │ │ +
40 n_[1] = { 1.0, 0.0, 0.0};
│ │ │ │ +
41 n_[2] = { 0.0, -1.0, 0.0};
│ │ │ │ +
42 n_[3] = { 0.0, 1.0, 0.0};
│ │ │ │ +
43 n_[4] = { 0.0, 0.0, -1.0};
│ │ │ │ +
44 n_[5] = { 0.0, 0.0, 1.0};
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
55 template<class F, class C>
│ │ │ │ +
│ │ │ │ +
56 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
57 {
│ │ │ │ +
58 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
59 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
60 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
61
│ │ │ │ +
62 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
63
│ │ │ │ +
64 out.resize(36);
│ │ │ │ +
65 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
66
│ │ │ │ +
67 const int qOrder = 3;
│ │ │ │ +
68 const auto& rule1 = QuadratureRules<Scalar,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
69
│ │ │ │ +
70 for (auto&& qp : rule1)
│ │ │ │ +
71 {
│ │ │ │ +
72 Dune::FieldVector<Scalar,2> qPos = qp.position();
│ │ │ │ +
73 typename LB::Traits::DomainType localPos;
│ │ │ │ +
74
│ │ │ │ +
75 localPos = {0.0, qPos[0], qPos[1]};
│ │ │ │ +
76 auto y = f(localPos);
│ │ │ │ +
77 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*qp.weight()*sign_[0];
│ │ │ │ +
78 out[6] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[0] - 1.0)*qp.weight();
│ │ │ │ +
79 out[12] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
80 out[18] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[0] - 1.0)*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
81
│ │ │ │ +
82 localPos = {1.0, qPos[0], qPos[1]};
│ │ │ │ +
83 y = f(localPos);
│ │ │ │ +
84 out[1] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*qp.weight()*sign_[1];
│ │ │ │ +
85 out[7] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos[0])*qp.weight();
│ │ │ │ +
86 out[13] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos[1])*qp.weight();
│ │ │ │ +
87 out[19] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos[0])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
88
│ │ │ │ +
89 localPos = {qPos[0], 0.0, qPos[1]};
│ │ │ │ +
90 y = f(localPos);
│ │ │ │ +
91 out[2] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*qp.weight()*sign_[2];
│ │ │ │ +
92 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(1.0 - 2.0*qPos[0])*qp.weight();
│ │ │ │ +
93 out[14] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
94 out[20] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(1.0 - 2.0*qPos[0])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
95
│ │ │ │ +
96 localPos = {qPos[0], 1.0, qPos[1]};
│ │ │ │ +
97 y = f(localPos);
│ │ │ │ +
98 out[3] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*qp.weight()*sign_[3];
│ │ │ │ +
99 out[9] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(2.0*qPos[0] - 1.0)*qp.weight();
│ │ │ │ +
100 out[15] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(1.0 - 2.0*qPos[1])*qp.weight();
│ │ │ │ +
101 out[21] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(2.0*qPos[0] - 1.0)*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
102
│ │ │ │ +
103 localPos = {qPos[0], qPos[1], 0.0};
│ │ │ │ +
104 y = f(localPos);
│ │ │ │ +
105 out[4] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*qp.weight()*sign_[4];
│ │ │ │ +
106 out[10] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos[0])*qp.weight();
│ │ │ │ +
107 out[16] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos[1])*qp.weight();
│ │ │ │ +
108 out[22] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos[0])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
109
│ │ │ │ +
110 localPos = {qPos[0], qPos[1], 1.0};
│ │ │ │ +
111 y = f(localPos);
│ │ │ │ +
112 out[5] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*qp.weight()*sign_[5];
│ │ │ │ +
113 out[11] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[0] - 1.0)*qp.weight();
│ │ │ │ +
114 out[17] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
115 out[23] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[0] - 1.0)*(2.0*qPos[1] - 1.0)*qp.weight();
│ │ │ │ +
116 }
│ │ │ │ +
117
│ │ │ │ +
118 const auto& rule2 = QuadratureRules<Vector,3>::rule(GeometryTypes::cube(3), qOrder);
│ │ │ │ +
119 for (auto&& qp : rule2)
│ │ │ │ +
120 {
│ │ │ │ +
121 FieldVector<double,3> qPos = qp.position();
│ │ │ │ +
122
│ │ │ │ +
123 auto y = f(qPos);
│ │ │ │ +
124 out[24] += y[0]*qp.weight();
│ │ │ │ +
125 out[25] += y[1]*qp.weight();
│ │ │ │ +
126 out[26] += y[2]*qp.weight();
│ │ │ │ +
127 out[27] += y[0]*qPos[1]*qp.weight();
│ │ │ │ +
128 out[28] += y[0]*qPos[2]*qp.weight();
│ │ │ │ +
129 out[29] += y[1]*qPos[0]*qp.weight();
│ │ │ │ +
130 out[30] += y[1]*qPos[2]*qp.weight();
│ │ │ │ +
131 out[31] += y[2]*qPos[0]*qp.weight();
│ │ │ │ +
132 out[32] += y[2]*qPos[1]*qp.weight();
│ │ │ │ +
133 out[33] += y[0]*qPos[1]*qPos[2]*qp.weight();
│ │ │ │ +
134 out[34] += y[1]*qPos[0]*qPos[2]*qp.weight();
│ │ │ │ +
135 out[35] += y[2]*qPos[0]*qPos[1]*qp.weight();
│ │ │ │ +
136 }
│ │ │ │ +
137 }
│ │ │ │ +
│ │ │ │ +
138
│ │ │ │ +
139 private:
│ │ │ │ +
140 // Facet orientations
│ │ │ │ +
141 std::array<typename LB::Traits::RangeFieldType, 6> sign_;
│ │ │ │ +
142
│ │ │ │ +
143 // Facet normals
│ │ │ │ +
144 std::array<typename LB::Traits::DomainType, 6> n_;
│ │ │ │ +
145 };
│ │ │ │ +
│ │ │ │ +
146}
│ │ │ │ +
147#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Constant shape function.
Definition p0localbasis.hh:30
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition p0localbasis.hh:79
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition p0localbasis.hh:52
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition p0localbasis.hh:43
│ │ │ │ -
void partial(const std::array< unsigned int, d > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of any order of all shape functions.
Definition p0localbasis.hh:65
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition p0localbasis.hh:37
│ │ │ │ -
LocalBasisTraits< D, d, Dune::FieldVector< D, d >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, d > > Traits
export type traits for function signature
Definition p0localbasis.hh:34
│ │ │ │ - │ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas1cube3dlocalinterpolation.hh:25
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas1cube3dlocalinterpolation.hh:56
│ │ │ │ +
RT1Cube3DLocalInterpolation(std::bitset< 6 > s=0)
Make set number s, where 0 <= s < 64.
Definition raviartthomas1cube3dlocalinterpolation.hh:34
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,120 +1,180 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ - * _p_0 │ │ │ │ │ -p0localbasis.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ +raviartthomas1cube3dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P0LOCALBASIS_HH │ │ │ │ │ -6#define DUNE_P0LOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -28 template │ │ │ │ │ -_2_9 class _P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -30 { │ │ │ │ │ -31 public: │ │ │ │ │ -33 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_>,R,1,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_3_4 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -35 │ │ │ │ │ -_3_7 unsigned int _s_i_z_e () const │ │ │ │ │ -38 { │ │ │ │ │ -39 return 1; │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -_4_3 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e&, │ │ │ │ │ -44 std::vector& out) const │ │ │ │ │ -45 { │ │ │ │ │ -46 out.resize(1); │ │ │ │ │ -47 out[0] = 1; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -51 inline void │ │ │ │ │ -_5_2 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e&, // position │ │ │ │ │ -53 std::vector& out) const // return value │ │ │ │ │ -54 { │ │ │ │ │ -55 out.resize(1); │ │ │ │ │ -56 for (int i=0; i& _o_r_d_e_r, │ │ │ │ │ -66 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -67 std::vector& out) const │ │ │ │ │ -68 { │ │ │ │ │ -69 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -70 if (totalOrder == 0) { │ │ │ │ │ -71 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -72 } else { │ │ │ │ │ -73 out.resize(1); │ │ │ │ │ -74 out[0] = 0; │ │ │ │ │ -75 } │ │ │ │ │ -76 } │ │ │ │ │ -77 │ │ │ │ │ -_7_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ -80 { │ │ │ │ │ -81 return 0; │ │ │ │ │ -82 } │ │ │ │ │ -83 }; │ │ │ │ │ -84 │ │ │ │ │ -85} │ │ │ │ │ -86 │ │ │ │ │ -87#endif │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +23 template │ │ │ │ │ +_2_4 class _R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +25 { │ │ │ │ │ +26 │ │ │ │ │ +27 public: │ │ │ │ │ +28 │ │ │ │ │ +_3_4 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<6> s = 0) │ │ │ │ │ +35 { │ │ │ │ │ +36 for (size_t i=0; i<6; i++) │ │ │ │ │ +37 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +38 │ │ │ │ │ +39 n_[0] = {-1.0, 0.0, 0.0}; │ │ │ │ │ +40 n_[1] = { 1.0, 0.0, 0.0}; │ │ │ │ │ +41 n_[2] = { 0.0, -1.0, 0.0}; │ │ │ │ │ +42 n_[3] = { 0.0, 1.0, 0.0}; │ │ │ │ │ +43 n_[4] = { 0.0, 0.0, -1.0}; │ │ │ │ │ +44 n_[5] = { 0.0, 0.0, 1.0}; │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +55 template │ │ │ │ │ +_5_6 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +57 { │ │ │ │ │ +58 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +59 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +60 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +61 │ │ │ │ │ +62 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +63 │ │ │ │ │ +64 out.resize(36); │ │ │ │ │ +65 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +66 │ │ │ │ │ +67 const int qOrder = 3; │ │ │ │ │ +68 const auto& rule1 = QuadratureRules::rule(GeometryTypes::cube(2), │ │ │ │ │ +qOrder); │ │ │ │ │ +69 │ │ │ │ │ +70 for (auto&& qp : rule1) │ │ │ │ │ +71 { │ │ │ │ │ +72 Dune::FieldVector qPos = qp.position(); │ │ │ │ │ +73 typename LB::Traits::DomainType localPos; │ │ │ │ │ +74 │ │ │ │ │ +75 localPos = {0.0, qPos[0], qPos[1]}; │ │ │ │ │ +76 auto y = f(localPos); │ │ │ │ │ +77 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*qp.weight()*sign_ │ │ │ │ │ +[0]; │ │ │ │ │ +78 out[6] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +79 out[12] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[1] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +80 out[18] += (y[0]*n_[0][0] + y[1]*n_[0][1] + y[2]*n_[0][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +81 │ │ │ │ │ +82 localPos = {1.0, qPos[0], qPos[1]}; │ │ │ │ │ +83 y = f(localPos); │ │ │ │ │ +84 out[1] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*qp.weight()*sign_ │ │ │ │ │ +[1]; │ │ │ │ │ +85 out[7] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*qp.weight(); │ │ │ │ │ +86 out[13] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[1])*qp.weight(); │ │ │ │ │ +87 out[19] += (y[0]*n_[1][0] + y[1]*n_[1][1] + y[2]*n_[1][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +88 │ │ │ │ │ +89 localPos = {qPos[0], 0.0, qPos[1]}; │ │ │ │ │ +90 y = f(localPos); │ │ │ │ │ +91 out[2] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*qp.weight()*sign_ │ │ │ │ │ +[2]; │ │ │ │ │ +92 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*qp.weight(); │ │ │ │ │ +93 out[14] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(2.0*qPos[1] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +94 out[20] += (y[0]*n_[2][0] + y[1]*n_[2][1] + y[2]*n_[2][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +95 │ │ │ │ │ +96 localPos = {qPos[0], 1.0, qPos[1]}; │ │ │ │ │ +97 y = f(localPos); │ │ │ │ │ +98 out[3] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*qp.weight()*sign_ │ │ │ │ │ +[3]; │ │ │ │ │ +99 out[9] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +100 out[15] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[1])*qp.weight(); │ │ │ │ │ +101 out[21] += (y[0]*n_[3][0] + y[1]*n_[3][1] + y[2]*n_[3][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +102 │ │ │ │ │ +103 localPos = {qPos[0], qPos[1], 0.0}; │ │ │ │ │ +104 y = f(localPos); │ │ │ │ │ +105 out[4] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*qp.weight()*sign_ │ │ │ │ │ +[4]; │ │ │ │ │ +106 out[10] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*qp.weight(); │ │ │ │ │ +107 out[16] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[1])*qp.weight(); │ │ │ │ │ +108 out[22] += (y[0]*n_[4][0] + y[1]*n_[4][1] + y[2]*n_[4][2])*(1.0 - 2.0*qPos │ │ │ │ │ +[0])*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +109 │ │ │ │ │ +110 localPos = {qPos[0], qPos[1], 1.0}; │ │ │ │ │ +111 y = f(localPos); │ │ │ │ │ +112 out[5] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*qp.weight()*sign_ │ │ │ │ │ +[5]; │ │ │ │ │ +113 out[11] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +114 out[17] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[1] - │ │ │ │ │ +1.0)*qp.weight(); │ │ │ │ │ +115 out[23] += (y[0]*n_[5][0] + y[1]*n_[5][1] + y[2]*n_[5][2])*(2.0*qPos[0] - │ │ │ │ │ +1.0)*(2.0*qPos[1] - 1.0)*qp.weight(); │ │ │ │ │ +116 } │ │ │ │ │ +117 │ │ │ │ │ +118 const auto& rule2 = QuadratureRules::rule(GeometryTypes::cube(3), │ │ │ │ │ +qOrder); │ │ │ │ │ +119 for (auto&& qp : rule2) │ │ │ │ │ +120 { │ │ │ │ │ +121 FieldVector qPos = qp.position(); │ │ │ │ │ +122 │ │ │ │ │ +123 auto y = f(qPos); │ │ │ │ │ +124 out[24] += y[0]*qp.weight(); │ │ │ │ │ +125 out[25] += y[1]*qp.weight(); │ │ │ │ │ +126 out[26] += y[2]*qp.weight(); │ │ │ │ │ +127 out[27] += y[0]*qPos[1]*qp.weight(); │ │ │ │ │ +128 out[28] += y[0]*qPos[2]*qp.weight(); │ │ │ │ │ +129 out[29] += y[1]*qPos[0]*qp.weight(); │ │ │ │ │ +130 out[30] += y[1]*qPos[2]*qp.weight(); │ │ │ │ │ +131 out[31] += y[2]*qPos[0]*qp.weight(); │ │ │ │ │ +132 out[32] += y[2]*qPos[1]*qp.weight(); │ │ │ │ │ +133 out[33] += y[0]*qPos[1]*qPos[2]*qp.weight(); │ │ │ │ │ +134 out[34] += y[1]*qPos[0]*qPos[2]*qp.weight(); │ │ │ │ │ +135 out[35] += y[2]*qPos[0]*qPos[1]*qp.weight(); │ │ │ │ │ +136 } │ │ │ │ │ +137 } │ │ │ │ │ +138 │ │ │ │ │ +139 private: │ │ │ │ │ +140 // Facet orientations │ │ │ │ │ +141 std::array sign_; │ │ │ │ │ +142 │ │ │ │ │ +143 // Facet normals │ │ │ │ │ +144 std::array n_; │ │ │ │ │ +145 }; │ │ │ │ │ +146} │ │ │ │ │ +147#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Constant shape function. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, d > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of any order of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, d, Dune::FieldVector< D, d >, R, 1, Dune::FieldVector< R, │ │ │ │ │ -1 >, Dune::FieldMatrix< R, 1, d > > Traits │ │ │ │ │ -export type traits for function signature │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:34 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalinterpolation.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalinterpolation.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT1Cube3DLocalInterpolation(std::bitset< 6 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalinterpolation.hh:34 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q1.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,49 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
q1.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas1cube3dlocalbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::Q1FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q1 elements. More...
class  Dune::RT1Cube3DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , int dim>
using Dune::Q1LocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, dim, 1 >
 The local Q1 finite element on cubes.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,29 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -q1.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas1cube3dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ -  Factory for global-valued Q1 elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, dim, │ │ │ │ │ - 1 > │ │ │ │ │ -  The local Q1 finite element on cubes. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00245_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q1.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,83 +70,642 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
q1.hh
│ │ │ │ +
raviartthomas1cube3dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ -
7#define DUNE_Q1_LOCALFINITEELEMENT_HH
│ │ │ │ -
8
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │
14
│ │ │ │ -
15#warning This header is deprecated
│ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
27 template<class D, class R, int dim>
│ │ │ │ - │ │ │ │ -
29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
34
│ │ │ │ -
39 template<class Geometry, class RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
42 LagrangeCubeLocalFiniteElement<
│ │ │ │ -
43 typename Geometry::ctype, RF, Geometry::mydimension, 1
│ │ │ │ -
44 >,
│ │ │ │ -
45 Geometry
│ │ │ │ -
46 >
│ │ │ │ -
47 {
│ │ │ │ - │ │ │ │ -
49 typename Geometry::ctype, RF, Geometry::mydimension, 1
│ │ │ │ -
50 > LFE;
│ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
53 static const LFE lfe;
│ │ │ │ -
54
│ │ │ │ -
55 public:
│ │ │ │ - │ │ │ │ -
58 };
│ │ │ │ -
│ │ │ │ -
59
│ │ │ │ -
60 template<class Geometry, class RF>
│ │ │ │ -
61 const typename Q1FiniteElementFactory<Geometry, RF>::LFE
│ │ │ │ -
62 Q1FiniteElementFactory<Geometry, RF>::lfe;
│ │ │ │ -
63}
│ │ │ │ -
64
│ │ │ │ -
65#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
32 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT1Cube3DLocalBasis (unsigned int s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ +
42 if (s & 1)
│ │ │ │ +
43 {
│ │ │ │ +
44 sign0 = -1.0;
│ │ │ │ +
45 }
│ │ │ │ +
46 if (s & 2)
│ │ │ │ +
47 {
│ │ │ │ +
48 sign1 = -1.0;
│ │ │ │ +
49 }
│ │ │ │ +
50 if (s & 4)
│ │ │ │ +
51 {
│ │ │ │ +
52 sign2 = -1.0;
│ │ │ │ +
53 }
│ │ │ │ +
54 if (s & 8)
│ │ │ │ +
55 {
│ │ │ │ +
56 sign3 = -1.0;
│ │ │ │ +
57 }
│ │ │ │ +
58 if (s & 16)
│ │ │ │ +
59 {
│ │ │ │ +
60 sign4 = -1.0;
│ │ │ │ +
61 }
│ │ │ │ +
62 if (s & 32)
│ │ │ │ +
63 {
│ │ │ │ +
64 sign5 = -1.0;
│ │ │ │ +
65 }
│ │ │ │ +
66 }
│ │ │ │ +
│ │ │ │ +
67
│ │ │ │ +
│ │ │ │ +
69 unsigned int size () const
│ │ │ │ +
70 {
│ │ │ │ +
71 return 36;
│ │ │ │ +
72 }
│ │ │ │ +
│ │ │ │ +
73
│ │ │ │ +
│ │ │ │ +
80 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
81 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
82 {
│ │ │ │ +
83 out.resize(36);
│ │ │ │ +
84
│ │ │ │ +
85 out[0][0] = sign0*(-3.0*in[0]*in[0] + 4.0*in[0] - 1.0);
│ │ │ │ +
86 out[0][1] = 0.0;
│ │ │ │ +
87 out[0][2] = 0.0;
│ │ │ │ +
88
│ │ │ │ +
89 out[1][0] = sign1*(-2.0*in[0] + 3.0*in[0]*in[0]);
│ │ │ │ +
90 out[1][1] = 0.0;
│ │ │ │ +
91 out[1][2] = 0.0;
│ │ │ │ +
92
│ │ │ │ +
93 out[2][0] = 0.0;
│ │ │ │ +
94 out[2][1] = sign2*(-3.0*in[1]*in[1] + 4.0*in[1] - 1.0);
│ │ │ │ +
95 out[2][2] = 0.0;
│ │ │ │ +
96
│ │ │ │ +
97 out[3][0] = 0.0;
│ │ │ │ +
98 out[3][1] = sign3*(3.0*in[1]*in[1] - 2.0*in[1]);
│ │ │ │ +
99 out[3][2] = 0.0;
│ │ │ │ +
100
│ │ │ │ +
101 out[4][0] = 0.0;
│ │ │ │ +
102 out[4][1] = 0.0;
│ │ │ │ +
103 out[4][2] = sign4*(-3.0*in[2]*in[2] + 4.0*in[2] - 1.0);
│ │ │ │ +
104
│ │ │ │ +
105 out[5][0] = 0.0;
│ │ │ │ +
106 out[5][1] = 0.0;
│ │ │ │ +
107 out[5][2] = sign5*(3.0*in[2]*in[2] - 2.0*in[2]);
│ │ │ │ +
108
│ │ │ │ +
109 out[6][0] = -18.0*in[0]*in[0]*in[1] + 9.0*in[0]*in[0] + 24.0*in[0]*in[1] - 6.0*in[1] -12.0*in[0] + 3.0;
│ │ │ │ +
110 out[6][1] = 0.0;
│ │ │ │ +
111 out[6][2] = 0.0;
│ │ │ │ +
112
│ │ │ │ +
113 out[7][0] = -18.0*in[0]*in[0]*in[1] + 9.0*in[0]*in[0] + 12.0*in[0]*in[1] - 6.0*in[0];
│ │ │ │ +
114 out[7][1] = 0.0;
│ │ │ │ +
115 out[7][2] = 0.0;
│ │ │ │ +
116
│ │ │ │ +
117 out[8][0] = 0.0;
│ │ │ │ +
118 out[8][1] = 18.0*in[0]*in[1]*in[1] - 9.0*in[1]*in[1] - 24.0*in[0]*in[1] + 12.0*in[1] + 6.0*in[0] - 3.0;
│ │ │ │ +
119 out[8][2] = 0.0;
│ │ │ │ +
120
│ │ │ │ +
121 out[9][0] = 0.0;
│ │ │ │ +
122 out[9][1] = 6.0*in[1] - 12.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in[1]*in[1];
│ │ │ │ +
123 out[9][2] = 0.0;
│ │ │ │ +
124
│ │ │ │ +
125 out[10][0] = 0.0;
│ │ │ │ +
126 out[10][1] = 0.0;
│ │ │ │ +
127 out[10][2] = -3.0 + 6.0*in[0] + 12.0*in[2] - 24.0*in[0]*in[2] - 9.0*in[2]*in[2] + 18.0*in[0]*in[2]*in[2];
│ │ │ │ +
128
│ │ │ │ +
129 out[11][0] = 0.0;
│ │ │ │ +
130 out[11][1] = 0.0;
│ │ │ │ +
131 out[11][2] = 6.0*in[2] - 12.0*in[0]*in[2] - 9.0*in[2]*in[2] + 18.0*in[0]*in[2]*in[2];
│ │ │ │ +
132
│ │ │ │ +
133 out[12][0] = 3.0 - 12.0*in[0] - 6.0*in[2] + 24.0*in[0]*in[2] + 9.0*in[0]*in[0] - 18.0*in[0]*in[0]*in[2];
│ │ │ │ +
134 out[12][1] = 0.0;
│ │ │ │ +
135 out[12][2] = 0.0;
│ │ │ │ +
136
│ │ │ │ +
137 out[13][0] = -6.0*in[0] + 12.0*in[0]*in[2] + 9.0*in[0]*in[0] - 18.0*in[0]*in[0]*in[2];
│ │ │ │ +
138 out[13][1] = 0.0;
│ │ │ │ +
139 out[13][2] = 0.0;
│ │ │ │ +
140
│ │ │ │ +
141 out[14][0] = 0.0;
│ │ │ │ +
142 out[14][1] = 3.0 - 12.0*in[1] - 6.0*in[2] + 24.0*in[1]*in[2] + 9.0*in[1]*in[1] - 18.0*in[1]*in[1]*in[2];
│ │ │ │ +
143 out[14][2] = 0.0;
│ │ │ │ +
144
│ │ │ │ +
145 out[15][0] = 0.0;
│ │ │ │ +
146 out[15][1] = -6.0*in[1] + 12.0*in[1]*in[2] + 9.0*in[1]*in[1] - 18.0*in[1]*in[1]*in[2];
│ │ │ │ +
147 out[15][2] = 0.0;
│ │ │ │ +
148
│ │ │ │ +
149 out[16][0] = 0.0;
│ │ │ │ +
150 out[16][1] = 0.0;
│ │ │ │ +
151 out[16][2] = -3.0 + 6.0*in[1] + 12.0*in[2] - 24.0*in[1]*in[2] - 9.0*in[2]*in[2] + 18.0*in[1]*in[2]*in[2];
│ │ │ │ +
152
│ │ │ │ +
153 out[17][0] = 0.0;
│ │ │ │ +
154 out[17][1] = 0.0;
│ │ │ │ +
155 out[17][2] = 6.0*in[2] - 12.0*in[1]*in[2] - 9.0*in[2]*in[2] + 18.0*in[1]*in[2]*in[2];
│ │ │ │ +
156
│ │ │ │ +
157 out[18][0] = -9.0 + 36.0*in[0] + 18.0*in[1] + 18.0*in[2] - 72.0*in[0]*in[1] - 72.0*in[0]*in[2] - 36.0*in[1]*in[2] + 144.0*in[0]*in[1]*in[2] - 27.0*in[0]*in[0] + 54.0*in[0]*in[0]*in[1] + 54.0*in[0]*in[0]*in[2] - 108.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
158 out[18][1] = 0.0;
│ │ │ │ +
159 out[18][2] = 0.0;
│ │ │ │ +
160
│ │ │ │ +
161 out[19][0] = 18.0*in[0] - 36.0*in[0]*in[1] - 36.0*in[0]*in[2] + 72.0*in[0]*in[1]*in[2] - 27.0*in[0]*in[0] + 54.0*in[0]*in[0]*in[1] + 54.0*in[0]*in[0]*in[2] - 108.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
162 out[19][1] = 0.0;
│ │ │ │ +
163 out[19][2] = 0.0;
│ │ │ │ +
164
│ │ │ │ +
165 out[20][0] = 0.0;
│ │ │ │ +
166 out[20][1] = 9.0 - 18.0*in[0] - 36.0*in[1] - 18.0*in[2] + 72.0*in[0]*in[1] + 36.0*in[0]*in[2] + 72.0*in[1]*in[2] - 144.0*in[0]*in[1]*in[2] + 27.0*in[1]*in[1] - 54.0*in[1]*in[1]*in[0] - 54.0*in[1]*in[1]*in[2] + 108.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
167 out[20][2] = 0.0;
│ │ │ │ +
168
│ │ │ │ +
169 out[21][0] = 0.0;
│ │ │ │ +
170 out[21][1] = -18.0*in[1] + 36.0*in[0]*in[1] + 36.0*in[1]*in[2] - 72.0*in[0]*in[1]*in[2] + 27.0*in[1]*in[1] - 54.0*in[0]*in[1]*in[1] - 54.0*in[1]*in[1]*in[2] + 108.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
171 out[21][2] = 0.0;
│ │ │ │ +
172
│ │ │ │ +
173 out[22][0] = 0.0;
│ │ │ │ +
174 out[22][1] = 0.0;
│ │ │ │ +
175 out[22][2] = 9.0 - 18.0*in[0] - 18.0*in[1] - 36.0*in[2] + 36.0*in[0]*in[1] + 72.0*in[0]*in[2] + 72.0*in[1]*in[2] - 144.0*in[0]*in[1]*in[2] + 27.0*in[2]*in[2] - 54.0*in[0]*in[2]*in[2] - 54.0*in[1]*in[2]*in[2] + 108.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
176
│ │ │ │ +
177 out[23][0] = 0.0;
│ │ │ │ +
178 out[23][1] = 0.0;
│ │ │ │ +
179 out[23][2] = -18.0*in[2] + 36.0*in[0]*in[2] + 36.0*in[1]*in[2] - 72.0*in[0]*in[1]*in[2] + 27.0*in[2]*in[2] - 54.0*in[0]*in[2]*in[2] - 54.0*in[1]*in[2]*in[2] + 108.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
180
│ │ │ │ +
181 out[24][0] = 96.0*in[0] - 144.0*in[0]*in[1] - 144.0*in[0]*in[2] + 216.0*in[0]*in[1]*in[2] - 96.0*in[0]*in[0] + 144.0*in[0]*in[0]*in[1] + 144.0*in[0]*in[0]*in[2] - 216.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
182 out[24][1] = 0.0;
│ │ │ │ +
183 out[24][2] = 0.0;
│ │ │ │ +
184
│ │ │ │ +
185 out[25][0] = 0.0;
│ │ │ │ +
186 out[25][1] = 96.0*in[1] - 144.0*in[0]*in[1] - 144.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2] - 96.0*in[1]*in[1] + 144.0*in[0]*in[1]*in[1] + 144.0*in[1]*in[1]*in[2] - 216.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
187 out[25][2] = 0.0;
│ │ │ │ +
188
│ │ │ │ +
189 out[26][0] = 0.0;
│ │ │ │ +
190 out[26][1] = 0.0;
│ │ │ │ +
191 out[26][2] = 96.0*in[2] - 144.0*in[0]*in[2] - 144.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2] - 96.0*in[2]*in[2] + 144.0*in[0]*in[2]*in[2] + 144.0*in[1]*in[2]*in[2] - 216.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
192
│ │ │ │ +
193 out[27][0] = -144.0*in[0] + 288.0*in[0]*in[1] + 216.0*in[0]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[0]*in[0] - 288.0*in[0]*in[0]*in[1] - 216.0*in[0]*in[0]*in[2] + 432.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
194 out[27][1] = 0.0;
│ │ │ │ +
195 out[27][2] = 0.0;
│ │ │ │ +
196
│ │ │ │ +
197 out[28][0] = -144.0*in[0] + 216.0*in[0]*in[1] + 288.0*in[0]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[0]*in[0] - 216.0*in[0]*in[0]*in[1] - 288.0*in[0]*in[0]*in[2] + 432.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
198 out[28][1] = 0.0;
│ │ │ │ +
199 out[28][2] = 0.0;
│ │ │ │ +
200
│ │ │ │ +
201 out[29][0] = 0.0;
│ │ │ │ +
202 out[29][1] = -144.0*in[1] + 288.0*in[0]*in[1] + 216.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[1]*in[1] - 288.0*in[0]*in[1]*in[1] - 216.0*in[1]*in[1]*in[2] + 432.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
203 out[29][2] = 0.0;
│ │ │ │ +
204
│ │ │ │ +
205 out[30][0] = 0.0;
│ │ │ │ +
206 out[30][1] = -144.0*in[1] + 216.0*in[0]*in[1] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[1]*in[1] - 216.0*in[0]*in[1]*in[1] - 288.0*in[1]*in[1]*in[2] + 432.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
207 out[30][2] = 0.0;
│ │ │ │ +
208
│ │ │ │ +
209 out[31][0] = 0.0;
│ │ │ │ +
210 out[31][1] = 0.0;
│ │ │ │ +
211 out[31][2] =-144.0*in[2] + 288.0*in[0]*in[2] + 216.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[2]*in[2] - 288.0*in[0]*in[2]*in[2] - 216.0*in[1]*in[2]*in[2] + 432.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
212
│ │ │ │ +
213 out[32][0] = 0.0;
│ │ │ │ +
214 out[32][1] = 0.0;
│ │ │ │ +
215 out[32][2] = -144.0*in[2] + 216.0*in[0]*in[2] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2] + 144.0*in[2]*in[2] - 216.0*in[0]*in[2]*in[2] - 288.0*in[1]*in[2]*in[2] + 432.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
216
│ │ │ │ +
217 out[33][0] = 216.0*in[0] - 432.0*in[0]*in[1] - 432.0*in[0]*in[2] + 864.0*in[0]*in[1]*in[2] - 216.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[1] + 432.0*in[0]*in[0]*in[2] - 864.0*in[0]*in[0]*in[1]*in[2];
│ │ │ │ +
218 out[33][1] = 0.0;
│ │ │ │ +
219 out[33][2] = 0.0;
│ │ │ │ +
220
│ │ │ │ +
221 out[34][0] = 0.0;
│ │ │ │ +
222 out[34][1] = 216.0*in[1] - 432.0*in[0]*in[1] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2] - 216.0*in[1]*in[1] + 432.0*in[0]*in[1]*in[1] + 432.0*in[1]*in[1]*in[2] - 864.0*in[0]*in[1]*in[1]*in[2];
│ │ │ │ +
223 out[34][2] = 0.0;
│ │ │ │ +
224
│ │ │ │ +
225 out[35][0] = 0.0;
│ │ │ │ +
226 out[35][1] = 0.0;
│ │ │ │ +
227 out[35][2] = 216.0*in[2] - 432.0*in[0]*in[2] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2] - 216.0*in[2]*in[2] + 432.0*in[0]*in[2]*in[2] + 432.0*in[1]*in[2]*in[2] - 864.0*in[0]*in[1]*in[2]*in[2];
│ │ │ │ +
228 }
│ │ │ │ +
│ │ │ │ +
229
│ │ │ │ +
│ │ │ │ +
236 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
237 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
238 {
│ │ │ │ +
239 out.resize(36);
│ │ │ │ +
240
│ │ │ │ +
241 out[0][0][0] = sign0*(-6.0*in[0] + 4);
│ │ │ │ +
242 out[0][0][1] = 0;
│ │ │ │ +
243 out[0][0][2] = 0;
│ │ │ │ +
244 out[0][1][0] = 0;
│ │ │ │ +
245 out[0][1][1] = 0;
│ │ │ │ +
246 out[0][1][2] = 0;
│ │ │ │ +
247 out[0][2][0] = 0;
│ │ │ │ +
248 out[0][2][1] = 0;
│ │ │ │ +
249 out[0][2][2] = 0;
│ │ │ │ +
250
│ │ │ │ +
251 out[1][0][0] = sign1*(-2 + 6.0*in[0]);
│ │ │ │ +
252 out[1][0][1] = 0;
│ │ │ │ +
253 out[1][0][2] = 0;
│ │ │ │ +
254 out[1][1][0] = 0;
│ │ │ │ +
255 out[1][1][1] = 0;
│ │ │ │ +
256 out[1][1][2] = 0;
│ │ │ │ +
257 out[1][2][0] = 0;
│ │ │ │ +
258 out[1][2][1] = 0;
│ │ │ │ +
259 out[1][2][2] = 0;
│ │ │ │ +
260
│ │ │ │ +
261 out[2][0][0] = 0;
│ │ │ │ +
262 out[2][0][1] = 0;
│ │ │ │ +
263 out[2][0][2] = 0;
│ │ │ │ +
264 out[2][1][0] = 0;
│ │ │ │ +
265 out[2][1][1] = sign2*(-6.0*in[1] + 4);
│ │ │ │ +
266 out[2][1][2] = 0;
│ │ │ │ +
267 out[2][2][0] = 0;
│ │ │ │ +
268 out[2][2][1] = 0;
│ │ │ │ +
269 out[2][2][2] = 0;
│ │ │ │ +
270
│ │ │ │ +
271 out[3][0][0] = 0;
│ │ │ │ +
272 out[3][0][1] = 0;
│ │ │ │ +
273 out[3][0][2] = 0;
│ │ │ │ +
274 out[3][1][0] = 0;
│ │ │ │ +
275 out[3][1][1] = sign3*(6.0*in[1] - 2);
│ │ │ │ +
276 out[3][1][2] = 0;
│ │ │ │ +
277 out[3][2][0] = 0;
│ │ │ │ +
278 out[3][2][1] = 0;
│ │ │ │ +
279 out[3][2][2] = 0;
│ │ │ │ +
280
│ │ │ │ +
281 out[4][0][0] = 0;
│ │ │ │ +
282 out[4][0][1] = 0;
│ │ │ │ +
283 out[4][0][2] = 0;
│ │ │ │ +
284 out[4][1][0] = 0;
│ │ │ │ +
285 out[4][1][1] = 0;
│ │ │ │ +
286 out[4][1][2] = 0;
│ │ │ │ +
287 out[4][2][0] = 0;
│ │ │ │ +
288 out[4][2][1] = 0;
│ │ │ │ +
289 out[4][2][2] = sign4*(-6.0*in[2] + 4);
│ │ │ │ +
290
│ │ │ │ +
291 out[5][0][0] = 0;
│ │ │ │ +
292 out[5][0][1] = 0;
│ │ │ │ +
293 out[5][0][2] = 0;
│ │ │ │ +
294 out[5][1][0] = 0;
│ │ │ │ +
295 out[5][1][1] = 0;
│ │ │ │ +
296 out[5][1][2] = 0;
│ │ │ │ +
297 out[5][2][0] = 0;
│ │ │ │ +
298 out[5][2][1] = 0;
│ │ │ │ +
299 out[5][2][2] = sign5*(6.0*in[2] - 2);
│ │ │ │ +
300
│ │ │ │ +
301 out[6][0][0] = -36.0*in[0]*in[1] + 18.0*in[0] + 24.0*in[1] - 12.0;
│ │ │ │ +
302 out[6][0][1] = -18.0*in[0]*in[0] + 24.0*in[0] - 6;
│ │ │ │ +
303 out[6][0][2] = 0.0;
│ │ │ │ +
304 out[6][1][0] = 0.0;
│ │ │ │ +
305 out[6][1][1] = 0.0;
│ │ │ │ +
306 out[6][1][2] = 0.0;
│ │ │ │ +
307 out[6][2][0] = 0.0;
│ │ │ │ +
308 out[6][2][1] = 0.0;
│ │ │ │ +
309 out[6][2][2] = 0.0;
│ │ │ │ +
310
│ │ │ │ +
311 out[7][0][0] = -36.0*in[0]*in[1] + 18.0*in[0] + 12.0*in[1] - 6.0;
│ │ │ │ +
312 out[7][0][1] = -18.0*in[0]*in[0] + 12.0*in[0];
│ │ │ │ +
313 out[7][0][2] = 0.0;
│ │ │ │ +
314 out[7][1][0] = 0.0;
│ │ │ │ +
315 out[7][1][1] = 0.0;
│ │ │ │ +
316 out[7][1][2] = 0.0;
│ │ │ │ +
317 out[7][2][0] = 0.0;
│ │ │ │ +
318 out[7][2][1] = 0.0;
│ │ │ │ +
319 out[7][2][2] = 0.0;
│ │ │ │ +
320
│ │ │ │ +
321 out[8][0][0] = 0.0;
│ │ │ │ +
322 out[8][0][1] = 0.0;
│ │ │ │ +
323 out[8][0][2] = 0.0;
│ │ │ │ +
324 out[8][1][0] = 18.0*in[1]*in[1] - 24.0*in[1] + 6.0;
│ │ │ │ +
325 out[8][1][1] = 36.0*in[0]*in[1] - 18.0*in[1] - 24.0*in[0] + 12.0;
│ │ │ │ +
326 out[8][1][2] = 0.0;
│ │ │ │ +
327 out[8][2][0] = 0.0;
│ │ │ │ +
328 out[8][2][1] = 0.0;
│ │ │ │ +
329 out[8][2][2] = 0.0;
│ │ │ │ +
330
│ │ │ │ +
331 out[9][0][0] = 0.0;
│ │ │ │ +
332 out[9][0][1] = 0.0;
│ │ │ │ +
333 out[9][0][2] = 0.0;
│ │ │ │ +
334 out[9][1][0] = -12.0*in[1] + 18.0*in[1]*in[1];
│ │ │ │ +
335 out[9][1][1] = 6.0 - 12.0*in[0] - 18.0*in[1] + 36.0*in[0]*in[1];;
│ │ │ │ +
336 out[9][1][2] = 0.0;
│ │ │ │ +
337 out[9][2][0] = 0.0;
│ │ │ │ +
338 out[9][2][1] = 0.0;
│ │ │ │ +
339 out[9][2][2] = 0.0;
│ │ │ │ +
340
│ │ │ │ +
341 out[10][0][0] = 0.0;
│ │ │ │ +
342 out[10][0][1] = 0.0;
│ │ │ │ +
343 out[10][0][2] = 0.0;
│ │ │ │ +
344 out[10][1][0] = 0.0;
│ │ │ │ +
345 out[10][1][1] = 0.0;
│ │ │ │ +
346 out[10][1][2] = 0.0;
│ │ │ │ +
347 out[10][2][0] = 6.0 - 24.0*in[2] + 18.0*in[2]*in[2];
│ │ │ │ +
348 out[10][2][1] = 0.0;
│ │ │ │ +
349 out[10][2][2] = 12.0 - 24.0*in[0] - 18.0*in[2] + 36.0*in[0]*in[2];
│ │ │ │ +
350
│ │ │ │ +
351 out[11][0][0] = 0.0;
│ │ │ │ +
352 out[11][0][1] = 0.0;
│ │ │ │ +
353 out[11][0][2] = 0.0;
│ │ │ │ +
354 out[11][1][0] = 0.0;
│ │ │ │ +
355 out[11][1][1] = 0.0;
│ │ │ │ +
356 out[11][1][2] = 0.0;
│ │ │ │ +
357 out[11][2][0] = -12.0*in[2] + 18.0*in[2]*in[2];
│ │ │ │ +
358 out[11][2][1] = 0.0;
│ │ │ │ +
359 out[11][2][2] = 6.0 - 12.0*in[0] - 18.0*in[2] + 36.0*in[0]*in[2];
│ │ │ │ +
360
│ │ │ │ +
361 out[12][0][0] = -12.0 + 24.0*in[2] + 18.0*in[0] - 36.0*in[0]*in[2];
│ │ │ │ +
362 out[12][0][1] = 0.0;
│ │ │ │ +
363 out[12][0][2] = -6.0 + 24.0*in[0] - 18.0*in[0]*in[0];
│ │ │ │ +
364 out[12][1][0] = 0.0;
│ │ │ │ +
365 out[12][1][1] = 0.0;
│ │ │ │ +
366 out[12][1][2] = 0.0;
│ │ │ │ +
367 out[12][2][0] = 0.0;
│ │ │ │ +
368 out[12][2][1] = 0.0;
│ │ │ │ +
369 out[12][2][2] = 0.0;
│ │ │ │ +
370
│ │ │ │ +
371 out[13][0][0] = -6.0 + 12.0*in[2] + 18.0*in[0] - 36.0*in[0]*in[2];
│ │ │ │ +
372 out[13][0][1] = 0.0;
│ │ │ │ +
373 out[13][0][2] = 12.0*in[0] - 18.0*in[0]*in[0];
│ │ │ │ +
374 out[13][1][0] = 0.0;
│ │ │ │ +
375 out[13][1][1] = 0.0;
│ │ │ │ +
376 out[13][1][2] = 0.0;
│ │ │ │ +
377 out[13][2][0] = 0.0;
│ │ │ │ +
378 out[13][2][1] = 0.0;
│ │ │ │ +
379 out[13][2][2] = 0.0;
│ │ │ │ +
380
│ │ │ │ +
381 out[14][0][0] = 0.0;
│ │ │ │ +
382 out[14][0][1] = 0.0;
│ │ │ │ +
383 out[14][0][2] = 0.0;
│ │ │ │ +
384 out[14][1][0] = 0.0;
│ │ │ │ +
385 out[14][1][1] = -12.0 + 24.0*in[2] + 18.0*in[1] - 36.0*in[1]*in[2];
│ │ │ │ +
386 out[14][1][2] = -6.0 + 24.0*in[1] - 18.0*in[1]*in[1];
│ │ │ │ +
387 out[14][2][0] = 0.0;
│ │ │ │ +
388 out[14][2][1] = 0.0;
│ │ │ │ +
389 out[14][2][2] = 0.0;
│ │ │ │ +
390
│ │ │ │ +
391 out[15][0][0] = 0.0;
│ │ │ │ +
392 out[15][0][1] = 0.0;
│ │ │ │ +
393 out[15][0][2] = 0.0;
│ │ │ │ +
394 out[15][1][0] = 0.0;
│ │ │ │ +
395 out[15][1][1] = -6.0 + 12.0*in[2] + 18.0*in[1] - 36.0*in[1]*in[2];
│ │ │ │ +
396 out[15][1][2] = 12.0*in[1] - 18.0*in[1]*in[1];
│ │ │ │ +
397 out[15][2][0] = 0.0;
│ │ │ │ +
398 out[15][2][1] = 0.0;
│ │ │ │ +
399 out[15][2][2] = 0.0;
│ │ │ │ +
400
│ │ │ │ +
401 out[16][0][0] = 0.0;
│ │ │ │ +
402 out[16][0][1] = 0.0;
│ │ │ │ +
403 out[16][0][2] = 0.0;
│ │ │ │ +
404 out[16][1][0] = 0.0;
│ │ │ │ +
405 out[16][1][1] = 0.0;
│ │ │ │ +
406 out[16][1][2] = 0.0;
│ │ │ │ +
407 out[16][2][0] = 0.0;
│ │ │ │ +
408 out[16][2][1] = 6.0 - 24.0*in[2] + 18.0*in[2]*in[2];
│ │ │ │ +
409 out[16][2][2] = 12.0 - 24.0*in[1] - 18.0*in[2] + 36.0*in[1]*in[2];
│ │ │ │ +
410
│ │ │ │ +
411 out[17][0][0] = 0.0;
│ │ │ │ +
412 out[17][0][1] = 0.0;
│ │ │ │ +
413 out[17][0][2] = 0.0;
│ │ │ │ +
414 out[17][1][0] = 0.0;
│ │ │ │ +
415 out[17][1][1] = 0.0;
│ │ │ │ +
416 out[17][1][2] = 0.0;
│ │ │ │ +
417 out[17][2][0] = 0.0;
│ │ │ │ +
418 out[17][2][1] = -12.0*in[2] + 18.0*in[2]*in[2];
│ │ │ │ +
419 out[17][2][2] = 6.0 - 12.0*in[1] - 18.0*in[2] + 36.0*in[1]*in[2];
│ │ │ │ +
420
│ │ │ │ +
421 out[18][0][0] = 36.0 - 72.0*in[1] - 72.0*in[2] + 144.0*in[1]*in[2] - 54.0*in[0] + 108.0*in[0]*in[1] + 108.0*in[0]*in[2] - 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
422 out[18][0][1] = 18.0 - 72.0*in[0] - 36.0*in[2] + 144.0*in[0]*in[2] + 54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[2];
│ │ │ │ +
423 out[18][0][2] = 18.0 - 72.0*in[0] - 36.0*in[1] + 144.0*in[0]*in[1] + 54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[1];
│ │ │ │ +
424 out[18][1][0] = 0.0;
│ │ │ │ +
425 out[18][1][1] = 0.0;
│ │ │ │ +
426 out[18][1][2] = 0.0;
│ │ │ │ +
427 out[18][2][0] = 0.0;
│ │ │ │ +
428 out[18][2][1] = 0.0;
│ │ │ │ +
429 out[18][2][2] = 0.0;
│ │ │ │ +
430
│ │ │ │ +
431 out[19][0][0] = 18 - 36.0*in[1] - 36.0*in[2] + 72.0*in[1]*in[2] - 54.0*in[0] + 108.0*in[0]*in[1] + 108.0*in[0]*in[2] - 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
432 out[19][0][1] = -36.0*in[0] + 72.0*in[0]*in[2] + 54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[2];
│ │ │ │ +
433 out[19][0][2] = -36.0*in[0] + 72.0*in[0]*in[1] + 54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[1];
│ │ │ │ +
434 out[19][1][0] = 0.0;
│ │ │ │ +
435 out[19][1][1] = 0.0;
│ │ │ │ +
436 out[19][1][2] = 0.0;
│ │ │ │ +
437 out[19][2][0] = 0.0;
│ │ │ │ +
438 out[19][2][1] = 0.0;
│ │ │ │ +
439 out[19][2][2] = 0.0;
│ │ │ │ +
440
│ │ │ │ +
441 out[20][0][0] = 0.0;
│ │ │ │ +
442 out[20][0][1] = 0.0;
│ │ │ │ +
443 out[20][0][2] = 0.0;
│ │ │ │ +
444 out[20][1][0] = -18.0 + 72.0*in[1] + 36.0*in[2] - 144.0*in[1]*in[2] - 54.0*in[1]*in[1] + 108.0*in[1]*in[1]*in[2];
│ │ │ │ +
445 out[20][1][1] = -36.0 + 72.0*in[0] + 72.0*in[2] - 144.0*in[0]*in[2] + 54.0*in[1] - 108.0*in[1]*in[0] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
446 out[20][1][2] = -18.0 + 36.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] - 54.0*in[1]*in[1] + 108.0*in[0]*in[1]*in[1];
│ │ │ │ +
447 out[20][2][0] = 0.0;
│ │ │ │ +
448 out[20][2][1] = 0.0;
│ │ │ │ +
449 out[20][2][2] = 0.0;
│ │ │ │ +
450
│ │ │ │ +
451 out[21][0][0] = 0.0;
│ │ │ │ +
452 out[21][0][1] = 0.0;
│ │ │ │ +
453 out[21][0][2] = 0.0;
│ │ │ │ +
454 out[21][1][0] = 36.0*in[1] - 72.0*in[1]*in[2] - 54.0*in[1]*in[1] + 108.0*in[1]*in[1]*in[2];
│ │ │ │ +
455 out[21][1][1] = -18.0 + 36.0*in[0] + 36.0*in[2] - 72.0*in[0]*in[2] + 54.0*in[1] - 108.0*in[0]*in[1] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
456 out[21][1][2] = 36.0*in[1] - 72.0*in[0]*in[1] - 54.0*in[1]*in[1] + 108.0*in[0]*in[1]*in[1];
│ │ │ │ +
457 out[21][2][0] = 0.0;
│ │ │ │ +
458 out[21][2][1] = 0.0;
│ │ │ │ +
459 out[21][2][2] = 0.0;
│ │ │ │ +
460
│ │ │ │ +
461 out[22][0][0] = 0.0;
│ │ │ │ +
462 out[22][0][1] = 0.0;
│ │ │ │ +
463 out[22][0][2] = 0.0;
│ │ │ │ +
464 out[22][1][0] = 0.0;
│ │ │ │ +
465 out[22][1][1] = 0.0;
│ │ │ │ +
466 out[22][1][2] = 0.0;
│ │ │ │ +
467 out[22][2][0] = -18.0 + 36.0*in[1] + 72.0*in[2] - 144.0*in[1]*in[2] - 54.0*in[2]*in[2] + 108.0*in[1]*in[2]*in[2];
│ │ │ │ +
468 out[22][2][1] = -18.0 + 36.0*in[0] + 72.0*in[2] - 144.0*in[0]*in[2] - 54.0*in[2]*in[2] + 108.0*in[0]*in[2]*in[2];
│ │ │ │ +
469 out[22][2][2] = -36.0 + 72.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] + 54.0*in[2] - 108.0*in[0]*in[2] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
470
│ │ │ │ +
471 out[23][0][0] = 0.0;
│ │ │ │ +
472 out[23][0][1] = 0.0;
│ │ │ │ +
473 out[23][0][2] = 0.0;
│ │ │ │ +
474 out[23][1][0] = 0.0;
│ │ │ │ +
475 out[23][1][1] = 0.0;
│ │ │ │ +
476 out[23][1][2] = 0.0;
│ │ │ │ +
477 out[23][2][0] = 36.0*in[2] - 72.0*in[1]*in[2] - 54.0*in[2]*in[2] + 108.0*in[1]*in[2]*in[2];
│ │ │ │ +
478 out[23][2][1] = 36.0*in[2] - 72.0*in[0]*in[2] - 54.0*in[2]*in[2] + 108.0*in[0]*in[2]*in[2];
│ │ │ │ +
479 out[23][2][2] = -18.0 + 36.0*in[0] + 36.0*in[1] - 72.0*in[0]*in[1] + 54.0*in[2] - 108.0*in[0]*in[2] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2];
│ │ │ │ +
480
│ │ │ │ +
481 out[24][0][0] = 96.0 - 144.0*in[1] - 144.0*in[2] + 216.0*in[1]*in[2] - 192.0*in[0] + 288.0*in[0]*in[1] + 288.0*in[0]*in[2] - 432.0*in[0]*in[1]*in[2];
│ │ │ │ +
482 out[24][0][1] = -144.0*in[0] + 216.0*in[0]*in[2] + 144.0*in[0]*in[0] - 216.0*in[0]*in[0]*in[2];
│ │ │ │ +
483 out[24][0][2] = -144.0*in[0] + 216.0*in[0]*in[1] + 144.0*in[0]*in[0] - 216.0*in[0]*in[0]*in[1];
│ │ │ │ +
484 out[24][1][0] = 0.0;
│ │ │ │ +
485 out[24][1][1] = 0.0;
│ │ │ │ +
486 out[24][1][2] = 0.0;
│ │ │ │ +
487 out[24][2][0] = 0.0;
│ │ │ │ +
488 out[24][2][1] = 0.0;
│ │ │ │ +
489 out[24][2][2] = 0.0;
│ │ │ │ +
490
│ │ │ │ +
491 out[25][0][0] = 0.0;
│ │ │ │ +
492 out[25][0][1] = 0.0;
│ │ │ │ +
493 out[25][0][2] = 0.0;
│ │ │ │ +
494 out[25][1][0] = -144.0*in[1] + 216.0*in[1]*in[2] + 144.0*in[1]*in[1] - 216.0*in[1]*in[1]*in[2];
│ │ │ │ +
495 out[25][1][1] = 96.0 - 144.0*in[0] - 144.0*in[2] + 216.0*in[0]*in[2] - 192.0*in[1] + 288.0*in[0]*in[1] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2];
│ │ │ │ +
496 out[25][1][2] = -144.0*in[1] + 216.0*in[0]*in[1] + 144.0*in[1]*in[1] - 216.0*in[0]*in[1]*in[1];
│ │ │ │ +
497 out[25][2][0] = 0.0;
│ │ │ │ +
498 out[25][2][1] = 0.0;
│ │ │ │ +
499 out[25][2][2] = 0.0;
│ │ │ │ +
500
│ │ │ │ +
501 out[26][0][0] = 0.0;
│ │ │ │ +
502 out[26][0][1] = 0.0;
│ │ │ │ +
503 out[26][0][2] = 0.0;
│ │ │ │ +
504 out[26][1][0] = 0.0;
│ │ │ │ +
505 out[26][1][1] = 0.0;
│ │ │ │ +
506 out[26][1][2] = 0.0;
│ │ │ │ +
507 out[26][2][0] = -144.0*in[2] + 216.0*in[1]*in[2] + 144.0*in[2]*in[2] - 216.0*in[1]*in[2]*in[2];
│ │ │ │ +
508 out[26][2][1] = -144.0*in[2] + 216.0*in[0]*in[2] + 144.0*in[2]*in[2] - 216.0*in[0]*in[2]*in[2];
│ │ │ │ +
509 out[26][2][2] = 96.0 - 144.0*in[0] - 144.0*in[1] + 216.0*in[0]*in[1] - 192.0*in[2] + 288.0*in[0]*in[2] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2];
│ │ │ │ +
510
│ │ │ │ +
511 out[27][0][0] = -144.0 + 288.0*in[1] + 216.0*in[2] - 432.0*in[1]*in[2] + 288.0*in[0] - 576.0*in[0]*in[1] - 432.0*in[0]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
512 out[27][0][1] = 288.0*in[0] - 432.0*in[0]*in[2] - 288.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[2];
│ │ │ │ +
513 out[27][0][2] = 216.0*in[0] - 432.0*in[0]*in[1] - 216.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[1];
│ │ │ │ +
514 out[27][1][0] = 0.0;
│ │ │ │ +
515 out[27][1][1] = 0.0;
│ │ │ │ +
516 out[27][1][2] = 0.0;
│ │ │ │ +
517 out[27][2][0] = 0.0;
│ │ │ │ +
518 out[27][2][1] = 0.0;
│ │ │ │ +
519 out[27][2][2] = 0.0;
│ │ │ │ +
520
│ │ │ │ +
521 out[28][0][0] = -144.0 + 216.0*in[1] + 288.0*in[2] - 432.0*in[1]*in[2] + 288.0*in[0] - 432.0*in[0]*in[1] - 576.0*in[0]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
522 out[28][0][1] = 216.0*in[0] - 432.0*in[0]*in[2] - 216.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[2];
│ │ │ │ +
523 out[28][0][2] = 288.0*in[0] - 432.0*in[0]*in[1] - 288.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[1];
│ │ │ │ +
524 out[28][1][0] = 0.0;
│ │ │ │ +
525 out[28][1][1] = 0.0;
│ │ │ │ +
526 out[28][1][2] = 0.0;
│ │ │ │ +
527 out[28][2][0] = 0.0;
│ │ │ │ +
528 out[28][2][1] = 0.0;
│ │ │ │ +
529 out[28][2][2] = 0.0;
│ │ │ │ +
530
│ │ │ │ +
531 out[29][0][0] = 0.0;
│ │ │ │ +
532 out[29][0][1] = 0.0;
│ │ │ │ +
533 out[29][0][2] = 0.0;
│ │ │ │ +
534 out[29][1][0] = 288.0*in[1] - 432.0*in[1]*in[2] - 288.0*in[1]*in[1] + 432.0*in[1]*in[1]*in[2];
│ │ │ │ +
535 out[29][1][1] = -144.0 + 288.0*in[0] + 216.0*in[2] - 432.0*in[0]*in[2] + 288.0*in[1] - 576.0*in[0]*in[1] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
536 out[29][1][2] = 216.0*in[1] - 432.0*in[0]*in[1] - 216.0*in[1]*in[1] + 432.0*in[0]*in[1]*in[1];
│ │ │ │ +
537 out[29][2][0] = 0.0;
│ │ │ │ +
538 out[29][2][1] = 0.0;
│ │ │ │ +
539 out[29][2][2] = 0.0;
│ │ │ │ +
540
│ │ │ │ +
541 out[30][0][0] = 0.0;
│ │ │ │ +
542 out[30][0][1] = 0.0;
│ │ │ │ +
543 out[30][0][2] = 0.0;
│ │ │ │ +
544 out[30][1][0] = 216.0*in[1] - 432.0*in[1]*in[2] - 216.0*in[1]*in[1] + 432.0*in[1]*in[1]*in[2];
│ │ │ │ +
545 out[30][1][1] = -144.0 + 216.0*in[0] + 288.0*in[2] - 432.0*in[0]*in[2] + 288.0*in[1] - 432.0*in[0]*in[1] - 576.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
546 out[30][1][2] = 288.0*in[1] - 432.0*in[0]*in[1] - 288.0*in[1]*in[1] + 432.0*in[0]*in[1]*in[1];
│ │ │ │ +
547 out[30][2][0] = 0.0;
│ │ │ │ +
548 out[30][2][1] = 0.0;
│ │ │ │ +
549 out[30][2][2] = 0.0;
│ │ │ │ +
550
│ │ │ │ +
551 out[31][0][0] = 0.0;
│ │ │ │ +
552 out[31][0][1] = 0.0;
│ │ │ │ +
553 out[31][0][2] = 0.0;
│ │ │ │ +
554 out[31][1][0] = 0.0;
│ │ │ │ +
555 out[31][1][1] = 0.0;
│ │ │ │ +
556 out[31][1][2] = 0.0;
│ │ │ │ +
557 out[31][2][0] = 288.0*in[2] - 432.0*in[1]*in[2] - 288.0*in[2]*in[2] + 432.0*in[1]*in[2]*in[2];
│ │ │ │ +
558 out[31][2][1] = 216.0*in[2] - 432.0*in[0]*in[2] - 216.0*in[2]*in[2] + 432.0*in[0]*in[2]*in[2];
│ │ │ │ +
559 out[31][2][2] = -144.0 + 288.0*in[0] + 216.0*in[1] - 432.0*in[0]*in[1] + 288.0*in[2] - 576.0*in[0]*in[2] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
560
│ │ │ │ +
561 out[32][0][0] = 0.0;
│ │ │ │ +
562 out[32][0][1] = 0.0;
│ │ │ │ +
563 out[32][0][2] = 0.0;
│ │ │ │ +
564 out[32][1][0] = 0.0;
│ │ │ │ +
565 out[32][1][1] = 0.0;
│ │ │ │ +
566 out[32][1][2] = 0.0;
│ │ │ │ +
567 out[32][2][0] = 216.0*in[2] - 432.0*in[1]*in[2] - 216.0*in[2]*in[2] + 432.0*in[1]*in[2]*in[2];
│ │ │ │ +
568 out[32][2][1] = 288.0*in[2] - 432.0*in[0]*in[2] - 288.0*in[2]*in[2] + 432.0*in[0]*in[2]*in[2];
│ │ │ │ +
569 out[32][2][2] = -144.0 + 216.0*in[0] + 288.0*in[1] - 432.0*in[0]*in[1] + 288.0*in[2] - 432.0*in[0]*in[2] - 576.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2];
│ │ │ │ +
570
│ │ │ │ +
571 out[33][0][0] = 216.0 - 432.0*in[1] - 432.0*in[2] + 864.0*in[1]*in[2] - 432.0*in[0] + 864.0*in[0]*in[1] + 864.0*in[0]*in[2] - 1728.0*in[0]*in[1]*in[2];
│ │ │ │ +
572 out[33][0][1] = -432.0*in[0] + 864.0*in[0]*in[2] + 432.0*in[0]*in[0] - 864.0*in[0]*in[0]*in[2];
│ │ │ │ +
573 out[33][0][2] = -432.0*in[0] + 864.0*in[0]*in[1] + 432.0*in[0]*in[0] - 864.0*in[0]*in[0]*in[1];
│ │ │ │ +
574 out[33][1][0] = 0.0;
│ │ │ │ +
575 out[33][1][1] = 0.0;
│ │ │ │ +
576 out[33][1][2] = 0.0;
│ │ │ │ +
577 out[33][2][0] = 0.0;
│ │ │ │ +
578 out[33][2][1] = 0.0;
│ │ │ │ +
579 out[33][2][2] = 0.0;
│ │ │ │ +
580
│ │ │ │ +
581 out[34][0][0] = 0.0;
│ │ │ │ +
582 out[34][0][1] = 0.0;
│ │ │ │ +
583 out[34][0][2] = 0.0;
│ │ │ │ +
584 out[34][1][0] = -432.0*in[1] + 864.0*in[1]*in[2] + 432.0*in[1]*in[1] - 864.0*in[1]*in[1]*in[2];
│ │ │ │ +
585 out[34][1][1] = 216.0 - 432.0*in[0] - 432.0*in[2] + 864.0*in[0]*in[2] - 432.0*in[1] + 864.0*in[0]*in[1] + 864.0*in[1]*in[2] - 1728.0*in[0]*in[1]*in[2];
│ │ │ │ +
586 out[34][1][2] = -432.0*in[1] + 864.0*in[0]*in[1] + 432.0*in[1]*in[1] - 864.0*in[0]*in[1]*in[1];
│ │ │ │ +
587 out[34][2][0] = 0.0;
│ │ │ │ +
588 out[34][2][1] = 0.0;
│ │ │ │ +
589 out[34][2][2] = 0.0;
│ │ │ │ +
590
│ │ │ │ +
591 out[35][0][0] = 0.0;
│ │ │ │ +
592 out[35][0][1] = 0.0;
│ │ │ │ +
593 out[35][0][2] = 0.0;
│ │ │ │ +
594 out[35][1][0] = 0.0;
│ │ │ │ +
595 out[35][1][1] = 0.0;
│ │ │ │ +
596 out[35][1][2] = 0.0;
│ │ │ │ +
597 out[35][2][0] = -432.0*in[2] + 864.0*in[1]*in[2] + 432.0*in[2]*in[2] - 864.0*in[1]*in[2]*in[2];
│ │ │ │ +
598 out[35][2][1] = -432.0*in[2] + 864.0*in[0]*in[2] + 432.0*in[2]*in[2] - 864.0*in[0]*in[2]*in[2];
│ │ │ │ +
599 out[35][2][2] = 216.0 - 432.0*in[0] - 432.0*in[1] + 864.0*in[0]*in[1] - 432.0*in[2] + 864.0*in[0]*in[2] + 864.0*in[1]*in[2] - 1728.0*in[0]*in[1]*in[2];
│ │ │ │ +
600 }
│ │ │ │ +
│ │ │ │ +
601
│ │ │ │ +
│ │ │ │ +
603 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
604 const typename Traits::DomainType& in, // position
│ │ │ │ +
605 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
606 {
│ │ │ │ +
607 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
608 if (totalOrder == 0) {
│ │ │ │ +
609 evaluateFunction(in, out);
│ │ │ │ +
610 } else {
│ │ │ │ +
611 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
612 }
│ │ │ │ +
613 }
│ │ │ │ +
│ │ │ │ +
614
│ │ │ │ +
│ │ │ │ +
616 unsigned int order () const
│ │ │ │ +
617 {
│ │ │ │ +
618 return 3;
│ │ │ │ +
619 }
│ │ │ │ +
│ │ │ │ +
620
│ │ │ │ +
621 private:
│ │ │ │ +
622 R sign0, sign1, sign2, sign3, sign4, sign5;
│ │ │ │ +
623 };
│ │ │ │ +
│ │ │ │ +
624}
│ │ │ │ +
625#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ -
Factory for global-valued Q1 elements.
Definition q1.hh:47
│ │ │ │ -
Q1FiniteElementFactory()
default constructor
Definition q1.hh:57
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas1cube3dlocalbasis.hh:28
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas1cube3dlocalbasis.hh:603
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas1cube3dlocalbasis.hh:32
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas1cube3dlocalbasis.hh:69
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas1cube3dlocalbasis.hh:80
│ │ │ │ +
RT1Cube3DLocalBasis(unsigned int s=0)
Make set number s, where 0 <= s < 64.
Definition raviartthomas1cube3dlocalbasis.hh:39
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas1cube3dlocalbasis.hh:236
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas1cube3dlocalbasis.hh:616
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,83 +1,758 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -q1.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ +raviartthomas1cube3dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ -7#define DUNE_Q1_LOCALFINITEELEMENT_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ 14 │ │ │ │ │ -15#warning This header is deprecated │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -27 template │ │ │ │ │ -_2_8 using _Q_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -29 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ -30 = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_1_>; │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -34 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 class _Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y : │ │ │ │ │ -41 public _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y< │ │ │ │ │ -42 LagrangeCubeLocalFiniteElement< │ │ │ │ │ -43 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ -44 >, │ │ │ │ │ -45 Geometry │ │ │ │ │ -46 > │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +28 { │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s (unsigned int s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ +42 if (s & 1) │ │ │ │ │ +43 { │ │ │ │ │ +44 sign0 = -1.0; │ │ │ │ │ +45 } │ │ │ │ │ +46 if (s & 2) │ │ │ │ │ 47 { │ │ │ │ │ -48 typedef _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ -49 typename Geometry::ctype, RF, Geometry::mydimension, 1 │ │ │ │ │ -50 > _L_F_E; │ │ │ │ │ -51 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y_<_L_F_E_,_ _G_e_o_m_e_t_r_y_> _B_a_s_e; │ │ │ │ │ -52 │ │ │ │ │ -53 static const _L_F_E lfe; │ │ │ │ │ -54 │ │ │ │ │ -55 public: │ │ │ │ │ -_5_7 _Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y() : _B_a_s_e(lfe) {} │ │ │ │ │ -58 }; │ │ │ │ │ -59 │ │ │ │ │ -60 template │ │ │ │ │ -61 const typename Q1FiniteElementFactory::LFE │ │ │ │ │ -62 Q1FiniteElementFactory::lfe; │ │ │ │ │ -63} │ │ │ │ │ -64 │ │ │ │ │ -65#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ +48 sign1 = -1.0; │ │ │ │ │ +49 } │ │ │ │ │ +50 if (s & 4) │ │ │ │ │ +51 { │ │ │ │ │ +52 sign2 = -1.0; │ │ │ │ │ +53 } │ │ │ │ │ +54 if (s & 8) │ │ │ │ │ +55 { │ │ │ │ │ +56 sign3 = -1.0; │ │ │ │ │ +57 } │ │ │ │ │ +58 if (s & 16) │ │ │ │ │ +59 { │ │ │ │ │ +60 sign4 = -1.0; │ │ │ │ │ +61 } │ │ │ │ │ +62 if (s & 32) │ │ │ │ │ +63 { │ │ │ │ │ +64 sign5 = -1.0; │ │ │ │ │ +65 } │ │ │ │ │ +66 } │ │ │ │ │ +67 │ │ │ │ │ +_6_9 unsigned int _s_i_z_e () const │ │ │ │ │ +70 { │ │ │ │ │ +71 return 36; │ │ │ │ │ +72 } │ │ │ │ │ +73 │ │ │ │ │ +_8_0 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +81 std::vector& out) const │ │ │ │ │ +82 { │ │ │ │ │ +83 out.resize(36); │ │ │ │ │ +84 │ │ │ │ │ +85 out[0][0] = sign0*(-3.0*in[0]*in[0] + 4.0*in[0] - 1.0); │ │ │ │ │ +86 out[0][1] = 0.0; │ │ │ │ │ +87 out[0][2] = 0.0; │ │ │ │ │ +88 │ │ │ │ │ +89 out[1][0] = sign1*(-2.0*in[0] + 3.0*in[0]*in[0]); │ │ │ │ │ +90 out[1][1] = 0.0; │ │ │ │ │ +91 out[1][2] = 0.0; │ │ │ │ │ +92 │ │ │ │ │ +93 out[2][0] = 0.0; │ │ │ │ │ +94 out[2][1] = sign2*(-3.0*in[1]*in[1] + 4.0*in[1] - 1.0); │ │ │ │ │ +95 out[2][2] = 0.0; │ │ │ │ │ +96 │ │ │ │ │ +97 out[3][0] = 0.0; │ │ │ │ │ +98 out[3][1] = sign3*(3.0*in[1]*in[1] - 2.0*in[1]); │ │ │ │ │ +99 out[3][2] = 0.0; │ │ │ │ │ +100 │ │ │ │ │ +101 out[4][0] = 0.0; │ │ │ │ │ +102 out[4][1] = 0.0; │ │ │ │ │ +103 out[4][2] = sign4*(-3.0*in[2]*in[2] + 4.0*in[2] - 1.0); │ │ │ │ │ +104 │ │ │ │ │ +105 out[5][0] = 0.0; │ │ │ │ │ +106 out[5][1] = 0.0; │ │ │ │ │ +107 out[5][2] = sign5*(3.0*in[2]*in[2] - 2.0*in[2]); │ │ │ │ │ +108 │ │ │ │ │ +109 out[6][0] = -18.0*in[0]*in[0]*in[1] + 9.0*in[0]*in[0] + 24.0*in[0]*in[1] - │ │ │ │ │ +6.0*in[1] -12.0*in[0] + 3.0; │ │ │ │ │ +110 out[6][1] = 0.0; │ │ │ │ │ +111 out[6][2] = 0.0; │ │ │ │ │ +112 │ │ │ │ │ +113 out[7][0] = -18.0*in[0]*in[0]*in[1] + 9.0*in[0]*in[0] + 12.0*in[0]*in[1] - │ │ │ │ │ +6.0*in[0]; │ │ │ │ │ +114 out[7][1] = 0.0; │ │ │ │ │ +115 out[7][2] = 0.0; │ │ │ │ │ +116 │ │ │ │ │ +117 out[8][0] = 0.0; │ │ │ │ │ +118 out[8][1] = 18.0*in[0]*in[1]*in[1] - 9.0*in[1]*in[1] - 24.0*in[0]*in[1] + │ │ │ │ │ +12.0*in[1] + 6.0*in[0] - 3.0; │ │ │ │ │ +119 out[8][2] = 0.0; │ │ │ │ │ +120 │ │ │ │ │ +121 out[9][0] = 0.0; │ │ │ │ │ +122 out[9][1] = 6.0*in[1] - 12.0*in[0]*in[1] - 9.0*in[1]*in[1] + 18.0*in[0]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +123 out[9][2] = 0.0; │ │ │ │ │ +124 │ │ │ │ │ +125 out[10][0] = 0.0; │ │ │ │ │ +126 out[10][1] = 0.0; │ │ │ │ │ +127 out[10][2] = -3.0 + 6.0*in[0] + 12.0*in[2] - 24.0*in[0]*in[2] - 9.0*in │ │ │ │ │ +[2]*in[2] + 18.0*in[0]*in[2]*in[2]; │ │ │ │ │ +128 │ │ │ │ │ +129 out[11][0] = 0.0; │ │ │ │ │ +130 out[11][1] = 0.0; │ │ │ │ │ +131 out[11][2] = 6.0*in[2] - 12.0*in[0]*in[2] - 9.0*in[2]*in[2] + 18.0*in[0]*in │ │ │ │ │ +[2]*in[2]; │ │ │ │ │ +132 │ │ │ │ │ +133 out[12][0] = 3.0 - 12.0*in[0] - 6.0*in[2] + 24.0*in[0]*in[2] + 9.0*in[0]*in │ │ │ │ │ +[0] - 18.0*in[0]*in[0]*in[2]; │ │ │ │ │ +134 out[12][1] = 0.0; │ │ │ │ │ +135 out[12][2] = 0.0; │ │ │ │ │ +136 │ │ │ │ │ +137 out[13][0] = -6.0*in[0] + 12.0*in[0]*in[2] + 9.0*in[0]*in[0] - 18.0*in │ │ │ │ │ +[0]*in[0]*in[2]; │ │ │ │ │ +138 out[13][1] = 0.0; │ │ │ │ │ +139 out[13][2] = 0.0; │ │ │ │ │ +140 │ │ │ │ │ +141 out[14][0] = 0.0; │ │ │ │ │ +142 out[14][1] = 3.0 - 12.0*in[1] - 6.0*in[2] + 24.0*in[1]*in[2] + 9.0*in[1]*in │ │ │ │ │ +[1] - 18.0*in[1]*in[1]*in[2]; │ │ │ │ │ +143 out[14][2] = 0.0; │ │ │ │ │ +144 │ │ │ │ │ +145 out[15][0] = 0.0; │ │ │ │ │ +146 out[15][1] = -6.0*in[1] + 12.0*in[1]*in[2] + 9.0*in[1]*in[1] - 18.0*in │ │ │ │ │ +[1]*in[1]*in[2]; │ │ │ │ │ +147 out[15][2] = 0.0; │ │ │ │ │ +148 │ │ │ │ │ +149 out[16][0] = 0.0; │ │ │ │ │ +150 out[16][1] = 0.0; │ │ │ │ │ +151 out[16][2] = -3.0 + 6.0*in[1] + 12.0*in[2] - 24.0*in[1]*in[2] - 9.0*in │ │ │ │ │ +[2]*in[2] + 18.0*in[1]*in[2]*in[2]; │ │ │ │ │ +152 │ │ │ │ │ +153 out[17][0] = 0.0; │ │ │ │ │ +154 out[17][1] = 0.0; │ │ │ │ │ +155 out[17][2] = 6.0*in[2] - 12.0*in[1]*in[2] - 9.0*in[2]*in[2] + 18.0*in[1]*in │ │ │ │ │ +[2]*in[2]; │ │ │ │ │ +156 │ │ │ │ │ +157 out[18][0] = -9.0 + 36.0*in[0] + 18.0*in[1] + 18.0*in[2] - 72.0*in[0]*in[1] │ │ │ │ │ +- 72.0*in[0]*in[2] - 36.0*in[1]*in[2] + 144.0*in[0]*in[1]*in[2] - 27.0*in[0]*in │ │ │ │ │ +[0] + 54.0*in[0]*in[0]*in[1] + 54.0*in[0]*in[0]*in[2] - 108.0*in[0]*in[0]*in │ │ │ │ │ +[1]*in[2]; │ │ │ │ │ +158 out[18][1] = 0.0; │ │ │ │ │ +159 out[18][2] = 0.0; │ │ │ │ │ +160 │ │ │ │ │ +161 out[19][0] = 18.0*in[0] - 36.0*in[0]*in[1] - 36.0*in[0]*in[2] + 72.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 27.0*in[0]*in[0] + 54.0*in[0]*in[0]*in[1] + 54.0*in[0]*in │ │ │ │ │ +[0]*in[2] - 108.0*in[0]*in[0]*in[1]*in[2]; │ │ │ │ │ +162 out[19][1] = 0.0; │ │ │ │ │ +163 out[19][2] = 0.0; │ │ │ │ │ +164 │ │ │ │ │ +165 out[20][0] = 0.0; │ │ │ │ │ +166 out[20][1] = 9.0 - 18.0*in[0] - 36.0*in[1] - 18.0*in[2] + 72.0*in[0]*in[1] │ │ │ │ │ ++ 36.0*in[0]*in[2] + 72.0*in[1]*in[2] - 144.0*in[0]*in[1]*in[2] + 27.0*in[1]*in │ │ │ │ │ +[1] - 54.0*in[1]*in[1]*in[0] - 54.0*in[1]*in[1]*in[2] + 108.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[2]; │ │ │ │ │ +167 out[20][2] = 0.0; │ │ │ │ │ +168 │ │ │ │ │ +169 out[21][0] = 0.0; │ │ │ │ │ +170 out[21][1] = -18.0*in[1] + 36.0*in[0]*in[1] + 36.0*in[1]*in[2] - 72.0*in │ │ │ │ │ +[0]*in[1]*in[2] + 27.0*in[1]*in[1] - 54.0*in[0]*in[1]*in[1] - 54.0*in[1]*in │ │ │ │ │ +[1]*in[2] + 108.0*in[0]*in[1]*in[1]*in[2]; │ │ │ │ │ +171 out[21][2] = 0.0; │ │ │ │ │ +172 │ │ │ │ │ +173 out[22][0] = 0.0; │ │ │ │ │ +174 out[22][1] = 0.0; │ │ │ │ │ +175 out[22][2] = 9.0 - 18.0*in[0] - 18.0*in[1] - 36.0*in[2] + 36.0*in[0]*in[1] │ │ │ │ │ ++ 72.0*in[0]*in[2] + 72.0*in[1]*in[2] - 144.0*in[0]*in[1]*in[2] + 27.0*in[2]*in │ │ │ │ │ +[2] - 54.0*in[0]*in[2]*in[2] - 54.0*in[1]*in[2]*in[2] + 108.0*in[0]*in[1]*in │ │ │ │ │ +[2]*in[2]; │ │ │ │ │ +176 │ │ │ │ │ +177 out[23][0] = 0.0; │ │ │ │ │ +178 out[23][1] = 0.0; │ │ │ │ │ +179 out[23][2] = -18.0*in[2] + 36.0*in[0]*in[2] + 36.0*in[1]*in[2] - 72.0*in │ │ │ │ │ +[0]*in[1]*in[2] + 27.0*in[2]*in[2] - 54.0*in[0]*in[2]*in[2] - 54.0*in[1]*in │ │ │ │ │ +[2]*in[2] + 108.0*in[0]*in[1]*in[2]*in[2]; │ │ │ │ │ +180 │ │ │ │ │ +181 out[24][0] = 96.0*in[0] - 144.0*in[0]*in[1] - 144.0*in[0]*in[2] + 216.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 96.0*in[0]*in[0] + 144.0*in[0]*in[0]*in[1] + 144.0*in[0]*in │ │ │ │ │ +[0]*in[2] - 216.0*in[0]*in[0]*in[1]*in[2]; │ │ │ │ │ +182 out[24][1] = 0.0; │ │ │ │ │ +183 out[24][2] = 0.0; │ │ │ │ │ +184 │ │ │ │ │ +185 out[25][0] = 0.0; │ │ │ │ │ +186 out[25][1] = 96.0*in[1] - 144.0*in[0]*in[1] - 144.0*in[1]*in[2] + 216.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 96.0*in[1]*in[1] + 144.0*in[0]*in[1]*in[1] + 144.0*in[1]*in │ │ │ │ │ +[1]*in[2] - 216.0*in[0]*in[1]*in[1]*in[2]; │ │ │ │ │ +187 out[25][2] = 0.0; │ │ │ │ │ +188 │ │ │ │ │ +189 out[26][0] = 0.0; │ │ │ │ │ +190 out[26][1] = 0.0; │ │ │ │ │ +191 out[26][2] = 96.0*in[2] - 144.0*in[0]*in[2] - 144.0*in[1]*in[2] + 216.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 96.0*in[2]*in[2] + 144.0*in[0]*in[2]*in[2] + 144.0*in[1]*in │ │ │ │ │ +[2]*in[2] - 216.0*in[0]*in[1]*in[2]*in[2]; │ │ │ │ │ +192 │ │ │ │ │ +193 out[27][0] = -144.0*in[0] + 288.0*in[0]*in[1] + 216.0*in[0]*in[2] - │ │ │ │ │ +432.0*in[0]*in[1]*in[2] + 144.0*in[0]*in[0] - 288.0*in[0]*in[0]*in[1] - │ │ │ │ │ +216.0*in[0]*in[0]*in[2] + 432.0*in[0]*in[0]*in[1]*in[2]; │ │ │ │ │ +194 out[27][1] = 0.0; │ │ │ │ │ +195 out[27][2] = 0.0; │ │ │ │ │ +196 │ │ │ │ │ +197 out[28][0] = -144.0*in[0] + 216.0*in[0]*in[1] + 288.0*in[0]*in[2] - │ │ │ │ │ +432.0*in[0]*in[1]*in[2] + 144.0*in[0]*in[0] - 216.0*in[0]*in[0]*in[1] - │ │ │ │ │ +288.0*in[0]*in[0]*in[2] + 432.0*in[0]*in[0]*in[1]*in[2]; │ │ │ │ │ +198 out[28][1] = 0.0; │ │ │ │ │ +199 out[28][2] = 0.0; │ │ │ │ │ +200 │ │ │ │ │ +201 out[29][0] = 0.0; │ │ │ │ │ +202 out[29][1] = -144.0*in[1] + 288.0*in[0]*in[1] + 216.0*in[1]*in[2] - │ │ │ │ │ +432.0*in[0]*in[1]*in[2] + 144.0*in[1]*in[1] - 288.0*in[0]*in[1]*in[1] - │ │ │ │ │ +216.0*in[1]*in[1]*in[2] + 432.0*in[0]*in[1]*in[1]*in[2]; │ │ │ │ │ +203 out[29][2] = 0.0; │ │ │ │ │ +204 │ │ │ │ │ +205 out[30][0] = 0.0; │ │ │ │ │ +206 out[30][1] = -144.0*in[1] + 216.0*in[0]*in[1] + 288.0*in[1]*in[2] - │ │ │ │ │ +432.0*in[0]*in[1]*in[2] + 144.0*in[1]*in[1] - 216.0*in[0]*in[1]*in[1] - │ │ │ │ │ +288.0*in[1]*in[1]*in[2] + 432.0*in[0]*in[1]*in[1]*in[2]; │ │ │ │ │ +207 out[30][2] = 0.0; │ │ │ │ │ +208 │ │ │ │ │ +209 out[31][0] = 0.0; │ │ │ │ │ +210 out[31][1] = 0.0; │ │ │ │ │ +211 out[31][2] =-144.0*in[2] + 288.0*in[0]*in[2] + 216.0*in[1]*in[2] - 432.0*in │ │ │ │ │ +[0]*in[1]*in[2] + 144.0*in[2]*in[2] - 288.0*in[0]*in[2]*in[2] - 216.0*in[1]*in │ │ │ │ │ +[2]*in[2] + 432.0*in[0]*in[1]*in[2]*in[2]; │ │ │ │ │ +212 │ │ │ │ │ +213 out[32][0] = 0.0; │ │ │ │ │ +214 out[32][1] = 0.0; │ │ │ │ │ +215 out[32][2] = -144.0*in[2] + 216.0*in[0]*in[2] + 288.0*in[1]*in[2] - │ │ │ │ │ +432.0*in[0]*in[1]*in[2] + 144.0*in[2]*in[2] - 216.0*in[0]*in[2]*in[2] - │ │ │ │ │ +288.0*in[1]*in[2]*in[2] + 432.0*in[0]*in[1]*in[2]*in[2]; │ │ │ │ │ +216 │ │ │ │ │ +217 out[33][0] = 216.0*in[0] - 432.0*in[0]*in[1] - 432.0*in[0]*in[2] + 864.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 216.0*in[0]*in[0] + 432.0*in[0]*in[0]*in[1] + 432.0*in[0]*in │ │ │ │ │ +[0]*in[2] - 864.0*in[0]*in[0]*in[1]*in[2]; │ │ │ │ │ +218 out[33][1] = 0.0; │ │ │ │ │ +219 out[33][2] = 0.0; │ │ │ │ │ +220 │ │ │ │ │ +221 out[34][0] = 0.0; │ │ │ │ │ +222 out[34][1] = 216.0*in[1] - 432.0*in[0]*in[1] - 432.0*in[1]*in[2] + 864.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 216.0*in[1]*in[1] + 432.0*in[0]*in[1]*in[1] + 432.0*in[1]*in │ │ │ │ │ +[1]*in[2] - 864.0*in[0]*in[1]*in[1]*in[2]; │ │ │ │ │ +223 out[34][2] = 0.0; │ │ │ │ │ +224 │ │ │ │ │ +225 out[35][0] = 0.0; │ │ │ │ │ +226 out[35][1] = 0.0; │ │ │ │ │ +227 out[35][2] = 216.0*in[2] - 432.0*in[0]*in[2] - 432.0*in[1]*in[2] + 864.0*in │ │ │ │ │ +[0]*in[1]*in[2] - 216.0*in[2]*in[2] + 432.0*in[0]*in[2]*in[2] + 432.0*in[1]*in │ │ │ │ │ +[2]*in[2] - 864.0*in[0]*in[1]*in[2]*in[2]; │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +_2_3_6 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +237 std::vector& out) const │ │ │ │ │ +238 { │ │ │ │ │ +239 out.resize(36); │ │ │ │ │ +240 │ │ │ │ │ +241 out[0][0][0] = sign0*(-6.0*in[0] + 4); │ │ │ │ │ +242 out[0][0][1] = 0; │ │ │ │ │ +243 out[0][0][2] = 0; │ │ │ │ │ +244 out[0][1][0] = 0; │ │ │ │ │ +245 out[0][1][1] = 0; │ │ │ │ │ +246 out[0][1][2] = 0; │ │ │ │ │ +247 out[0][2][0] = 0; │ │ │ │ │ +248 out[0][2][1] = 0; │ │ │ │ │ +249 out[0][2][2] = 0; │ │ │ │ │ +250 │ │ │ │ │ +251 out[1][0][0] = sign1*(-2 + 6.0*in[0]); │ │ │ │ │ +252 out[1][0][1] = 0; │ │ │ │ │ +253 out[1][0][2] = 0; │ │ │ │ │ +254 out[1][1][0] = 0; │ │ │ │ │ +255 out[1][1][1] = 0; │ │ │ │ │ +256 out[1][1][2] = 0; │ │ │ │ │ +257 out[1][2][0] = 0; │ │ │ │ │ +258 out[1][2][1] = 0; │ │ │ │ │ +259 out[1][2][2] = 0; │ │ │ │ │ +260 │ │ │ │ │ +261 out[2][0][0] = 0; │ │ │ │ │ +262 out[2][0][1] = 0; │ │ │ │ │ +263 out[2][0][2] = 0; │ │ │ │ │ +264 out[2][1][0] = 0; │ │ │ │ │ +265 out[2][1][1] = sign2*(-6.0*in[1] + 4); │ │ │ │ │ +266 out[2][1][2] = 0; │ │ │ │ │ +267 out[2][2][0] = 0; │ │ │ │ │ +268 out[2][2][1] = 0; │ │ │ │ │ +269 out[2][2][2] = 0; │ │ │ │ │ +270 │ │ │ │ │ +271 out[3][0][0] = 0; │ │ │ │ │ +272 out[3][0][1] = 0; │ │ │ │ │ +273 out[3][0][2] = 0; │ │ │ │ │ +274 out[3][1][0] = 0; │ │ │ │ │ +275 out[3][1][1] = sign3*(6.0*in[1] - 2); │ │ │ │ │ +276 out[3][1][2] = 0; │ │ │ │ │ +277 out[3][2][0] = 0; │ │ │ │ │ +278 out[3][2][1] = 0; │ │ │ │ │ +279 out[3][2][2] = 0; │ │ │ │ │ +280 │ │ │ │ │ +281 out[4][0][0] = 0; │ │ │ │ │ +282 out[4][0][1] = 0; │ │ │ │ │ +283 out[4][0][2] = 0; │ │ │ │ │ +284 out[4][1][0] = 0; │ │ │ │ │ +285 out[4][1][1] = 0; │ │ │ │ │ +286 out[4][1][2] = 0; │ │ │ │ │ +287 out[4][2][0] = 0; │ │ │ │ │ +288 out[4][2][1] = 0; │ │ │ │ │ +289 out[4][2][2] = sign4*(-6.0*in[2] + 4); │ │ │ │ │ +290 │ │ │ │ │ +291 out[5][0][0] = 0; │ │ │ │ │ +292 out[5][0][1] = 0; │ │ │ │ │ +293 out[5][0][2] = 0; │ │ │ │ │ +294 out[5][1][0] = 0; │ │ │ │ │ +295 out[5][1][1] = 0; │ │ │ │ │ +296 out[5][1][2] = 0; │ │ │ │ │ +297 out[5][2][0] = 0; │ │ │ │ │ +298 out[5][2][1] = 0; │ │ │ │ │ +299 out[5][2][2] = sign5*(6.0*in[2] - 2); │ │ │ │ │ +300 │ │ │ │ │ +301 out[6][0][0] = -36.0*in[0]*in[1] + 18.0*in[0] + 24.0*in[1] - 12.0; │ │ │ │ │ +302 out[6][0][1] = -18.0*in[0]*in[0] + 24.0*in[0] - 6; │ │ │ │ │ +303 out[6][0][2] = 0.0; │ │ │ │ │ +304 out[6][1][0] = 0.0; │ │ │ │ │ +305 out[6][1][1] = 0.0; │ │ │ │ │ +306 out[6][1][2] = 0.0; │ │ │ │ │ +307 out[6][2][0] = 0.0; │ │ │ │ │ +308 out[6][2][1] = 0.0; │ │ │ │ │ +309 out[6][2][2] = 0.0; │ │ │ │ │ +310 │ │ │ │ │ +311 out[7][0][0] = -36.0*in[0]*in[1] + 18.0*in[0] + 12.0*in[1] - 6.0; │ │ │ │ │ +312 out[7][0][1] = -18.0*in[0]*in[0] + 12.0*in[0]; │ │ │ │ │ +313 out[7][0][2] = 0.0; │ │ │ │ │ +314 out[7][1][0] = 0.0; │ │ │ │ │ +315 out[7][1][1] = 0.0; │ │ │ │ │ +316 out[7][1][2] = 0.0; │ │ │ │ │ +317 out[7][2][0] = 0.0; │ │ │ │ │ +318 out[7][2][1] = 0.0; │ │ │ │ │ +319 out[7][2][2] = 0.0; │ │ │ │ │ +320 │ │ │ │ │ +321 out[8][0][0] = 0.0; │ │ │ │ │ +322 out[8][0][1] = 0.0; │ │ │ │ │ +323 out[8][0][2] = 0.0; │ │ │ │ │ +324 out[8][1][0] = 18.0*in[1]*in[1] - 24.0*in[1] + 6.0; │ │ │ │ │ +325 out[8][1][1] = 36.0*in[0]*in[1] - 18.0*in[1] - 24.0*in[0] + 12.0; │ │ │ │ │ +326 out[8][1][2] = 0.0; │ │ │ │ │ +327 out[8][2][0] = 0.0; │ │ │ │ │ +328 out[8][2][1] = 0.0; │ │ │ │ │ +329 out[8][2][2] = 0.0; │ │ │ │ │ +330 │ │ │ │ │ +331 out[9][0][0] = 0.0; │ │ │ │ │ +332 out[9][0][1] = 0.0; │ │ │ │ │ +333 out[9][0][2] = 0.0; │ │ │ │ │ +334 out[9][1][0] = -12.0*in[1] + 18.0*in[1]*in[1]; │ │ │ │ │ +335 out[9][1][1] = 6.0 - 12.0*in[0] - 18.0*in[1] + 36.0*in[0]*in[1];; │ │ │ │ │ +336 out[9][1][2] = 0.0; │ │ │ │ │ +337 out[9][2][0] = 0.0; │ │ │ │ │ +338 out[9][2][1] = 0.0; │ │ │ │ │ +339 out[9][2][2] = 0.0; │ │ │ │ │ +340 │ │ │ │ │ +341 out[10][0][0] = 0.0; │ │ │ │ │ +342 out[10][0][1] = 0.0; │ │ │ │ │ +343 out[10][0][2] = 0.0; │ │ │ │ │ +344 out[10][1][0] = 0.0; │ │ │ │ │ +345 out[10][1][1] = 0.0; │ │ │ │ │ +346 out[10][1][2] = 0.0; │ │ │ │ │ +347 out[10][2][0] = 6.0 - 24.0*in[2] + 18.0*in[2]*in[2]; │ │ │ │ │ +348 out[10][2][1] = 0.0; │ │ │ │ │ +349 out[10][2][2] = 12.0 - 24.0*in[0] - 18.0*in[2] + 36.0*in[0]*in[2]; │ │ │ │ │ +350 │ │ │ │ │ +351 out[11][0][0] = 0.0; │ │ │ │ │ +352 out[11][0][1] = 0.0; │ │ │ │ │ +353 out[11][0][2] = 0.0; │ │ │ │ │ +354 out[11][1][0] = 0.0; │ │ │ │ │ +355 out[11][1][1] = 0.0; │ │ │ │ │ +356 out[11][1][2] = 0.0; │ │ │ │ │ +357 out[11][2][0] = -12.0*in[2] + 18.0*in[2]*in[2]; │ │ │ │ │ +358 out[11][2][1] = 0.0; │ │ │ │ │ +359 out[11][2][2] = 6.0 - 12.0*in[0] - 18.0*in[2] + 36.0*in[0]*in[2]; │ │ │ │ │ +360 │ │ │ │ │ +361 out[12][0][0] = -12.0 + 24.0*in[2] + 18.0*in[0] - 36.0*in[0]*in[2]; │ │ │ │ │ +362 out[12][0][1] = 0.0; │ │ │ │ │ +363 out[12][0][2] = -6.0 + 24.0*in[0] - 18.0*in[0]*in[0]; │ │ │ │ │ +364 out[12][1][0] = 0.0; │ │ │ │ │ +365 out[12][1][1] = 0.0; │ │ │ │ │ +366 out[12][1][2] = 0.0; │ │ │ │ │ +367 out[12][2][0] = 0.0; │ │ │ │ │ +368 out[12][2][1] = 0.0; │ │ │ │ │ +369 out[12][2][2] = 0.0; │ │ │ │ │ +370 │ │ │ │ │ +371 out[13][0][0] = -6.0 + 12.0*in[2] + 18.0*in[0] - 36.0*in[0]*in[2]; │ │ │ │ │ +372 out[13][0][1] = 0.0; │ │ │ │ │ +373 out[13][0][2] = 12.0*in[0] - 18.0*in[0]*in[0]; │ │ │ │ │ +374 out[13][1][0] = 0.0; │ │ │ │ │ +375 out[13][1][1] = 0.0; │ │ │ │ │ +376 out[13][1][2] = 0.0; │ │ │ │ │ +377 out[13][2][0] = 0.0; │ │ │ │ │ +378 out[13][2][1] = 0.0; │ │ │ │ │ +379 out[13][2][2] = 0.0; │ │ │ │ │ +380 │ │ │ │ │ +381 out[14][0][0] = 0.0; │ │ │ │ │ +382 out[14][0][1] = 0.0; │ │ │ │ │ +383 out[14][0][2] = 0.0; │ │ │ │ │ +384 out[14][1][0] = 0.0; │ │ │ │ │ +385 out[14][1][1] = -12.0 + 24.0*in[2] + 18.0*in[1] - 36.0*in[1]*in[2]; │ │ │ │ │ +386 out[14][1][2] = -6.0 + 24.0*in[1] - 18.0*in[1]*in[1]; │ │ │ │ │ +387 out[14][2][0] = 0.0; │ │ │ │ │ +388 out[14][2][1] = 0.0; │ │ │ │ │ +389 out[14][2][2] = 0.0; │ │ │ │ │ +390 │ │ │ │ │ +391 out[15][0][0] = 0.0; │ │ │ │ │ +392 out[15][0][1] = 0.0; │ │ │ │ │ +393 out[15][0][2] = 0.0; │ │ │ │ │ +394 out[15][1][0] = 0.0; │ │ │ │ │ +395 out[15][1][1] = -6.0 + 12.0*in[2] + 18.0*in[1] - 36.0*in[1]*in[2]; │ │ │ │ │ +396 out[15][1][2] = 12.0*in[1] - 18.0*in[1]*in[1]; │ │ │ │ │ +397 out[15][2][0] = 0.0; │ │ │ │ │ +398 out[15][2][1] = 0.0; │ │ │ │ │ +399 out[15][2][2] = 0.0; │ │ │ │ │ +400 │ │ │ │ │ +401 out[16][0][0] = 0.0; │ │ │ │ │ +402 out[16][0][1] = 0.0; │ │ │ │ │ +403 out[16][0][2] = 0.0; │ │ │ │ │ +404 out[16][1][0] = 0.0; │ │ │ │ │ +405 out[16][1][1] = 0.0; │ │ │ │ │ +406 out[16][1][2] = 0.0; │ │ │ │ │ +407 out[16][2][0] = 0.0; │ │ │ │ │ +408 out[16][2][1] = 6.0 - 24.0*in[2] + 18.0*in[2]*in[2]; │ │ │ │ │ +409 out[16][2][2] = 12.0 - 24.0*in[1] - 18.0*in[2] + 36.0*in[1]*in[2]; │ │ │ │ │ +410 │ │ │ │ │ +411 out[17][0][0] = 0.0; │ │ │ │ │ +412 out[17][0][1] = 0.0; │ │ │ │ │ +413 out[17][0][2] = 0.0; │ │ │ │ │ +414 out[17][1][0] = 0.0; │ │ │ │ │ +415 out[17][1][1] = 0.0; │ │ │ │ │ +416 out[17][1][2] = 0.0; │ │ │ │ │ +417 out[17][2][0] = 0.0; │ │ │ │ │ +418 out[17][2][1] = -12.0*in[2] + 18.0*in[2]*in[2]; │ │ │ │ │ +419 out[17][2][2] = 6.0 - 12.0*in[1] - 18.0*in[2] + 36.0*in[1]*in[2]; │ │ │ │ │ +420 │ │ │ │ │ +421 out[18][0][0] = 36.0 - 72.0*in[1] - 72.0*in[2] + 144.0*in[1]*in[2] - │ │ │ │ │ +54.0*in[0] + 108.0*in[0]*in[1] + 108.0*in[0]*in[2] - 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +422 out[18][0][1] = 18.0 - 72.0*in[0] - 36.0*in[2] + 144.0*in[0]*in[2] + │ │ │ │ │ +54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[2]; │ │ │ │ │ +423 out[18][0][2] = 18.0 - 72.0*in[0] - 36.0*in[1] + 144.0*in[0]*in[1] + │ │ │ │ │ +54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[1]; │ │ │ │ │ +424 out[18][1][0] = 0.0; │ │ │ │ │ +425 out[18][1][1] = 0.0; │ │ │ │ │ +426 out[18][1][2] = 0.0; │ │ │ │ │ +427 out[18][2][0] = 0.0; │ │ │ │ │ +428 out[18][2][1] = 0.0; │ │ │ │ │ +429 out[18][2][2] = 0.0; │ │ │ │ │ +430 │ │ │ │ │ +431 out[19][0][0] = 18 - 36.0*in[1] - 36.0*in[2] + 72.0*in[1]*in[2] - 54.0*in │ │ │ │ │ +[0] + 108.0*in[0]*in[1] + 108.0*in[0]*in[2] - 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +432 out[19][0][1] = -36.0*in[0] + 72.0*in[0]*in[2] + 54.0*in[0]*in[0] - │ │ │ │ │ +108.0*in[0]*in[0]*in[2]; │ │ │ │ │ +433 out[19][0][2] = -36.0*in[0] + 72.0*in[0]*in[1] + 54.0*in[0]*in[0] - │ │ │ │ │ +108.0*in[0]*in[0]*in[1]; │ │ │ │ │ +434 out[19][1][0] = 0.0; │ │ │ │ │ +435 out[19][1][1] = 0.0; │ │ │ │ │ +436 out[19][1][2] = 0.0; │ │ │ │ │ +437 out[19][2][0] = 0.0; │ │ │ │ │ +438 out[19][2][1] = 0.0; │ │ │ │ │ +439 out[19][2][2] = 0.0; │ │ │ │ │ +440 │ │ │ │ │ +441 out[20][0][0] = 0.0; │ │ │ │ │ +442 out[20][0][1] = 0.0; │ │ │ │ │ +443 out[20][0][2] = 0.0; │ │ │ │ │ +444 out[20][1][0] = -18.0 + 72.0*in[1] + 36.0*in[2] - 144.0*in[1]*in[2] - │ │ │ │ │ +54.0*in[1]*in[1] + 108.0*in[1]*in[1]*in[2]; │ │ │ │ │ +445 out[20][1][1] = -36.0 + 72.0*in[0] + 72.0*in[2] - 144.0*in[0]*in[2] + │ │ │ │ │ +54.0*in[1] - 108.0*in[1]*in[0] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +446 out[20][1][2] = -18.0 + 36.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] - │ │ │ │ │ +54.0*in[1]*in[1] + 108.0*in[0]*in[1]*in[1]; │ │ │ │ │ +447 out[20][2][0] = 0.0; │ │ │ │ │ +448 out[20][2][1] = 0.0; │ │ │ │ │ +449 out[20][2][2] = 0.0; │ │ │ │ │ +450 │ │ │ │ │ +451 out[21][0][0] = 0.0; │ │ │ │ │ +452 out[21][0][1] = 0.0; │ │ │ │ │ +453 out[21][0][2] = 0.0; │ │ │ │ │ +454 out[21][1][0] = 36.0*in[1] - 72.0*in[1]*in[2] - 54.0*in[1]*in[1] + 108.0*in │ │ │ │ │ +[1]*in[1]*in[2]; │ │ │ │ │ +455 out[21][1][1] = -18.0 + 36.0*in[0] + 36.0*in[2] - 72.0*in[0]*in[2] + │ │ │ │ │ +54.0*in[1] - 108.0*in[0]*in[1] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +456 out[21][1][2] = 36.0*in[1] - 72.0*in[0]*in[1] - 54.0*in[1]*in[1] + 108.0*in │ │ │ │ │ +[0]*in[1]*in[1]; │ │ │ │ │ +457 out[21][2][0] = 0.0; │ │ │ │ │ +458 out[21][2][1] = 0.0; │ │ │ │ │ +459 out[21][2][2] = 0.0; │ │ │ │ │ +460 │ │ │ │ │ +461 out[22][0][0] = 0.0; │ │ │ │ │ +462 out[22][0][1] = 0.0; │ │ │ │ │ +463 out[22][0][2] = 0.0; │ │ │ │ │ +464 out[22][1][0] = 0.0; │ │ │ │ │ +465 out[22][1][1] = 0.0; │ │ │ │ │ +466 out[22][1][2] = 0.0; │ │ │ │ │ +467 out[22][2][0] = -18.0 + 36.0*in[1] + 72.0*in[2] - 144.0*in[1]*in[2] - │ │ │ │ │ +54.0*in[2]*in[2] + 108.0*in[1]*in[2]*in[2]; │ │ │ │ │ +468 out[22][2][1] = -18.0 + 36.0*in[0] + 72.0*in[2] - 144.0*in[0]*in[2] - │ │ │ │ │ +54.0*in[2]*in[2] + 108.0*in[0]*in[2]*in[2]; │ │ │ │ │ +469 out[22][2][2] = -36.0 + 72.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] + │ │ │ │ │ +54.0*in[2] - 108.0*in[0]*in[2] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +470 │ │ │ │ │ +471 out[23][0][0] = 0.0; │ │ │ │ │ +472 out[23][0][1] = 0.0; │ │ │ │ │ +473 out[23][0][2] = 0.0; │ │ │ │ │ +474 out[23][1][0] = 0.0; │ │ │ │ │ +475 out[23][1][1] = 0.0; │ │ │ │ │ +476 out[23][1][2] = 0.0; │ │ │ │ │ +477 out[23][2][0] = 36.0*in[2] - 72.0*in[1]*in[2] - 54.0*in[2]*in[2] + 108.0*in │ │ │ │ │ +[1]*in[2]*in[2]; │ │ │ │ │ +478 out[23][2][1] = 36.0*in[2] - 72.0*in[0]*in[2] - 54.0*in[2]*in[2] + 108.0*in │ │ │ │ │ +[0]*in[2]*in[2]; │ │ │ │ │ +479 out[23][2][2] = -18.0 + 36.0*in[0] + 36.0*in[1] - 72.0*in[0]*in[1] + │ │ │ │ │ +54.0*in[2] - 108.0*in[0]*in[2] - 108.0*in[1]*in[2] + 216.0*in[0]*in[1]*in[2]; │ │ │ │ │ +480 │ │ │ │ │ +481 out[24][0][0] = 96.0 - 144.0*in[1] - 144.0*in[2] + 216.0*in[1]*in[2] - │ │ │ │ │ +192.0*in[0] + 288.0*in[0]*in[1] + 288.0*in[0]*in[2] - 432.0*in[0]*in[1]*in[2]; │ │ │ │ │ +482 out[24][0][1] = -144.0*in[0] + 216.0*in[0]*in[2] + 144.0*in[0]*in[0] - │ │ │ │ │ +216.0*in[0]*in[0]*in[2]; │ │ │ │ │ +483 out[24][0][2] = -144.0*in[0] + 216.0*in[0]*in[1] + 144.0*in[0]*in[0] - │ │ │ │ │ +216.0*in[0]*in[0]*in[1]; │ │ │ │ │ +484 out[24][1][0] = 0.0; │ │ │ │ │ +485 out[24][1][1] = 0.0; │ │ │ │ │ +486 out[24][1][2] = 0.0; │ │ │ │ │ +487 out[24][2][0] = 0.0; │ │ │ │ │ +488 out[24][2][1] = 0.0; │ │ │ │ │ +489 out[24][2][2] = 0.0; │ │ │ │ │ +490 │ │ │ │ │ +491 out[25][0][0] = 0.0; │ │ │ │ │ +492 out[25][0][1] = 0.0; │ │ │ │ │ +493 out[25][0][2] = 0.0; │ │ │ │ │ +494 out[25][1][0] = -144.0*in[1] + 216.0*in[1]*in[2] + 144.0*in[1]*in[1] - │ │ │ │ │ +216.0*in[1]*in[1]*in[2]; │ │ │ │ │ +495 out[25][1][1] = 96.0 - 144.0*in[0] - 144.0*in[2] + 216.0*in[0]*in[2] - │ │ │ │ │ +192.0*in[1] + 288.0*in[0]*in[1] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2]; │ │ │ │ │ +496 out[25][1][2] = -144.0*in[1] + 216.0*in[0]*in[1] + 144.0*in[1]*in[1] - │ │ │ │ │ +216.0*in[0]*in[1]*in[1]; │ │ │ │ │ +497 out[25][2][0] = 0.0; │ │ │ │ │ +498 out[25][2][1] = 0.0; │ │ │ │ │ +499 out[25][2][2] = 0.0; │ │ │ │ │ +500 │ │ │ │ │ +501 out[26][0][0] = 0.0; │ │ │ │ │ +502 out[26][0][1] = 0.0; │ │ │ │ │ +503 out[26][0][2] = 0.0; │ │ │ │ │ +504 out[26][1][0] = 0.0; │ │ │ │ │ +505 out[26][1][1] = 0.0; │ │ │ │ │ +506 out[26][1][2] = 0.0; │ │ │ │ │ +507 out[26][2][0] = -144.0*in[2] + 216.0*in[1]*in[2] + 144.0*in[2]*in[2] - │ │ │ │ │ +216.0*in[1]*in[2]*in[2]; │ │ │ │ │ +508 out[26][2][1] = -144.0*in[2] + 216.0*in[0]*in[2] + 144.0*in[2]*in[2] - │ │ │ │ │ +216.0*in[0]*in[2]*in[2]; │ │ │ │ │ +509 out[26][2][2] = 96.0 - 144.0*in[0] - 144.0*in[1] + 216.0*in[0]*in[1] - │ │ │ │ │ +192.0*in[2] + 288.0*in[0]*in[2] + 288.0*in[1]*in[2] - 432.0*in[0]*in[1]*in[2]; │ │ │ │ │ +510 │ │ │ │ │ +511 out[27][0][0] = -144.0 + 288.0*in[1] + 216.0*in[2] - 432.0*in[1]*in[2] + │ │ │ │ │ +288.0*in[0] - 576.0*in[0]*in[1] - 432.0*in[0]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +512 out[27][0][1] = 288.0*in[0] - 432.0*in[0]*in[2] - 288.0*in[0]*in[0] + │ │ │ │ │ +432.0*in[0]*in[0]*in[2]; │ │ │ │ │ +513 out[27][0][2] = 216.0*in[0] - 432.0*in[0]*in[1] - 216.0*in[0]*in[0] + │ │ │ │ │ +432.0*in[0]*in[0]*in[1]; │ │ │ │ │ +514 out[27][1][0] = 0.0; │ │ │ │ │ +515 out[27][1][1] = 0.0; │ │ │ │ │ +516 out[27][1][2] = 0.0; │ │ │ │ │ +517 out[27][2][0] = 0.0; │ │ │ │ │ +518 out[27][2][1] = 0.0; │ │ │ │ │ +519 out[27][2][2] = 0.0; │ │ │ │ │ +520 │ │ │ │ │ +521 out[28][0][0] = -144.0 + 216.0*in[1] + 288.0*in[2] - 432.0*in[1]*in[2] + │ │ │ │ │ +288.0*in[0] - 432.0*in[0]*in[1] - 576.0*in[0]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +522 out[28][0][1] = 216.0*in[0] - 432.0*in[0]*in[2] - 216.0*in[0]*in[0] + │ │ │ │ │ +432.0*in[0]*in[0]*in[2]; │ │ │ │ │ +523 out[28][0][2] = 288.0*in[0] - 432.0*in[0]*in[1] - 288.0*in[0]*in[0] + │ │ │ │ │ +432.0*in[0]*in[0]*in[1]; │ │ │ │ │ +524 out[28][1][0] = 0.0; │ │ │ │ │ +525 out[28][1][1] = 0.0; │ │ │ │ │ +526 out[28][1][2] = 0.0; │ │ │ │ │ +527 out[28][2][0] = 0.0; │ │ │ │ │ +528 out[28][2][1] = 0.0; │ │ │ │ │ +529 out[28][2][2] = 0.0; │ │ │ │ │ +530 │ │ │ │ │ +531 out[29][0][0] = 0.0; │ │ │ │ │ +532 out[29][0][1] = 0.0; │ │ │ │ │ +533 out[29][0][2] = 0.0; │ │ │ │ │ +534 out[29][1][0] = 288.0*in[1] - 432.0*in[1]*in[2] - 288.0*in[1]*in[1] + │ │ │ │ │ +432.0*in[1]*in[1]*in[2]; │ │ │ │ │ +535 out[29][1][1] = -144.0 + 288.0*in[0] + 216.0*in[2] - 432.0*in[0]*in[2] + │ │ │ │ │ +288.0*in[1] - 576.0*in[0]*in[1] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +536 out[29][1][2] = 216.0*in[1] - 432.0*in[0]*in[1] - 216.0*in[1]*in[1] + │ │ │ │ │ +432.0*in[0]*in[1]*in[1]; │ │ │ │ │ +537 out[29][2][0] = 0.0; │ │ │ │ │ +538 out[29][2][1] = 0.0; │ │ │ │ │ +539 out[29][2][2] = 0.0; │ │ │ │ │ +540 │ │ │ │ │ +541 out[30][0][0] = 0.0; │ │ │ │ │ +542 out[30][0][1] = 0.0; │ │ │ │ │ +543 out[30][0][2] = 0.0; │ │ │ │ │ +544 out[30][1][0] = 216.0*in[1] - 432.0*in[1]*in[2] - 216.0*in[1]*in[1] + │ │ │ │ │ +432.0*in[1]*in[1]*in[2]; │ │ │ │ │ +545 out[30][1][1] = -144.0 + 216.0*in[0] + 288.0*in[2] - 432.0*in[0]*in[2] + │ │ │ │ │ +288.0*in[1] - 432.0*in[0]*in[1] - 576.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +546 out[30][1][2] = 288.0*in[1] - 432.0*in[0]*in[1] - 288.0*in[1]*in[1] + │ │ │ │ │ +432.0*in[0]*in[1]*in[1]; │ │ │ │ │ +547 out[30][2][0] = 0.0; │ │ │ │ │ +548 out[30][2][1] = 0.0; │ │ │ │ │ +549 out[30][2][2] = 0.0; │ │ │ │ │ +550 │ │ │ │ │ +551 out[31][0][0] = 0.0; │ │ │ │ │ +552 out[31][0][1] = 0.0; │ │ │ │ │ +553 out[31][0][2] = 0.0; │ │ │ │ │ +554 out[31][1][0] = 0.0; │ │ │ │ │ +555 out[31][1][1] = 0.0; │ │ │ │ │ +556 out[31][1][2] = 0.0; │ │ │ │ │ +557 out[31][2][0] = 288.0*in[2] - 432.0*in[1]*in[2] - 288.0*in[2]*in[2] + │ │ │ │ │ +432.0*in[1]*in[2]*in[2]; │ │ │ │ │ +558 out[31][2][1] = 216.0*in[2] - 432.0*in[0]*in[2] - 216.0*in[2]*in[2] + │ │ │ │ │ +432.0*in[0]*in[2]*in[2]; │ │ │ │ │ +559 out[31][2][2] = -144.0 + 288.0*in[0] + 216.0*in[1] - 432.0*in[0]*in[1] + │ │ │ │ │ +288.0*in[2] - 576.0*in[0]*in[2] - 432.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +560 │ │ │ │ │ +561 out[32][0][0] = 0.0; │ │ │ │ │ +562 out[32][0][1] = 0.0; │ │ │ │ │ +563 out[32][0][2] = 0.0; │ │ │ │ │ +564 out[32][1][0] = 0.0; │ │ │ │ │ +565 out[32][1][1] = 0.0; │ │ │ │ │ +566 out[32][1][2] = 0.0; │ │ │ │ │ +567 out[32][2][0] = 216.0*in[2] - 432.0*in[1]*in[2] - 216.0*in[2]*in[2] + │ │ │ │ │ +432.0*in[1]*in[2]*in[2]; │ │ │ │ │ +568 out[32][2][1] = 288.0*in[2] - 432.0*in[0]*in[2] - 288.0*in[2]*in[2] + │ │ │ │ │ +432.0*in[0]*in[2]*in[2]; │ │ │ │ │ +569 out[32][2][2] = -144.0 + 216.0*in[0] + 288.0*in[1] - 432.0*in[0]*in[1] + │ │ │ │ │ +288.0*in[2] - 432.0*in[0]*in[2] - 576.0*in[1]*in[2] + 864.0*in[0]*in[1]*in[2]; │ │ │ │ │ +570 │ │ │ │ │ +571 out[33][0][0] = 216.0 - 432.0*in[1] - 432.0*in[2] + 864.0*in[1]*in[2] - │ │ │ │ │ +432.0*in[0] + 864.0*in[0]*in[1] + 864.0*in[0]*in[2] - 1728.0*in[0]*in[1]*in[2]; │ │ │ │ │ +572 out[33][0][1] = -432.0*in[0] + 864.0*in[0]*in[2] + 432.0*in[0]*in[0] - │ │ │ │ │ +864.0*in[0]*in[0]*in[2]; │ │ │ │ │ +573 out[33][0][2] = -432.0*in[0] + 864.0*in[0]*in[1] + 432.0*in[0]*in[0] - │ │ │ │ │ +864.0*in[0]*in[0]*in[1]; │ │ │ │ │ +574 out[33][1][0] = 0.0; │ │ │ │ │ +575 out[33][1][1] = 0.0; │ │ │ │ │ +576 out[33][1][2] = 0.0; │ │ │ │ │ +577 out[33][2][0] = 0.0; │ │ │ │ │ +578 out[33][2][1] = 0.0; │ │ │ │ │ +579 out[33][2][2] = 0.0; │ │ │ │ │ +580 │ │ │ │ │ +581 out[34][0][0] = 0.0; │ │ │ │ │ +582 out[34][0][1] = 0.0; │ │ │ │ │ +583 out[34][0][2] = 0.0; │ │ │ │ │ +584 out[34][1][0] = -432.0*in[1] + 864.0*in[1]*in[2] + 432.0*in[1]*in[1] - │ │ │ │ │ +864.0*in[1]*in[1]*in[2]; │ │ │ │ │ +585 out[34][1][1] = 216.0 - 432.0*in[0] - 432.0*in[2] + 864.0*in[0]*in[2] - │ │ │ │ │ +432.0*in[1] + 864.0*in[0]*in[1] + 864.0*in[1]*in[2] - 1728.0*in[0]*in[1]*in[2]; │ │ │ │ │ +586 out[34][1][2] = -432.0*in[1] + 864.0*in[0]*in[1] + 432.0*in[1]*in[1] - │ │ │ │ │ +864.0*in[0]*in[1]*in[1]; │ │ │ │ │ +587 out[34][2][0] = 0.0; │ │ │ │ │ +588 out[34][2][1] = 0.0; │ │ │ │ │ +589 out[34][2][2] = 0.0; │ │ │ │ │ +590 │ │ │ │ │ +591 out[35][0][0] = 0.0; │ │ │ │ │ +592 out[35][0][1] = 0.0; │ │ │ │ │ +593 out[35][0][2] = 0.0; │ │ │ │ │ +594 out[35][1][0] = 0.0; │ │ │ │ │ +595 out[35][1][1] = 0.0; │ │ │ │ │ +596 out[35][1][2] = 0.0; │ │ │ │ │ +597 out[35][2][0] = -432.0*in[2] + 864.0*in[1]*in[2] + 432.0*in[2]*in[2] - │ │ │ │ │ +864.0*in[1]*in[2]*in[2]; │ │ │ │ │ +598 out[35][2][1] = -432.0*in[2] + 864.0*in[0]*in[2] + 432.0*in[2]*in[2] - │ │ │ │ │ +864.0*in[0]*in[2]*in[2]; │ │ │ │ │ +599 out[35][2][2] = 216.0 - 432.0*in[0] - 432.0*in[1] + 864.0*in[0]*in[1] - │ │ │ │ │ +432.0*in[2] + 864.0*in[0]*in[2] + 864.0*in[1]*in[2] - 1728.0*in[0]*in[1]*in[2]; │ │ │ │ │ +600 } │ │ │ │ │ +601 │ │ │ │ │ +_6_0_3 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +604 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +605 std::vector& out) const // return value │ │ │ │ │ +606 { │ │ │ │ │ +607 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +608 if (totalOrder == 0) { │ │ │ │ │ +609 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +610 } else { │ │ │ │ │ +611 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +612 } │ │ │ │ │ +613 } │ │ │ │ │ +614 │ │ │ │ │ +_6_1_6 unsigned int _o_r_d_e_r () const │ │ │ │ │ +617 { │ │ │ │ │ +618 return 3; │ │ │ │ │ +619 } │ │ │ │ │ +620 │ │ │ │ │ +621 private: │ │ │ │ │ +622 R sign0, sign1, sign2, sign3, sign4, sign5; │ │ │ │ │ +623 }; │ │ │ │ │ +624} │ │ │ │ │ +625#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ -_D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for global-valued Q1 elements. │ │ │ │ │ -DDeeffiinniittiioonn q1.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_1_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Q1FiniteElementFactory() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn q1.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:603 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:69 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:80 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT1Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:236 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalbasis.hh:616 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangepyramid.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,41 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangepyramid.hh File Reference
│ │ │ │ +
raviartthomas1cube3dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LagrangePyramidLocalFiniteElement< D, R, k >
 Lagrange finite element for 3d pyramids with compile-time polynomial order. More...
class  Dune::RT1Cube3DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangepyramid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomas1cube3dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _k_ _> │ │ │ │ │ -  Lagrange finite element for 3d pyramids with compile-time polynomial │ │ │ │ │ - order. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00248_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangepyramid.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas1cube3dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,831 +70,85 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangepyramid.hh
│ │ │ │ +
raviartthomas1cube3dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
13#include <dune/common/math.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune { namespace Impl
│ │ │ │ -
23{
│ │ │ │ -
33 template<class D, class R, unsigned int k>
│ │ │ │ -
34 class LagrangePyramidLocalBasis
│ │ │ │ -
35 {
│ │ │ │ -
36 public:
│ │ │ │ -
37 using Traits = LocalBasisTraits<D,3,FieldVector<D,3>,R,1,FieldVector<R,1>,FieldMatrix<R,1,3> >;
│ │ │ │ -
38
│ │ │ │ -
41 static constexpr std::size_t size ()
│ │ │ │ -
42 {
│ │ │ │ -
43 std::size_t result = 0;
│ │ │ │ -
44 for (unsigned int i=0; i<=k; i++)
│ │ │ │ -
45 result += power(i+1,2);
│ │ │ │ -
46 return result;
│ │ │ │ -
47 }
│ │ │ │ -
48
│ │ │ │ -
50 void evaluateFunction(const typename Traits::DomainType& in,
│ │ │ │ -
51 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for (std::size_t i = 0; i < 6; i++)
│ │ │ │ +
31 {
│ │ │ │ +
32 li[i] = LocalKey(i,1,0);
│ │ │ │ +
33 li[i + 6] = LocalKey(i,1,1);
│ │ │ │ +
34 li[i + 12] = LocalKey(i,1,2);
│ │ │ │ +
35 li[i + 18] = LocalKey(i,1,3);
│ │ │ │ +
36 }
│ │ │ │ +
37
│ │ │ │ +
38 for (std::size_t i = 0; i < 12; i++)
│ │ │ │ +
39 {
│ │ │ │ +
40 li[i + 24] = LocalKey(0,0,i);
│ │ │ │ +
41 }
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 std::size_t size () const
│ │ │ │ +
46 {
│ │ │ │ +
47 return 36;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
51 const LocalKey& localKey (std::size_t i) const
│ │ │ │
52 {
│ │ │ │ -
53 out.resize(size());
│ │ │ │ -
54
│ │ │ │ -
55 // Specialization for zero-order case
│ │ │ │ -
56 if (k==0)
│ │ │ │ -
57 {
│ │ │ │ -
58 out[0] = 1;
│ │ │ │ -
59 return;
│ │ │ │ -
60 }
│ │ │ │ -
61
│ │ │ │ -
62 if (k==1)
│ │ │ │ -
63 {
│ │ │ │ -
64 if(in[0] > in[1])
│ │ │ │ -
65 {
│ │ │ │ -
66 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[1]);
│ │ │ │ -
67 out[1] = in[0]*(1-in[1])-in[2]*in[1];
│ │ │ │ -
68 out[2] = (1-in[0])*in[1]-in[2]*in[1];
│ │ │ │ -
69 out[3] = in[0]*in[1]+in[2]*in[1];
│ │ │ │ -
70 }
│ │ │ │ -
71 else
│ │ │ │ -
72 {
│ │ │ │ -
73 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[0]);
│ │ │ │ -
74 out[1] = in[0]*(1-in[1])-in[2]*in[0];
│ │ │ │ -
75 out[2] = (1-in[0])*in[1]-in[2]*in[0];
│ │ │ │ -
76 out[3] = in[0]*in[1]+in[2]*in[0];
│ │ │ │ -
77 }
│ │ │ │ -
78
│ │ │ │ -
79 out[4] = in[2];
│ │ │ │ -
80
│ │ │ │ -
81 return;
│ │ │ │ -
82 }
│ │ │ │ -
83
│ │ │ │ -
84 if (k==2)
│ │ │ │ -
85 {
│ │ │ │ -
86 // transform to reference element with base [-1,1]^2
│ │ │ │ -
87 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ -
88 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ -
89 const R z = in[2];
│ │ │ │ -
90
│ │ │ │ -
91 if (x > y)
│ │ │ │ -
92 {
│ │ │ │ -
93 // vertices
│ │ │ │ -
94 out[0] = 0.25*(x + z)*(x + z - 1)*(y - z - 1)*(y - z);
│ │ │ │ -
95 out[1] = -0.25*(x + z)*(y - z)*((x + z + 1)*(-y + z + 1) - 4*z) - z*(x - y);
│ │ │ │ -
96 out[2] = 0.25*(x + z)*(y - z)*(y - z + 1)*(x + z - 1);
│ │ │ │ -
97 out[3] = 0.25*(y - z)*(x + z)*(y - z + 1)*(x + z + 1);
│ │ │ │ -
98 out[4] = z*(2*z - 1);
│ │ │ │ -
99
│ │ │ │ -
100 // lower edges
│ │ │ │ -
101 out[5] = -0.5*(y - z + 1)*(x + z - 1)*(y - 1)*x;
│ │ │ │ -
102 out[6] = -0.5*(y - z + 1)*(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1));
│ │ │ │ -
103 out[7] = -0.5*(x + z - 1)*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1));
│ │ │ │ -
104 out[8] = -0.5*(y - z + 1)*(x + z - 1)*(x + 1)*y;
│ │ │ │ -
105
│ │ │ │ -
106 // upper edges
│ │ │ │ -
107 out[9] = z*(x + z - 1)*(y - z - 1);
│ │ │ │ -
108 out[10] = -z*((x + z + 1)*(y - z - 1) + 4*z);
│ │ │ │ -
109 out[11] = -z*(y - z + 1)*(x + z - 1);
│ │ │ │ -
110 out[12] = z*(y - z + 1)*(x + z + 1);
│ │ │ │ -
111
│ │ │ │ -
112 // base face
│ │ │ │ -
113 out[13] = (y - z + 1)*(x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1));
│ │ │ │ -
114 }
│ │ │ │ -
115 else
│ │ │ │ -
116 {
│ │ │ │ -
117 // vertices
│ │ │ │ -
118 out[0] = 0.25*(y + z)*(y + z - 1)*(x - z - 1)*(x - z);
│ │ │ │ -
119 out[1] = -0.25*(x - z)*(y + z)*(x - z + 1)*(-y - z + 1);
│ │ │ │ -
120 out[2] = 0.25*(x - z)*(y + z)*((x - z - 1)*(y + z + 1) + 4*z) + z*(x - y);
│ │ │ │ -
121 out[3] = 0.25*(y + z)*(x - z)*(x - z + 1)*(y + z + 1);
│ │ │ │ -
122 out[4] = z*(2*z - 1);
│ │ │ │ -
123
│ │ │ │ -
124 // lower edges
│ │ │ │ -
125 out[5] = -0.5*(y + z - 1)*(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1));
│ │ │ │ -
126 out[6] = -0.5*(x - z + 1)*(y + z - 1)*(y + 1)*x;
│ │ │ │ -
127 out[7] = -0.5*(x - z + 1)*(y + z - 1)*(x - 1)*y;
│ │ │ │ -
128 out[8] = -0.5*(x - z + 1)*(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1));
│ │ │ │ -
129
│ │ │ │ -
130 // upper edges
│ │ │ │ -
131 out[9] = z*(y + z - 1)*(x - z - 1);
│ │ │ │ -
132 out[10] = -z*(x - z + 1)*(y + z - 1);
│ │ │ │ -
133 out[11] = -z*((y + z + 1)*(x - z - 1) + 4*z);
│ │ │ │ -
134 out[12] = z*(x - z + 1)*(y + z + 1);
│ │ │ │ -
135
│ │ │ │ -
136 // base face
│ │ │ │ -
137 out[13] = (x - z + 1)*(y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1));
│ │ │ │ -
138 }
│ │ │ │ -
139
│ │ │ │ -
140 return;
│ │ │ │ -
141 }
│ │ │ │ -
142
│ │ │ │ -
143 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateFunction for order " << k);
│ │ │ │ -
144 }
│ │ │ │ -
145
│ │ │ │ -
151 void evaluateJacobian(const typename Traits::DomainType& in,
│ │ │ │ -
152 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
153 {
│ │ │ │ -
154 out.resize(size());
│ │ │ │ -
155
│ │ │ │ -
156 // Specialization for k==0
│ │ │ │ -
157 if (k==0)
│ │ │ │ -
158 {
│ │ │ │ -
159 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ -
160 return;
│ │ │ │ -
161 }
│ │ │ │ -
162
│ │ │ │ -
163 if (k==1)
│ │ │ │ -
164 {
│ │ │ │ -
165 if(in[0] > in[1])
│ │ │ │ -
166 {
│ │ │ │ -
167 out[0][0] = {-1 + in[1], -1 + in[0] + in[2], -1 + in[1]};
│ │ │ │ -
168 out[1][0] = { 1 - in[1], -in[0] - in[2], -in[1]};
│ │ │ │ -
169 out[2][0] = { -in[1], 1 - in[0] - in[2], -in[1]};
│ │ │ │ -
170 out[3][0] = { in[1], in[0] + in[2], in[1]};
│ │ │ │ -
171 }
│ │ │ │ -
172 else
│ │ │ │ -
173 {
│ │ │ │ -
174 out[0][0] = {-1 + in[1] + in[2], -1 + in[0], -1 + in[0]};
│ │ │ │ -
175 out[1][0] = { 1 - in[1] - in[2], -in[0], -in[0]};
│ │ │ │ -
176 out[2][0] = { -in[1] - in[2], 1 - in[0], -in[0]};
│ │ │ │ -
177 out[3][0] = { in[1] + in[2], in[0], in[0]};
│ │ │ │ -
178 }
│ │ │ │ -
179
│ │ │ │ -
180 out[4][0] = {0, 0, 1};
│ │ │ │ -
181 return;
│ │ │ │ -
182 }
│ │ │ │ -
183
│ │ │ │ -
184 if (k==2)
│ │ │ │ -
185 {
│ │ │ │ -
186 // transform to reference element with base [-1,1]^2
│ │ │ │ -
187 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ -
188 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ -
189 const R z = in[2];
│ │ │ │ -
190
│ │ │ │ -
191 // transformation of the gradient leads to a multiplication
│ │ │ │ -
192 // with the Jacobian [2 0 0; 0 2 0; 1 1 1]
│ │ │ │ -
193 if (x > y)
│ │ │ │ -
194 {
│ │ │ │ -
195 // vertices
│ │ │ │ -
196 out[0][0][0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1);
│ │ │ │ -
197 out[0][0][1] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1);
│ │ │ │ -
198 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1])
│ │ │ │ -
199 + 0.25*((2*x + 2*z - 1)*(y - z - 1)*(y - z)
│ │ │ │ -
200 + (x + z)*(x + z - 1)*(-2*y + 2*z + 1));
│ │ │ │ -
201
│ │ │ │ -
202 out[1][0][0] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ -
203 + (x + z)*(y - z)*(-y + z + 1)) - z);
│ │ │ │ -
204 out[1][0][1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ -
205 + (x + z)*(y - z)*(-(x + z + 1))) + z);
│ │ │ │ -
206 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1])
│ │ │ │ -
207 - 0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ -
208 - (x + z)*((x + z + 1)*(-y + z + 1) - 4*z)
│ │ │ │ -
209 + (x + z)*(y - z)*(x - y + 2*z - 2))
│ │ │ │ -
210 - (x - y);
│ │ │ │ -
211
│ │ │ │ -
212 out[2][0][0] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1);
│ │ │ │ -
213 out[2][0][1] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1);
│ │ │ │ -
214 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1])
│ │ │ │ -
215 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z - 1)
│ │ │ │ -
216 + (x + z)*(y - z)*(y - x - 2*z + 2));
│ │ │ │ -
217
│ │ │ │ -
218 out[3][0][0] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1);
│ │ │ │ -
219 out[3][0][1] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1);
│ │ │ │ -
220 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1])
│ │ │ │ -
221 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z + 1)
│ │ │ │ -
222 + (y - z)*(x + z)*(y - x - 2*z));
│ │ │ │ -
223
│ │ │ │ -
224 out[4][0][0] = 0;
│ │ │ │ -
225 out[4][0][1] = 0;
│ │ │ │ -
226 out[4][0][2] = 4*z - 1;
│ │ │ │ -
227
│ │ │ │ -
228 // lower edges
│ │ │ │ -
229 out[5][0][0] = -(y - z + 1)*(y - 1)*(2*x + z - 1);
│ │ │ │ -
230 out[5][0][1] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x;
│ │ │ │ -
231 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1])
│ │ │ │ -
232 + 0.5*(x + z - 1)*(y - 1)*x - 0.5*(y - z + 1)*(y - 1)*x;
│ │ │ │ -
233
│ │ │ │ -
234 out[6][0][0] = -(y - z + 1)*(2*x + z + 1)*(y - 1);
│ │ │ │ -
235 out[6][0][1] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)
│ │ │ │ -
236 + (y - z + 1)*((x + z + 1)*x + 2*z));
│ │ │ │ -
237 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1])
│ │ │ │ -
238 - 0.5*(-(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1))
│ │ │ │ -
239 + (y - z + 1)*(((y - 1)*x - 1) + 2*y + 1));
│ │ │ │ -
240
│ │ │ │ -
241 out[7][0][0] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)
│ │ │ │ -
242 + (x + z - 1)*((y - z - 1)*y + 2*z));
│ │ │ │ -
243 out[7][0][1] = -(x + z - 1)*(2*y - z - 1)*(x + 1);
│ │ │ │ -
244 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1])
│ │ │ │ -
245 - 0.5*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)
│ │ │ │ -
246 + (x + z - 1)*((-(x + 1)*y - 1) + 2*x + 1));
│ │ │ │ -
247
│ │ │ │ -
248 out[8][0][0] = -(y - z + 1)*(2*x + z)*y;
│ │ │ │ -
249 out[8][0][1] = -(2*y - z + 1)*(x + z - 1)*(x + 1);
│ │ │ │ -
250 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1])
│ │ │ │ -
251 - 0.5*(-x + y - 2*z + 2)*(x + 1)*y;
│ │ │ │ -
252
│ │ │ │ -
253 // upper edges
│ │ │ │ -
254 out[9][0][0] = 2*z*(y - z - 1);
│ │ │ │ -
255 out[9][0][1] = 2*z*(x + z - 1);
│ │ │ │ -
256 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1])
│ │ │ │ -
257 + (x + z - 1)*(y - z - 1) + z*(-x + y - 2*z);
│ │ │ │ -
258
│ │ │ │ -
259 out[10][0][0] = -2*z*(y - z - 1);
│ │ │ │ -
260 out[10][0][1] = -2*z*(x + z + 1);
│ │ │ │ -
261 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1])
│ │ │ │ -
262 - ((x + z + 1)*(y - z - 1) + 4*z)
│ │ │ │ -
263 - z*(-x + y - 2*z + 2);
│ │ │ │ -
264
│ │ │ │ -
265 out[11][0][0] = -2*z*(y - z + 1);
│ │ │ │ -
266 out[11][0][1] = -2*z*(x + z - 1);
│ │ │ │ -
267 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1])
│ │ │ │ -
268 - (y - z + 1)*(x + z - 1) - z*(-x + y - 2*z + 2);
│ │ │ │ -
269
│ │ │ │ -
270 out[12][0][0] = 2*z*(y - z + 1);
│ │ │ │ -
271 out[12][0][1] = 2*z*(x + z + 1);
│ │ │ │ -
272 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1])
│ │ │ │ -
273 + (y - z + 1)*(x + z + 1) + z*(-x + y - 2*z);
│ │ │ │ -
274
│ │ │ │ -
275 // base face
│ │ │ │ -
276 out[13][0][0] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ -
277 + (y - z + 1)*(x + z - 1)*(y - 1 + z));
│ │ │ │ -
278 out[13][0][1] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ -
279 + (y - z + 1)*(x + z - 1)*(x + 1 - z));
│ │ │ │ -
280 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1])
│ │ │ │ -
281 + ((-x + y - 2*z + 2)*((y - 1)*(x + 1) + z*(x - y + z + 1))
│ │ │ │ -
282 + (y - z + 1)*(x + z - 1)*(x - y + 2*z + 1));
│ │ │ │ -
283 }
│ │ │ │ -
284 else
│ │ │ │ -
285 {
│ │ │ │ -
286 // vertices
│ │ │ │ -
287 out[0][0][0] = 0.5*(y + z)*(y + z - 1)*(2*x - 2*z - 1);
│ │ │ │ -
288 out[0][0][1] = 0.5*(2*y + 2*z - 1)*(x - z - 1)*(x - z);
│ │ │ │ -
289 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1])
│ │ │ │ -
290 + 0.25*((2*y + 2*z - 1)*(x - z - 1)*(x - z)
│ │ │ │ -
291 + (y + z)*(y + z - 1)*(-2*x + 2*z + 1));
│ │ │ │ -
292
│ │ │ │ -
293 out[1][0][0] = -0.5*(y + z)*(2*x - 2*z + 1)*(-y - z + 1);
│ │ │ │ -
294 out[1][0][1] = -0.5*(x - z)*(x - z + 1)*(-2*y - 2*z + 1);
│ │ │ │ -
295 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1])
│ │ │ │ -
296 - 0.25*((x - y - 2*z)*(x - z + 1)*(-y - z + 1)
│ │ │ │ -
297 + (x - z)*(y + z)*(-x + y + 2*z - 2));
│ │ │ │ -
298
│ │ │ │ -
299 out[2][0][0] = 0.5*((y + z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ -
300 + (x - z)*(y + z)*(y + z + 1) + 4*z);
│ │ │ │ -
301 out[2][0][1] = 0.5*((x - z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ -
302 + (x - z)*(y + z)*(x - z - 1) - 4*z);
│ │ │ │ -
303 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1])
│ │ │ │ -
304 + 0.25*((x - y - 2*z)*((x - z - 1)*(y + z + 1) + 4*z)
│ │ │ │ -
305 + (x - z)*(y + z)*(x - y - 2*z + 2) + 4*(x - y));
│ │ │ │ -
306
│ │ │ │ -
307 out[3][0][0] = 0.5*(y + z)*(2*x - 2*z + 1)*(y + z + 1);
│ │ │ │ -
308 out[3][0][1] = 0.5*(x - z)*(x - z + 1)*(2*y + 2*z + 1);
│ │ │ │ -
309 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1])
│ │ │ │ -
310 + 0.25*((x - y - 2*z)*(x - z + 1)*(y + z + 1)
│ │ │ │ -
311 + (y + z)*(x - z)*(x - y - 2*z));
│ │ │ │ -
312
│ │ │ │ -
313 out[4][0][0] = 0;
│ │ │ │ -
314 out[4][0][1] = 0;
│ │ │ │ -
315 out[4][0][2] = 4*z - 1;
│ │ │ │ -
316
│ │ │ │ -
317 // lower edges
│ │ │ │ -
318 out[5][0][0] = -(y + z - 1)*(2*x - z - 1)*(y + 1);
│ │ │ │ -
319 out[5][0][1] = -(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)
│ │ │ │ -
320 + (y + z - 1)*((x - z - 1)*x + 2*z));
│ │ │ │ -
321 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1])
│ │ │ │ -
322 - 0.5*((((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1))
│ │ │ │ -
323 + (y + z - 1)*((-(y + 1)*x - 1) + 2*y + 1));
│ │ │ │ -
324
│ │ │ │ -
325 out[6][0][0] = -(2*x - z + 1)*(y + z - 1)*(y + 1);
│ │ │ │ -
326 out[6][0][1] = -(x - z + 1)*(2*y + z)*x;
│ │ │ │ -
327 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1])
│ │ │ │ -
328 - 0.5*(x - y - 2*z + 2)*(y + 1)*x;
│ │ │ │ -
329
│ │ │ │ -
330 out[7][0][0] = -(2*x - z)*(y + z - 1)*y;
│ │ │ │ -
331 out[7][0][1] = -(x - z + 1)*(2*y + z - 1)*(x - 1);
│ │ │ │ -
332 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1])
│ │ │ │ -
333 - 0.5*(x - y - 2*z + 2)*(x - 1)*y;
│ │ │ │ -
334
│ │ │ │ -
335 out[8][0][0] = -(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)
│ │ │ │ -
336 + (x - z + 1)*((y + z + 1)*y + 2*z));
│ │ │ │ -
337 out[8][0][1] = -(x - z + 1)*(2*y + z + 1)*(x - 1);
│ │ │ │ -
338 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1])
│ │ │ │ -
339 - 0.5*(-(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1))
│ │ │ │ -
340 + (x - z + 1)*(((x - 1)*y - 1) + 2*x + 1));
│ │ │ │ -
341
│ │ │ │ -
342 // upper edges
│ │ │ │ -
343 out[9][0][0] = 2*z*(y + z - 1);
│ │ │ │ -
344 out[9][0][1] = 2*z*(x - z - 1);
│ │ │ │ -
345 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1])
│ │ │ │ -
346 + (y + z - 1)*(x - z - 1) + z*(x - y - 2*z);
│ │ │ │ -
347
│ │ │ │ -
348 out[10][0][0] = -2*z*(y + z - 1);
│ │ │ │ -
349 out[10][0][1] = -2*z*(x - z + 1);
│ │ │ │ -
350 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1])
│ │ │ │ -
351 - (x - z + 1)*(y + z - 1) - z*(x - y - 2*z + 2);
│ │ │ │ -
352
│ │ │ │ -
353 out[11][0][0] = -2*z*(y + z + 1);
│ │ │ │ -
354 out[11][0][1] = -2*z*(x - z - 1);
│ │ │ │ -
355 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1])
│ │ │ │ -
356 - ((y + z + 1)*(x - z - 1) + 4*z) - z*(x - y - 2*z + 2);
│ │ │ │ -
357
│ │ │ │ -
358 out[12][0][0] = 2*z*(y + z + 1);
│ │ │ │ -
359 out[12][0][1] = 2*z*(x - z + 1);
│ │ │ │ -
360 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1])
│ │ │ │ -
361 + (x - z + 1)*(y + z + 1) + z*(x - y - 2*z);
│ │ │ │ -
362
│ │ │ │ -
363 // base face
│ │ │ │ -
364 out[13][0][0] = 2*((y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ -
365 + (x - z + 1)*(y + z - 1)*(y + 1 - z));
│ │ │ │ -
366 out[13][0][1] = 2*((x - z + 1)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ -
367 + (x - z + 1)*(y + z - 1)*(x - 1 + z));
│ │ │ │ -
368 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1])
│ │ │ │ -
369 + (x - y - 2*z + 2)*((y + 1)*(x - 1) - z*(x - y - z - 1))
│ │ │ │ -
370 + (x - z + 1)*(y + z - 1)*(-(x - y - 2*z - 1));
│ │ │ │ -
371 }
│ │ │ │ -
372
│ │ │ │ -
373 return;
│ │ │ │ -
374 }
│ │ │ │ -
375
│ │ │ │ -
376 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateJacobian for order " << k);
│ │ │ │ -
377 }
│ │ │ │ -
378
│ │ │ │ -
385 void partial(const std::array<unsigned int,3>& order,
│ │ │ │ -
386 const typename Traits::DomainType& in,
│ │ │ │ -
387 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
388 {
│ │ │ │ -
389 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
390
│ │ │ │ -
391 out.resize(size());
│ │ │ │ -
392
│ │ │ │ -
393 if (totalOrder == 0)
│ │ │ │ -
394 {
│ │ │ │ -
395 evaluateFunction(in, out);
│ │ │ │ -
396 return;
│ │ │ │ -
397 }
│ │ │ │ -
398
│ │ │ │ -
399 if (k==0)
│ │ │ │ -
400 {
│ │ │ │ -
401 out[0] = 0;
│ │ │ │ -
402 return;
│ │ │ │ -
403 }
│ │ │ │ -
404
│ │ │ │ -
405 if (k==1)
│ │ │ │ -
406 {
│ │ │ │ -
407 if (totalOrder == 1)
│ │ │ │ -
408 {
│ │ │ │ -
409 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
410 if (in[0] > in[1])
│ │ │ │ -
411 {
│ │ │ │ -
412 switch (direction)
│ │ │ │ -
413 {
│ │ │ │ -
414 case 0:
│ │ │ │ -
415 out[0] = -1 + in[1];
│ │ │ │ -
416 out[1] = 1 - in[1];
│ │ │ │ -
417 out[2] = -in[1];
│ │ │ │ -
418 out[3] = in[1];
│ │ │ │ -
419 out[4] = 0;
│ │ │ │ -
420 break;
│ │ │ │ -
421 case 1:
│ │ │ │ -
422 out[0] = -1 + in[0] + in[2];
│ │ │ │ -
423 out[1] = -in[0] - in[2];
│ │ │ │ -
424 out[2] = 1 - in[0] - in[2];
│ │ │ │ -
425 out[3] = in[0]+in[2];
│ │ │ │ -
426 out[4] = 0;
│ │ │ │ -
427 break;
│ │ │ │ -
428 case 2:
│ │ │ │ -
429 out[0] = -1 + in[1];
│ │ │ │ -
430 out[1] = -in[1];
│ │ │ │ -
431 out[2] = -in[1];
│ │ │ │ -
432 out[3] = in[1];
│ │ │ │ -
433 out[4] = 1;
│ │ │ │ -
434 break;
│ │ │ │ -
435 default:
│ │ │ │ -
436 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
437 }
│ │ │ │ -
438 }
│ │ │ │ -
439 else /* (in[0] <= in[1]) */
│ │ │ │ -
440 {
│ │ │ │ -
441 switch (direction)
│ │ │ │ -
442 {
│ │ │ │ -
443 case 0:
│ │ │ │ -
444 out[0] = -1 + in[1] + in[2];
│ │ │ │ -
445 out[1] = 1 - in[1] - in[2];
│ │ │ │ -
446 out[2] = -in[1] - in[2];
│ │ │ │ -
447 out[3] = in[1] + in[2];
│ │ │ │ -
448 out[4] = 0;
│ │ │ │ -
449 break;
│ │ │ │ -
450 case 1:
│ │ │ │ -
451 out[0] = -1 + in[0];
│ │ │ │ -
452 out[1] = -in[0];
│ │ │ │ -
453 out[2] = 1 - in[0];
│ │ │ │ -
454 out[3] = in[0];
│ │ │ │ -
455 out[4] = 0;
│ │ │ │ -
456 break;
│ │ │ │ -
457 case 2:
│ │ │ │ -
458 out[0] = -1 + in[0];
│ │ │ │ -
459 out[1] = -in[0];
│ │ │ │ -
460 out[2] = -in[0];
│ │ │ │ -
461 out[3] = in[0];
│ │ │ │ -
462 out[4] = 1;
│ │ │ │ -
463 break;
│ │ │ │ -
464 default:
│ │ │ │ -
465 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
466 }
│ │ │ │ -
467 }
│ │ │ │ -
468 } else if (totalOrder == 2)
│ │ │ │ -
469 {
│ │ │ │ -
470 if ((order[0] == 1 && order[1] == 1) ||
│ │ │ │ -
471 (order[1] == 1 && order[2] == 1 && in[0] > in[1]) ||
│ │ │ │ -
472 (order[0] == 1 && order[2] == 1 && in[0] <=in[1]))
│ │ │ │ -
473 {
│ │ │ │ -
474 out = {1, -1, -1, 1, 0};
│ │ │ │ -
475 } else
│ │ │ │ -
476 {
│ │ │ │ -
477 out = {0, 0, 0, 0, 0};
│ │ │ │ -
478 }
│ │ │ │ -
479
│ │ │ │ -
480 } else
│ │ │ │ -
481 {
│ │ │ │ -
482 out = {0, 0, 0, 0, 0};
│ │ │ │ -
483 }
│ │ │ │ -
484
│ │ │ │ -
485 return;
│ │ │ │ -
486 }
│ │ │ │ -
487
│ │ │ │ -
488 if (k==2)
│ │ │ │ -
489 {
│ │ │ │ -
490 if (totalOrder == 1)
│ │ │ │ -
491 {
│ │ │ │ -
492 // transform to reference element with base [-1,1]^2
│ │ │ │ -
493 const R x = 2.0*in[0] + in[2] - 1.0;
│ │ │ │ -
494 const R y = 2.0*in[1] + in[2] - 1.0;
│ │ │ │ -
495 const R z = in[2];
│ │ │ │ -
496
│ │ │ │ -
497 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
498
│ │ │ │ -
499 // transformation of the gradient leads to a multiplication
│ │ │ │ -
500 // with the Jacobian [2 0 0; 0 2 0; 1 1 1]
│ │ │ │ -
501 if (x > y)
│ │ │ │ -
502 {
│ │ │ │ -
503 switch (direction)
│ │ │ │ -
504 {
│ │ │ │ -
505 case 0:
│ │ │ │ -
506 out[0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1);
│ │ │ │ -
507 out[1] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - z)*(-y + z + 1)) - z);
│ │ │ │ -
508 out[2] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1);
│ │ │ │ -
509 out[3] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1);
│ │ │ │ -
510 out[4] = 0;
│ │ │ │ -
511 out[5] = -(y - z + 1)*(2*x + z - 1)*(y - 1);
│ │ │ │ -
512 out[6] = -(y - z + 1)*(2*x + z + 1)*(y - 1);
│ │ │ │ -
513 out[7] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) + (x + z - 1)*((y - z - 1)*y + 2*z));
│ │ │ │ -
514 out[8] = -(y - z + 1)*(2*x + z)*y;
│ │ │ │ -
515 out[9] = 2*z*(y - z - 1);
│ │ │ │ -
516 out[10] = -2*z*(y - z - 1);
│ │ │ │ -
517 out[11] = -2*z*(y - z + 1);
│ │ │ │ -
518 out[12] = 2*z*(y - z + 1);
│ │ │ │ -
519 out[13] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + 1)*(x + z - 1)*(y - 1 + z));
│ │ │ │ -
520 break;
│ │ │ │ -
521 case 1:
│ │ │ │ -
522 out[0] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1);
│ │ │ │ -
523 out[1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - z)*(-(x + z + 1))) + z);
│ │ │ │ -
524 out[2] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1);
│ │ │ │ -
525 out[3] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1);
│ │ │ │ -
526 out[4] = 0;
│ │ │ │ -
527 out[5] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x;
│ │ │ │ -
528 out[6] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) + (y - z + 1)*((x + z + 1)*x + 2*z));
│ │ │ │ -
529 out[7] = -(x + z - 1)*(2*y - z - 1)*(x + 1);
│ │ │ │ -
530 out[8] = -(2*y - z + 1)*(x + z - 1)*(x + 1);
│ │ │ │ -
531 out[9] = 2*z*(x + z - 1);
│ │ │ │ -
532 out[10] = -2*z*(x + z + 1);
│ │ │ │ -
533 out[11] = -2*z*(x + z - 1);
│ │ │ │ -
534 out[12] = 2*z*(x + z + 1);
│ │ │ │ -
535 out[13] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + 1)*(x + z - 1)*(x + 1 - z));
│ │ │ │ -
536 break;
│ │ │ │ -
537 case 2:
│ │ │ │ -
538 out[0] = -((y - z)*(2*x + 2*z - 1)*(z - y + 1))/2;
│ │ │ │ -
539 out[1] = ((y - z + 1)*(y - 2*x + z + 2*x*y - 2*x*z + 2*y*z - 2*z*z))/2;
│ │ │ │ -
540 out[2] = ((y - z)*(2*x + 2*z - 1)*(y - z + 1))/2;
│ │ │ │ -
541 out[3] = ((y - z)*(2*x + 2*z + 1)*(y - z + 1))/2;
│ │ │ │ -
542 out[4] = 4*z - 1;
│ │ │ │ -
543 out[5] = (-(y - z + 1)*(2*x + z - 1)*(y - 1) - (x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x + (x + z - 1)*(y - 1)*x - (y - z + 1)*(y - 1)*x)/2;
│ │ │ │ -
544 out[6] = -((y - z + 1)*(3*y - 2*x + z + 3*x*y + x*z + y*z + x*x - 1))/2;
│ │ │ │ -
545 out[7] = z - z*(2*x + 1) - ((2*z - y*(z - y + 1))*(x + z - 1))/2 - ((2*x - y*(x + 1))*(x + z - 1))/2 + ((x + 1)*(x + z - 1)*(z - 2*y + 1))/2 + y*(x + 1)*(z - y + 1);
│ │ │ │ -
546 out[8] = -((y - z + 1)*(y + z + 3*x*y + x*z + y*z + x*x - 1))/2;
│ │ │ │ -
547 out[9] = -(x + 3*z - 1)*(z - y + 1);
│ │ │ │ -
548 out[10] = (x + z + 1)*(z - y + 1) - 2*y*z - 6*z + 2*z*z;
│ │ │ │ -
549 out[11] = -(x + 3*z - 1)*(y - z + 1);
│ │ │ │ -
550 out[12] = (x + 3*z + 1)*(y - z + 1);
│ │ │ │ -
551 out[13] = (y - z + 1)*(2*y - 3*x + z + 2*x*y + 6*x*z - 2*y*z + 2*x*x + 4*z*z - 3);
│ │ │ │ -
552 break;
│ │ │ │ -
553 default:
│ │ │ │ -
554 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
555 }
│ │ │ │ -
556 }
│ │ │ │ -
557 else // x <= y
│ │ │ │ -
558 {
│ │ │ │ -
559 switch (direction)
│ │ │ │ -
560 {
│ │ │ │ -
561 case 0:
│ │ │ │ -
562 out[0] = -((y + z)*(2*z - 2*x + 1)*(y + z - 1))/2;
│ │ │ │ -
563 out[1] = ((y + z)*(2*x - 2*z + 1)*(y + z - 1))/2;
│ │ │ │ -
564 out[2] = -((y + z + 1)*(y - 3*z - 2*x*y - 2*x*z + 2*y*z + 2*z*z))/2;
│ │ │ │ -
565 out[3] = ((y + z)*(2*x - 2*z + 1)*(y + z + 1))/2;
│ │ │ │ -
566 out[4] = 0;
│ │ │ │ -
567 out[5] = (y + 1)*(y + z - 1)*(z - 2*x + 1);
│ │ │ │ -
568 out[6] = -(y + 1)*(2*x - z + 1)*(y + z - 1);
│ │ │ │ -
569 out[7] = -y*(2*x - z)*(y + z - 1);
│ │ │ │ -
570 out[8] = z - z*(2*x + 1) - (2*z + y*(y + z + 1))*(x - z + 1) - y*(x - 1)*(y + z + 1);
│ │ │ │ -
571 out[9] = 2*z*(y + z - 1);
│ │ │ │ -
572 out[10] = -2*z*(y + z - 1);
│ │ │ │ -
573 out[11] = -2*z*(y + z + 1);
│ │ │ │ -
574 out[12] = 2*z*(y + z + 1);
│ │ │ │ -
575 out[13] = 2*(y + z - 1)*(2*x - z + 2*x*y - 2*x*z + 2*z*z);
│ │ │ │ -
576 break;
│ │ │ │ -
577 case 1:
│ │ │ │ -
578 out[0] = -(x - z)*(y + z - 0.5)*(z - x + 1);
│ │ │ │ -
579 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2;
│ │ │ │ -
580 out[2] = -((z - x + 1)*(x + 3*z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2;
│ │ │ │ -
581 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2;
│ │ │ │ -
582 out[4] = 0;
│ │ │ │ -
583 out[5] = z - z*(2*y + 1) - (2*z - x*(z - x + 1))*(y + z - 1) + x*(y + 1)*(z - x + 1);
│ │ │ │ -
584 out[6] = -x*(2*y + z)*(x - z + 1);
│ │ │ │ -
585 out[7] = -(x - 1)*(x - z + 1)*(2*y + z - 1);
│ │ │ │ -
586 out[8] = -(x - 1)*(x - z + 1)*(2*y + z + 1);
│ │ │ │ -
587 out[9] = -2*z*(z - x + 1);
│ │ │ │ -
588 out[10] = -2*z*(x - z + 1);
│ │ │ │ -
589 out[11] = 2*z*(z - x + 1);
│ │ │ │ -
590 out[12] = 2*z*(x - z + 1);
│ │ │ │ -
591 out[13] = 2*(x - z + 1)*(2*x*y - z - 2*y + 2*y*z + 2*z*z);
│ │ │ │ -
592 break;
│ │ │ │ -
593 case 2:
│ │ │ │ -
594 out[0] = -((x - z)*(2*y + 2*z - 1)*(z - x + 1))/2;
│ │ │ │ -
595 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2;
│ │ │ │ -
596 out[2] = ((x - z + 1)*(x - 2*y + z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2;
│ │ │ │ -
597 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2;
│ │ │ │ -
598 out[4] = 4*z - 1;
│ │ │ │ -
599 out[5] = z - z*(2*y + 1) - ((2*z - x*(z - x + 1))*(y + z - 1))/2 - ((2*y - x*(y + 1))*(y + z - 1))/2 + ((y + 1)*(y + z - 1)*(z - 2*x + 1))/2 + x*(y + 1)*(z - x + 1);
│ │ │ │ -
600 out[6] = -((x - z + 1)*(x + z + 3*x*y + x*z + y*z + y*y - 1))/2;
│ │ │ │ -
601 out[7] = -((x - z + 1)*(3*x*y - 4*y - z - x + x*z + y*z + y*y + 1))/2;
│ │ │ │ -
602 out[8] = -((x - z + 1)*(3*x - 2*y + z + 3*x*y + x*z + y*z + y*y - 1))/2;
│ │ │ │ -
603 out[9] = -(z - x + 1)*(y + 3*z - 1);
│ │ │ │ -
604 out[10] = -(x - z + 1)*(y + 3*z - 1);
│ │ │ │ -
605 out[11] = (y + z + 1)*(z - x + 1) - 2*x*z - 6*z + 2*z*z;
│ │ │ │ -
606 out[12] = (x - z + 1)*(y + 3*z + 1);
│ │ │ │ -
607 out[13] = (x - z + 1)*(2*x - 3*y + z + 2*x*y - 2*x*z + 6*y*z + 2*y*y + 4*z*z - 3);
│ │ │ │ -
608 break;
│ │ │ │ -
609 default:
│ │ │ │ -
610 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
611 }
│ │ │ │ -
612 }
│ │ │ │ -
613 } else {
│ │ │ │ -
614 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
615 }
│ │ │ │ -
616
│ │ │ │ -
617 return;
│ │ │ │ -
618 }
│ │ │ │ -
619
│ │ │ │ -
620 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::partial for order " << k);
│ │ │ │ -
621 }
│ │ │ │ -
622
│ │ │ │ -
624 static constexpr unsigned int order ()
│ │ │ │ -
625 {
│ │ │ │ -
626 return k;
│ │ │ │ -
627 }
│ │ │ │ -
628 };
│ │ │ │ -
629
│ │ │ │ -
634 template<unsigned int k>
│ │ │ │ -
635 class LagrangePyramidLocalCoefficients
│ │ │ │ -
636 {
│ │ │ │ -
637 public:
│ │ │ │ -
639 LagrangePyramidLocalCoefficients ()
│ │ │ │ -
640 : localKeys_(size())
│ │ │ │ -
641 {
│ │ │ │ -
642 if (k==0)
│ │ │ │ -
643 {
│ │ │ │ -
644 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ -
645 return;
│ │ │ │ -
646 }
│ │ │ │ -
647
│ │ │ │ -
648 if (k==1)
│ │ │ │ -
649 {
│ │ │ │ -
650 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
651 localKeys_[i] = LocalKey(i,3,0);
│ │ │ │ -
652 return;
│ │ │ │ -
653 }
│ │ │ │ -
654
│ │ │ │ -
655 if (k==2)
│ │ │ │ -
656 {
│ │ │ │ -
657 // Vertex shape functions
│ │ │ │ -
658 localKeys_[0] = LocalKey(0,3,0);
│ │ │ │ -
659 localKeys_[1] = LocalKey(1,3,0);
│ │ │ │ -
660 localKeys_[2] = LocalKey(2,3,0);
│ │ │ │ -
661 localKeys_[3] = LocalKey(3,3,0);
│ │ │ │ -
662 localKeys_[4] = LocalKey(4,3,0);
│ │ │ │ -
663
│ │ │ │ -
664 // Edge shape functions
│ │ │ │ -
665 localKeys_[5] = LocalKey(0,2,0);
│ │ │ │ -
666 localKeys_[6] = LocalKey(1,2,0);
│ │ │ │ -
667 localKeys_[7] = LocalKey(2,2,0);
│ │ │ │ -
668 localKeys_[8] = LocalKey(3,2,0);
│ │ │ │ -
669 localKeys_[9] = LocalKey(4,2,0);
│ │ │ │ -
670 localKeys_[10] = LocalKey(5,2,0);
│ │ │ │ -
671 localKeys_[11] = LocalKey(6,2,0);
│ │ │ │ -
672 localKeys_[12] = LocalKey(7,2,0);
│ │ │ │ -
673
│ │ │ │ -
674 // base face shape function
│ │ │ │ -
675 localKeys_[13] = LocalKey(0,1,0);
│ │ │ │ -
676
│ │ │ │ -
677 return;
│ │ │ │ -
678 }
│ │ │ │ -
679
│ │ │ │ -
680 // No general case
│ │ │ │ -
681 DUNE_THROW(NotImplemented, "LagrangePyramidLocalCoefficients for order " << k);
│ │ │ │ -
682
│ │ │ │ -
683 }
│ │ │ │ -
684
│ │ │ │ -
686 static constexpr std::size_t size ()
│ │ │ │ -
687 {
│ │ │ │ -
688 std::size_t result = 0;
│ │ │ │ -
689 for (unsigned int i=0; i<=k; i++)
│ │ │ │ -
690 result += power(i+1,2);
│ │ │ │ -
691 return result;
│ │ │ │ -
692 }
│ │ │ │ -
693
│ │ │ │ -
695 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
696 {
│ │ │ │ -
697 return localKeys_[i];
│ │ │ │ -
698 }
│ │ │ │ -
699
│ │ │ │ -
700 private:
│ │ │ │ -
701 std::vector<LocalKey> localKeys_;
│ │ │ │ -
702 };
│ │ │ │ -
703
│ │ │ │ -
708 template<class LocalBasis>
│ │ │ │ -
709 class LagrangePyramidLocalInterpolation
│ │ │ │ -
710 {
│ │ │ │ -
711 public:
│ │ │ │ -
712
│ │ │ │ -
720 template<typename F, typename C>
│ │ │ │ -
721 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
722 {
│ │ │ │ -
723 constexpr auto k = LocalBasis::order();
│ │ │ │ -
724 using D = typename LocalBasis::Traits::DomainType;
│ │ │ │ -
725 using DF = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ -
726
│ │ │ │ -
727 auto&& f = Impl::makeFunctionWithCallOperator<D>(ff);
│ │ │ │ -
728
│ │ │ │ -
729 out.resize(LocalBasis::size());
│ │ │ │ -
730
│ │ │ │ -
731 // Specialization for zero-order case
│ │ │ │ -
732 if (k==0)
│ │ │ │ -
733 {
│ │ │ │ -
734 auto center = ReferenceElements<DF,3>::general(GeometryTypes::pyramid).position(0,0);
│ │ │ │ -
735 out[0] = f(center);
│ │ │ │ -
736 return;
│ │ │ │ -
737 }
│ │ │ │ -
738
│ │ │ │ -
739 // Specialization for first-order case
│ │ │ │ -
740 if (k==1)
│ │ │ │ -
741 {
│ │ │ │ -
742 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ -
743 {
│ │ │ │ -
744 auto vertex = ReferenceElements<DF,3>::general(GeometryTypes::pyramid).position(i,3);
│ │ │ │ -
745 out[i] = f(vertex);
│ │ │ │ -
746 }
│ │ │ │ -
747 return;
│ │ │ │ -
748 }
│ │ │ │ -
749
│ │ │ │ -
750 // Specialization for second-order case
│ │ │ │ -
751 if (k==2)
│ │ │ │ -
752 {
│ │ │ │ -
753 out[0] = f( D( {0.0, 0.0, 0.0} ) );
│ │ │ │ -
754 out[1] = f( D( {1.0, 0.0, 0.0} ) );
│ │ │ │ -
755 out[2] = f( D( {0.0, 1.0, 0.0} ) );
│ │ │ │ -
756 out[3] = f( D( {1.0, 1.0, 0.0} ) );
│ │ │ │ -
757 out[4] = f( D( {0.0, 0.0, 1.0} ) );
│ │ │ │ -
758 out[5] = f( D( {0.0, 0.5, 0.0} ) );
│ │ │ │ -
759 out[6] = f( D( {1.0, 0.5, 0.0} ) );
│ │ │ │ -
760 out[7] = f( D( {0.5, 0.0, 0.0} ) );
│ │ │ │ -
761 out[8] = f( D( {0.5, 1.0, 0.0} ) );
│ │ │ │ -
762 out[9] = f( D( {0.0, 0.0, 0.5} ) );
│ │ │ │ -
763 out[10] = f( D( {0.5, 0.0, 0.5} ) );
│ │ │ │ -
764 out[11] = f( D( {0.0, 0.5, 0.5} ) );
│ │ │ │ -
765 out[12] = f( D( {0.5, 0.5, 0.5} ) );
│ │ │ │ -
766 out[13] = f( D( {0.5, 0.5, 0.0} ) );
│ │ │ │ -
767
│ │ │ │ -
768 return;
│ │ │ │ -
769 }
│ │ │ │ -
770
│ │ │ │ -
771 DUNE_THROW(NotImplemented, "LagrangePyramidLocalInterpolation not implemented for order " << k);
│ │ │ │ -
772 }
│ │ │ │ -
773
│ │ │ │ -
774 };
│ │ │ │ -
775
│ │ │ │ -
776} } // namespace Dune::Impl
│ │ │ │ -
777
│ │ │ │ -
778namespace Dune
│ │ │ │ -
779{
│ │ │ │ -
810 template<class D, class R, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
812 {
│ │ │ │ -
813 public:
│ │ │ │ - │ │ │ │ -
817 Impl::LagrangePyramidLocalCoefficients<k>,
│ │ │ │ -
818 Impl::LagrangePyramidLocalInterpolation<Impl::LagrangePyramidLocalBasis<D,R,k> > >;
│ │ │ │ -
819
│ │ │ │ - │ │ │ │ -
826
│ │ │ │ -
│ │ │ │ -
829 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
830 {
│ │ │ │ -
831 return basis_;
│ │ │ │ -
832 }
│ │ │ │ -
│ │ │ │ -
833
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
837 {
│ │ │ │ -
838 return coefficients_;
│ │ │ │ -
839 }
│ │ │ │ -
│ │ │ │ -
840
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
844 {
│ │ │ │ -
845 return interpolation_;
│ │ │ │ -
846 }
│ │ │ │ -
│ │ │ │ -
847
│ │ │ │ -
│ │ │ │ -
849 static constexpr std::size_t size ()
│ │ │ │ -
850 {
│ │ │ │ -
851 return Impl::LagrangePyramidLocalBasis<D,R,k>::size();
│ │ │ │ -
852 }
│ │ │ │ -
│ │ │ │ -
853
│ │ │ │ -
│ │ │ │ -
856 static constexpr GeometryType type ()
│ │ │ │ -
857 {
│ │ │ │ -
858 return GeometryTypes::pyramid;
│ │ │ │ -
859 }
│ │ │ │ -
│ │ │ │ -
860
│ │ │ │ -
861 private:
│ │ │ │ -
862 Impl::LagrangePyramidLocalBasis<D,R,k> basis_;
│ │ │ │ -
863 Impl::LagrangePyramidLocalCoefficients<k> coefficients_;
│ │ │ │ -
864 Impl::LagrangePyramidLocalInterpolation<Impl::LagrangePyramidLocalBasis<D,R,k> > interpolation_;
│ │ │ │ -
865 };
│ │ │ │ -
│ │ │ │ -
866
│ │ │ │ -
867} // namespace Dune
│ │ │ │ -
868
│ │ │ │ -
869#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
53 return li[i];
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
56 private:
│ │ │ │ +
57 std::vector<LocalKey> li;
│ │ │ │ +
58 };
│ │ │ │ +
│ │ │ │ +
59}
│ │ │ │ +
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangepyramid.hh:836
│ │ │ │ -
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangepyramid.hh:849
│ │ │ │ -
LagrangePyramidLocalFiniteElement()
Default constructor.
Definition lagrangepyramid.hh:825
│ │ │ │ -
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangepyramid.hh:856
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangepyramid.hh:829
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangepyramid.hh:843
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on quadrilaterals.
Definition raviartthomas1cube3dlocalcoefficients.hh:24
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas1cube3dlocalcoefficients.hh:45
│ │ │ │ +
RT1Cube3DLocalCoefficients()
Standard constructor.
Definition raviartthomas1cube3dlocalcoefficients.hh:28
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas1cube3dlocalcoefficients.hh:51
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,871 +1,83 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangepyramid.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_c_u_b_e_3_d │ │ │ │ │ +raviartthomas1cube3dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { namespace Impl │ │ │ │ │ -23{ │ │ │ │ │ -33 template │ │ │ │ │ -34 class LagrangePyramidLocalBasis │ │ │ │ │ -35 { │ │ │ │ │ -36 public: │ │ │ │ │ -37 using Traits = │ │ │ │ │ -LocalBasisTraits,R,1,FieldVector,FieldMatrix │ │ │ │ │ ->; │ │ │ │ │ -38 │ │ │ │ │ -41 static constexpr std::size_t size () │ │ │ │ │ -42 { │ │ │ │ │ -43 std::size_t result = 0; │ │ │ │ │ -44 for (unsigned int i=0; i<=k; i++) │ │ │ │ │ -45 result += power(i+1,2); │ │ │ │ │ -46 return result; │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -50 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -51 std::vector& out) const │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +_2_3 class _R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ +25 │ │ │ │ │ +26 public: │ │ │ │ │ +_2_8 _R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(36) │ │ │ │ │ +29 { │ │ │ │ │ +30 for (std::size_t i = 0; i < 6; i++) │ │ │ │ │ +31 { │ │ │ │ │ +32 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +33 li[i + 6] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +34 li[i + 12] = _L_o_c_a_l_K_e_y(i,1,2); │ │ │ │ │ +35 li[i + 18] = _L_o_c_a_l_K_e_y(i,1,3); │ │ │ │ │ +36 } │ │ │ │ │ +37 │ │ │ │ │ +38 for (std::size_t i = 0; i < 12; i++) │ │ │ │ │ +39 { │ │ │ │ │ +40 li[i + 24] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ +41 } │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_5 std::size_t _s_i_z_e () const │ │ │ │ │ +46 { │ │ │ │ │ +47 return 36; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_1 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ 52 { │ │ │ │ │ -53 out.resize(size()); │ │ │ │ │ -54 │ │ │ │ │ -55 // Specialization for zero-order case │ │ │ │ │ -56 if (k==0) │ │ │ │ │ -57 { │ │ │ │ │ -58 out[0] = 1; │ │ │ │ │ -59 return; │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -62 if (k==1) │ │ │ │ │ -63 { │ │ │ │ │ -64 if(in[0] > in[1]) │ │ │ │ │ -65 { │ │ │ │ │ -66 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[1]); │ │ │ │ │ -67 out[1] = in[0]*(1-in[1])-in[2]*in[1]; │ │ │ │ │ -68 out[2] = (1-in[0])*in[1]-in[2]*in[1]; │ │ │ │ │ -69 out[3] = in[0]*in[1]+in[2]*in[1]; │ │ │ │ │ -70 } │ │ │ │ │ -71 else │ │ │ │ │ -72 { │ │ │ │ │ -73 out[0] = (1-in[0])*(1-in[1])-in[2]*(1-in[0]); │ │ │ │ │ -74 out[1] = in[0]*(1-in[1])-in[2]*in[0]; │ │ │ │ │ -75 out[2] = (1-in[0])*in[1]-in[2]*in[0]; │ │ │ │ │ -76 out[3] = in[0]*in[1]+in[2]*in[0]; │ │ │ │ │ -77 } │ │ │ │ │ -78 │ │ │ │ │ -79 out[4] = in[2]; │ │ │ │ │ -80 │ │ │ │ │ -81 return; │ │ │ │ │ -82 } │ │ │ │ │ -83 │ │ │ │ │ -84 if (k==2) │ │ │ │ │ -85 { │ │ │ │ │ -86 // transform to reference element with base [-1,1]^2 │ │ │ │ │ -87 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ -88 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ -89 const R z = in[2]; │ │ │ │ │ -90 │ │ │ │ │ -91 if (x > y) │ │ │ │ │ -92 { │ │ │ │ │ -93 // vertices │ │ │ │ │ -94 out[0] = 0.25*(x + z)*(x + z - 1)*(y - z - 1)*(y - z); │ │ │ │ │ -95 out[1] = -0.25*(x + z)*(y - z)*((x + z + 1)*(-y + z + 1) - 4*z) - z*(x - y); │ │ │ │ │ -96 out[2] = 0.25*(x + z)*(y - z)*(y - z + 1)*(x + z - 1); │ │ │ │ │ -97 out[3] = 0.25*(y - z)*(x + z)*(y - z + 1)*(x + z + 1); │ │ │ │ │ -98 out[4] = z*(2*z - 1); │ │ │ │ │ -99 │ │ │ │ │ -100 // lower edges │ │ │ │ │ -101 out[5] = -0.5*(y - z + 1)*(x + z - 1)*(y - 1)*x; │ │ │ │ │ -102 out[6] = -0.5*(y - z + 1)*(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)); │ │ │ │ │ -103 out[7] = -0.5*(x + z - 1)*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1)); │ │ │ │ │ -104 out[8] = -0.5*(y - z + 1)*(x + z - 1)*(x + 1)*y; │ │ │ │ │ -105 │ │ │ │ │ -106 // upper edges │ │ │ │ │ -107 out[9] = z*(x + z - 1)*(y - z - 1); │ │ │ │ │ -108 out[10] = -z*((x + z + 1)*(y - z - 1) + 4*z); │ │ │ │ │ -109 out[11] = -z*(y - z + 1)*(x + z - 1); │ │ │ │ │ -110 out[12] = z*(y - z + 1)*(x + z + 1); │ │ │ │ │ -111 │ │ │ │ │ -112 // base face │ │ │ │ │ -113 out[13] = (y - z + 1)*(x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)); │ │ │ │ │ -114 } │ │ │ │ │ -115 else │ │ │ │ │ -116 { │ │ │ │ │ -117 // vertices │ │ │ │ │ -118 out[0] = 0.25*(y + z)*(y + z - 1)*(x - z - 1)*(x - z); │ │ │ │ │ -119 out[1] = -0.25*(x - z)*(y + z)*(x - z + 1)*(-y - z + 1); │ │ │ │ │ -120 out[2] = 0.25*(x - z)*(y + z)*((x - z - 1)*(y + z + 1) + 4*z) + z*(x - y); │ │ │ │ │ -121 out[3] = 0.25*(y + z)*(x - z)*(x - z + 1)*(y + z + 1); │ │ │ │ │ -122 out[4] = z*(2*z - 1); │ │ │ │ │ -123 │ │ │ │ │ -124 // lower edges │ │ │ │ │ -125 out[5] = -0.5*(y + z - 1)*(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)); │ │ │ │ │ -126 out[6] = -0.5*(x - z + 1)*(y + z - 1)*(y + 1)*x; │ │ │ │ │ -127 out[7] = -0.5*(x - z + 1)*(y + z - 1)*(x - 1)*y; │ │ │ │ │ -128 out[8] = -0.5*(x - z + 1)*(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)); │ │ │ │ │ -129 │ │ │ │ │ -130 // upper edges │ │ │ │ │ -131 out[9] = z*(y + z - 1)*(x - z - 1); │ │ │ │ │ -132 out[10] = -z*(x - z + 1)*(y + z - 1); │ │ │ │ │ -133 out[11] = -z*((y + z + 1)*(x - z - 1) + 4*z); │ │ │ │ │ -134 out[12] = z*(x - z + 1)*(y + z + 1); │ │ │ │ │ -135 │ │ │ │ │ -136 // base face │ │ │ │ │ -137 out[13] = (x - z + 1)*(y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)); │ │ │ │ │ -138 } │ │ │ │ │ -139 │ │ │ │ │ -140 return; │ │ │ │ │ -141 } │ │ │ │ │ -142 │ │ │ │ │ -143 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateFunction for │ │ │ │ │ -order " << k); │ │ │ │ │ -144 } │ │ │ │ │ -145 │ │ │ │ │ -151 void evaluateJacobian(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -152 std::vector& out) const │ │ │ │ │ -153 { │ │ │ │ │ -154 out.resize(size()); │ │ │ │ │ -155 │ │ │ │ │ -156 // Specialization for k==0 │ │ │ │ │ -157 if (k==0) │ │ │ │ │ -158 { │ │ │ │ │ -159 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ -160 return; │ │ │ │ │ -161 } │ │ │ │ │ -162 │ │ │ │ │ -163 if (k==1) │ │ │ │ │ -164 { │ │ │ │ │ -165 if(in[0] > in[1]) │ │ │ │ │ -166 { │ │ │ │ │ -167 out[0][0] = {-1 + in[1], -1 + in[0] + in[2], -1 + in[1]}; │ │ │ │ │ -168 out[1][0] = { 1 - in[1], -in[0] - in[2], -in[1]}; │ │ │ │ │ -169 out[2][0] = { -in[1], 1 - in[0] - in[2], -in[1]}; │ │ │ │ │ -170 out[3][0] = { in[1], in[0] + in[2], in[1]}; │ │ │ │ │ -171 } │ │ │ │ │ -172 else │ │ │ │ │ -173 { │ │ │ │ │ -174 out[0][0] = {-1 + in[1] + in[2], -1 + in[0], -1 + in[0]}; │ │ │ │ │ -175 out[1][0] = { 1 - in[1] - in[2], -in[0], -in[0]}; │ │ │ │ │ -176 out[2][0] = { -in[1] - in[2], 1 - in[0], -in[0]}; │ │ │ │ │ -177 out[3][0] = { in[1] + in[2], in[0], in[0]}; │ │ │ │ │ -178 } │ │ │ │ │ -179 │ │ │ │ │ -180 out[4][0] = {0, 0, 1}; │ │ │ │ │ -181 return; │ │ │ │ │ -182 } │ │ │ │ │ -183 │ │ │ │ │ -184 if (k==2) │ │ │ │ │ -185 { │ │ │ │ │ -186 // transform to reference element with base [-1,1]^2 │ │ │ │ │ -187 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ -188 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ -189 const R z = in[2]; │ │ │ │ │ -190 │ │ │ │ │ -191 // transformation of the gradient leads to a multiplication │ │ │ │ │ -192 // with the Jacobian [2 0 0; 0 2 0; 1 1 1] │ │ │ │ │ -193 if (x > y) │ │ │ │ │ -194 { │ │ │ │ │ -195 // vertices │ │ │ │ │ -196 out[0][0][0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1); │ │ │ │ │ -197 out[0][0][1] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1); │ │ │ │ │ -198 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1]) │ │ │ │ │ -199 + 0.25*((2*x + 2*z - 1)*(y - z - 1)*(y - z) │ │ │ │ │ -200 + (x + z)*(x + z - 1)*(-2*y + 2*z + 1)); │ │ │ │ │ -201 │ │ │ │ │ -202 out[1][0][0] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ -203 + (x + z)*(y - z)*(-y + z + 1)) - z); │ │ │ │ │ -204 out[1][0][1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ -205 + (x + z)*(y - z)*(-(x + z + 1))) + z); │ │ │ │ │ -206 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1]) │ │ │ │ │ -207 - 0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ -208 - (x + z)*((x + z + 1)*(-y + z + 1) - 4*z) │ │ │ │ │ -209 + (x + z)*(y - z)*(x - y + 2*z - 2)) │ │ │ │ │ -210 - (x - y); │ │ │ │ │ -211 │ │ │ │ │ -212 out[2][0][0] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1); │ │ │ │ │ -213 out[2][0][1] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1); │ │ │ │ │ -214 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1]) │ │ │ │ │ -215 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z - 1) │ │ │ │ │ -216 + (x + z)*(y - z)*(y - x - 2*z + 2)); │ │ │ │ │ -217 │ │ │ │ │ -218 out[3][0][0] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1); │ │ │ │ │ -219 out[3][0][1] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1); │ │ │ │ │ -220 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1]) │ │ │ │ │ -221 + 0.25*((y - x - 2*z)*(y - z + 1)*(x + z + 1) │ │ │ │ │ -222 + (y - z)*(x + z)*(y - x - 2*z)); │ │ │ │ │ -223 │ │ │ │ │ -224 out[4][0][0] = 0; │ │ │ │ │ -225 out[4][0][1] = 0; │ │ │ │ │ -226 out[4][0][2] = 4*z - 1; │ │ │ │ │ -227 │ │ │ │ │ -228 // lower edges │ │ │ │ │ -229 out[5][0][0] = -(y - z + 1)*(y - 1)*(2*x + z - 1); │ │ │ │ │ -230 out[5][0][1] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x; │ │ │ │ │ -231 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1]) │ │ │ │ │ -232 + 0.5*(x + z - 1)*(y - 1)*x - 0.5*(y - z + 1)*(y - 1)*x; │ │ │ │ │ -233 │ │ │ │ │ -234 out[6][0][0] = -(y - z + 1)*(2*x + z + 1)*(y - 1); │ │ │ │ │ -235 out[6][0][1] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) │ │ │ │ │ -236 + (y - z + 1)*((x + z + 1)*x + 2*z)); │ │ │ │ │ -237 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1]) │ │ │ │ │ -238 - 0.5*(-(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1)) │ │ │ │ │ -239 + (y - z + 1)*(((y - 1)*x - 1) + 2*y + 1)); │ │ │ │ │ -240 │ │ │ │ │ -241 out[7][0][0] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) │ │ │ │ │ -242 + (x + z - 1)*((y - z - 1)*y + 2*z)); │ │ │ │ │ -243 out[7][0][1] = -(x + z - 1)*(2*y - z - 1)*(x + 1); │ │ │ │ │ -244 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1]) │ │ │ │ │ -245 - 0.5*(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) │ │ │ │ │ -246 + (x + z - 1)*((-(x + 1)*y - 1) + 2*x + 1)); │ │ │ │ │ -247 │ │ │ │ │ -248 out[8][0][0] = -(y - z + 1)*(2*x + z)*y; │ │ │ │ │ -249 out[8][0][1] = -(2*y - z + 1)*(x + z - 1)*(x + 1); │ │ │ │ │ -250 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1]) │ │ │ │ │ -251 - 0.5*(-x + y - 2*z + 2)*(x + 1)*y; │ │ │ │ │ -252 │ │ │ │ │ -253 // upper edges │ │ │ │ │ -254 out[9][0][0] = 2*z*(y - z - 1); │ │ │ │ │ -255 out[9][0][1] = 2*z*(x + z - 1); │ │ │ │ │ -256 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1]) │ │ │ │ │ -257 + (x + z - 1)*(y - z - 1) + z*(-x + y - 2*z); │ │ │ │ │ -258 │ │ │ │ │ -259 out[10][0][0] = -2*z*(y - z - 1); │ │ │ │ │ -260 out[10][0][1] = -2*z*(x + z + 1); │ │ │ │ │ -261 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1]) │ │ │ │ │ -262 - ((x + z + 1)*(y - z - 1) + 4*z) │ │ │ │ │ -263 - z*(-x + y - 2*z + 2); │ │ │ │ │ -264 │ │ │ │ │ -265 out[11][0][0] = -2*z*(y - z + 1); │ │ │ │ │ -266 out[11][0][1] = -2*z*(x + z - 1); │ │ │ │ │ -267 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1]) │ │ │ │ │ -268 - (y - z + 1)*(x + z - 1) - z*(-x + y - 2*z + 2); │ │ │ │ │ -269 │ │ │ │ │ -270 out[12][0][0] = 2*z*(y - z + 1); │ │ │ │ │ -271 out[12][0][1] = 2*z*(x + z + 1); │ │ │ │ │ -272 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1]) │ │ │ │ │ -273 + (y - z + 1)*(x + z + 1) + z*(-x + y - 2*z); │ │ │ │ │ -274 │ │ │ │ │ -275 // base face │ │ │ │ │ -276 out[13][0][0] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ -277 + (y - z + 1)*(x + z - 1)*(y - 1 + z)); │ │ │ │ │ -278 out[13][0][1] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ -279 + (y - z + 1)*(x + z - 1)*(x + 1 - z)); │ │ │ │ │ -280 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1]) │ │ │ │ │ -281 + ((-x + y - 2*z + 2)*((y - 1)*(x + 1) + z*(x - y + z + 1)) │ │ │ │ │ -282 + (y - z + 1)*(x + z - 1)*(x - y + 2*z + 1)); │ │ │ │ │ -283 } │ │ │ │ │ -284 else │ │ │ │ │ -285 { │ │ │ │ │ -286 // vertices │ │ │ │ │ -287 out[0][0][0] = 0.5*(y + z)*(y + z - 1)*(2*x - 2*z - 1); │ │ │ │ │ -288 out[0][0][1] = 0.5*(2*y + 2*z - 1)*(x - z - 1)*(x - z); │ │ │ │ │ -289 out[0][0][2] = 0.5*(out[0][0][0] + out[0][0][1]) │ │ │ │ │ -290 + 0.25*((2*y + 2*z - 1)*(x - z - 1)*(x - z) │ │ │ │ │ -291 + (y + z)*(y + z - 1)*(-2*x + 2*z + 1)); │ │ │ │ │ -292 │ │ │ │ │ -293 out[1][0][0] = -0.5*(y + z)*(2*x - 2*z + 1)*(-y - z + 1); │ │ │ │ │ -294 out[1][0][1] = -0.5*(x - z)*(x - z + 1)*(-2*y - 2*z + 1); │ │ │ │ │ -295 out[1][0][2] = 0.5*(out[1][0][0] + out[1][0][1]) │ │ │ │ │ -296 - 0.25*((x - y - 2*z)*(x - z + 1)*(-y - z + 1) │ │ │ │ │ -297 + (x - z)*(y + z)*(-x + y + 2*z - 2)); │ │ │ │ │ -298 │ │ │ │ │ -299 out[2][0][0] = 0.5*((y + z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ -300 + (x - z)*(y + z)*(y + z + 1) + 4*z); │ │ │ │ │ -301 out[2][0][1] = 0.5*((x - z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ -302 + (x - z)*(y + z)*(x - z - 1) - 4*z); │ │ │ │ │ -303 out[2][0][2] = 0.5*(out[2][0][0] + out[2][0][1]) │ │ │ │ │ -304 + 0.25*((x - y - 2*z)*((x - z - 1)*(y + z + 1) + 4*z) │ │ │ │ │ -305 + (x - z)*(y + z)*(x - y - 2*z + 2) + 4*(x - y)); │ │ │ │ │ -306 │ │ │ │ │ -307 out[3][0][0] = 0.5*(y + z)*(2*x - 2*z + 1)*(y + z + 1); │ │ │ │ │ -308 out[3][0][1] = 0.5*(x - z)*(x - z + 1)*(2*y + 2*z + 1); │ │ │ │ │ -309 out[3][0][2] = 0.5*(out[3][0][0] + out[3][0][1]) │ │ │ │ │ -310 + 0.25*((x - y - 2*z)*(x - z + 1)*(y + z + 1) │ │ │ │ │ -311 + (y + z)*(x - z)*(x - y - 2*z)); │ │ │ │ │ -312 │ │ │ │ │ -313 out[4][0][0] = 0; │ │ │ │ │ -314 out[4][0][1] = 0; │ │ │ │ │ -315 out[4][0][2] = 4*z - 1; │ │ │ │ │ -316 │ │ │ │ │ -317 // lower edges │ │ │ │ │ -318 out[5][0][0] = -(y + z - 1)*(2*x - z - 1)*(y + 1); │ │ │ │ │ -319 out[5][0][1] = -(((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1) │ │ │ │ │ -320 + (y + z - 1)*((x - z - 1)*x + 2*z)); │ │ │ │ │ -321 out[5][0][2] = 0.5*(out[5][0][0] + out[5][0][1]) │ │ │ │ │ -322 - 0.5*((((x - z - 1)*(y + 1)*x - z) + z*(2*y + 1)) │ │ │ │ │ -323 + (y + z - 1)*((-(y + 1)*x - 1) + 2*y + 1)); │ │ │ │ │ -324 │ │ │ │ │ -325 out[6][0][0] = -(2*x - z + 1)*(y + z - 1)*(y + 1); │ │ │ │ │ -326 out[6][0][1] = -(x - z + 1)*(2*y + z)*x; │ │ │ │ │ -327 out[6][0][2] = 0.5*(out[6][0][0] + out[6][0][1]) │ │ │ │ │ -328 - 0.5*(x - y - 2*z + 2)*(y + 1)*x; │ │ │ │ │ -329 │ │ │ │ │ -330 out[7][0][0] = -(2*x - z)*(y + z - 1)*y; │ │ │ │ │ -331 out[7][0][1] = -(x - z + 1)*(2*y + z - 1)*(x - 1); │ │ │ │ │ -332 out[7][0][2] = 0.5*(out[7][0][0] + out[7][0][1]) │ │ │ │ │ -333 - 0.5*(x - y - 2*z + 2)*(x - 1)*y; │ │ │ │ │ -334 │ │ │ │ │ -335 out[8][0][0] = -(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1) │ │ │ │ │ -336 + (x - z + 1)*((y + z + 1)*y + 2*z)); │ │ │ │ │ -337 out[8][0][1] = -(x - z + 1)*(2*y + z + 1)*(x - 1); │ │ │ │ │ -338 out[8][0][2] = 0.5*(out[8][0][0] + out[8][0][1]) │ │ │ │ │ -339 - 0.5*(-(((y + z + 1)*(x - 1)*y - z) + z*(2*x + 1)) │ │ │ │ │ -340 + (x - z + 1)*(((x - 1)*y - 1) + 2*x + 1)); │ │ │ │ │ -341 │ │ │ │ │ -342 // upper edges │ │ │ │ │ -343 out[9][0][0] = 2*z*(y + z - 1); │ │ │ │ │ -344 out[9][0][1] = 2*z*(x - z - 1); │ │ │ │ │ -345 out[9][0][2] = 0.5*(out[9][0][0] + out[9][0][1]) │ │ │ │ │ -346 + (y + z - 1)*(x - z - 1) + z*(x - y - 2*z); │ │ │ │ │ -347 │ │ │ │ │ -348 out[10][0][0] = -2*z*(y + z - 1); │ │ │ │ │ -349 out[10][0][1] = -2*z*(x - z + 1); │ │ │ │ │ -350 out[10][0][2] = 0.5*(out[10][0][0] + out[10][0][1]) │ │ │ │ │ -351 - (x - z + 1)*(y + z - 1) - z*(x - y - 2*z + 2); │ │ │ │ │ -352 │ │ │ │ │ -353 out[11][0][0] = -2*z*(y + z + 1); │ │ │ │ │ -354 out[11][0][1] = -2*z*(x - z - 1); │ │ │ │ │ -355 out[11][0][2] = 0.5*(out[11][0][0] + out[11][0][1]) │ │ │ │ │ -356 - ((y + z + 1)*(x - z - 1) + 4*z) - z*(x - y - 2*z + 2); │ │ │ │ │ -357 │ │ │ │ │ -358 out[12][0][0] = 2*z*(y + z + 1); │ │ │ │ │ -359 out[12][0][1] = 2*z*(x - z + 1); │ │ │ │ │ -360 out[12][0][2] = 0.5*(out[12][0][0] + out[12][0][1]) │ │ │ │ │ -361 + (x - z + 1)*(y + z + 1) + z*(x - y - 2*z); │ │ │ │ │ -362 │ │ │ │ │ -363 // base face │ │ │ │ │ -364 out[13][0][0] = 2*((y + z - 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ -365 + (x - z + 1)*(y + z - 1)*(y + 1 - z)); │ │ │ │ │ -366 out[13][0][1] = 2*((x - z + 1)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ -367 + (x - z + 1)*(y + z - 1)*(x - 1 + z)); │ │ │ │ │ -368 out[13][0][2] = 0.5*(out[13][0][0] + out[13][0][1]) │ │ │ │ │ -369 + (x - y - 2*z + 2)*((y + 1)*(x - 1) - z*(x - y - z - 1)) │ │ │ │ │ -370 + (x - z + 1)*(y + z - 1)*(-(x - y - 2*z - 1)); │ │ │ │ │ -371 } │ │ │ │ │ -372 │ │ │ │ │ -373 return; │ │ │ │ │ -374 } │ │ │ │ │ -375 │ │ │ │ │ -376 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::evaluateJacobian for │ │ │ │ │ -order " << k); │ │ │ │ │ -377 } │ │ │ │ │ -378 │ │ │ │ │ -385 void partial(const std::array& order, │ │ │ │ │ -386 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -387 std::vector& out) const │ │ │ │ │ -388 { │ │ │ │ │ -389 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -390 │ │ │ │ │ -391 out.resize(size()); │ │ │ │ │ -392 │ │ │ │ │ -393 if (totalOrder == 0) │ │ │ │ │ -394 { │ │ │ │ │ -395 evaluateFunction(in, out); │ │ │ │ │ -396 return; │ │ │ │ │ -397 } │ │ │ │ │ -398 │ │ │ │ │ -399 if (k==0) │ │ │ │ │ -400 { │ │ │ │ │ -401 out[0] = 0; │ │ │ │ │ -402 return; │ │ │ │ │ -403 } │ │ │ │ │ -404 │ │ │ │ │ -405 if (k==1) │ │ │ │ │ -406 { │ │ │ │ │ -407 if (totalOrder == 1) │ │ │ │ │ -408 { │ │ │ │ │ -409 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -410 if (in[0] > in[1]) │ │ │ │ │ -411 { │ │ │ │ │ -412 switch (direction) │ │ │ │ │ -413 { │ │ │ │ │ -414 case 0: │ │ │ │ │ -415 out[0] = -1 + in[1]; │ │ │ │ │ -416 out[1] = 1 - in[1]; │ │ │ │ │ -417 out[2] = -in[1]; │ │ │ │ │ -418 out[3] = in[1]; │ │ │ │ │ -419 out[4] = 0; │ │ │ │ │ -420 break; │ │ │ │ │ -421 case 1: │ │ │ │ │ -422 out[0] = -1 + in[0] + in[2]; │ │ │ │ │ -423 out[1] = -in[0] - in[2]; │ │ │ │ │ -424 out[2] = 1 - in[0] - in[2]; │ │ │ │ │ -425 out[3] = in[0]+in[2]; │ │ │ │ │ -426 out[4] = 0; │ │ │ │ │ -427 break; │ │ │ │ │ -428 case 2: │ │ │ │ │ -429 out[0] = -1 + in[1]; │ │ │ │ │ -430 out[1] = -in[1]; │ │ │ │ │ -431 out[2] = -in[1]; │ │ │ │ │ -432 out[3] = in[1]; │ │ │ │ │ -433 out[4] = 1; │ │ │ │ │ -434 break; │ │ │ │ │ -435 default: │ │ │ │ │ -436 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -437 } │ │ │ │ │ -438 } │ │ │ │ │ -439 else /* (in[0] <= in[1]) */ │ │ │ │ │ -440 { │ │ │ │ │ -441 switch (direction) │ │ │ │ │ -442 { │ │ │ │ │ -443 case 0: │ │ │ │ │ -444 out[0] = -1 + in[1] + in[2]; │ │ │ │ │ -445 out[1] = 1 - in[1] - in[2]; │ │ │ │ │ -446 out[2] = -in[1] - in[2]; │ │ │ │ │ -447 out[3] = in[1] + in[2]; │ │ │ │ │ -448 out[4] = 0; │ │ │ │ │ -449 break; │ │ │ │ │ -450 case 1: │ │ │ │ │ -451 out[0] = -1 + in[0]; │ │ │ │ │ -452 out[1] = -in[0]; │ │ │ │ │ -453 out[2] = 1 - in[0]; │ │ │ │ │ -454 out[3] = in[0]; │ │ │ │ │ -455 out[4] = 0; │ │ │ │ │ -456 break; │ │ │ │ │ -457 case 2: │ │ │ │ │ -458 out[0] = -1 + in[0]; │ │ │ │ │ -459 out[1] = -in[0]; │ │ │ │ │ -460 out[2] = -in[0]; │ │ │ │ │ -461 out[3] = in[0]; │ │ │ │ │ -462 out[4] = 1; │ │ │ │ │ -463 break; │ │ │ │ │ -464 default: │ │ │ │ │ -465 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -466 } │ │ │ │ │ -467 } │ │ │ │ │ -468 } else if (totalOrder == 2) │ │ │ │ │ -469 { │ │ │ │ │ -470 if ((order[0] == 1 && order[1] == 1) || │ │ │ │ │ -471 (order[1] == 1 && order[2] == 1 && in[0] > in[1]) || │ │ │ │ │ -472 (order[0] == 1 && order[2] == 1 && in[0] <=in[1])) │ │ │ │ │ -473 { │ │ │ │ │ -474 out = {1, -1, -1, 1, 0}; │ │ │ │ │ -475 } else │ │ │ │ │ -476 { │ │ │ │ │ -477 out = {0, 0, 0, 0, 0}; │ │ │ │ │ -478 } │ │ │ │ │ -479 │ │ │ │ │ -480 } else │ │ │ │ │ -481 { │ │ │ │ │ -482 out = {0, 0, 0, 0, 0}; │ │ │ │ │ -483 } │ │ │ │ │ -484 │ │ │ │ │ -485 return; │ │ │ │ │ -486 } │ │ │ │ │ -487 │ │ │ │ │ -488 if (k==2) │ │ │ │ │ -489 { │ │ │ │ │ -490 if (totalOrder == 1) │ │ │ │ │ -491 { │ │ │ │ │ -492 // transform to reference element with base [-1,1]^2 │ │ │ │ │ -493 const R x = 2.0*in[0] + in[2] - 1.0; │ │ │ │ │ -494 const R y = 2.0*in[1] + in[2] - 1.0; │ │ │ │ │ -495 const R z = in[2]; │ │ │ │ │ -496 │ │ │ │ │ -497 auto const direction = std::distance(order.begin(), std::find(order.begin │ │ │ │ │ -(), order.end(), 1)); │ │ │ │ │ -498 │ │ │ │ │ -499 // transformation of the gradient leads to a multiplication │ │ │ │ │ -500 // with the Jacobian [2 0 0; 0 2 0; 1 1 1] │ │ │ │ │ -501 if (x > y) │ │ │ │ │ -502 { │ │ │ │ │ -503 switch (direction) │ │ │ │ │ -504 { │ │ │ │ │ -505 case 0: │ │ │ │ │ -506 out[0] = 0.5*(y - z - 1)*(y - z)*(2*x + 2*z - 1); │ │ │ │ │ -507 out[1] = 2*(-0.25*((y - z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - │ │ │ │ │ -z)*(-y + z + 1)) - z); │ │ │ │ │ -508 out[2] = 0.5*(y - z)*(y - z + 1)*(2*x + 2*z - 1); │ │ │ │ │ -509 out[3] = 0.5*(y - z)*(2*x + 2*z + 1)*(y - z + 1); │ │ │ │ │ -510 out[4] = 0; │ │ │ │ │ -511 out[5] = -(y - z + 1)*(2*x + z - 1)*(y - 1); │ │ │ │ │ -512 out[6] = -(y - z + 1)*(2*x + z + 1)*(y - 1); │ │ │ │ │ -513 out[7] = -(((y - z - 1)*(x + 1)*y - z) + z*(2*x + 1) + (x + z - 1)*((y - z │ │ │ │ │ -- 1)*y + 2*z)); │ │ │ │ │ -514 out[8] = -(y - z + 1)*(2*x + z)*y; │ │ │ │ │ -515 out[9] = 2*z*(y - z - 1); │ │ │ │ │ -516 out[10] = -2*z*(y - z - 1); │ │ │ │ │ -517 out[11] = -2*z*(y - z + 1); │ │ │ │ │ -518 out[12] = 2*z*(y - z + 1); │ │ │ │ │ -519 out[13] = 2*((y - z + 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + │ │ │ │ │ -1)*(x + z - 1)*(y - 1 + z)); │ │ │ │ │ -520 break; │ │ │ │ │ -521 case 1: │ │ │ │ │ -522 out[0] = 0.5*(x + z)*(x + z - 1)*(2*y - 2*z - 1); │ │ │ │ │ -523 out[1] = 2*(-0.25*((x + z)*((x + z + 1)*(-y + z + 1) - 4*z) + (x + z)*(y - │ │ │ │ │ -z)*(-(x + z + 1))) + z); │ │ │ │ │ -524 out[2] = 0.5*(x + z)*(2*y - 2*z + 1)*(x + z - 1); │ │ │ │ │ -525 out[3] = 0.5*(2*y - 2*z + 1)*(x + z)*(x + z + 1); │ │ │ │ │ -526 out[4] = 0; │ │ │ │ │ -527 out[5] = -(x + z - 1)*(y - 1)*x - (y - z + 1)*(x + z - 1)*x; │ │ │ │ │ -528 out[6] = -(((x + z + 1)*(y - 1)*x - z) + z*(2*y + 1) + (y - z + 1)*((x + z │ │ │ │ │ -+ 1)*x + 2*z)); │ │ │ │ │ -529 out[7] = -(x + z - 1)*(2*y - z - 1)*(x + 1); │ │ │ │ │ -530 out[8] = -(2*y - z + 1)*(x + z - 1)*(x + 1); │ │ │ │ │ -531 out[9] = 2*z*(x + z - 1); │ │ │ │ │ -532 out[10] = -2*z*(x + z + 1); │ │ │ │ │ -533 out[11] = -2*z*(x + z - 1); │ │ │ │ │ -534 out[12] = 2*z*(x + z + 1); │ │ │ │ │ -535 out[13] = 2*((x + z - 1)*((y - 1)*(x + 1) + z*(x - y + z + 1)) + (y - z + │ │ │ │ │ -1)*(x + z - 1)*(x + 1 - z)); │ │ │ │ │ -536 break; │ │ │ │ │ -537 case 2: │ │ │ │ │ -538 out[0] = -((y - z)*(2*x + 2*z - 1)*(z - y + 1))/2; │ │ │ │ │ -539 out[1] = ((y - z + 1)*(y - 2*x + z + 2*x*y - 2*x*z + 2*y*z - 2*z*z))/2; │ │ │ │ │ -540 out[2] = ((y - z)*(2*x + 2*z - 1)*(y - z + 1))/2; │ │ │ │ │ -541 out[3] = ((y - z)*(2*x + 2*z + 1)*(y - z + 1))/2; │ │ │ │ │ -542 out[4] = 4*z - 1; │ │ │ │ │ -543 out[5] = (-(y - z + 1)*(2*x + z - 1)*(y - 1) - (x + z - 1)*(y - 1)*x - (y - │ │ │ │ │ -z + 1)*(x + z - 1)*x + (x + z - 1)*(y - 1)*x - (y - z + 1)*(y - 1)*x)/2; │ │ │ │ │ -544 out[6] = -((y - z + 1)*(3*y - 2*x + z + 3*x*y + x*z + y*z + x*x - 1))/2; │ │ │ │ │ -545 out[7] = z - z*(2*x + 1) - ((2*z - y*(z - y + 1))*(x + z - 1))/2 - ((2*x - │ │ │ │ │ -y*(x + 1))*(x + z - 1))/2 + ((x + 1)*(x + z - 1)*(z - 2*y + 1))/2 + y*(x + 1)* │ │ │ │ │ -(z - y + 1); │ │ │ │ │ -546 out[8] = -((y - z + 1)*(y + z + 3*x*y + x*z + y*z + x*x - 1))/2; │ │ │ │ │ -547 out[9] = -(x + 3*z - 1)*(z - y + 1); │ │ │ │ │ -548 out[10] = (x + z + 1)*(z - y + 1) - 2*y*z - 6*z + 2*z*z; │ │ │ │ │ -549 out[11] = -(x + 3*z - 1)*(y - z + 1); │ │ │ │ │ -550 out[12] = (x + 3*z + 1)*(y - z + 1); │ │ │ │ │ -551 out[13] = (y - z + 1)*(2*y - 3*x + z + 2*x*y + 6*x*z - 2*y*z + 2*x*x + │ │ │ │ │ -4*z*z - 3); │ │ │ │ │ -552 break; │ │ │ │ │ -553 default: │ │ │ │ │ -554 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -555 } │ │ │ │ │ -556 } │ │ │ │ │ -557 else // x <= y │ │ │ │ │ -558 { │ │ │ │ │ -559 switch (direction) │ │ │ │ │ -560 { │ │ │ │ │ -561 case 0: │ │ │ │ │ -562 out[0] = -((y + z)*(2*z - 2*x + 1)*(y + z - 1))/2; │ │ │ │ │ -563 out[1] = ((y + z)*(2*x - 2*z + 1)*(y + z - 1))/2; │ │ │ │ │ -564 out[2] = -((y + z + 1)*(y - 3*z - 2*x*y - 2*x*z + 2*y*z + 2*z*z))/2; │ │ │ │ │ -565 out[3] = ((y + z)*(2*x - 2*z + 1)*(y + z + 1))/2; │ │ │ │ │ -566 out[4] = 0; │ │ │ │ │ -567 out[5] = (y + 1)*(y + z - 1)*(z - 2*x + 1); │ │ │ │ │ -568 out[6] = -(y + 1)*(2*x - z + 1)*(y + z - 1); │ │ │ │ │ -569 out[7] = -y*(2*x - z)*(y + z - 1); │ │ │ │ │ -570 out[8] = z - z*(2*x + 1) - (2*z + y*(y + z + 1))*(x - z + 1) - y*(x - 1)*(y │ │ │ │ │ -+ z + 1); │ │ │ │ │ -571 out[9] = 2*z*(y + z - 1); │ │ │ │ │ -572 out[10] = -2*z*(y + z - 1); │ │ │ │ │ -573 out[11] = -2*z*(y + z + 1); │ │ │ │ │ -574 out[12] = 2*z*(y + z + 1); │ │ │ │ │ -575 out[13] = 2*(y + z - 1)*(2*x - z + 2*x*y - 2*x*z + 2*z*z); │ │ │ │ │ -576 break; │ │ │ │ │ -577 case 1: │ │ │ │ │ -578 out[0] = -(x - z)*(y + z - 0.5)*(z - x + 1); │ │ │ │ │ -579 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2; │ │ │ │ │ -580 out[2] = -((z - x + 1)*(x + 3*z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2; │ │ │ │ │ -581 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2; │ │ │ │ │ -582 out[4] = 0; │ │ │ │ │ -583 out[5] = z - z*(2*y + 1) - (2*z - x*(z - x + 1))*(y + z - 1) + x*(y + 1)*(z │ │ │ │ │ -- x + 1); │ │ │ │ │ -584 out[6] = -x*(2*y + z)*(x - z + 1); │ │ │ │ │ -585 out[7] = -(x - 1)*(x - z + 1)*(2*y + z - 1); │ │ │ │ │ -586 out[8] = -(x - 1)*(x - z + 1)*(2*y + z + 1); │ │ │ │ │ -587 out[9] = -2*z*(z - x + 1); │ │ │ │ │ -588 out[10] = -2*z*(x - z + 1); │ │ │ │ │ -589 out[11] = 2*z*(z - x + 1); │ │ │ │ │ -590 out[12] = 2*z*(x - z + 1); │ │ │ │ │ -591 out[13] = 2*(x - z + 1)*(2*x*y - z - 2*y + 2*y*z + 2*z*z); │ │ │ │ │ -592 break; │ │ │ │ │ -593 case 2: │ │ │ │ │ -594 out[0] = -((x - z)*(2*y + 2*z - 1)*(z - x + 1))/2; │ │ │ │ │ -595 out[1] = ((x - z)*(2*y + 2*z - 1)*(x - z + 1))/2; │ │ │ │ │ -596 out[2] = ((x - z + 1)*(x - 2*y + z + 2*x*y + 2*x*z - 2*y*z - 2*z*z))/2; │ │ │ │ │ -597 out[3] = ((x - z)*(2*y + 2*z + 1)*(x - z + 1))/2; │ │ │ │ │ -598 out[4] = 4*z - 1; │ │ │ │ │ -599 out[5] = z - z*(2*y + 1) - ((2*z - x*(z - x + 1))*(y + z - 1))/2 - ((2*y - │ │ │ │ │ -x*(y + 1))*(y + z - 1))/2 + ((y + 1)*(y + z - 1)*(z - 2*x + 1))/2 + x*(y + 1)* │ │ │ │ │ -(z - x + 1); │ │ │ │ │ -600 out[6] = -((x - z + 1)*(x + z + 3*x*y + x*z + y*z + y*y - 1))/2; │ │ │ │ │ -601 out[7] = -((x - z + 1)*(3*x*y - 4*y - z - x + x*z + y*z + y*y + 1))/2; │ │ │ │ │ -602 out[8] = -((x - z + 1)*(3*x - 2*y + z + 3*x*y + x*z + y*z + y*y - 1))/2; │ │ │ │ │ -603 out[9] = -(z - x + 1)*(y + 3*z - 1); │ │ │ │ │ -604 out[10] = -(x - z + 1)*(y + 3*z - 1); │ │ │ │ │ -605 out[11] = (y + z + 1)*(z - x + 1) - 2*x*z - 6*z + 2*z*z; │ │ │ │ │ -606 out[12] = (x - z + 1)*(y + 3*z + 1); │ │ │ │ │ -607 out[13] = (x - z + 1)*(2*x - 3*y + z + 2*x*y - 2*x*z + 6*y*z + 2*y*y + │ │ │ │ │ -4*z*z - 3); │ │ │ │ │ -608 break; │ │ │ │ │ -609 default: │ │ │ │ │ -610 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -611 } │ │ │ │ │ -612 } │ │ │ │ │ -613 } else { │ │ │ │ │ -614 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -615 } │ │ │ │ │ -616 │ │ │ │ │ -617 return; │ │ │ │ │ -618 } │ │ │ │ │ -619 │ │ │ │ │ -620 DUNE_THROW(NotImplemented, "LagrangePyramidLocalBasis::partial for order " │ │ │ │ │ -<< k); │ │ │ │ │ -621 } │ │ │ │ │ -622 │ │ │ │ │ -624 static constexpr unsigned int order () │ │ │ │ │ -625 { │ │ │ │ │ -626 return k; │ │ │ │ │ -627 } │ │ │ │ │ -628 }; │ │ │ │ │ -629 │ │ │ │ │ -634 template │ │ │ │ │ -635 class LagrangePyramidLocalCoefficients │ │ │ │ │ -636 { │ │ │ │ │ -637 public: │ │ │ │ │ -639 LagrangePyramidLocalCoefficients () │ │ │ │ │ -640 : localKeys_(size()) │ │ │ │ │ -641 { │ │ │ │ │ -642 if (k==0) │ │ │ │ │ -643 { │ │ │ │ │ -644 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ -645 return; │ │ │ │ │ -646 } │ │ │ │ │ -647 │ │ │ │ │ -648 if (k==1) │ │ │ │ │ -649 { │ │ │ │ │ -650 for (std::size_t i=0; i localKeys_; │ │ │ │ │ -702 }; │ │ │ │ │ -703 │ │ │ │ │ -708 template │ │ │ │ │ -709 class LagrangePyramidLocalInterpolation │ │ │ │ │ -710 { │ │ │ │ │ -711 public: │ │ │ │ │ -712 │ │ │ │ │ -720 template │ │ │ │ │ -721 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -722 { │ │ │ │ │ -723 constexpr auto k = LocalBasis::order(); │ │ │ │ │ -724 using D = typename LocalBasis::Traits::DomainType; │ │ │ │ │ -725 using DF = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ -726 │ │ │ │ │ -727 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -728 │ │ │ │ │ -729 out.resize(LocalBasis::size()); │ │ │ │ │ -730 │ │ │ │ │ -731 // Specialization for zero-order case │ │ │ │ │ -732 if (k==0) │ │ │ │ │ -733 { │ │ │ │ │ -734 auto center = ReferenceElements::general(GeometryTypes:: │ │ │ │ │ -pyramid).position(0,0); │ │ │ │ │ -735 out[0] = f(center); │ │ │ │ │ -736 return; │ │ │ │ │ -737 } │ │ │ │ │ -738 │ │ │ │ │ -739 // Specialization for first-order case │ │ │ │ │ -740 if (k==1) │ │ │ │ │ -741 { │ │ │ │ │ -742 for (unsigned int i=0; i::general(GeometryTypes:: │ │ │ │ │ -pyramid).position(i,3); │ │ │ │ │ -745 out[i] = f(vertex); │ │ │ │ │ -746 } │ │ │ │ │ -747 return; │ │ │ │ │ -748 } │ │ │ │ │ -749 │ │ │ │ │ -750 // Specialization for second-order case │ │ │ │ │ -751 if (k==2) │ │ │ │ │ -752 { │ │ │ │ │ -753 out[0] = f( D( {0.0, 0.0, 0.0} ) ); │ │ │ │ │ -754 out[1] = f( D( {1.0, 0.0, 0.0} ) ); │ │ │ │ │ -755 out[2] = f( D( {0.0, 1.0, 0.0} ) ); │ │ │ │ │ -756 out[3] = f( D( {1.0, 1.0, 0.0} ) ); │ │ │ │ │ -757 out[4] = f( D( {0.0, 0.0, 1.0} ) ); │ │ │ │ │ -758 out[5] = f( D( {0.0, 0.5, 0.0} ) ); │ │ │ │ │ -759 out[6] = f( D( {1.0, 0.5, 0.0} ) ); │ │ │ │ │ -760 out[7] = f( D( {0.5, 0.0, 0.0} ) ); │ │ │ │ │ -761 out[8] = f( D( {0.5, 1.0, 0.0} ) ); │ │ │ │ │ -762 out[9] = f( D( {0.0, 0.0, 0.5} ) ); │ │ │ │ │ -763 out[10] = f( D( {0.5, 0.0, 0.5} ) ); │ │ │ │ │ -764 out[11] = f( D( {0.0, 0.5, 0.5} ) ); │ │ │ │ │ -765 out[12] = f( D( {0.5, 0.5, 0.5} ) ); │ │ │ │ │ -766 out[13] = f( D( {0.5, 0.5, 0.0} ) ); │ │ │ │ │ -767 │ │ │ │ │ -768 return; │ │ │ │ │ -769 } │ │ │ │ │ -770 │ │ │ │ │ -771 DUNE_THROW(NotImplemented, "LagrangePyramidLocalInterpolation not │ │ │ │ │ -implemented for order " << k); │ │ │ │ │ -772 } │ │ │ │ │ -773 │ │ │ │ │ -774 }; │ │ │ │ │ -775 │ │ │ │ │ -776} } // namespace Dune::Impl │ │ │ │ │ -777 │ │ │ │ │ -778namespace _D_u_n_e │ │ │ │ │ -779{ │ │ │ │ │ -810 template │ │ │ │ │ -_8_1_1 class _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -812 { │ │ │ │ │ -813 public: │ │ │ │ │ -_8_1_6 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_k_>, │ │ │ │ │ -817 Impl::LagrangePyramidLocalCoefficients, │ │ │ │ │ -818 Impl::LagrangePyramidLocalInterpolation > >; │ │ │ │ │ -819 │ │ │ │ │ -_8_2_5 _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ -826 │ │ │ │ │ -_8_2_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -830 { │ │ │ │ │ -831 return basis_; │ │ │ │ │ -832 } │ │ │ │ │ -833 │ │ │ │ │ -_8_3_6 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -837 { │ │ │ │ │ -838 return coefficients_; │ │ │ │ │ -839 } │ │ │ │ │ -840 │ │ │ │ │ -_8_4_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -844 { │ │ │ │ │ -845 return interpolation_; │ │ │ │ │ -846 } │ │ │ │ │ -847 │ │ │ │ │ -_8_4_9 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ -850 { │ │ │ │ │ -851 return Impl::LagrangePyramidLocalBasis::size(); │ │ │ │ │ -852 } │ │ │ │ │ -853 │ │ │ │ │ -_8_5_6 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -857 { │ │ │ │ │ -858 return GeometryTypes::pyramid; │ │ │ │ │ -859 } │ │ │ │ │ -860 │ │ │ │ │ -861 private: │ │ │ │ │ -862 Impl::LagrangePyramidLocalBasis basis_; │ │ │ │ │ -863 Impl::LagrangePyramidLocalCoefficients coefficients_; │ │ │ │ │ -864 Impl::LagrangePyramidLocalInterpolation > interpolation_; │ │ │ │ │ -865 }; │ │ │ │ │ -866 │ │ │ │ │ -867} // namespace Dune │ │ │ │ │ -868 │ │ │ │ │ -869#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGEPYRAMID_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +53 return li[i]; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +56 private: │ │ │ │ │ +57 std::vector li; │ │ │ │ │ +58 }; │ │ │ │ │ +59} │ │ │ │ │ +60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS1_CUBE3D_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:836 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:849 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -LagrangePyramidLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:825 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:856 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:829 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:843 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalcoefficients.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT1Cube3DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalcoefficients.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas1cube3dlocalcoefficients.hh:51 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pqkfactory.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prism.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,49 +65,36 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pqkfactory.hh File Reference
│ │ │ │ +
raviartthomas0prism.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <map>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualinterface.hh>
│ │ │ │ -#include <dune/localfunctions/common/virtualwrappers.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/p0.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localfiniteelementtraits.hh"
│ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalbasis.hh"
│ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalcoefficients.hh"
│ │ │ │ +#include "raviartthomas0prism/raviartthomas0prismlocalinterpolation.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, d, k >
 Factory that only creates dimension specific local finite elements. More...
 
struct  Dune::DimSpecificPQkLocalFiniteElementFactory< D, R, 3, k >
 Factory that only creates dimension specific local finite elements. More...
 
struct  Dune::PQkLocalFiniteElementFactory< D, R, dim, k >
 Factory to create any kind of Pk/Qk like element wrapped for the virtual interface. More...
 
class  Dune::PQkLocalFiniteElementCache< D, R, dim, k >
 A cache that stores all available Pk/Qk like local finite elements for the given dimension and order. More...
class  Dune::RT0PrismLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on prisms. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -pqkfactory.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0prism.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _d_,_ _k_ _> │ │ │ │ │ -  Factory that only creates dimension specific local finite elements. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _> │ │ │ │ │ -  Factory that only creates dimension specific local finite elements. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ -  Factory to create any kind of Pk/Qk like element wrapped for the │ │ │ │ │ - virtual interface. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ -  A cache that stores all available Pk/Qk like local finite elements for │ │ │ │ │ - the given dimension and order. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on prisms. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00251_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pqkfactory.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prism.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,215 +70,124 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pqkfactory.hh
│ │ │ │ +
raviartthomas0prism.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │
7
│ │ │ │ -
8#include <map>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/geometry/type.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ - │ │ │ │ +
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
14
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
20
│ │ │ │ -
21namespace Dune
│ │ │ │ -
22{
│ │ │ │ -
23
│ │ │ │ -
28 template<class D, class R, int d, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ - │ │ │ │ -
32
│ │ │ │ -
│ │ │ │ -
34 static LocalFiniteElementVirtualInterface<T>* create(const GeometryType&)
│ │ │ │ -
35 {
│ │ │ │ -
36 return nullptr;
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38 };
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
25 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
27 {
│ │ │ │ +
28
│ │ │ │ +
29 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
34
│ │ │ │ +
35
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 {}
│ │ │ │
│ │ │ │
39
│ │ │ │ -
44 template<class D, class R, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
52
│ │ │ │ -
│ │ │ │ -
54 static LocalFiniteElementVirtualInterface<T>* create(const GeometryType& gt)
│ │ │ │ -
55 {
│ │ │ │ -
56 if ((gt.isPrism())and (k==1))
│ │ │ │ - │ │ │ │ -
58 if ((gt.isPrism())and (k==2))
│ │ │ │ - │ │ │ │ -
60 if ((gt.isPyramid())and (k==1))
│ │ │ │ - │ │ │ │ -
62 if ((gt.isPyramid())and (k==2))
│ │ │ │ - │ │ │ │ -
64 return nullptr;
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66 };
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
68
│ │ │ │ -
72 template<class D, class R, int dim, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
74 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
80
│ │ │ │ -
81
│ │ │ │ -
│ │ │ │ -
83 static FiniteElementType* create(const GeometryType& gt)
│ │ │ │ -
84 {
│ │ │ │ -
85 if (k==0)
│ │ │ │ - │ │ │ │ -
87
│ │ │ │ -
88 if (gt.isSimplex())
│ │ │ │ - │ │ │ │ -
90
│ │ │ │ -
91 if (gt.isCube())
│ │ │ │ - │ │ │ │ -
93
│ │ │ │ - │ │ │ │ -
95 }
│ │ │ │ -
│ │ │ │ -
96 };
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
98
│ │ │ │ -
99
│ │ │ │ -
110 template<class D, class R, int dim, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
112 {
│ │ │ │ -
113 protected:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
116 typedef typename std::map<GeometryType,FE*> FEMap;
│ │ │ │ -
117
│ │ │ │ -
118 public:
│ │ │ │ - │ │ │ │ -
121
│ │ │ │ - │ │ │ │ -
124
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
127 {
│ │ │ │ -
128 typename FEMap::iterator it = other.cache_.begin();
│ │ │ │ -
129 typename FEMap::iterator end = other.cache_.end();
│ │ │ │ -
130 for(; it!=end; ++it)
│ │ │ │ -
131 cache_[it->first] = (it->second)->clone();
│ │ │ │ -
132 }
│ │ │ │ -
│ │ │ │ -
133
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
135 {
│ │ │ │ -
136 typename FEMap::iterator it = cache_.begin();
│ │ │ │ -
137 typename FEMap::iterator end = cache_.end();
│ │ │ │ -
138 for(; it!=end; ++it)
│ │ │ │ -
139 delete it->second;
│ │ │ │ -
140 }
│ │ │ │ -
│ │ │ │ -
141
│ │ │ │ -
│ │ │ │ -
143 const FiniteElementType& get(const GeometryType& gt) const
│ │ │ │ -
144 {
│ │ │ │ -
145 typename FEMap::const_iterator it = cache_.find(gt);
│ │ │ │ -
146 if (it==cache_.end())
│ │ │ │ -
147 {
│ │ │ │ - │ │ │ │ -
149 if (fe==0)
│ │ │ │ -
150 DUNE_THROW(Dune::NotImplemented,"No Pk/Qk like local finite element available for geometry type " << gt << " and order " << k);
│ │ │ │ -
151
│ │ │ │ -
152 cache_[gt] = fe;
│ │ │ │ -
153 return *fe;
│ │ │ │ -
154 }
│ │ │ │ -
155 return *(it->second);
│ │ │ │ -
156 }
│ │ │ │ -
│ │ │ │ -
157
│ │ │ │ -
158 protected:
│ │ │ │ -
159 mutable FEMap cache_;
│ │ │ │ -
160
│ │ │ │ -
161 };
│ │ │ │ -
│ │ │ │ -
162
│ │ │ │ -
163}
│ │ │ │ -
164
│ │ │ │ -
165#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 basis(s),
│ │ │ │ +
47 interpolation(s)
│ │ │ │ +
48 {}
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
50 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
51 {
│ │ │ │ +
52 return basis;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
56 {
│ │ │ │ +
57 return coefficients;
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │ +
59
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
61 {
│ │ │ │ +
62 return interpolation;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
│ │ │ │ +
66 unsigned int size () const
│ │ │ │ +
67 {
│ │ │ │ +
68 return basis.size();
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
71 static constexpr GeometryType type ()
│ │ │ │ +
72 {
│ │ │ │ +
73 return GeometryTypes::prism;
│ │ │ │ +
74 }
│ │ │ │ +
│ │ │ │ +
75
│ │ │ │ +
76 private:
│ │ │ │ + │ │ │ │ +
78 RT0PrismLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
80 };
│ │ │ │ +
│ │ │ │ +
81}
│ │ │ │ +
82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
virtual base class for local finite elements with functions
Definition virtualinterface.hh:286
│ │ │ │ -
class for wrapping a finite element using the virtual interface
Definition virtualwrappers.hh:240
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ -
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
The local p0 finite element on all types of reference elements.
Definition p0.hh:25
│ │ │ │ -
Factory that only creates dimension specific local finite elements.
Definition pqkfactory.hh:30
│ │ │ │ -
P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:31
│ │ │ │ -
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &)
create finite element for given GeometryType
Definition pqkfactory.hh:34
│ │ │ │ -
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &gt)
create finite element for given GeometryType
Definition pqkfactory.hh:54
│ │ │ │ -
P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:47
│ │ │ │ -
Factory to create any kind of Pk/Qk like element wrapped for the virtual interface.
Definition pqkfactory.hh:74
│ │ │ │ -
LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk
Definition pqkfactory.hh:79
│ │ │ │ -
LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk
Definition pqkfactory.hh:78
│ │ │ │ -
LocalFiniteElementVirtualInterface< T > FiniteElementType
Definition pqkfactory.hh:76
│ │ │ │ -
static FiniteElementType * create(const GeometryType &gt)
create finite element for given GeometryType
Definition pqkfactory.hh:83
│ │ │ │ -
P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:75
│ │ │ │ -
P0LocalFiniteElement< D, R, dim > P0
Definition pqkfactory.hh:77
│ │ │ │ -
A cache that stores all available Pk/Qk like local finite elements for the given dimension and order.
Definition pqkfactory.hh:112
│ │ │ │ -
P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
Definition pqkfactory.hh:114
│ │ │ │ -
LocalFiniteElementVirtualInterface< T > FE
Definition pqkfactory.hh:115
│ │ │ │ -
PQkLocalFiniteElementCache()
Default constructor.
Definition pqkfactory.hh:123
│ │ │ │ -
FE FiniteElementType
Type of the finite elements stored in this cache.
Definition pqkfactory.hh:120
│ │ │ │ -
std::map< GeometryType, FE * > FEMap
Definition pqkfactory.hh:116
│ │ │ │ -
const FiniteElementType & get(const GeometryType &gt) const
Get local finite element for given GeometryType.
Definition pqkfactory.hh:143
│ │ │ │ -
FEMap cache_
Definition pqkfactory.hh:159
│ │ │ │ -
~PQkLocalFiniteElementCache()
Definition pqkfactory.hh:134
│ │ │ │ -
PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other)
Copy constructor.
Definition pqkfactory.hh:126
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on prisms.
Definition raviartthomas0prism.hh:27
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0prism.hh:66
│ │ │ │ +
LocalFiniteElementTraits< RT0PrismLocalBasis< D, R >, RT0PrismLocalCoefficients, RT0PrismLocalInterpolation< RT0PrismLocalBasis< D, R > > > Traits
Definition raviartthomas0prism.hh:33
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0prism.hh:60
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0prism.hh:50
│ │ │ │ +
RT0PrismLocalFiniteElement()
Standard constructor.
Definition raviartthomas0prism.hh:37
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0prism.hh:55
│ │ │ │ +
RT0PrismLocalFiniteElement(int s)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0prism.hh:45
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas0prism.hh:71
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference prism.
Definition raviartthomas0prismlocalbasis.hh:28
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on prisms.
Definition raviartthomas0prismlocalcoefficients.hh:24
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference prism.
Definition raviartthomas0prismlocalinterpolation.hh:24
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,263 +1,137 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pqkfactory.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomas0prism.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h> │ │ │ │ │ +10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ +13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ 14 │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_p_0_._h_h> │ │ │ │ │ -20 │ │ │ │ │ -21namespace _D_u_n_e │ │ │ │ │ -22{ │ │ │ │ │ -23 │ │ │ │ │ -28 template │ │ │ │ │ -_2_9 struct _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -30 { │ │ │ │ │ -_3_1 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_:_T_r_a_i_t_s │ │ │ │ │ -_T; │ │ │ │ │ -32 │ │ │ │ │ -_3_4 static _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_>* _c_r_e_a_t_e(const GeometryType&) │ │ │ │ │ -35 { │ │ │ │ │ -36 return nullptr; │ │ │ │ │ -37 } │ │ │ │ │ -38 }; │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +25 template │ │ │ │ │ +_2_6 class _R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +27 { │ │ │ │ │ +28 │ │ │ │ │ +29 public: │ │ │ │ │ +30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +31 _R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +32 _R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_3 _R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +35 │ │ │ │ │ +_3_7 _R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +38 {} │ │ │ │ │ 39 │ │ │ │ │ -44 template │ │ │ │ │ -_4_5 struct _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -46 { │ │ │ │ │ -_4_7 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_:_T_r_a_i_t_s │ │ │ │ │ -_T; │ │ │ │ │ -_4_8 using _P_r_i_s_m_P_1 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ -_4_9 using _P_r_i_s_m_P_2 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ -_5_0 using _P_y_r_a_m_i_d_P_1 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ -_5_1 using _P_y_r_a_m_i_d_P_2 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ -52 │ │ │ │ │ -_5_4 static _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_>* _c_r_e_a_t_e(const GeometryType& gt) │ │ │ │ │ -55 { │ │ │ │ │ -56 if ((gt.isPrism())and (k==1)) │ │ │ │ │ -57 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_r_i_s_m_P_1_>(_P_r_i_s_m_P_1()); │ │ │ │ │ -58 if ((gt.isPrism())and (k==2)) │ │ │ │ │ -59 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_r_i_s_m_P_2_>(_P_r_i_s_m_P_2()); │ │ │ │ │ -60 if ((gt.isPyramid())and (k==1)) │ │ │ │ │ -61 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_y_r_a_m_i_d_P_1_>(_P_y_r_a_m_i_d_P_1()); │ │ │ │ │ -62 if ((gt.isPyramid())and (k==2)) │ │ │ │ │ -63 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_y_r_a_m_i_d_P_2_>(_P_y_r_a_m_i_d_P_2()); │ │ │ │ │ -64 return nullptr; │ │ │ │ │ -65 } │ │ │ │ │ -66 }; │ │ │ │ │ -67 │ │ │ │ │ -68 │ │ │ │ │ -72 template │ │ │ │ │ -_7_3 struct _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -74 { │ │ │ │ │ -_7_5 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_: │ │ │ │ │ -_T_r_a_i_t_s _T; │ │ │ │ │ -_7_6 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_> _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ -_7_7 using _P_0 = _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>; │ │ │ │ │ -_7_8 using _P_k = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_k_>; │ │ │ │ │ -_7_9 using _Q_k = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_k_>; │ │ │ │ │ -80 │ │ │ │ │ -81 │ │ │ │ │ -_8_3 static _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e* _c_r_e_a_t_e(const GeometryType& gt) │ │ │ │ │ -84 { │ │ │ │ │ -85 if (k==0) │ │ │ │ │ -86 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_0_>(_P_0(gt)); │ │ │ │ │ -87 │ │ │ │ │ -88 if (gt.isSimplex()) │ │ │ │ │ -89 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_P_k_>(_P_k()); │ │ │ │ │ -90 │ │ │ │ │ -91 if (gt.isCube()) │ │ │ │ │ -92 return new _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p_<_Q_k_>(_Q_k()); │ │ │ │ │ -93 │ │ │ │ │ -94 return _D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_D_,_R_,_d_i_m_,_k_>_:_:_c_r_e_a_t_e(gt); │ │ │ │ │ -95 } │ │ │ │ │ -96 }; │ │ │ │ │ -97 │ │ │ │ │ -98 │ │ │ │ │ -99 │ │ │ │ │ -110 template │ │ │ │ │ -_1_1_1 class _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -112 { │ │ │ │ │ -113 protected: │ │ │ │ │ -_1_1_4 typedef typename _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_>_:_:_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e_:_: │ │ │ │ │ -_T_r_a_i_t_s _T; │ │ │ │ │ -_1_1_5 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e_<_T_> _F_E; │ │ │ │ │ -_1_1_6 typedef typename std::map _F_E_M_a_p; │ │ │ │ │ -117 │ │ │ │ │ -118 public: │ │ │ │ │ -_1_2_0 typedef _F_E _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e; │ │ │ │ │ -121 │ │ │ │ │ -_1_2_3 _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e() {} │ │ │ │ │ -124 │ │ │ │ │ -_1_2_6 _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e(const _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e& other) │ │ │ │ │ -127 { │ │ │ │ │ -128 typename FEMap::iterator it = other._c_a_c_h_e__.begin(); │ │ │ │ │ -129 typename FEMap::iterator end = other._c_a_c_h_e__.end(); │ │ │ │ │ -130 for(; it!=end; ++it) │ │ │ │ │ -131 _c_a_c_h_e__[it->first] = (it->second)->clone(); │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -_1_3_4 _~_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e() │ │ │ │ │ -135 { │ │ │ │ │ -136 typename FEMap::iterator it = _c_a_c_h_e__.begin(); │ │ │ │ │ -137 typename FEMap::iterator end = _c_a_c_h_e__.end(); │ │ │ │ │ -138 for(; it!=end; ++it) │ │ │ │ │ -139 delete it->second; │ │ │ │ │ -140 } │ │ │ │ │ -141 │ │ │ │ │ -_1_4_3 const _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e& _g_e_t(const GeometryType& gt) const │ │ │ │ │ -144 { │ │ │ │ │ -145 typename FEMap::const_iterator it = _c_a_c_h_e__.find(gt); │ │ │ │ │ -146 if (it==_c_a_c_h_e__.end()) │ │ │ │ │ -147 { │ │ │ │ │ -148 _F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e* fe = _P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_D_,_R_,_d_i_m_,_k_>_:_:_c_r_e_a_t_e │ │ │ │ │ -(gt); │ │ │ │ │ -149 if (fe==0) │ │ │ │ │ -150 DUNE_THROW(Dune::NotImplemented,"No Pk/Qk like local finite element │ │ │ │ │ -available for geometry type " << gt << " and order " << k); │ │ │ │ │ -151 │ │ │ │ │ -152 _c_a_c_h_e__[gt] = fe; │ │ │ │ │ -153 return *fe; │ │ │ │ │ -154 } │ │ │ │ │ -155 return *(it->second); │ │ │ │ │ -156 } │ │ │ │ │ -157 │ │ │ │ │ -158 protected: │ │ │ │ │ -_1_5_9 mutable _F_E_M_a_p _c_a_c_h_e__; │ │ │ │ │ -160 │ │ │ │ │ -161 }; │ │ │ │ │ -162 │ │ │ │ │ -163} │ │ │ │ │ -164 │ │ │ │ │ -165#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_p_0_._h_h │ │ │ │ │ -_v_i_r_t_u_a_l_i_n_t_e_r_f_a_c_e_._h_h │ │ │ │ │ -_v_i_r_t_u_a_l_w_r_a_p_p_e_r_s_._h_h │ │ │ │ │ +_4_5 _R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +46 basis(s), │ │ │ │ │ +47 interpolation(s) │ │ │ │ │ +48 {} │ │ │ │ │ +49 │ │ │ │ │ +_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return basis; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +56 { │ │ │ │ │ +57 return coefficients; │ │ │ │ │ +58 } │ │ │ │ │ +59 │ │ │ │ │ +_6_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +61 { │ │ │ │ │ +62 return interpolation; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +_6_6 unsigned int _s_i_z_e () const │ │ │ │ │ +67 { │ │ │ │ │ +68 return basis.size(); │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +72 { │ │ │ │ │ +73 return GeometryTypes::prism; │ │ │ │ │ +74 } │ │ │ │ │ +75 │ │ │ │ │ +76 private: │ │ │ │ │ +77 _R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +78 _R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +79 _R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +80 }; │ │ │ │ │ +81} │ │ │ │ │ +82#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_n_t_e_r_f_a_c_e │ │ │ │ │ -virtual base class for local finite elements with functions │ │ │ │ │ -DDeeffiinniittiioonn virtualinterface.hh:286 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_i_r_t_u_a_l_I_m_p │ │ │ │ │ -class for wrapping a finite element using the virtual interface │ │ │ │ │ -DDeeffiinniittiioonn virtualwrappers.hh:240 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local p0 finite element on all types of reference elements. │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory that only creates dimension specific local finite elements. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_T │ │ │ │ │ -P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:31 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _>_:_:_c_r_e_a_t_e │ │ │ │ │ -static LocalFiniteElementVirtualInterface< T > * create(const GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_D_i_m_S_p_e_c_i_f_i_c_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _D_,_ _R_,_ _3_,_ _k_ _>_:_:_T │ │ │ │ │ -P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory to create any kind of Pk/Qk like element wrapped for the virtual │ │ │ │ │ -interface. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:74 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_k │ │ │ │ │ -LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_P_k │ │ │ │ │ -LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:78 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -LocalFiniteElementVirtualInterface< T > FiniteElementType │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:76 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static FiniteElementType * create(const GeometryType >) │ │ │ │ │ -create finite element for given GeometryType │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:83 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_T │ │ │ │ │ -P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_P_0 │ │ │ │ │ -P0LocalFiniteElement< D, R, dim > P0 │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:77 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -A cache that stores all available Pk/Qk like local finite elements for the │ │ │ │ │ -given dimension and order. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_T │ │ │ │ │ -P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:114 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E │ │ │ │ │ -LocalFiniteElementVirtualInterface< T > FE │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -PQkLocalFiniteElementCache() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:123 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_i_n_i_t_e_E_l_e_m_e_n_t_T_y_p_e │ │ │ │ │ -FE FiniteElementType │ │ │ │ │ -Type of the finite elements stored in this cache. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:120 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_F_E_M_a_p │ │ │ │ │ -std::map< GeometryType, FE * > FEMap │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_g_e_t │ │ │ │ │ -const FiniteElementType & get(const GeometryType >) const │ │ │ │ │ -Get local finite element for given GeometryType. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:143 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_c_a_c_h_e__ │ │ │ │ │ -FEMap cache_ │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_~_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -~PQkLocalFiniteElementCache() │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e_:_:_P_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e │ │ │ │ │ -PQkLocalFiniteElementCache(const PQkLocalFiniteElementCache &other) │ │ │ │ │ -Copy constructor. │ │ │ │ │ -DDeeffiinniittiioonn pqkfactory.hh:126 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +First order Raviart-Thomas shape functions on prisms. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:66 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT0PrismLocalBasis< D, R >, │ │ │ │ │ +RT0PrismLocalCoefficients, RT0PrismLocalInterpolation< RT0PrismLocalBasis< D, R │ │ │ │ │ +> > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0PrismLocalFiniteElement() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:37 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0PrismLocalFiniteElement(int s) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prism.hh:71 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecube.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomassimplex.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,48 +65,45 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangecube.hh File Reference
│ │ │ │ +
raviartthomassimplex.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ + │ │ │ │ +

Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension. │ │ │ │ +More...

│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LagrangeCubeLocalFiniteElement< D, R, dim, k >
 Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order. More...
class  Dune::RaviartThomasSimplexLocalFiniteElement< dimDomain, D, R, SF, CF >
 Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,30 +1,27 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangecube.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomassimplex.hh File Reference │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_/_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_i_m_,_ _k_ _> │ │ │ │ │ -  Lagrange finite element for cubes with arbitrary compile-time dimension │ │ │ │ │ - and polynomial order. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _d_i_m_D_o_m_a_i_n_,_ _D_,_ _R_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ +  Raviart-Thomas local finite elements of arbitrary order for simplices │ │ │ │ │ + of arbitrary dimension. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00254_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecube.hh Source File │ │ │ │ +dune-localfunctions: raviartthomassimplex.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,747 +70,66 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangecube.hh
│ │ │ │ +
raviartthomassimplex.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ + │ │ │ │ + │ │ │ │
10
│ │ │ │ -
11#include <dune/common/fmatrix.hh>
│ │ │ │ -
12#include <dune/common/fvector.hh>
│ │ │ │ -
13#include <dune/common/math.hh>
│ │ │ │ -
14
│ │ │ │ -
15#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
16
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
21
│ │ │ │ -
22namespace Dune { namespace Impl
│ │ │ │ -
23{
│ │ │ │ -
24 // Forward declaration
│ │ │ │ -
25 template<class LocalBasis>
│ │ │ │ -
26 class LagrangeCubeLocalInterpolation;
│ │ │ │ -
27
│ │ │ │ -
38 template<class D, class R, unsigned int dim, unsigned int k>
│ │ │ │ -
39 class LagrangeCubeLocalBasis
│ │ │ │ -
40 {
│ │ │ │ -
41 friend class LagrangeCubeLocalInterpolation<LagrangeCubeLocalBasis<D,R,dim,k> >;
│ │ │ │ -
42
│ │ │ │ -
43 // i-th Lagrange polynomial of degree k in one dimension
│ │ │ │ -
44 static R p(unsigned int i, D x)
│ │ │ │ -
45 {
│ │ │ │ -
46 R result(1.0);
│ │ │ │ -
47 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
48 if (j!=i) result *= (k*x-j)/((int)i-(int)j);
│ │ │ │ -
49 return result;
│ │ │ │ -
50 }
│ │ │ │ -
51
│ │ │ │ -
52 // derivative of ith Lagrange polynomial of degree k in one dimension
│ │ │ │ -
53 static R dp(unsigned int i, D x)
│ │ │ │ -
54 {
│ │ │ │ -
55 R result(0.0);
│ │ │ │ -
56
│ │ │ │ -
57 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
58 {
│ │ │ │ -
59 if (j!=i)
│ │ │ │ -
60 {
│ │ │ │ -
61 R prod( (k*1.0)/((int)i-(int)j) );
│ │ │ │ -
62 for (unsigned int l=0; l<=k; l++)
│ │ │ │ -
63 if (l!=i && l!=j)
│ │ │ │ -
64 prod *= (k*x-l)/((int)i-(int)l);
│ │ │ │ -
65 result += prod;
│ │ │ │ -
66 }
│ │ │ │ -
67 }
│ │ │ │ -
68 return result;
│ │ │ │ -
69 }
│ │ │ │ -
70
│ │ │ │ -
71 // Second derivative of j-th Lagrange polynomial of degree k in one dimension
│ │ │ │ -
72 // Formula and notation taken from https://en.wikipedia.org/wiki/Lagrange_polynomial#Derivatives
│ │ │ │ -
73 static R ddp(unsigned int j, D x)
│ │ │ │ -
74 {
│ │ │ │ -
75 R result(0.0);
│ │ │ │ -
76
│ │ │ │ -
77 for (unsigned int i=0; i<=k; i++)
│ │ │ │ -
78 {
│ │ │ │ -
79 if (i==j)
│ │ │ │ -
80 continue;
│ │ │ │ -
81
│ │ │ │ -
82 R sum(0);
│ │ │ │ -
83
│ │ │ │ -
84 for (unsigned int m=0; m<=k; m++)
│ │ │ │ -
85 {
│ │ │ │ -
86 if (m==i || m==j)
│ │ │ │ -
87 continue;
│ │ │ │ -
88
│ │ │ │ -
89 R prod( (k*1.0)/((int)j-(int)m) );
│ │ │ │ -
90 for (unsigned int l=0; l<=k; l++)
│ │ │ │ -
91 if (l!=i && l!=j && l!=m)
│ │ │ │ -
92 prod *= (k*x-l)/((int)j-(int)l);
│ │ │ │ -
93 sum += prod;
│ │ │ │ -
94 }
│ │ │ │ -
95
│ │ │ │ -
96 result += sum * ( (k*1.0)/((int)j-(int)i) );
│ │ │ │ -
97 }
│ │ │ │ -
98
│ │ │ │ -
99 return result;
│ │ │ │ -
100 }
│ │ │ │ -
101
│ │ │ │ -
102 // Return i as a d-digit number in the (k+1)-nary system
│ │ │ │ -
103 static std::array<unsigned int,dim> multiindex (unsigned int i)
│ │ │ │ -
104 {
│ │ │ │ -
105 std::array<unsigned int,dim> alpha;
│ │ │ │ -
106 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
107 {
│ │ │ │ -
108 alpha[j] = i % (k+1);
│ │ │ │ -
109 i = i/(k+1);
│ │ │ │ -
110 }
│ │ │ │ -
111 return alpha;
│ │ │ │ -
112 }
│ │ │ │ -
113
│ │ │ │ -
114 public:
│ │ │ │ -
115 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,R,1,FieldVector<R,1>,FieldMatrix<R,1,dim> >;
│ │ │ │ -
116
│ │ │ │ -
119 static constexpr unsigned int size ()
│ │ │ │ -
120 {
│ │ │ │ -
121 return power(k+1, dim);
│ │ │ │ -
122 }
│ │ │ │ -
123
│ │ │ │ -
125 void evaluateFunction(const typename Traits::DomainType& x,
│ │ │ │ -
126 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
127 {
│ │ │ │ -
128 out.resize(size());
│ │ │ │ -
129
│ │ │ │ -
130 // Specialization for zero-order case
│ │ │ │ -
131 if (k==0)
│ │ │ │ -
132 {
│ │ │ │ -
133 out[0] = 1;
│ │ │ │ -
134 return;
│ │ │ │ -
135 }
│ │ │ │ -
136
│ │ │ │ -
137 if (k==1)
│ │ │ │ -
138 {
│ │ │ │ -
139 for (size_t i=0; i<size(); i++)
│ │ │ │ -
140 {
│ │ │ │ -
141 out[i] = 1;
│ │ │ │ -
142
│ │ │ │ -
143 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
144 // if j-th bit of i is set multiply with x[j], else with 1-x[j]
│ │ │ │ -
145 out[i] *= (i & (1<<j)) ? x[j] : 1-x[j];
│ │ │ │ -
146 }
│ │ │ │ -
147 return;
│ │ │ │ -
148 }
│ │ │ │ -
149
│ │ │ │ -
150 // General case
│ │ │ │ -
151 for (size_t i=0; i<size(); i++)
│ │ │ │ -
152 {
│ │ │ │ -
153 // convert index i to multiindex
│ │ │ │ -
154 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ -
155
│ │ │ │ -
156 // initialize product
│ │ │ │ -
157 out[i] = 1.0;
│ │ │ │ -
158
│ │ │ │ -
159 // dimension by dimension
│ │ │ │ -
160 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
161 out[i] *= p(alpha[j],x[j]);
│ │ │ │ -
162 }
│ │ │ │ -
163 }
│ │ │ │ -
164
│ │ │ │ -
170 void evaluateJacobian(const typename Traits::DomainType& x,
│ │ │ │ -
171 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
172 {
│ │ │ │ -
173 out.resize(size());
│ │ │ │ -
174
│ │ │ │ -
175 // Specialization for k==0
│ │ │ │ -
176 if (k==0)
│ │ │ │ -
177 {
│ │ │ │ -
178 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ -
179 return;
│ │ │ │ -
180 }
│ │ │ │ -
181
│ │ │ │ -
182 // Specialization for k==1
│ │ │ │ -
183 if (k==1)
│ │ │ │ -
184 {
│ │ │ │ -
185 // Loop over all shape functions
│ │ │ │ -
186 for (size_t i=0; i<size(); i++)
│ │ │ │ -
187 {
│ │ │ │ -
188 // Loop over all coordinate directions
│ │ │ │ -
189 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
190 {
│ │ │ │ -
191 // Initialize: the overall expression is a product
│ │ │ │ -
192 // if j-th bit of i is set to 1, else -11
│ │ │ │ -
193 out[i][0][j] = (i & (1<<j)) ? 1 : -1;
│ │ │ │ -
194
│ │ │ │ -
195 for (unsigned int l=0; l<dim; l++)
│ │ │ │ -
196 {
│ │ │ │ -
197 if (j!=l)
│ │ │ │ -
198 // if l-th bit of i is set multiply with x[l], else with 1-x[l]
│ │ │ │ -
199 out[i][0][j] *= (i & (1<<l)) ? x[l] : 1-x[l];
│ │ │ │ -
200 }
│ │ │ │ -
201 }
│ │ │ │ -
202 }
│ │ │ │ -
203 return;
│ │ │ │ -
204 }
│ │ │ │ -
205
│ │ │ │ -
206 // The general case
│ │ │ │ -
207
│ │ │ │ -
208 // Loop over all shape functions
│ │ │ │ -
209 for (size_t i=0; i<size(); i++)
│ │ │ │ -
210 {
│ │ │ │ -
211 // convert index i to multiindex
│ │ │ │ -
212 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ -
213
│ │ │ │ -
214 // Loop over all coordinate directions
│ │ │ │ -
215 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
216 {
│ │ │ │ -
217 // Initialize: the overall expression is a product
│ │ │ │ -
218 // if j-th bit of i is set to -1, else 1
│ │ │ │ -
219 out[i][0][j] = dp(alpha[j],x[j]);
│ │ │ │ -
220
│ │ │ │ -
221 // rest of the product
│ │ │ │ -
222 for (unsigned int l=0; l<dim; l++)
│ │ │ │ -
223 if (l!=j)
│ │ │ │ -
224 out[i][0][j] *= p(alpha[l],x[l]);
│ │ │ │ -
225 }
│ │ │ │ -
226 }
│ │ │ │ -
227 }
│ │ │ │ -
228
│ │ │ │ -
235 void partial(const std::array<unsigned int,dim>& order,
│ │ │ │ -
236 const typename Traits::DomainType& in,
│ │ │ │ -
237 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
238 {
│ │ │ │ -
239 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
240
│ │ │ │ -
241 out.resize(size());
│ │ │ │ -
242
│ │ │ │ -
243 if (k==0)
│ │ │ │ -
244 {
│ │ │ │ -
245 out[0] = (totalOrder==0);
│ │ │ │ -
246 return;
│ │ │ │ -
247 }
│ │ │ │ -
248
│ │ │ │ -
249 if (k==1)
│ │ │ │ -
250 {
│ │ │ │ -
251 if (totalOrder == 0)
│ │ │ │ -
252 {
│ │ │ │ -
253 evaluateFunction(in, out);
│ │ │ │ -
254 }
│ │ │ │ -
255 else if (totalOrder == 1)
│ │ │ │ -
256 {
│ │ │ │ -
257 out.resize(size());
│ │ │ │ -
258
│ │ │ │ -
259 auto direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
260 if (direction >= dim)
│ │ │ │ -
261 DUNE_THROW(RangeError, "Direction of partial derivative not found!");
│ │ │ │ -
262
│ │ │ │ -
263 // Loop over all shape functions
│ │ │ │ -
264 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
265 {
│ │ │ │ -
266 // Initialize: the overall expression is a product
│ │ │ │ -
267 // if j-th bit of i is set to 1, otherwise to -1
│ │ │ │ -
268 out[i] = (i & (1<<direction)) ? 1 : -1;
│ │ │ │ -
269
│ │ │ │ -
270 for (unsigned int j = 0; j < dim; ++j)
│ │ │ │ -
271 {
│ │ │ │ -
272 if (direction != j)
│ │ │ │ -
273 // if j-th bit of i is set multiply with in[j], else with 1-in[j]
│ │ │ │ -
274 out[i] *= (i & (1<<j)) ? in[j] : 1-in[j];
│ │ │ │ -
275 }
│ │ │ │ -
276 }
│ │ │ │ -
277 }
│ │ │ │ -
278 else if (totalOrder == 2)
│ │ │ │ -
279 {
│ │ │ │ -
280
│ │ │ │ -
281 for (size_t i=0; i<size(); i++)
│ │ │ │ -
282 {
│ │ │ │ -
283 // convert index i to multiindex
│ │ │ │ -
284 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ -
285
│ │ │ │ -
286 // Initialize: the overall expression is a product
│ │ │ │ -
287 out[i][0] = 1.0;
│ │ │ │ -
288
│ │ │ │ -
289 // rest of the product
│ │ │ │ -
290 for (std::size_t l=0; l<dim; l++)
│ │ │ │ -
291 {
│ │ │ │ -
292 switch (order[l])
│ │ │ │ -
293 {
│ │ │ │ -
294 case 0:
│ │ │ │ -
295 out[i][0] *= p(alpha[l],in[l]);
│ │ │ │ -
296 break;
│ │ │ │ -
297 case 1:
│ │ │ │ -
298 //std::cout << "dp: " << dp(alpha[l],in[l]) << std::endl;
│ │ │ │ -
299 out[i][0] *= dp(alpha[l],in[l]);
│ │ │ │ -
300 break;
│ │ │ │ -
301 case 2:
│ │ │ │ -
302 out[i][0] *= 0;
│ │ │ │ -
303 break;
│ │ │ │ -
304 default:
│ │ │ │ -
305 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
306 }
│ │ │ │ -
307 }
│ │ │ │ -
308 }
│ │ │ │ -
309 }
│ │ │ │ -
310 else
│ │ │ │ -
311 DUNE_THROW(NotImplemented, "Partial derivative of order " << totalOrder << " is not implemented!");
│ │ │ │ -
312
│ │ │ │ -
313 return;
│ │ │ │ -
314 }
│ │ │ │ -
315
│ │ │ │ -
316 // The case k>1
│ │ │ │ -
317
│ │ │ │ -
318 // Loop over all shape functions
│ │ │ │ -
319 for (size_t i=0; i<size(); i++)
│ │ │ │ -
320 {
│ │ │ │ -
321 // convert index i to multiindex
│ │ │ │ -
322 std::array<unsigned int,dim> alpha(multiindex(i));
│ │ │ │ -
323
│ │ │ │ -
324 // Initialize: the overall expression is a product
│ │ │ │ -
325 out[i][0] = 1.0;
│ │ │ │ -
326
│ │ │ │ -
327 // rest of the product
│ │ │ │ -
328 for (std::size_t l=0; l<dim; l++)
│ │ │ │ -
329 {
│ │ │ │ -
330 switch (order[l])
│ │ │ │ -
331 {
│ │ │ │ -
332 case 0:
│ │ │ │ -
333 out[i][0] *= p(alpha[l],in[l]);
│ │ │ │ -
334 break;
│ │ │ │ -
335 case 1:
│ │ │ │ -
336 out[i][0] *= dp(alpha[l],in[l]);
│ │ │ │ -
337 break;
│ │ │ │ -
338 case 2:
│ │ │ │ -
339 out[i][0] *= ddp(alpha[l],in[l]);
│ │ │ │ -
340 break;
│ │ │ │ -
341 default:
│ │ │ │ -
342 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
343 }
│ │ │ │ -
344 }
│ │ │ │ -
345 }
│ │ │ │ -
346 }
│ │ │ │ -
347
│ │ │ │ -
349 static constexpr unsigned int order ()
│ │ │ │ -
350 {
│ │ │ │ -
351 return k;
│ │ │ │ -
352 }
│ │ │ │ -
353 };
│ │ │ │ -
354
│ │ │ │ -
360 template<unsigned int dim, unsigned int k>
│ │ │ │ -
361 class LagrangeCubeLocalCoefficients
│ │ │ │ -
362 {
│ │ │ │ -
363 // Return i as a d-digit number in the (k+1)-nary system
│ │ │ │ -
364 static std::array<unsigned int,dim> multiindex (unsigned int i)
│ │ │ │ -
365 {
│ │ │ │ -
366 std::array<unsigned int,dim> alpha;
│ │ │ │ -
367 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
368 {
│ │ │ │ -
369 alpha[j] = i % (k+1);
│ │ │ │ -
370 i = i/(k+1);
│ │ │ │ -
371 }
│ │ │ │ -
372 return alpha;
│ │ │ │ -
373 }
│ │ │ │ -
374
│ │ │ │ -
376 void setup1d(std::vector<unsigned int>& subEntity)
│ │ │ │ -
377 {
│ │ │ │ -
378 assert(k>0);
│ │ │ │ -
379
│ │ │ │ -
380 unsigned lastIndex=0;
│ │ │ │ -
381
│ │ │ │ -
382 /* edge and vertex numbering
│ │ │ │ -
383 0----0----1
│ │ │ │ -
384 */
│ │ │ │ -
385
│ │ │ │ -
386 // edge (0)
│ │ │ │ -
387 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ -
388 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
389 subEntity[lastIndex++] = 0; // inner dofs of element (0)
│ │ │ │ -
390
│ │ │ │ -
391 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ -
392
│ │ │ │ -
393 assert(power(k+1,dim)==lastIndex);
│ │ │ │ -
394 }
│ │ │ │ -
395
│ │ │ │ -
396 void setup2d(std::vector<unsigned int>& subEntity)
│ │ │ │ -
397 {
│ │ │ │ -
398 assert(k>0);
│ │ │ │ -
399
│ │ │ │ -
400 unsigned lastIndex=0;
│ │ │ │ -
401
│ │ │ │ -
402 // LocalKey: entity number, entity codim, dof indices within each entity
│ │ │ │ -
403 /* edge and vertex numbering
│ │ │ │ -
404 2----3----3
│ │ │ │ -
405 | |
│ │ │ │ -
406 | |
│ │ │ │ -
407 0 1
│ │ │ │ -
408 | |
│ │ │ │ -
409 | |
│ │ │ │ -
410 0----2----1
│ │ │ │ -
411 */
│ │ │ │ -
412
│ │ │ │ -
413 // lower edge (2)
│ │ │ │ -
414 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ -
415 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
416 subEntity[lastIndex++] = 2; // inner dofs of lower edge (2)
│ │ │ │ -
417
│ │ │ │ -
418 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ -
419
│ │ │ │ -
420 // iterate from bottom to top over inner edge dofs
│ │ │ │ -
421 for (unsigned e = 0; e < k - 1; ++e) {
│ │ │ │ -
422 subEntity[lastIndex++] = 0; // left edge (0)
│ │ │ │ -
423 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
424 subEntity[lastIndex++] = 0; // face dofs
│ │ │ │ -
425 subEntity[lastIndex++] = 1; // right edge (1)
│ │ │ │ -
426 }
│ │ │ │ -
427
│ │ │ │ -
428 // upper edge (3)
│ │ │ │ -
429 subEntity[lastIndex++] = 2; // corner 2
│ │ │ │ -
430 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
431 subEntity[lastIndex++] = 3; // inner dofs of upper edge (3)
│ │ │ │ -
432
│ │ │ │ -
433 subEntity[lastIndex++] = 3; // corner 3
│ │ │ │ -
434
│ │ │ │ -
435 assert(power(k+1,dim)==lastIndex);
│ │ │ │ -
436 }
│ │ │ │ -
437
│ │ │ │ -
438 void setup3d(std::vector<unsigned int>& subEntity)
│ │ │ │ -
439 {
│ │ │ │ -
440 assert(k>0);
│ │ │ │ -
441
│ │ │ │ -
442 unsigned lastIndex=0;
│ │ │ │ -
443#ifndef NDEBUG
│ │ │ │ -
444 const unsigned numIndices = power(k+1,dim);
│ │ │ │ -
445 const unsigned numFaceIndices = power(k+1,dim-1);
│ │ │ │ -
446#endif
│ │ │ │ -
447 const unsigned numInnerEdgeDofs = k-1;
│ │ │ │ -
448
│ │ │ │ -
449 // LocalKey: entity number, entity codim, dof indices within each entity
│ │ │ │ -
450 /* edge and vertex numbering
│ │ │ │ -
451
│ │ │ │ -
452 6---(11)--7 6---------7
│ │ │ │ -
453 /| /| /| (5) /|
│ │ │ │ -
454 (8)| (9)| / | top / |
│ │ │ │ -
455 / (2) / (3) / |(3)bac/k |
│ │ │ │ -
456 4---(10)--5 | 4---------5 |
│ │ │ │ -
457 | | | | left|(0)| |(1)|right
│ │ │ │ -
458 | 2--(7)|---3 | 2-----|---3
│ │ │ │ -
459 (0) / (1) / |(2)front | /
│ │ │ │ -
460 |(4) |(5) | / (4) | /
│ │ │ │ -
461 |/ |/ |/ bottom |/
│ │ │ │ -
462 0---(6)---1 0---------1
│ │ │ │ -
463 */
│ │ │ │ -
464
│ │ │ │ -
465 // bottom face (4)
│ │ │ │ -
466 lastIndex=0;
│ │ │ │ -
467 // lower edge (6)
│ │ │ │ -
468 subEntity[lastIndex++] = 0; // corner 0
│ │ │ │ -
469 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ -
470 subEntity[lastIndex++] = 6; // inner dofs of lower edge (6)
│ │ │ │ -
471
│ │ │ │ -
472 subEntity[lastIndex++] = 1; // corner 1
│ │ │ │ -
473
│ │ │ │ -
474 // iterate from bottom to top over inner edge dofs
│ │ │ │ -
475 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) {
│ │ │ │ -
476 subEntity[lastIndex++] = 4; // left edge (4)
│ │ │ │ -
477 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ -
478 subEntity[lastIndex++] = 4; // inner face dofs
│ │ │ │ -
479 subEntity[lastIndex++] = 5; // right edge (5)
│ │ │ │ -
480 }
│ │ │ │ -
481
│ │ │ │ -
482 // upper edge (7)
│ │ │ │ -
483 subEntity[lastIndex++] = 2; // corner 2
│ │ │ │ -
484 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
485 subEntity[lastIndex++] = 7; // inner dofs of upper edge (7)
│ │ │ │ -
486 subEntity[lastIndex++] = 3; // corner 3
│ │ │ │ -
487
│ │ │ │ -
488 assert(numFaceIndices==lastIndex); // added 1 face so far
│ │ │ │ -
490
│ │ │ │ -
492 for(unsigned f = 0; f < numInnerEdgeDofs; ++f) {
│ │ │ │ -
493
│ │ │ │ -
494 // lower edge (connecting edges 0 and 1)
│ │ │ │ -
495 subEntity[lastIndex++] = 0; // dof on edge 0
│ │ │ │ -
496 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ -
497 subEntity[lastIndex++] = 2; // dof in front face
│ │ │ │ -
498 subEntity[lastIndex++] = 1; // dof on edge 1
│ │ │ │ -
499
│ │ │ │ -
500 // iterate from bottom to top over inner edge dofs
│ │ │ │ -
501 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) {
│ │ │ │ -
502 subEntity[lastIndex++] = 0; // on left face (0)
│ │ │ │ -
503 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ -
504 subEntity[lastIndex++] = 0; // volume dofs
│ │ │ │ -
505 subEntity[lastIndex++] = 1; // right face (1)
│ │ │ │ -
506 }
│ │ │ │ -
507
│ │ │ │ -
508 // upper edge (connecting edges 0 and 1)
│ │ │ │ -
509 subEntity[lastIndex++] = 2; // dof on edge 2
│ │ │ │ -
510 for (unsigned i = 0; i < numInnerEdgeDofs; ++i)
│ │ │ │ -
511 subEntity[lastIndex++] = 3; // dof on rear face (3)
│ │ │ │ -
512 subEntity[lastIndex++] = 3; // dof on edge 3
│ │ │ │ -
513
│ │ │ │ -
514 assert(lastIndex==(f+1+1)*numFaceIndices);
│ │ │ │ -
515 }
│ │ │ │ -
516
│ │ │ │ -
518 // lower edge (10)
│ │ │ │ -
519 subEntity[lastIndex++] = 4; // corner 4
│ │ │ │ -
520 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
521 subEntity[lastIndex++] = 10; // inner dofs on lower edge (10)
│ │ │ │ -
522 subEntity[lastIndex++] = 5; // corner 5
│ │ │ │ -
523
│ │ │ │ -
524 // iterate from bottom to top over inner edge dofs
│ │ │ │ -
525 for (unsigned e = 0; e < k - 1; ++e) {
│ │ │ │ -
526 subEntity[lastIndex++] = 8; // left edge (8)
│ │ │ │ -
527 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
528 subEntity[lastIndex++] = 5; // face dofs
│ │ │ │ -
529 subEntity[lastIndex++] = 9; // right edge (9)
│ │ │ │ -
530 }
│ │ │ │ -
531
│ │ │ │ -
532 // upper edge (11)
│ │ │ │ -
533 subEntity[lastIndex++] = 6; // corner 6
│ │ │ │ -
534 for (unsigned i = 0; i < k - 1; ++i)
│ │ │ │ -
535 subEntity[lastIndex++] = 11; // inner dofs of upper edge (11)
│ │ │ │ -
536 subEntity[lastIndex++] = 7; // corner 7
│ │ │ │ -
537
│ │ │ │ -
538 assert(numIndices==lastIndex);
│ │ │ │ -
539 }
│ │ │ │ -
540
│ │ │ │ -
541 public:
│ │ │ │ -
543 LagrangeCubeLocalCoefficients ()
│ │ │ │ -
544 : localKeys_(size())
│ │ │ │ -
545 {
│ │ │ │ -
546 if (k==0)
│ │ │ │ -
547 {
│ │ │ │ -
548 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ -
549 return;
│ │ │ │ -
550 }
│ │ │ │ -
551
│ │ │ │ -
552 if (k==1)
│ │ │ │ -
553 {
│ │ │ │ -
554 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
555 localKeys_[i] = LocalKey(i,dim,0);
│ │ │ │ -
556 return;
│ │ │ │ -
557 }
│ │ │ │ -
558
│ │ │ │ -
559 // Now: the general case
│ │ │ │ -
560
│ │ │ │ -
561 // Set up array of codimension-per-dof-number
│ │ │ │ -
562 std::vector<unsigned int> codim(size());
│ │ │ │ -
563
│ │ │ │ -
564 for (std::size_t i=0; i<codim.size(); i++)
│ │ │ │ -
565 {
│ │ │ │ -
566 codim[i] = 0;
│ │ │ │ -
567
│ │ │ │ -
568 // Codimension gets increased by 1 for each coordinate direction
│ │ │ │ -
569 // where dof is on boundary
│ │ │ │ -
570 std::array<unsigned int,dim> mIdx = multiindex(i);
│ │ │ │ -
571 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
572 if (mIdx[j]==0 or mIdx[j]==k)
│ │ │ │ -
573 codim[i]++;
│ │ │ │ -
574 }
│ │ │ │ -
575
│ │ │ │ -
576 // Set up index vector (the index of the dof in the set of dofs of a given subentity)
│ │ │ │ -
577 // Algorithm: the 'index' has the same ordering as the dof number 'i'.
│ │ │ │ -
578 // To make it consecutive we interpret 'i' in the (k+1)-adic system, omit all digits
│ │ │ │ -
579 // that correspond to axes where the dof is on the element boundary, and transform the
│ │ │ │ -
580 // rest to the (k-1)-adic system.
│ │ │ │ -
581 std::vector<unsigned int> index(size());
│ │ │ │ -
582
│ │ │ │ -
583 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
584 {
│ │ │ │ -
585 index[i] = 0;
│ │ │ │ -
586
│ │ │ │ -
587 std::array<unsigned int,dim> mIdx = multiindex(i);
│ │ │ │ -
588
│ │ │ │ -
589 for (int j=dim-1; j>=0; j--)
│ │ │ │ -
590 if (mIdx[j]>0 && mIdx[j]<k)
│ │ │ │ -
591 index[i] = (k-1)*index[i] + (mIdx[j]-1);
│ │ │ │ -
592 }
│ │ │ │ -
593
│ │ │ │ -
594 // Set up entity and dof numbers for each (supported) dimension separately
│ │ │ │ -
595 std::vector<unsigned int> subEntity(size());
│ │ │ │ -
596
│ │ │ │ -
597 if (dim==1) {
│ │ │ │ -
598
│ │ │ │ -
599 setup1d(subEntity);
│ │ │ │ -
600
│ │ │ │ -
601 } else if (dim==2) {
│ │ │ │ -
602
│ │ │ │ -
603 setup2d(subEntity);
│ │ │ │ -
604
│ │ │ │ -
605 } else if (dim==3) {
│ │ │ │ -
606
│ │ │ │ -
607 setup3d(subEntity);
│ │ │ │ -
608
│ │ │ │ -
609 } else
│ │ │ │ -
610 DUNE_THROW(Dune::NotImplemented, "LagrangeCubeLocalCoefficients for order " << k << " and dim == " << dim);
│ │ │ │ -
611
│ │ │ │ -
612 for (size_t i=0; i<size(); i++)
│ │ │ │ -
613 localKeys_[i] = LocalKey(subEntity[i], codim[i], index[i]);
│ │ │ │ -
614 }
│ │ │ │ -
615
│ │ │ │ -
617 static constexpr std::size_t size ()
│ │ │ │ -
618 {
│ │ │ │ -
619 return power(k+1,dim);
│ │ │ │ -
620 }
│ │ │ │ -
621
│ │ │ │ -
623 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
624 {
│ │ │ │ -
625 return localKeys_[i];
│ │ │ │ -
626 }
│ │ │ │ -
627
│ │ │ │ -
628 private:
│ │ │ │ -
629 std::vector<LocalKey> localKeys_;
│ │ │ │ -
630 };
│ │ │ │ -
631
│ │ │ │ -
636 template<class LocalBasis>
│ │ │ │ -
637 class LagrangeCubeLocalInterpolation
│ │ │ │ -
638 {
│ │ │ │ -
639 public:
│ │ │ │ -
640
│ │ │ │ -
648 template<typename F, typename C>
│ │ │ │ -
649 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
650 {
│ │ │ │ -
651 constexpr auto dim = LocalBasis::Traits::dimDomain;
│ │ │ │ -
652 constexpr auto k = LocalBasis::order();
│ │ │ │ -
653 using D = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ -
654
│ │ │ │ -
655 typename LocalBasis::Traits::DomainType x;
│ │ │ │ -
656 auto&& f = Impl::makeFunctionWithCallOperator<typename LocalBasis::Traits::DomainType>(ff);
│ │ │ │ -
657
│ │ │ │ -
658 out.resize(LocalBasis::size());
│ │ │ │ -
659
│ │ │ │ -
660 // Specialization for zero-order case
│ │ │ │ -
661 if (k==0)
│ │ │ │ -
662 {
│ │ │ │ -
663 auto center = ReferenceElements<D,dim>::cube().position(0,0);
│ │ │ │ -
664 out[0] = f(center);
│ │ │ │ -
665 return;
│ │ │ │ -
666 }
│ │ │ │ -
667
│ │ │ │ -
668 // Specialization for first-order case
│ │ │ │ -
669 if (k==1)
│ │ │ │ -
670 {
│ │ │ │ -
671 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ -
672 {
│ │ │ │ -
673 // Generate coordinate of the i-th corner of the reference cube
│ │ │ │ -
674 for (int j=0; j<dim; j++)
│ │ │ │ -
675 x[j] = (i & (1<<j)) ? 1.0 : 0.0;
│ │ │ │ -
676
│ │ │ │ -
677 out[i] = f(x);
│ │ │ │ -
678 }
│ │ │ │ -
679 return;
│ │ │ │ -
680 }
│ │ │ │ -
681
│ │ │ │ -
682 // The general case
│ │ │ │ -
683 for (unsigned int i=0; i<LocalBasis::size(); i++)
│ │ │ │ -
684 {
│ │ │ │ -
685 // convert index i to multiindex
│ │ │ │ -
686 std::array<unsigned int,dim> alpha(LocalBasis::multiindex(i));
│ │ │ │ -
687
│ │ │ │ -
688 // Generate coordinate of the i-th Lagrange point
│ │ │ │ -
689 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
690 x[j] = (1.0*alpha[j])/k;
│ │ │ │ -
691
│ │ │ │ -
692 out[i] = f(x);
│ │ │ │ -
693 }
│ │ │ │ -
694 }
│ │ │ │ -
695
│ │ │ │ -
696 };
│ │ │ │ -
697
│ │ │ │ -
698} } // namespace Dune::Impl
│ │ │ │ -
699
│ │ │ │ -
700namespace Dune
│ │ │ │ -
701{
│ │ │ │ -
709 template<class D, class R, int dim, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
711 {
│ │ │ │ -
712 public:
│ │ │ │ - │ │ │ │ -
716 Impl::LagrangeCubeLocalCoefficients<dim,k>,
│ │ │ │ -
717 Impl::LagrangeCubeLocalInterpolation<Impl::LagrangeCubeLocalBasis<D,R,dim,k> > >;
│ │ │ │ -
718
│ │ │ │ - │ │ │ │ -
725
│ │ │ │ -
│ │ │ │ -
728 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
729 {
│ │ │ │ -
730 return basis_;
│ │ │ │ -
731 }
│ │ │ │ -
│ │ │ │ -
732
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
736 {
│ │ │ │ -
737 return coefficients_;
│ │ │ │ -
738 }
│ │ │ │ -
│ │ │ │ -
739
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
743 {
│ │ │ │ -
744 return interpolation_;
│ │ │ │ -
745 }
│ │ │ │ -
│ │ │ │ -
746
│ │ │ │ -
│ │ │ │ -
748 static constexpr std::size_t size ()
│ │ │ │ -
749 {
│ │ │ │ -
750 return power(k+1,dim);
│ │ │ │ -
751 }
│ │ │ │ -
│ │ │ │ -
752
│ │ │ │ -
│ │ │ │ -
755 static constexpr GeometryType type ()
│ │ │ │ -
756 {
│ │ │ │ -
757 return GeometryTypes::cube(dim);
│ │ │ │ -
758 }
│ │ │ │ -
│ │ │ │ -
759
│ │ │ │ -
760 private:
│ │ │ │ -
761 Impl::LagrangeCubeLocalBasis<D,R,dim,k> basis_;
│ │ │ │ -
762 Impl::LagrangeCubeLocalCoefficients<dim,k> coefficients_;
│ │ │ │ -
763 Impl::LagrangeCubeLocalInterpolation<Impl::LagrangeCubeLocalBasis<D,R,dim,k> > interpolation_;
│ │ │ │ -
764 };
│ │ │ │ -
│ │ │ │ -
765
│ │ │ │ -
766} // namespace Dune
│ │ │ │ -
767
│ │ │ │ -
768#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
17namespace Dune
│ │ │ │ +
18{
│ │ │ │ +
35 template<unsigned int dimDomain, class D, class R,
│ │ │ │ +
36 class SF=R, class CF=SF>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
38 : public GenericLocalFiniteElement<RaviartThomasBasisFactory<dimDomain, SF, CF>,
│ │ │ │ +
39 RaviartThomasCoefficientsFactory<dimDomain>,
│ │ │ │ +
40 RaviartThomasL2InterpolationFactory<dimDomain, SF> >
│ │ │ │ +
41 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
45 public:
│ │ │ │ +
46 using typename Base::Traits;
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 RaviartThomasSimplexLocalFiniteElement(const GeometryType &gt, unsigned int order)
│ │ │ │ +
50 : Base(gt, order)
│ │ │ │ +
51 {}
│ │ │ │ +
│ │ │ │ +
52 };
│ │ │ │ +
│ │ │ │ +
53} // namespace Dune
│ │ │ │ +
54
│ │ │ │ +
55#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangecube.hh:728
│ │ │ │ -
LagrangeCubeLocalFiniteElement()
Default constructor.
Definition lagrangecube.hh:724
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangecube.hh:742
│ │ │ │ -
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangecube.hh:755
│ │ │ │ -
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangecube.hh:748
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangecube.hh:735
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.
Definition raviartthomassimplex.hh:41
│ │ │ │ +
RaviartThomasSimplexLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition raviartthomassimplex.hh:49
│ │ │ │ +
Definition raviartthomassimplexinterpolation.hh:421
│ │ │ │ +
Definition raviartthomassimplexinterpolation.hh:70
│ │ │ │ +
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis,...
Definition localfunctions/utility/localfiniteelement.hh:25
│ │ │ │ +
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition localfunctions/utility/localfiniteelement.hh:29
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,774 +1,72 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangecube.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomassimplex.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ +9#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_/_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_b_a_s_i_s_._h_h" │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14 │ │ │ │ │ -15#include │ │ │ │ │ -16 │ │ │ │ │ -17#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -21 │ │ │ │ │ -22namespace _D_u_n_e { namespace Impl │ │ │ │ │ -23{ │ │ │ │ │ -24 // Forward declaration │ │ │ │ │ -25 template │ │ │ │ │ -26 class LagrangeCubeLocalInterpolation; │ │ │ │ │ -27 │ │ │ │ │ -38 template │ │ │ │ │ -39 class LagrangeCubeLocalBasis │ │ │ │ │ -40 { │ │ │ │ │ -41 friend class │ │ │ │ │ -LagrangeCubeLocalInterpolation >; │ │ │ │ │ -42 │ │ │ │ │ -43 // i-th Lagrange polynomial of degree k in one dimension │ │ │ │ │ -44 static R p(unsigned int i, D x) │ │ │ │ │ -45 { │ │ │ │ │ -46 R result(1.0); │ │ │ │ │ -47 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ -48 if (j!=i) result *= (k*x-j)/((int)i-(int)j); │ │ │ │ │ -49 return result; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -52 // derivative of ith Lagrange polynomial of degree k in one dimension │ │ │ │ │ -53 static R dp(unsigned int i, D x) │ │ │ │ │ -54 { │ │ │ │ │ -55 R result(0.0); │ │ │ │ │ -56 │ │ │ │ │ -57 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ -58 { │ │ │ │ │ -59 if (j!=i) │ │ │ │ │ -60 { │ │ │ │ │ -61 R prod( (k*1.0)/((int)i-(int)j) ); │ │ │ │ │ -62 for (unsigned int l=0; l<=k; l++) │ │ │ │ │ -63 if (l!=i && l!=j) │ │ │ │ │ -64 prod *= (k*x-l)/((int)i-(int)l); │ │ │ │ │ -65 result += prod; │ │ │ │ │ -66 } │ │ │ │ │ -67 } │ │ │ │ │ -68 return result; │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -71 // Second derivative of j-th Lagrange polynomial of degree k in one │ │ │ │ │ -dimension │ │ │ │ │ -72 // Formula and notation taken from https://en.wikipedia.org/wiki/ │ │ │ │ │ -Lagrange_polynomial#Derivatives │ │ │ │ │ -73 static R ddp(unsigned int j, D x) │ │ │ │ │ -74 { │ │ │ │ │ -75 R result(0.0); │ │ │ │ │ -76 │ │ │ │ │ -77 for (unsigned int i=0; i<=k; i++) │ │ │ │ │ -78 { │ │ │ │ │ -79 if (i==j) │ │ │ │ │ -80 continue; │ │ │ │ │ -81 │ │ │ │ │ -82 R sum(0); │ │ │ │ │ -83 │ │ │ │ │ -84 for (unsigned int m=0; m<=k; m++) │ │ │ │ │ -85 { │ │ │ │ │ -86 if (m==i || m==j) │ │ │ │ │ -87 continue; │ │ │ │ │ -88 │ │ │ │ │ -89 R prod( (k*1.0)/((int)j-(int)m) ); │ │ │ │ │ -90 for (unsigned int l=0; l<=k; l++) │ │ │ │ │ -91 if (l!=i && l!=j && l!=m) │ │ │ │ │ -92 prod *= (k*x-l)/((int)j-(int)l); │ │ │ │ │ -93 sum += prod; │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 result += sum * ( (k*1.0)/((int)j-(int)i) ); │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99 return result; │ │ │ │ │ -100 } │ │ │ │ │ -101 │ │ │ │ │ -102 // Return i as a d-digit number in the (k+1)-nary system │ │ │ │ │ -103 static std::array multiindex (unsigned int i) │ │ │ │ │ -104 { │ │ │ │ │ -105 std::array alpha; │ │ │ │ │ -106 for (unsigned int j=0; j,R,1,FieldVector,FieldMatrix │ │ │ │ │ ->; │ │ │ │ │ -116 │ │ │ │ │ -119 static constexpr unsigned int size () │ │ │ │ │ -120 { │ │ │ │ │ -121 return power(k+1, dim); │ │ │ │ │ -122 } │ │ │ │ │ -123 │ │ │ │ │ -125 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ -126 std::vector& out) const │ │ │ │ │ -127 { │ │ │ │ │ -128 out.resize(size()); │ │ │ │ │ -129 │ │ │ │ │ -130 // Specialization for zero-order case │ │ │ │ │ -131 if (k==0) │ │ │ │ │ -132 { │ │ │ │ │ -133 out[0] = 1; │ │ │ │ │ -134 return; │ │ │ │ │ -135 } │ │ │ │ │ -136 │ │ │ │ │ -137 if (k==1) │ │ │ │ │ -138 { │ │ │ │ │ -139 for (size_t i=0; i alpha(multiindex(i)); │ │ │ │ │ -155 │ │ │ │ │ -156 // initialize product │ │ │ │ │ -157 out[i] = 1.0; │ │ │ │ │ -158 │ │ │ │ │ -159 // dimension by dimension │ │ │ │ │ -160 for (unsigned int j=0; j& out) const │ │ │ │ │ -172 { │ │ │ │ │ -173 out.resize(size()); │ │ │ │ │ -174 │ │ │ │ │ -175 // Specialization for k==0 │ │ │ │ │ -176 if (k==0) │ │ │ │ │ -177 { │ │ │ │ │ -178 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ -179 return; │ │ │ │ │ -180 } │ │ │ │ │ -181 │ │ │ │ │ -182 // Specialization for k==1 │ │ │ │ │ -183 if (k==1) │ │ │ │ │ -184 { │ │ │ │ │ -185 // Loop over all shape functions │ │ │ │ │ -186 for (size_t i=0; i alpha(multiindex(i)); │ │ │ │ │ -213 │ │ │ │ │ -214 // Loop over all coordinate directions │ │ │ │ │ -215 for (unsigned int j=0; j& order, │ │ │ │ │ -236 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -237 std::vector& out) const │ │ │ │ │ -238 { │ │ │ │ │ -239 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -240 │ │ │ │ │ -241 out.resize(size()); │ │ │ │ │ -242 │ │ │ │ │ -243 if (k==0) │ │ │ │ │ -244 { │ │ │ │ │ -245 out[0] = (totalOrder==0); │ │ │ │ │ -246 return; │ │ │ │ │ -247 } │ │ │ │ │ -248 │ │ │ │ │ -249 if (k==1) │ │ │ │ │ -250 { │ │ │ │ │ -251 if (totalOrder == 0) │ │ │ │ │ -252 { │ │ │ │ │ -253 evaluateFunction(in, out); │ │ │ │ │ -254 } │ │ │ │ │ -255 else if (totalOrder == 1) │ │ │ │ │ -256 { │ │ │ │ │ -257 out.resize(size()); │ │ │ │ │ -258 │ │ │ │ │ -259 auto direction = std::distance(order.begin(), std::find(order.begin(), │ │ │ │ │ -order.end(), 1)); │ │ │ │ │ -260 if (direction >= dim) │ │ │ │ │ -261 DUNE_THROW(RangeError, "Direction of partial derivative not found!"); │ │ │ │ │ -262 │ │ │ │ │ -263 // Loop over all shape functions │ │ │ │ │ -264 for (std::size_t i = 0; i < size(); ++i) │ │ │ │ │ -265 { │ │ │ │ │ -266 // Initialize: the overall expression is a product │ │ │ │ │ -267 // if j-th bit of i is set to 1, otherwise to -1 │ │ │ │ │ -268 out[i] = (i & (1< alpha(multiindex(i)); │ │ │ │ │ -285 │ │ │ │ │ -286 // Initialize: the overall expression is a product │ │ │ │ │ -287 out[i][0] = 1.0; │ │ │ │ │ -288 │ │ │ │ │ -289 // rest of the product │ │ │ │ │ -290 for (std::size_t l=0; l1 │ │ │ │ │ -317 │ │ │ │ │ -318 // Loop over all shape functions │ │ │ │ │ -319 for (size_t i=0; i alpha(multiindex(i)); │ │ │ │ │ -323 │ │ │ │ │ -324 // Initialize: the overall expression is a product │ │ │ │ │ -325 out[i][0] = 1.0; │ │ │ │ │ -326 │ │ │ │ │ -327 // rest of the product │ │ │ │ │ -328 for (std::size_t l=0; l │ │ │ │ │ -361 class LagrangeCubeLocalCoefficients │ │ │ │ │ -362 { │ │ │ │ │ -363 // Return i as a d-digit number in the (k+1)-nary system │ │ │ │ │ -364 static std::array multiindex (unsigned int i) │ │ │ │ │ -365 { │ │ │ │ │ -366 std::array alpha; │ │ │ │ │ -367 for (unsigned int j=0; j& subEntity) │ │ │ │ │ -377 { │ │ │ │ │ -378 assert(k>0); │ │ │ │ │ -379 │ │ │ │ │ -380 unsigned lastIndex=0; │ │ │ │ │ -381 │ │ │ │ │ -382 /* edge and vertex numbering │ │ │ │ │ -383 0----0----1 │ │ │ │ │ -384 */ │ │ │ │ │ -385 │ │ │ │ │ -386 // edge (0) │ │ │ │ │ -387 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ -388 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -389 subEntity[lastIndex++] = 0; // inner dofs of element (0) │ │ │ │ │ -390 │ │ │ │ │ -391 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ -392 │ │ │ │ │ -393 assert(power(k+1,dim)==lastIndex); │ │ │ │ │ -394 } │ │ │ │ │ -395 │ │ │ │ │ -396 void setup2d(std::vector& subEntity) │ │ │ │ │ -397 { │ │ │ │ │ -398 assert(k>0); │ │ │ │ │ -399 │ │ │ │ │ -400 unsigned lastIndex=0; │ │ │ │ │ -401 │ │ │ │ │ -402 // LocalKey: entity number, entity codim, dof indices within each entity │ │ │ │ │ -403 /* edge and vertex numbering │ │ │ │ │ -404 2----3----3 │ │ │ │ │ -405 | | │ │ │ │ │ -406 | | │ │ │ │ │ -407 0 1 │ │ │ │ │ -408 | | │ │ │ │ │ -409 | | │ │ │ │ │ -410 0----2----1 │ │ │ │ │ -411 */ │ │ │ │ │ -412 │ │ │ │ │ -413 // lower edge (2) │ │ │ │ │ -414 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ -415 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -416 subEntity[lastIndex++] = 2; // inner dofs of lower edge (2) │ │ │ │ │ -417 │ │ │ │ │ -418 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ -419 │ │ │ │ │ -420 // iterate from bottom to top over inner edge dofs │ │ │ │ │ -421 for (unsigned e = 0; e < k - 1; ++e) { │ │ │ │ │ -422 subEntity[lastIndex++] = 0; // left edge (0) │ │ │ │ │ -423 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -424 subEntity[lastIndex++] = 0; // face dofs │ │ │ │ │ -425 subEntity[lastIndex++] = 1; // right edge (1) │ │ │ │ │ -426 } │ │ │ │ │ -427 │ │ │ │ │ -428 // upper edge (3) │ │ │ │ │ -429 subEntity[lastIndex++] = 2; // corner 2 │ │ │ │ │ -430 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -431 subEntity[lastIndex++] = 3; // inner dofs of upper edge (3) │ │ │ │ │ -432 │ │ │ │ │ -433 subEntity[lastIndex++] = 3; // corner 3 │ │ │ │ │ -434 │ │ │ │ │ -435 assert(power(k+1,dim)==lastIndex); │ │ │ │ │ -436 } │ │ │ │ │ -437 │ │ │ │ │ -438 void setup3d(std::vector& subEntity) │ │ │ │ │ -439 { │ │ │ │ │ -440 assert(k>0); │ │ │ │ │ -441 │ │ │ │ │ -442 unsigned lastIndex=0; │ │ │ │ │ -443#ifndef NDEBUG │ │ │ │ │ -444 const unsigned numIndices = power(k+1,dim); │ │ │ │ │ -445 const unsigned numFaceIndices = power(k+1,dim-1); │ │ │ │ │ -446#endif │ │ │ │ │ -447 const unsigned numInnerEdgeDofs = k-1; │ │ │ │ │ -448 │ │ │ │ │ -449 // LocalKey: entity number, entity codim, dof indices within each entity │ │ │ │ │ -450 /* edge and vertex numbering │ │ │ │ │ -451 │ │ │ │ │ -452 6---(11)--7 6---------7 │ │ │ │ │ -453 /| /| /| (5) /| │ │ │ │ │ -454 (8)| (9)| / | top / | │ │ │ │ │ -455 / (2) / (3) / |(3)bac/k | │ │ │ │ │ -456 4---(10)--5 | 4---------5 | │ │ │ │ │ -457 | | | | left|(0)| |(1)|right │ │ │ │ │ -458 | 2--(7)|---3 | 2-----|---3 │ │ │ │ │ -459 (0) / (1) / |(2)front | / │ │ │ │ │ -460 |(4) |(5) | / (4) | / │ │ │ │ │ -461 |/ |/ |/ bottom |/ │ │ │ │ │ -462 0---(6)---1 0---------1 │ │ │ │ │ -463 */ │ │ │ │ │ -464 │ │ │ │ │ -465 // bottom face (4) │ │ │ │ │ -466 lastIndex=0; │ │ │ │ │ -467 // lower edge (6) │ │ │ │ │ -468 subEntity[lastIndex++] = 0; // corner 0 │ │ │ │ │ -469 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ -470 subEntity[lastIndex++] = 6; // inner dofs of lower edge (6) │ │ │ │ │ -471 │ │ │ │ │ -472 subEntity[lastIndex++] = 1; // corner 1 │ │ │ │ │ -473 │ │ │ │ │ -474 // iterate from bottom to top over inner edge dofs │ │ │ │ │ -475 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) { │ │ │ │ │ -476 subEntity[lastIndex++] = 4; // left edge (4) │ │ │ │ │ -477 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ -478 subEntity[lastIndex++] = 4; // inner face dofs │ │ │ │ │ -479 subEntity[lastIndex++] = 5; // right edge (5) │ │ │ │ │ -480 } │ │ │ │ │ -481 │ │ │ │ │ -482 // upper edge (7) │ │ │ │ │ -483 subEntity[lastIndex++] = 2; // corner 2 │ │ │ │ │ -484 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -485 subEntity[lastIndex++] = 7; // inner dofs of upper edge (7) │ │ │ │ │ -486 subEntity[lastIndex++] = 3; // corner 3 │ │ │ │ │ -487 │ │ │ │ │ -488 assert(numFaceIndices==lastIndex); // added 1 face so far │ │ │ │ │ -490 │ │ │ │ │ -492 for(unsigned f = 0; f < numInnerEdgeDofs; ++f) { │ │ │ │ │ -493 │ │ │ │ │ -494 // lower edge (connecting edges 0 and 1) │ │ │ │ │ -495 subEntity[lastIndex++] = 0; // dof on edge 0 │ │ │ │ │ -496 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ -497 subEntity[lastIndex++] = 2; // dof in front face │ │ │ │ │ -498 subEntity[lastIndex++] = 1; // dof on edge 1 │ │ │ │ │ -499 │ │ │ │ │ -500 // iterate from bottom to top over inner edge dofs │ │ │ │ │ -501 for (unsigned e = 0; e < numInnerEdgeDofs; ++e) { │ │ │ │ │ -502 subEntity[lastIndex++] = 0; // on left face (0) │ │ │ │ │ -503 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ -504 subEntity[lastIndex++] = 0; // volume dofs │ │ │ │ │ -505 subEntity[lastIndex++] = 1; // right face (1) │ │ │ │ │ -506 } │ │ │ │ │ -507 │ │ │ │ │ -508 // upper edge (connecting edges 0 and 1) │ │ │ │ │ -509 subEntity[lastIndex++] = 2; // dof on edge 2 │ │ │ │ │ -510 for (unsigned i = 0; i < numInnerEdgeDofs; ++i) │ │ │ │ │ -511 subEntity[lastIndex++] = 3; // dof on rear face (3) │ │ │ │ │ -512 subEntity[lastIndex++] = 3; // dof on edge 3 │ │ │ │ │ -513 │ │ │ │ │ -514 assert(lastIndex==(f+1+1)*numFaceIndices); │ │ │ │ │ -515 } │ │ │ │ │ -516 │ │ │ │ │ -518 // lower edge (10) │ │ │ │ │ -519 subEntity[lastIndex++] = 4; // corner 4 │ │ │ │ │ -520 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -521 subEntity[lastIndex++] = 10; // inner dofs on lower edge (10) │ │ │ │ │ -522 subEntity[lastIndex++] = 5; // corner 5 │ │ │ │ │ -523 │ │ │ │ │ -524 // iterate from bottom to top over inner edge dofs │ │ │ │ │ -525 for (unsigned e = 0; e < k - 1; ++e) { │ │ │ │ │ -526 subEntity[lastIndex++] = 8; // left edge (8) │ │ │ │ │ -527 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -528 subEntity[lastIndex++] = 5; // face dofs │ │ │ │ │ -529 subEntity[lastIndex++] = 9; // right edge (9) │ │ │ │ │ -530 } │ │ │ │ │ -531 │ │ │ │ │ -532 // upper edge (11) │ │ │ │ │ -533 subEntity[lastIndex++] = 6; // corner 6 │ │ │ │ │ -534 for (unsigned i = 0; i < k - 1; ++i) │ │ │ │ │ -535 subEntity[lastIndex++] = 11; // inner dofs of upper edge (11) │ │ │ │ │ -536 subEntity[lastIndex++] = 7; // corner 7 │ │ │ │ │ -537 │ │ │ │ │ -538 assert(numIndices==lastIndex); │ │ │ │ │ -539 } │ │ │ │ │ -540 │ │ │ │ │ -541 public: │ │ │ │ │ -543 LagrangeCubeLocalCoefficients () │ │ │ │ │ -544 : localKeys_(size()) │ │ │ │ │ -545 { │ │ │ │ │ -546 if (k==0) │ │ │ │ │ -547 { │ │ │ │ │ -548 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ -549 return; │ │ │ │ │ -550 } │ │ │ │ │ -551 │ │ │ │ │ -552 if (k==1) │ │ │ │ │ -553 { │ │ │ │ │ -554 for (std::size_t i=0; i codim(size()); │ │ │ │ │ -563 │ │ │ │ │ -564 for (std::size_t i=0; i mIdx = multiindex(i); │ │ │ │ │ -571 for (unsigned int j=0; j index(size()); │ │ │ │ │ -582 │ │ │ │ │ -583 for (std::size_t i=0; i mIdx = multiindex(i); │ │ │ │ │ -588 │ │ │ │ │ -589 for (int j=dim-1; j>=0; j--) │ │ │ │ │ -590 if (mIdx[j]>0 && mIdx[j] subEntity(size()); │ │ │ │ │ -596 │ │ │ │ │ -597 if (dim==1) { │ │ │ │ │ -598 │ │ │ │ │ -599 setup1d(subEntity); │ │ │ │ │ -600 │ │ │ │ │ -601 } else if (dim==2) { │ │ │ │ │ -602 │ │ │ │ │ -603 setup2d(subEntity); │ │ │ │ │ -604 │ │ │ │ │ -605 } else if (dim==3) { │ │ │ │ │ -606 │ │ │ │ │ -607 setup3d(subEntity); │ │ │ │ │ -608 │ │ │ │ │ -609 } else │ │ │ │ │ -610 DUNE_THROW(Dune::NotImplemented, "LagrangeCubeLocalCoefficients for order " │ │ │ │ │ -<< k << " and dim == " << dim); │ │ │ │ │ -611 │ │ │ │ │ -612 for (size_t i=0; i localKeys_; │ │ │ │ │ -630 }; │ │ │ │ │ -631 │ │ │ │ │ -636 template │ │ │ │ │ -637 class LagrangeCubeLocalInterpolation │ │ │ │ │ -638 { │ │ │ │ │ -639 public: │ │ │ │ │ -640 │ │ │ │ │ -648 template │ │ │ │ │ -649 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -650 { │ │ │ │ │ -651 constexpr auto dim = LocalBasis::Traits::dimDomain; │ │ │ │ │ -652 constexpr auto k = LocalBasis::order(); │ │ │ │ │ -653 using D = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ -654 │ │ │ │ │ -655 typename LocalBasis::Traits::DomainType x; │ │ │ │ │ -656 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -657 │ │ │ │ │ -658 out.resize(LocalBasis::size()); │ │ │ │ │ -659 │ │ │ │ │ -660 // Specialization for zero-order case │ │ │ │ │ -661 if (k==0) │ │ │ │ │ -662 { │ │ │ │ │ -663 auto center = ReferenceElements::cube().position(0,0); │ │ │ │ │ -664 out[0] = f(center); │ │ │ │ │ -665 return; │ │ │ │ │ -666 } │ │ │ │ │ -667 │ │ │ │ │ -668 // Specialization for first-order case │ │ │ │ │ -669 if (k==1) │ │ │ │ │ -670 { │ │ │ │ │ -671 for (unsigned int i=0; i alpha(LocalBasis::multiindex(i)); │ │ │ │ │ -687 │ │ │ │ │ -688 // Generate coordinate of the i-th Lagrange point │ │ │ │ │ -689 for (unsigned int j=0; j │ │ │ │ │ -_7_1_0 class _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -711 { │ │ │ │ │ -712 public: │ │ │ │ │ -_7_1_5 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_i_m_,_k_>, │ │ │ │ │ -716 Impl::LagrangeCubeLocalCoefficients, │ │ │ │ │ -717 Impl::LagrangeCubeLocalInterpolation > >; │ │ │ │ │ -718 │ │ │ │ │ -_7_2_4 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ -725 │ │ │ │ │ -_7_2_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -729 { │ │ │ │ │ -730 return basis_; │ │ │ │ │ -731 } │ │ │ │ │ -732 │ │ │ │ │ -_7_3_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -736 { │ │ │ │ │ -737 return coefficients_; │ │ │ │ │ -738 } │ │ │ │ │ -739 │ │ │ │ │ -_7_4_2 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -743 { │ │ │ │ │ -744 return interpolation_; │ │ │ │ │ -745 } │ │ │ │ │ -746 │ │ │ │ │ -_7_4_8 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ -749 { │ │ │ │ │ -750 return power(k+1,dim); │ │ │ │ │ -751 } │ │ │ │ │ -752 │ │ │ │ │ -_7_5_5 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -756 { │ │ │ │ │ -757 return GeometryTypes::cube(dim); │ │ │ │ │ -758 } │ │ │ │ │ -759 │ │ │ │ │ -760 private: │ │ │ │ │ -761 Impl::LagrangeCubeLocalBasis basis_; │ │ │ │ │ -762 Impl::LagrangeCubeLocalCoefficients coefficients_; │ │ │ │ │ -763 Impl::LagrangeCubeLocalInterpolation > interpolation_; │ │ │ │ │ -764 }; │ │ │ │ │ -765 │ │ │ │ │ -766} // namespace Dune │ │ │ │ │ -767 │ │ │ │ │ -768#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGECUBE_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +17namespace _D_u_n_e │ │ │ │ │ +18{ │ │ │ │ │ +35 template │ │ │ │ │ +_3_7 class _R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +38 : public _G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t, │ │ │ │ │ +39 RaviartThomasCoefficientsFactory, │ │ │ │ │ +40 RaviartThomasL2InterpolationFactory > │ │ │ │ │ +41 { │ │ │ │ │ +42 typedef _G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y_<_d_i_m_D_o_m_a_i_n_,_ _S_F_, │ │ │ │ │ +_C_F_>, │ │ │ │ │ +43 _R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_d_i_m_D_o_m_a_i_n_>, │ │ │ │ │ +44 _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_d_i_m_D_o_m_a_i_n_,_ _S_F_> > _B_a_s_e; │ │ │ │ │ +45 public: │ │ │ │ │ +46 using typename _B_a_s_e_:_:_T_r_a_i_t_s; │ │ │ │ │ +47 │ │ │ │ │ +_4_9 _R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(const GeometryType >, unsigned int │ │ │ │ │ +order) │ │ │ │ │ +50 : _B_a_s_e(gt, order) │ │ │ │ │ +51 {} │ │ │ │ │ +52 }; │ │ │ │ │ +53} // namespace Dune │ │ │ │ │ +54 │ │ │ │ │ +55#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_b_a_s_i_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:728 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -LagrangeCubeLocalFiniteElement() │ │ │ │ │ -Default constructor. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:724 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:742 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:755 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:748 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:735 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ +arbitrary dimension. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplex.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_: │ │ │ │ │ +_R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RaviartThomasSimplexLocalFiniteElement(const GeometryType >, unsigned int │ │ │ │ │ +order) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplex.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ +_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +A LocalFiniteElement implementation based on three TopologyFactories providing │ │ │ │ │ +the LocalBasis,... │ │ │ │ │ +DDeeffiinniittiioonn localfunctions/utility/localfiniteelement.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_G_e_n_e_r_i_c_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, │ │ │ │ │ +typename InterpolF::Object > Traits │ │ │ │ │ +DDeeffiinniittiioonn localfunctions/utility/localfiniteelement.hh:29 │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp2.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pyramidp2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas4cube2dlocalinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT4Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R >
using Dune::PyramidP2LocalFiniteElement = LagrangePyramidLocalFiniteElement< D, R, 2 >
 Second-order Lagrangian finite element on a three-dimensional pyramid.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pyramidp2.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas4cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_y_r_a_m_i_d_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ - D, R, 2 > │ │ │ │ │ -  Second-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00257_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp2.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,177 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pyramidp2.hh
│ │ │ │ +
raviartthomas4cube2dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
35 RT4Cube2DLocalInterpolation (unsigned int s = 0)
│ │ │ │ +
36 {
│ │ │ │ +
37 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
38 if (s & 1)
│ │ │ │ +
39 {
│ │ │ │ +
40 sign0 *= -1.0;
│ │ │ │ +
41 }
│ │ │ │ +
42 if (s & 2)
│ │ │ │ +
43 {
│ │ │ │ +
44 sign1 *= -1.0;
│ │ │ │ +
45 }
│ │ │ │ +
46 if (s & 4)
│ │ │ │ +
47 {
│ │ │ │ +
48 sign2 *= -1.0;
│ │ │ │ +
49 }
│ │ │ │ +
50 if (s & 8)
│ │ │ │ +
51 {
│ │ │ │ +
52 sign3 *= -1.0;
│ │ │ │ +
53 }
│ │ │ │ +
54
│ │ │ │ +
55 n0[0] = -1.0;
│ │ │ │ +
56 n0[1] = 0.0;
│ │ │ │ +
57 n1[0] = 1.0;
│ │ │ │ +
58 n1[1] = 0.0;
│ │ │ │ +
59 n2[0] = 0.0;
│ │ │ │ +
60 n2[1] = -1.0;
│ │ │ │ +
61 n3[0] = 0.0;
│ │ │ │ +
62 n3[1] = 1.0;
│ │ │ │ +
63 }
│ │ │ │ +
│ │ │ │ +
64
│ │ │ │ +
73 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
74 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
75 {
│ │ │ │ +
76 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
77 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
78 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
79
│ │ │ │ +
80 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
81
│ │ │ │ +
82 out.resize(60);
│ │ │ │ +
83 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
84
│ │ │ │ +
85 const int qOrder = 12;
│ │ │ │ +
86 const QuadratureRule<Scalar,1>& rule = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
87
│ │ │ │ +
88 for (typename QuadratureRule<Scalar,1>::const_iterator it=rule.begin(); it!=rule.end(); ++it)
│ │ │ │ +
89 {
│ │ │ │ +
90 Scalar qPos = it->position();
│ │ │ │ +
91 typename LB::Traits::DomainType localPos;
│ │ │ │ +
92
│ │ │ │ +
93 localPos[0] = 0.0;
│ │ │ │ +
94 localPos[1] = qPos;
│ │ │ │ +
95 auto y = f(localPos);
│ │ │ │ +
96 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0;
│ │ │ │ +
97 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
98 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign0;
│ │ │ │ +
99 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos + 12.0*qPos - 1.0)*it->weight();
│ │ │ │ +
100 out[4] += (y[0]*n0[0] + y[1]*n0[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)-140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign0;
│ │ │ │ +
101
│ │ │ │ +
102 localPos[0] = 1.0;
│ │ │ │ +
103 localPos[1] = qPos;
│ │ │ │ +
104 y = f(localPos);
│ │ │ │ +
105 out[5] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1;
│ │ │ │ +
106 out[6] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
107 out[7] += (y[0]*n1[0] + y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign1;
│ │ │ │ +
108 out[8] += (y[0]*n1[0] + y[1]*n1[1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos - 12.0*qPos + 1.0)*it->weight();
│ │ │ │ +
109 out[9] += (y[0]*n1[0] + y[1]*n1[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)-140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign1;
│ │ │ │ +
110
│ │ │ │ +
111 localPos[0] = qPos;
│ │ │ │ +
112 localPos[1] = 0.0;
│ │ │ │ +
113 y = f(localPos);
│ │ │ │ +
114 out[10] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2;
│ │ │ │ +
115 out[11] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight();
│ │ │ │ +
116 out[12] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign2;
│ │ │ │ +
117 out[13] += (y[0]*n2[0] + y[1]*n2[1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos - 12.0*qPos + 1.0)*it->weight();
│ │ │ │ +
118 out[14] += (y[0]*n2[0] + y[1]*n2[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)-140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign2;
│ │ │ │ +
119
│ │ │ │ +
120 localPos[0] = qPos;
│ │ │ │ +
121 localPos[1] = 1.0;
│ │ │ │ +
122 y = f(localPos);
│ │ │ │ +
123 out[15] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3;
│ │ │ │ +
124 out[16] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight();
│ │ │ │ +
125 out[17] += (y[0]*n3[0] + y[1]*n3[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it->weight()*sign3;
│ │ │ │ +
126 out[18] += (y[0]*n3[0] + y[1]*n3[1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos + 12.0*qPos - 1.0)*it->weight();
│ │ │ │ +
127 out[19] += (y[0]*n3[0] + y[1]*n3[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)-140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign3;
│ │ │ │ +
128 }
│ │ │ │ +
129
│ │ │ │ +
130 const QuadratureRule<Vector,2>& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
131
│ │ │ │ +
132 for (typename QuadratureRule<Vector,2>::const_iterator it = rule2.begin();
│ │ │ │ +
133 it != rule2.end(); ++it)
│ │ │ │ +
134 {
│ │ │ │ +
135 FieldVector<double,2> qPos = it->position();
│ │ │ │ +
136
│ │ │ │ +
137 auto y = f(qPos);
│ │ │ │ +
138 std::vector<std::vector<double> > l(2,std::vector<double> (5));
│ │ │ │ +
139 l[0][0]=1.0;
│ │ │ │ +
140 l[1][0]=1.0;
│ │ │ │ +
141 l[0][1]=2.0*qPos[0]-1.0;
│ │ │ │ +
142 l[1][1]=2.0*qPos[1]-1.0;
│ │ │ │ +
143 l[0][2]=6.0*qPos[0]*qPos[0]-6.0*qPos[0]+1.0;
│ │ │ │ +
144 l[1][2]=6.0*qPos[1]*qPos[1]-6.0*qPos[1]+1.0;
│ │ │ │ +
145 l[0][3]=20.0*qPos[0]*qPos[0]*qPos[0] - 30.0*qPos[0]*qPos[0] + 12.0*qPos[0] - 1.0;
│ │ │ │ +
146 l[1][3]=20.0*qPos[1]*qPos[1]*qPos[1] - 30.0*qPos[1]*qPos[1] + 12.0*qPos[1] - 1.0;
│ │ │ │ +
147 l[0][4]=1.0-20.0*qPos[0]+90.0*pow(qPos[0],2)-140.0*pow(qPos[0],3)+70.0*pow(qPos[0],4);
│ │ │ │ +
148 l[1][4]=1.0-20.0*qPos[1]+90.0*pow(qPos[1],2)-140.0*pow(qPos[1],3)+70.0*pow(qPos[1],4);
│ │ │ │ +
149
│ │ │ │ +
150 for (int i=0;i<4;i++)
│ │ │ │ +
151 for (int j=0;j<5;j++)
│ │ │ │ +
152 out[20+i*5+j] +=y[0]*l[0][i]*l[1][j]*it->weight();
│ │ │ │ +
153
│ │ │ │ +
154 for (int i=0;i<5;i++)
│ │ │ │ +
155 for (int j=0;j<4;j++)
│ │ │ │ +
156 out[40+i*4+j] +=y[1]*l[0][i]*l[1][j]*it->weight();
│ │ │ │ +
157 }
│ │ │ │ +
158 }
│ │ │ │ +
│ │ │ │ +
159
│ │ │ │ +
160 private:
│ │ │ │ +
161 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3;
│ │ │ │ +
162 typename LB::Traits::DomainType n0, n1, n2, n3;
│ │ │ │ +
163 };
│ │ │ │ +
│ │ │ │ +
164}
│ │ │ │ +
165
│ │ │ │ +
166#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas4cube2dlocalinterpolation.hh:26
│ │ │ │ +
RT4Cube2DLocalInterpolation(unsigned int s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas4cube2dlocalinterpolation.hh:35
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas4cube2dlocalinterpolation.hh:74
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,40 +1,192 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pyramidp2.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +raviartthomas4cube2dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_PYRAMIDP2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 using _P_y_r_a_m_i_d_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ -22 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ -23 │ │ │ │ │ -24} │ │ │ │ │ -25 │ │ │ │ │ -26#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +29 │ │ │ │ │ +_3_5 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (unsigned int s = 0) │ │ │ │ │ +36 { │ │ │ │ │ +37 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ +38 if (s & 1) │ │ │ │ │ +39 { │ │ │ │ │ +40 sign0 *= -1.0; │ │ │ │ │ +41 } │ │ │ │ │ +42 if (s & 2) │ │ │ │ │ +43 { │ │ │ │ │ +44 sign1 *= -1.0; │ │ │ │ │ +45 } │ │ │ │ │ +46 if (s & 4) │ │ │ │ │ +47 { │ │ │ │ │ +48 sign2 *= -1.0; │ │ │ │ │ +49 } │ │ │ │ │ +50 if (s & 8) │ │ │ │ │ +51 { │ │ │ │ │ +52 sign3 *= -1.0; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 n0[0] = -1.0; │ │ │ │ │ +56 n0[1] = 0.0; │ │ │ │ │ +57 n1[0] = 1.0; │ │ │ │ │ +58 n1[1] = 0.0; │ │ │ │ │ +59 n2[0] = 0.0; │ │ │ │ │ +60 n2[1] = -1.0; │ │ │ │ │ +61 n3[0] = 0.0; │ │ │ │ │ +62 n3[1] = 1.0; │ │ │ │ │ +63 } │ │ │ │ │ +64 │ │ │ │ │ +73 template │ │ │ │ │ +_7_4 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +75 { │ │ │ │ │ +76 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +77 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +78 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +79 │ │ │ │ │ +80 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +81 │ │ │ │ │ +82 out.resize(60); │ │ │ │ │ +83 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +84 │ │ │ │ │ +85 const int qOrder = 12; │ │ │ │ │ +86 const QuadratureRule& rule = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(1), qOrder); │ │ │ │ │ +87 │ │ │ │ │ +88 for (typename QuadratureRule::const_iterator it=rule.begin(); │ │ │ │ │ +it!=rule.end(); ++it) │ │ │ │ │ +89 { │ │ │ │ │ +90 Scalar qPos = it->position(); │ │ │ │ │ +91 typename LB::Traits::DomainType localPos; │ │ │ │ │ +92 │ │ │ │ │ +93 localPos[0] = 0.0; │ │ │ │ │ +94 localPos[1] = qPos; │ │ │ │ │ +95 auto y = f(localPos); │ │ │ │ │ +96 out[0] += (y[0]*n0[0] + y[1]*n0[1])*it->weight()*sign0; │ │ │ │ │ +97 out[1] += (y[0]*n0[0] + y[1]*n0[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ +98 out[2] += (y[0]*n0[0] + y[1]*n0[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign0; │ │ │ │ │ +99 out[3] += (y[0]*n0[0] + y[1]*n0[1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos + │ │ │ │ │ +12.0*qPos - 1.0)*it->weight(); │ │ │ │ │ +100 out[4] += (y[0]*n0[0] + y[1]*n0[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)- │ │ │ │ │ +140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign0; │ │ │ │ │ +101 │ │ │ │ │ +102 localPos[0] = 1.0; │ │ │ │ │ +103 localPos[1] = qPos; │ │ │ │ │ +104 y = f(localPos); │ │ │ │ │ +105 out[5] += (y[0]*n1[0] + y[1]*n1[1])*it->weight()*sign1; │ │ │ │ │ +106 out[6] += (y[0]*n1[0] + y[1]*n1[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ +107 out[7] += (y[0]*n1[0] + y[1]*n1[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign1; │ │ │ │ │ +108 out[8] += (y[0]*n1[0] + y[1]*n1[1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos │ │ │ │ │ +- 12.0*qPos + 1.0)*it->weight(); │ │ │ │ │ +109 out[9] += (y[0]*n1[0] + y[1]*n1[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)- │ │ │ │ │ +140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign1; │ │ │ │ │ +110 │ │ │ │ │ +111 localPos[0] = qPos; │ │ │ │ │ +112 localPos[1] = 0.0; │ │ │ │ │ +113 y = f(localPos); │ │ │ │ │ +114 out[10] += (y[0]*n2[0] + y[1]*n2[1])*it->weight()*sign2; │ │ │ │ │ +115 out[11] += (y[0]*n2[0] + y[1]*n2[1])*(1.0 - 2.0*qPos)*it->weight(); │ │ │ │ │ +116 out[12] += (y[0]*n2[0] + y[1]*n2[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign2; │ │ │ │ │ +117 out[13] += (y[0]*n2[0] + y[1]*n2[1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos │ │ │ │ │ +- 12.0*qPos + 1.0)*it->weight(); │ │ │ │ │ +118 out[14] += (y[0]*n2[0] + y[1]*n2[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)- │ │ │ │ │ +140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign2; │ │ │ │ │ +119 │ │ │ │ │ +120 localPos[0] = qPos; │ │ │ │ │ +121 localPos[1] = 1.0; │ │ │ │ │ +122 y = f(localPos); │ │ │ │ │ +123 out[15] += (y[0]*n3[0] + y[1]*n3[1])*it->weight()*sign3; │ │ │ │ │ +124 out[16] += (y[0]*n3[0] + y[1]*n3[1])*(2.0*qPos - 1.0)*it->weight(); │ │ │ │ │ +125 out[17] += (y[0]*n3[0] + y[1]*n3[1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*it- │ │ │ │ │ +>weight()*sign3; │ │ │ │ │ +126 out[18] += (y[0]*n3[0] + y[1]*n3[1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos │ │ │ │ │ ++ 12.0*qPos - 1.0)*it->weight(); │ │ │ │ │ +127 out[19] += (y[0]*n3[0] + y[1]*n3[1])*(1.0-20.0*qPos+90.0*pow(qPos,2)- │ │ │ │ │ +140.0*pow(qPos,3)+70.0*pow(qPos,4))*it->weight()*sign3; │ │ │ │ │ +128 } │ │ │ │ │ +129 │ │ │ │ │ +130 const QuadratureRule& rule2 = QuadratureRules::rule │ │ │ │ │ +(GeometryTypes::cube(2), qOrder); │ │ │ │ │ +131 │ │ │ │ │ +132 for (typename QuadratureRule::const_iterator it = rule2.begin(); │ │ │ │ │ +133 it != rule2.end(); ++it) │ │ │ │ │ +134 { │ │ │ │ │ +135 FieldVector qPos = it->position(); │ │ │ │ │ +136 │ │ │ │ │ +137 auto y = f(qPos); │ │ │ │ │ +138 std::vector > l(2,std::vector (5)); │ │ │ │ │ +139 l[0][0]=1.0; │ │ │ │ │ +140 l[1][0]=1.0; │ │ │ │ │ +141 l[0][1]=2.0*qPos[0]-1.0; │ │ │ │ │ +142 l[1][1]=2.0*qPos[1]-1.0; │ │ │ │ │ +143 l[0][2]=6.0*qPos[0]*qPos[0]-6.0*qPos[0]+1.0; │ │ │ │ │ +144 l[1][2]=6.0*qPos[1]*qPos[1]-6.0*qPos[1]+1.0; │ │ │ │ │ +145 l[0][3]=20.0*qPos[0]*qPos[0]*qPos[0] - 30.0*qPos[0]*qPos[0] + 12.0*qPos[0] │ │ │ │ │ +- 1.0; │ │ │ │ │ +146 l[1][3]=20.0*qPos[1]*qPos[1]*qPos[1] - 30.0*qPos[1]*qPos[1] + 12.0*qPos[1] │ │ │ │ │ +- 1.0; │ │ │ │ │ +147 l[0][4]=1.0-20.0*qPos[0]+90.0*pow(qPos[0],2)-140.0*pow(qPos[0],3)+70.0*pow │ │ │ │ │ +(qPos[0],4); │ │ │ │ │ +148 l[1][4]=1.0-20.0*qPos[1]+90.0*pow(qPos[1],2)-140.0*pow(qPos[1],3)+70.0*pow │ │ │ │ │ +(qPos[1],4); │ │ │ │ │ +149 │ │ │ │ │ +150 for (int i=0;i<4;i++) │ │ │ │ │ +151 for (int j=0;j<5;j++) │ │ │ │ │ +152 out[20+i*5+j] +=y[0]*l[0][i]*l[1][j]*it->weight(); │ │ │ │ │ +153 │ │ │ │ │ +154 for (int i=0;i<5;i++) │ │ │ │ │ +155 for (int j=0;j<4;j++) │ │ │ │ │ +156 out[40+i*4+j] +=y[1]*l[0][i]*l[1][j]*it->weight(); │ │ │ │ │ +157 } │ │ │ │ │ +158 } │ │ │ │ │ +159 │ │ │ │ │ +160 private: │ │ │ │ │ +161 typename LB::Traits::RangeFieldType sign0, sign1, sign2, sign3; │ │ │ │ │ +162 typename LB::Traits::DomainType n0, n1, n2, n3; │ │ │ │ │ +163 }; │ │ │ │ │ +164} │ │ │ │ │ +165 │ │ │ │ │ +166#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalinterpolation.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT4Cube2DLocalInterpolation(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalinterpolation.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalinterpolation.hh:74 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: qk.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
qk.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas4cube2dlocalcoefficients.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT4Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-4 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , int d, int k>
using Dune::QkLocalFiniteElement = LagrangeCubeLocalFiniteElement< D, R, d, k >
 General Lagrange finite element for cubes with arbitrary dimension and polynomial order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -qk.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas4cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-4 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, k │ │ │ │ │ - > │ │ │ │ │ -  General Lagrange finite element for cubes with arbitrary dimension and │ │ │ │ │ - polynomial order. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00260_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: qk.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,85 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
qk.hh
│ │ │ │ +
raviartthomas4cube2dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ -
7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH
│ │ │ │ -
8
│ │ │ │ - │ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#warning This header is deprecated
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │ -
25 template<class D, class R, int d, int k>
│ │ │ │ - │ │ │ │ -
27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
29
│ │ │ │ -
30}
│ │ │ │ -
31
│ │ │ │ -
32#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i = 0; i < 4; i++)
│ │ │ │ +
30 {
│ │ │ │ +
31 li[5*i] = LocalKey(i,1,0);
│ │ │ │ +
32 li[5*i + 1] = LocalKey(i,1,1);
│ │ │ │ +
33 li[5*i + 2] = LocalKey(i,1,2);
│ │ │ │ +
34 li[5*i + 3] = LocalKey(i,1,3);
│ │ │ │ +
35 li[5*i + 4] = LocalKey(i,1,4);
│ │ │ │ +
36 }
│ │ │ │ +
37
│ │ │ │ +
38 for (std::size_t i=0; i<40; i++)
│ │ │ │ +
39 {
│ │ │ │ +
40 li[20 + i] = LocalKey(0,0,i);
│ │ │ │ +
41 }
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 std::size_t size () const
│ │ │ │ +
46 {
│ │ │ │ +
47 return 60;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ +
51 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
52 {
│ │ │ │ +
53 return li[i];
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
56 private:
│ │ │ │ +
57 std::vector<LocalKey> li;
│ │ │ │ +
58 };
│ │ │ │ +
│ │ │ │ +
59}
│ │ │ │ +
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-4 elements on quadrilaterals.
Definition raviartthomas4cube2dlocalcoefficients.hh:23
│ │ │ │ +
RT4Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas4cube2dlocalcoefficients.hh:27
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas4cube2dlocalcoefficients.hh:45
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas4cube2dlocalcoefficients.hh:51
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,83 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -qk.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +raviartthomas4cube2dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ -7#define DUNE_LOCALFUNCTIONS_QK_LOCALFINITEELEMENT_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#warning This header is deprecated │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ 13namespace _D_u_n_e │ │ │ │ │ 14{ │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 using _Q_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 [[deprecated("use LagrangeCubeLocalFiniteElement instead")]] │ │ │ │ │ -28 = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_,_k_>; │ │ │ │ │ -29 │ │ │ │ │ -30} │ │ │ │ │ -31 │ │ │ │ │ -32#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ +_2_2 class _R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +23 { │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(60) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i = 0; i < 4; i++) │ │ │ │ │ +30 { │ │ │ │ │ +31 li[5*i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 li[5*i + 1] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +33 li[5*i + 2] = _L_o_c_a_l_K_e_y(i,1,2); │ │ │ │ │ +34 li[5*i + 3] = _L_o_c_a_l_K_e_y(i,1,3); │ │ │ │ │ +35 li[5*i + 4] = _L_o_c_a_l_K_e_y(i,1,4); │ │ │ │ │ +36 } │ │ │ │ │ +37 │ │ │ │ │ +38 for (std::size_t i=0; i<40; i++) │ │ │ │ │ +39 { │ │ │ │ │ +40 li[20 + i] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ +41 } │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_5 std::size_t _s_i_z_e () const │ │ │ │ │ +46 { │ │ │ │ │ +47 return 60; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_1 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +52 { │ │ │ │ │ +53 return li[i]; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +56 private: │ │ │ │ │ +57 std::vector li; │ │ │ │ │ +58 }; │ │ │ │ │ +59} │ │ │ │ │ +60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-4 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT4Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalcoefficients.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalcoefficients.hh:51 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp1.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
prismp1.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas4cube2dlocalbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ +
#include <bitset>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT4Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R >
using Dune::PrismP1LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, 1 >
 First-order Lagrangian finite element on a prism.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -prismp1.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas4cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_r_i_s_m_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 1 > │ │ │ │ │ -  First-order Lagrangian finite element on a prism. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00263_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp1.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas4cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,814 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
prismp1.hh
│ │ │ │ +
raviartthomas4cube2dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_P13DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ +
8#include <bitset>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13
│ │ │ │ +
14#include "../../common/localbasis.hh"
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ +
32 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
33 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
40 RT4Cube2DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = (s[0]) ? -1.0 : 1.0;
│ │ │ │ +
43 sign1 = (s[1]) ? -1.0 : 1.0;
│ │ │ │ +
44 sign2 = (s[2]) ? -1.0 : 1.0;
│ │ │ │ +
45 sign3 = (s[3]) ? -1.0 : 1.0;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 unsigned int size () const
│ │ │ │ +
50 {
│ │ │ │ +
51 return 60;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
60 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
61 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
62 {
│ │ │ │ +
63 out.resize(60);
│ │ │ │ +
64
│ │ │ │ +
65 auto const& x = in[0], y = in[1];
│ │ │ │ +
66
│ │ │ │ +
67 const auto l1_x = 2*x - 1;
│ │ │ │ +
68 const auto l2_x = x*(6*x - 6) + 1;
│ │ │ │ +
69 const auto l3_x = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
70 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
│ │ │ │ +
71 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
72 const auto l1_y = 2*y - 1;
│ │ │ │ +
73 const auto l2_y = y*(6*y - 6) + 1;
│ │ │ │ +
74 const auto l3_y = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
75 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
│ │ │ │ +
76 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
77
│ │ │ │ +
78 out[0][0]=sign0*(0.5*(-l4_x)+0.5*l5_x);
│ │ │ │ +
79 out[0][1]=0.0;
│ │ │ │ +
80 out[1][0]=-(1.5)*l4_x*l1_y+1.5*l5_x*l1_y;
│ │ │ │ +
81 out[1][1]=0.0;
│ │ │ │ +
82 out[2][0]=sign0*(-(2.5)*l4_x*l2_y+2.5*l5_x*l2_y);
│ │ │ │ +
83 out[2][1]=0.0;
│ │ │ │ +
84 out[3][0]=-(3.5)*l4_x*l3_y+3.5*l5_x*l3_y;
│ │ │ │ +
85 out[3][1]=0.0;
│ │ │ │ +
86 out[4][0]=sign0*(-(4.5)*l4_x*l4_y+4.5*l5_x*l4_y);
│ │ │ │ +
87 out[4][1]=0.0;
│ │ │ │ +
88
│ │ │ │ +
89 out[5][0]=sign1*(0.5*l4_x+0.5*l5_x);
│ │ │ │ +
90 out[5][1]=0.0;
│ │ │ │ +
91 out[6][0]=-(1.5)*l4_x*l1_y-1.5*l5_x*l1_y;
│ │ │ │ +
92 out[6][1]=0.0;
│ │ │ │ +
93 out[7][0]=sign1*(2.5*l4_x*l2_y+2.5*l5_x*l2_y);
│ │ │ │ +
94 out[7][1]=0.0;
│ │ │ │ +
95 out[8][0]=-(3.5)*l4_x*l3_y-3.5*l5_x*l3_y;
│ │ │ │ +
96 out[8][1]=0.0;
│ │ │ │ +
97 out[9][0]=sign1*(4.5*l4_x*l4_y+4.5*l5_x*l4_y);
│ │ │ │ +
98 out[9][1]=0.0;
│ │ │ │ +
99
│ │ │ │ +
100 out[10][0]=0.0;
│ │ │ │ +
101 out[10][1]=sign2*(0.5*(-l4_y)+0.5*l5_y);
│ │ │ │ +
102 out[11][0]=0.0;
│ │ │ │ +
103 out[11][1]=1.5*l1_x*l4_y-1.5*l1_x*l5_y;
│ │ │ │ +
104 out[12][0]=0.0;
│ │ │ │ +
105 out[12][1]=sign2*(-(2.5)*l2_x*l4_y+2.5*l2_x*l5_y);
│ │ │ │ +
106 out[13][0]=0.0;
│ │ │ │ +
107 out[13][1]=3.5*l3_x*l4_y-3.5*l3_x*l5_y;
│ │ │ │ +
108 out[14][0]=0.0;
│ │ │ │ +
109 out[14][1]=sign2*(-(4.5)*l4_x*l4_y+4.5*l4_x*l5_y);
│ │ │ │ +
110
│ │ │ │ +
111 out[15][0]=0.0;
│ │ │ │ +
112 out[15][1]=sign3*(0.5*l4_y+0.5*l5_y);
│ │ │ │ +
113 out[16][0]=0.0;
│ │ │ │ +
114 out[16][1]=1.5*l1_x*l4_y+1.5*l1_x*l5_y;
│ │ │ │ +
115 out[17][0]=0.0;
│ │ │ │ +
116 out[17][1]=sign3*(2.5*l2_x*l4_y+2.5*l2_x*l5_y);
│ │ │ │ +
117 out[18][0]=0.0;
│ │ │ │ +
118 out[18][1]=3.5*l3_x*l4_y+3.5*l3_x*l5_y;
│ │ │ │ +
119 out[19][0]=0.0;
│ │ │ │ +
120 out[19][1]=sign3*(4.5*l4_x*l4_y+4.5*l4_x*l5_y);
│ │ │ │ +
121
│ │ │ │ +
122 out[20][0]=1.0-l4_x;
│ │ │ │ +
123 out[20][1]=0.0;
│ │ │ │ +
124 out[21][0]=3.0*l1_y-3.0*l4_x*l1_y;
│ │ │ │ +
125 out[21][1]=0.0;
│ │ │ │ +
126 out[22][0]=5.0*l2_y-5.0*l4_x*l2_y;
│ │ │ │ +
127 out[22][1]=0.0;
│ │ │ │ +
128 out[23][0]=7.0*l3_y-7.0*l4_x*l3_y;
│ │ │ │ +
129 out[23][1]=0.0;
│ │ │ │ +
130 out[24][0]=9.0*l4_y-9.0*l4_x*l4_y;
│ │ │ │ +
131 out[24][1]=0.0;
│ │ │ │ +
132 out[25][0]=3.0*l1_x-3.0*l5_x;
│ │ │ │ +
133 out[25][1]=0.0;
│ │ │ │ +
134 out[26][0]=9.0*l1_x*l1_y-9.0*l5_x*l1_y;
│ │ │ │ +
135 out[26][1]=0.0;
│ │ │ │ +
136 out[27][0]=15.0*l1_x*l2_y-15.0*l5_x*l2_y;
│ │ │ │ +
137 out[27][1]=0.0;
│ │ │ │ +
138 out[28][0]=21.0*l1_x*l3_y-21.0*l5_x*l3_y;
│ │ │ │ +
139 out[28][1]=0.0;
│ │ │ │ +
140 out[29][0]=27.0*l1_x*l4_y-27.0*l5_x*l4_y;
│ │ │ │ +
141 out[29][1]=0.0;
│ │ │ │ +
142 out[30][0]=5.0*l2_x-5.0*l4_x;
│ │ │ │ +
143 out[30][1]=0.0;
│ │ │ │ +
144 out[31][0]=15.0*l2_x*l1_y-15.0*l4_x*l1_y;
│ │ │ │ +
145 out[31][1]=0.0;
│ │ │ │ +
146 out[32][0]=25.0*l2_x*l2_y-25.0*l4_x*l2_y;
│ │ │ │ +
147 out[32][1]=0.0;
│ │ │ │ +
148 out[33][0]=35.0*l2_x*l3_y-35.0*l4_x*l3_y;
│ │ │ │ +
149 out[33][1]=0.0;
│ │ │ │ +
150 out[34][0]=45.0*l2_x*l4_y-45.0*l4_x*l4_y;
│ │ │ │ +
151 out[34][1]=0.0;
│ │ │ │ +
152 out[35][0]=7.0*l3_x-7.0*l5_x;
│ │ │ │ +
153 out[35][1]=0.0;
│ │ │ │ +
154 out[36][0]=21.0*l3_x*l1_y-21.0*l5_x*l1_y;
│ │ │ │ +
155 out[36][1]=0.0;
│ │ │ │ +
156 out[37][0]=35.0*l3_x*l2_y-35.0*l5_x*l2_y;
│ │ │ │ +
157 out[37][1]=0.0;
│ │ │ │ +
158 out[38][0]=49.0*l3_x*l3_y-49.0*l5_x*l3_y;
│ │ │ │ +
159 out[38][1]=0.0;
│ │ │ │ +
160 out[39][0]=63.0*l3_x*l4_y-63.0*l5_x*l4_y;
│ │ │ │ +
161 out[39][1]=0.0;
│ │ │ │ +
162 out[40][0]=0.0;
│ │ │ │ +
163 out[40][1]=1.0-l4_y;
│ │ │ │ +
164 out[41][0]=0.0;
│ │ │ │ +
165 out[41][1]=3.0*l1_y-3.0*l5_y;
│ │ │ │ +
166 out[42][0]=0.0;
│ │ │ │ +
167 out[42][1]=5.0*l2_y-5.0*l4_y;
│ │ │ │ +
168 out[43][0]=0.0;
│ │ │ │ +
169 out[43][1]=7.0*l3_y-7.0*l5_y;
│ │ │ │ +
170 out[44][0]=0.0;
│ │ │ │ +
171 out[44][1]=3.0*l1_x-3.0*l1_x*l4_y;
│ │ │ │ +
172 out[45][0]=0.0;
│ │ │ │ +
173 out[45][1]=9.0*l1_x*l1_y-9.0*l1_x*l5_y;
│ │ │ │ +
174 out[46][0]=0.0;
│ │ │ │ +
175 out[46][1]=15.0*l1_x*l2_y-15.0*l1_x*l4_y;
│ │ │ │ +
176 out[47][0]=0.0;
│ │ │ │ +
177 out[47][1]=21.0*l1_x*l3_y-21.0*l1_x*l5_y;
│ │ │ │ +
178 out[48][0]=0.0;
│ │ │ │ +
179 out[48][1]=5.0*l2_x-5.0*l2_x*l4_y;
│ │ │ │ +
180 out[49][0]=0.0;
│ │ │ │ +
181 out[49][1]=15.0*l2_x*l1_y-15.0*l2_x*l5_y;
│ │ │ │ +
182 out[50][0]=0.0;
│ │ │ │ +
183 out[50][1]=25.0*l2_x*l2_y-25.0*l2_x*l4_y;
│ │ │ │ +
184 out[51][0]=0.0;
│ │ │ │ +
185 out[51][1]=35.0*l2_x*l3_y-35.0*l2_x*l5_y;
│ │ │ │ +
186 out[52][0]=0.0;
│ │ │ │ +
187 out[52][1]=7.0*l3_x-7.0*l3_x*l4_y;
│ │ │ │ +
188 out[53][0]=0.0;
│ │ │ │ +
189 out[53][1]=21.0*l3_x*l1_y-21.0*l3_x*l5_y;
│ │ │ │ +
190 out[54][0]=0.0;
│ │ │ │ +
191 out[54][1]=35.0*l3_x*l2_y-35.0*l3_x*l4_y;
│ │ │ │ +
192 out[55][0]=0.0;
│ │ │ │ +
193 out[55][1]=49.0*l3_x*l3_y-49.0*l3_x*l5_y;
│ │ │ │ +
194 out[56][0]=0.0;
│ │ │ │ +
195 out[56][1]=9.0*l4_x-9.0*l4_x*l4_y;
│ │ │ │ +
196 out[57][0]=0.0;
│ │ │ │ +
197 out[57][1]=27.0*l4_x*l1_y-27.0*l4_x*l5_y;
│ │ │ │ +
198 out[58][0]=0.0;
│ │ │ │ +
199 out[58][1]=45.0*l4_x*l2_y-45.0*l4_x*l4_y;
│ │ │ │ +
200 out[59][0]=0.0;
│ │ │ │ +
201 out[59][1]=63.0*l4_x*l3_y-63.0*l4_x*l5_y;
│ │ │ │ +
202 }
│ │ │ │ +
│ │ │ │ +
203
│ │ │ │ +
│ │ │ │ +
210 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
211 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
212 {
│ │ │ │ +
213 out.resize(60);
│ │ │ │ +
214 auto const& x = in[0], y = in[1];
│ │ │ │ +
215
│ │ │ │ +
216 const auto l1_x = 2*x - 1;
│ │ │ │ +
217 const auto l2_x = x*(6*x - 6) + 1;
│ │ │ │ +
218 const auto l3_x = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
219 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
│ │ │ │ +
220 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
221 const auto l1_y = 2*y - 1;
│ │ │ │ +
222 const auto l2_y = y*(6*y - 6) + 1;
│ │ │ │ +
223 const auto l3_y = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
224 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
│ │ │ │ +
225 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
226
│ │ │ │ +
227 const auto dxl1_x = 2.0;
│ │ │ │ +
228 const auto dxl2_x = 12*x - 6;
│ │ │ │ +
229 const auto dxl3_x = x*(60*x - 60) + 12;
│ │ │ │ +
230 const auto dxl4_x = x*(x*(280*x - 420) + 180) - 20;
│ │ │ │ +
231 const auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30;
│ │ │ │ +
232 const auto dyl1_y = 2.0;
│ │ │ │ +
233 const auto dyl2_y = 12*y - 6;
│ │ │ │ +
234 const auto dyl3_y = y*(60*y - 60) + 12;
│ │ │ │ +
235 const auto dyl4_y = y*(y*(280*y - 420) + 180) - 20;
│ │ │ │ +
236 const auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30;
│ │ │ │ +
237
│ │ │ │ +
238 // x-component
│ │ │ │ +
239 out[0][0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x);
│ │ │ │ +
240 out[0][1][0]=0.0;
│ │ │ │ +
241 out[1][0][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y;
│ │ │ │ +
242 out[1][1][0]=0.0;
│ │ │ │ +
243 out[2][0][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
│ │ │ │ +
244 out[2][1][0]=0.0;
│ │ │ │ +
245 out[3][0][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y;
│ │ │ │ +
246 out[3][1][0]=0.0;
│ │ │ │ +
247 out[4][0][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
│ │ │ │ +
248 out[4][1][0]=0.0;
│ │ │ │ +
249
│ │ │ │ +
250 out[5][0][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x);
│ │ │ │ +
251 out[5][1][0]=0.0;
│ │ │ │ +
252 out[6][0][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y;
│ │ │ │ +
253 out[6][1][0]=0.0;
│ │ │ │ +
254 out[7][0][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
│ │ │ │ +
255 out[7][1][0]=0.0;
│ │ │ │ +
256 out[8][0][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y;
│ │ │ │ +
257 out[8][1][0]=0.0;
│ │ │ │ +
258 out[9][0][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
│ │ │ │ +
259 out[9][1][0]=0.0;
│ │ │ │ +
260
│ │ │ │ +
261 out[10][0][0]=0.0;
│ │ │ │ +
262 out[10][1][0]=0.0;
│ │ │ │ +
263 out[11][0][0]=0.0;
│ │ │ │ +
264 out[11][1][0]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y;
│ │ │ │ +
265 out[12][0][0]=0.0;
│ │ │ │ +
266 out[12][1][0]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
│ │ │ │ +
267 out[13][0][0]=0.0;
│ │ │ │ +
268 out[13][1][0]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y;
│ │ │ │ +
269 out[14][0][0]=0.0;
│ │ │ │ +
270 out[14][1][0]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
│ │ │ │ +
271
│ │ │ │ +
272 out[15][0][0]=0.0;
│ │ │ │ +
273 out[15][1][0]=0.0;
│ │ │ │ +
274 out[16][0][0]=0.0;
│ │ │ │ +
275 out[16][1][0]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y;
│ │ │ │ +
276 out[17][0][0]=0.0;
│ │ │ │ +
277 out[17][1][0]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
│ │ │ │ +
278 out[18][0][0]=0.0;
│ │ │ │ +
279 out[18][1][0]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y;
│ │ │ │ +
280 out[19][0][0]=0.0;
│ │ │ │ +
281 out[19][1][0]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
│ │ │ │ +
282
│ │ │ │ +
283 out[20][0][0]=-dxl4_x;
│ │ │ │ +
284 out[20][1][0]=0.0;
│ │ │ │ +
285 out[21][0][0]=-3.0*dxl4_x*l1_y;
│ │ │ │ +
286 out[21][1][0]=0.0;
│ │ │ │ +
287 out[22][0][0]=-5.0*dxl4_x*l2_y;
│ │ │ │ +
288 out[22][1][0]=0.0;
│ │ │ │ +
289 out[23][0][0]=-7.0*dxl4_x*l3_y;
│ │ │ │ +
290 out[23][1][0]=0.0;
│ │ │ │ +
291 out[24][0][0]=-9.0*dxl4_x*l4_y;
│ │ │ │ +
292 out[24][1][0]=0.0;
│ │ │ │ +
293 out[25][0][0]=3.0*dxl1_x-3.0*dxl5_x;
│ │ │ │ +
294 out[25][1][0]=0.0;
│ │ │ │ +
295 out[26][0][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y;
│ │ │ │ +
296 out[26][1][0]=0.0;
│ │ │ │ +
297 out[27][0][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y;
│ │ │ │ +
298 out[27][1][0]=0.0;
│ │ │ │ +
299 out[28][0][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y;
│ │ │ │ +
300 out[28][1][0]=0.0;
│ │ │ │ +
301 out[29][0][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y;
│ │ │ │ +
302 out[29][1][0]=0.0;
│ │ │ │ +
303 out[30][0][0]=5.0*dxl2_x-5.0*dxl4_x;
│ │ │ │ +
304 out[30][1][0]=0.0;
│ │ │ │ +
305 out[31][0][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y;
│ │ │ │ +
306 out[31][1][0]=0.0;
│ │ │ │ +
307 out[32][0][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y;
│ │ │ │ +
308 out[32][1][0]=0.0;
│ │ │ │ +
309 out[33][0][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y;
│ │ │ │ +
310 out[33][1][0]=0.0;
│ │ │ │ +
311 out[34][0][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y;
│ │ │ │ +
312 out[34][1][0]=0.0;
│ │ │ │ +
313 out[35][0][0]=7.0*dxl3_x-7.0*dxl5_x;
│ │ │ │ +
314 out[35][1][0]=0.0;
│ │ │ │ +
315 out[36][0][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y;
│ │ │ │ +
316 out[36][1][0]=0.0;
│ │ │ │ +
317 out[37][0][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y;
│ │ │ │ +
318 out[37][1][0]=0.0;
│ │ │ │ +
319 out[38][0][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y;
│ │ │ │ +
320 out[38][1][0]=0.0;
│ │ │ │ +
321 out[39][0][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y;
│ │ │ │ +
322 out[39][1][0]=0.0;
│ │ │ │ +
323 out[40][0][0]=0.0;
│ │ │ │ +
324 out[40][1][0]=0.0;
│ │ │ │ +
325 out[41][0][0]=0.0;
│ │ │ │ +
326 out[41][1][0]=0.0;
│ │ │ │ +
327 out[42][0][0]=0.0;
│ │ │ │ +
328 out[42][1][0]=0.0;
│ │ │ │ +
329 out[43][0][0]=0.0;
│ │ │ │ +
330 out[43][1][0]=0.0;
│ │ │ │ +
331 out[44][0][0]=0.0;
│ │ │ │ +
332 out[44][1][0]=3.0*dxl1_x-3.0*dxl1_x*l4_y;
│ │ │ │ +
333 out[45][0][0]=0.0;
│ │ │ │ +
334 out[45][1][0]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y;
│ │ │ │ +
335 out[46][0][0]=0.0;
│ │ │ │ +
336 out[46][1][0]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y;
│ │ │ │ +
337 out[47][0][0]=0.0;
│ │ │ │ +
338 out[47][1][0]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y;
│ │ │ │ +
339 out[48][0][0]=0.0;
│ │ │ │ +
340 out[48][1][0]=5.0*dxl2_x-5.0*dxl2_x*l4_y;
│ │ │ │ +
341 out[49][0][0]=0.0;
│ │ │ │ +
342 out[49][1][0]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y;
│ │ │ │ +
343 out[50][0][0]=0.0;
│ │ │ │ +
344 out[50][1][0]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y;
│ │ │ │ +
345 out[51][0][0]=0.0;
│ │ │ │ +
346 out[51][1][0]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y;
│ │ │ │ +
347 out[52][0][0]=0.0;
│ │ │ │ +
348 out[52][1][0]=7.0*dxl3_x-7.0*dxl3_x*l4_y;
│ │ │ │ +
349 out[53][0][0]=0.0;
│ │ │ │ +
350 out[53][1][0]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y;
│ │ │ │ +
351 out[54][0][0]=0.0;
│ │ │ │ +
352 out[54][1][0]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y;
│ │ │ │ +
353 out[55][0][0]=0.0;
│ │ │ │ +
354 out[55][1][0]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y;
│ │ │ │ +
355 out[56][0][0]=0.0;
│ │ │ │ +
356 out[56][1][0]=9.0*dxl4_x-9.0*dxl4_x*l4_y;
│ │ │ │ +
357 out[57][0][0]=0.0;
│ │ │ │ +
358 out[57][1][0]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y;
│ │ │ │ +
359 out[58][0][0]=0.0;
│ │ │ │ +
360 out[58][1][0]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y;
│ │ │ │ +
361 out[59][0][0]=0.0;
│ │ │ │ +
362 out[59][1][0]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y;
│ │ │ │ +
363
│ │ │ │ +
364 // y-component
│ │ │ │ +
365 out[0][0][1]=0.0;
│ │ │ │ +
366 out[0][1][1]=0.0;
│ │ │ │ +
367 out[1][0][1]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y;
│ │ │ │ +
368 out[1][1][1]=0.0;
│ │ │ │ +
369 out[2][0][1]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
│ │ │ │ +
370 out[2][1][1]=0.0;
│ │ │ │ +
371 out[3][0][1]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y;
│ │ │ │ +
372 out[3][1][1]=0.0;
│ │ │ │ +
373 out[4][0][1]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
│ │ │ │ +
374 out[4][1][1]=0.0;
│ │ │ │ +
375
│ │ │ │ +
376 out[5][0][1]=0.0;
│ │ │ │ +
377 out[5][1][1]=0.0;
│ │ │ │ +
378 out[6][0][1]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y;
│ │ │ │ +
379 out[6][1][1]=0.0;
│ │ │ │ +
380 out[7][0][1]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
│ │ │ │ +
381 out[7][1][1]=0.0;
│ │ │ │ +
382 out[8][0][1]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y;
│ │ │ │ +
383 out[8][1][1]=0.0;
│ │ │ │ +
384 out[9][0][1]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
│ │ │ │ +
385 out[9][1][1]=0.0;
│ │ │ │ +
386
│ │ │ │ +
387 out[10][0][1]=0.0;
│ │ │ │ +
388 out[10][1][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y);
│ │ │ │ +
389 out[11][0][1]=0.0;
│ │ │ │ +
390 out[11][1][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y;
│ │ │ │ +
391 out[12][0][1]=0.0;
│ │ │ │ +
392 out[12][1][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
│ │ │ │ +
393 out[13][0][1]=0.0;
│ │ │ │ +
394 out[13][1][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y;
│ │ │ │ +
395 out[14][0][1]=0.0;
│ │ │ │ +
396 out[14][1][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
│ │ │ │ +
397
│ │ │ │ +
398 out[15][0][1]=0.0;
│ │ │ │ +
399 out[15][1][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y);
│ │ │ │ +
400 out[16][0][1]=0.0;
│ │ │ │ +
401 out[16][1][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y;
│ │ │ │ +
402 out[17][0][1]=0.0;
│ │ │ │ +
403 out[17][1][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
│ │ │ │ +
404 out[18][0][1]=0.0;
│ │ │ │ +
405 out[18][1][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y;
│ │ │ │ +
406 out[19][0][1]=0.0;
│ │ │ │ +
407 out[19][1][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
│ │ │ │ +
408
│ │ │ │ +
409 out[20][0][1]=0.0;
│ │ │ │ +
410 out[20][1][1]=0.0;
│ │ │ │ +
411 out[21][0][1]=3.0*dyl1_y-3.0*l4_x*dyl1_y;
│ │ │ │ +
412 out[21][1][1]=0.0;
│ │ │ │ +
413 out[22][0][1]=5.0*dyl2_y-5.0*l4_x*dyl2_y;
│ │ │ │ +
414 out[22][1][1]=0.0;
│ │ │ │ +
415 out[23][0][1]=7.0*dyl3_y-7.0*l4_x*dyl3_y;
│ │ │ │ +
416 out[23][1][1]=0.0;
│ │ │ │ +
417 out[24][0][1]=9.0*dyl4_y-9.0*l4_x*dyl4_y;
│ │ │ │ +
418 out[24][1][1]=0.0;
│ │ │ │ +
419 out[25][0][1]=0.0;
│ │ │ │ +
420 out[25][1][1]=0.0;
│ │ │ │ +
421 out[26][0][1]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y;
│ │ │ │ +
422 out[26][1][1]=0.0;
│ │ │ │ +
423 out[27][0][1]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y;
│ │ │ │ +
424 out[27][1][1]=0.0;
│ │ │ │ +
425 out[28][0][1]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y;
│ │ │ │ +
426 out[28][1][1]=0.0;
│ │ │ │ +
427 out[29][0][1]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y;
│ │ │ │ +
428 out[29][1][1]=0.0;
│ │ │ │ +
429 out[30][0][1]=0.0;
│ │ │ │ +
430 out[30][1][1]=0.0;
│ │ │ │ +
431 out[31][0][1]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y;
│ │ │ │ +
432 out[31][1][1]=0.0;
│ │ │ │ +
433 out[32][0][1]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y;
│ │ │ │ +
434 out[32][1][1]=0.0;
│ │ │ │ +
435 out[33][0][1]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y;
│ │ │ │ +
436 out[33][1][1]=0.0;
│ │ │ │ +
437 out[34][0][1]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y;
│ │ │ │ +
438 out[34][1][1]=0.0;
│ │ │ │ +
439 out[35][0][1]=0.0;
│ │ │ │ +
440 out[35][1][1]=0.0;
│ │ │ │ +
441 out[36][0][1]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y;
│ │ │ │ +
442 out[36][1][1]=0.0;
│ │ │ │ +
443 out[37][0][1]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y;
│ │ │ │ +
444 out[37][1][1]=0.0;
│ │ │ │ +
445 out[38][0][1]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y;
│ │ │ │ +
446 out[38][1][1]=0.0;
│ │ │ │ +
447 out[39][0][1]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y;
│ │ │ │ +
448 out[39][1][1]=0.0;
│ │ │ │ +
449 out[40][0][1]=0.0;
│ │ │ │ +
450 out[40][1][1]=-dyl4_y;
│ │ │ │ +
451 out[41][0][1]=0.0;
│ │ │ │ +
452 out[41][1][1]=3.0*dyl1_y-3.0*dyl5_y;
│ │ │ │ +
453 out[42][0][1]=0.0;
│ │ │ │ +
454 out[42][1][1]=5.0*dyl2_y-5.0*dyl4_y;
│ │ │ │ +
455 out[43][0][1]=0.0;
│ │ │ │ +
456 out[43][1][1]=7.0*dyl3_y-7.0*dyl5_y;
│ │ │ │ +
457 out[44][0][1]=0.0;
│ │ │ │ +
458 out[44][1][1]=-3.0*l1_x*dyl4_y;
│ │ │ │ +
459 out[45][0][1]=0.0;
│ │ │ │ +
460 out[45][1][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y;
│ │ │ │ +
461 out[46][0][1]=0.0;
│ │ │ │ +
462 out[46][1][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y;
│ │ │ │ +
463 out[47][0][1]=0.0;
│ │ │ │ +
464 out[47][1][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y;
│ │ │ │ +
465 out[48][0][1]=0.0;
│ │ │ │ +
466 out[48][1][1]=-5.0*l2_x*dyl4_y;
│ │ │ │ +
467 out[49][0][1]=0.0;
│ │ │ │ +
468 out[49][1][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y;
│ │ │ │ +
469 out[50][0][1]=0.0;
│ │ │ │ +
470 out[50][1][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y;
│ │ │ │ +
471 out[51][0][1]=0.0;
│ │ │ │ +
472 out[51][1][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y;
│ │ │ │ +
473 out[52][0][1]=0.0;
│ │ │ │ +
474 out[52][1][1]=-7.0*l3_x*dyl4_y;
│ │ │ │ +
475 out[53][0][1]=0.0;
│ │ │ │ +
476 out[53][1][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y;
│ │ │ │ +
477 out[54][0][1]=0.0;
│ │ │ │ +
478 out[54][1][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y;
│ │ │ │ +
479 out[55][0][1]=0.0;
│ │ │ │ +
480 out[55][1][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y;
│ │ │ │ +
481 out[56][0][1]=0.0;
│ │ │ │ +
482 out[56][1][1]=-9.0*l4_x*dyl4_y;
│ │ │ │ +
483 out[57][0][1]=0.0;
│ │ │ │ +
484 out[57][1][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y;
│ │ │ │ +
485 out[58][0][1]=0.0;
│ │ │ │ +
486 out[58][1][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y;
│ │ │ │ +
487 out[59][0][1]=0.0;
│ │ │ │ +
488 out[59][1][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y;
│ │ │ │ +
489 }
│ │ │ │ +
│ │ │ │ +
490
│ │ │ │ +
│ │ │ │ +
492 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
493 const typename Traits::DomainType& in, // position
│ │ │ │ +
494 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
495 {
│ │ │ │ +
496 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
497 if (totalOrder == 0) {
│ │ │ │ +
498 evaluateFunction(in, out);
│ │ │ │ +
499 } else if (totalOrder == 1) {
│ │ │ │ +
500 out.resize(size());
│ │ │ │ +
501 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
502 auto const& x = in[0], y = in[1];
│ │ │ │ +
503
│ │ │ │ +
504 auto l1_x = 2*x - 1;
│ │ │ │ +
505 auto l2_x = x*(6*x - 6) + 1;
│ │ │ │ +
506 auto l3_x = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
507 auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1;
│ │ │ │ +
508 auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
509 auto l1_y = 2*y - 1;
│ │ │ │ +
510 auto l2_y = y*(6*y - 6) + 1;
│ │ │ │ +
511 auto l3_y = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
512 auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1;
│ │ │ │ +
513 auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1;
│ │ │ │ +
514
│ │ │ │ +
515 if (direction == 0) {
│ │ │ │ +
516 auto dxl1_x = 2.0;
│ │ │ │ +
517 auto dxl2_x = 12*x - 6;
│ │ │ │ +
518 auto dxl3_x = x*(60*x - 60) + 12;
│ │ │ │ +
519 auto dxl4_x = x*(x*(280*x - 420) + 180) - 20;
│ │ │ │ +
520 auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30;
│ │ │ │ +
521
│ │ │ │ +
522 out[0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x);
│ │ │ │ +
523 out[0][1]=0.0;
│ │ │ │ +
524 out[1][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y;
│ │ │ │ +
525 out[1][1]=0.0;
│ │ │ │ +
526 out[2][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
│ │ │ │ +
527 out[2][1]=0.0;
│ │ │ │ +
528 out[3][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y;
│ │ │ │ +
529 out[3][1]=0.0;
│ │ │ │ +
530 out[4][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
│ │ │ │ +
531 out[4][1]=0.0;
│ │ │ │ +
532
│ │ │ │ +
533 out[5][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x);
│ │ │ │ +
534 out[5][1]=0.0;
│ │ │ │ +
535 out[6][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y;
│ │ │ │ +
536 out[6][1]=0.0;
│ │ │ │ +
537 out[7][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y);
│ │ │ │ +
538 out[7][1]=0.0;
│ │ │ │ +
539 out[8][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y;
│ │ │ │ +
540 out[8][1]=0.0;
│ │ │ │ +
541 out[9][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y);
│ │ │ │ +
542 out[9][1]=0.0;
│ │ │ │ +
543
│ │ │ │ +
544 out[10][0]=0.0;
│ │ │ │ +
545 out[10][1]=0.0;
│ │ │ │ +
546 out[11][0]=0.0;
│ │ │ │ +
547 out[11][1]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y;
│ │ │ │ +
548 out[12][0]=0.0;
│ │ │ │ +
549 out[12][1]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
│ │ │ │ +
550 out[13][0]=0.0;
│ │ │ │ +
551 out[13][1]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y;
│ │ │ │ +
552 out[14][0]=0.0;
│ │ │ │ +
553 out[14][1]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
│ │ │ │ +
554
│ │ │ │ +
555 out[15][0]=0.0;
│ │ │ │ +
556 out[15][1]=0.0;
│ │ │ │ +
557 out[16][0]=0.0;
│ │ │ │ +
558 out[16][1]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y;
│ │ │ │ +
559 out[17][0]=0.0;
│ │ │ │ +
560 out[17][1]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y);
│ │ │ │ +
561 out[18][0]=0.0;
│ │ │ │ +
562 out[18][1]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y;
│ │ │ │ +
563 out[19][0]=0.0;
│ │ │ │ +
564 out[19][1]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y);
│ │ │ │ +
565
│ │ │ │ +
566 out[20][0]=-dxl4_x;
│ │ │ │ +
567 out[20][1]=0.0;
│ │ │ │ +
568 out[21][0]=-3.0*dxl4_x*l1_y;
│ │ │ │ +
569 out[21][1]=0.0;
│ │ │ │ +
570 out[22][0]=-5.0*dxl4_x*l2_y;
│ │ │ │ +
571 out[22][1]=0.0;
│ │ │ │ +
572 out[23][0]=-7.0*dxl4_x*l3_y;
│ │ │ │ +
573 out[23][1]=0.0;
│ │ │ │ +
574 out[24][0]=-9.0*dxl4_x*l4_y;
│ │ │ │ +
575 out[24][1]=0.0;
│ │ │ │ +
576 out[25][0]=3.0*dxl1_x-3.0*dxl5_x;
│ │ │ │ +
577 out[25][1]=0.0;
│ │ │ │ +
578 out[26][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y;
│ │ │ │ +
579 out[26][1]=0.0;
│ │ │ │ +
580 out[27][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y;
│ │ │ │ +
581 out[27][1]=0.0;
│ │ │ │ +
582 out[28][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y;
│ │ │ │ +
583 out[28][1]=0.0;
│ │ │ │ +
584 out[29][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y;
│ │ │ │ +
585 out[29][1]=0.0;
│ │ │ │ +
586 out[30][0]=5.0*dxl2_x-5.0*dxl4_x;
│ │ │ │ +
587 out[30][1]=0.0;
│ │ │ │ +
588 out[31][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y;
│ │ │ │ +
589 out[31][1]=0.0;
│ │ │ │ +
590 out[32][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y;
│ │ │ │ +
591 out[32][1]=0.0;
│ │ │ │ +
592 out[33][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y;
│ │ │ │ +
593 out[33][1]=0.0;
│ │ │ │ +
594 out[34][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y;
│ │ │ │ +
595 out[34][1]=0.0;
│ │ │ │ +
596 out[35][0]=7.0*dxl3_x-7.0*dxl5_x;
│ │ │ │ +
597 out[35][1]=0.0;
│ │ │ │ +
598 out[36][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y;
│ │ │ │ +
599 out[36][1]=0.0;
│ │ │ │ +
600 out[37][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y;
│ │ │ │ +
601 out[37][1]=0.0;
│ │ │ │ +
602 out[38][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y;
│ │ │ │ +
603 out[38][1]=0.0;
│ │ │ │ +
604 out[39][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y;
│ │ │ │ +
605 out[39][1]=0.0;
│ │ │ │ +
606 out[40][0]=0.0;
│ │ │ │ +
607 out[40][1]=0.0;
│ │ │ │ +
608 out[41][0]=0.0;
│ │ │ │ +
609 out[41][1]=0.0;
│ │ │ │ +
610 out[42][0]=0.0;
│ │ │ │ +
611 out[42][1]=0.0;
│ │ │ │ +
612 out[43][0]=0.0;
│ │ │ │ +
613 out[43][1]=0.0;
│ │ │ │ +
614 out[44][0]=0.0;
│ │ │ │ +
615 out[44][1]=3.0*dxl1_x-3.0*dxl1_x*l4_y;
│ │ │ │ +
616 out[45][0]=0.0;
│ │ │ │ +
617 out[45][1]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y;
│ │ │ │ +
618 out[46][0]=0.0;
│ │ │ │ +
619 out[46][1]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y;
│ │ │ │ +
620 out[47][0]=0.0;
│ │ │ │ +
621 out[47][1]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y;
│ │ │ │ +
622 out[48][0]=0.0;
│ │ │ │ +
623 out[48][1]=5.0*dxl2_x-5.0*dxl2_x*l4_y;
│ │ │ │ +
624 out[49][0]=0.0;
│ │ │ │ +
625 out[49][1]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y;
│ │ │ │ +
626 out[50][0]=0.0;
│ │ │ │ +
627 out[50][1]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y;
│ │ │ │ +
628 out[51][0]=0.0;
│ │ │ │ +
629 out[51][1]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y;
│ │ │ │ +
630 out[52][0]=0.0;
│ │ │ │ +
631 out[52][1]=7.0*dxl3_x-7.0*dxl3_x*l4_y;
│ │ │ │ +
632 out[53][0]=0.0;
│ │ │ │ +
633 out[53][1]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y;
│ │ │ │ +
634 out[54][0]=0.0;
│ │ │ │ +
635 out[54][1]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y;
│ │ │ │ +
636 out[55][0]=0.0;
│ │ │ │ +
637 out[55][1]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y;
│ │ │ │ +
638 out[56][0]=0.0;
│ │ │ │ +
639 out[56][1]=9.0*dxl4_x-9.0*dxl4_x*l4_y;
│ │ │ │ +
640 out[57][0]=0.0;
│ │ │ │ +
641 out[57][1]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y;
│ │ │ │ +
642 out[58][0]=0.0;
│ │ │ │ +
643 out[58][1]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y;
│ │ │ │ +
644 out[59][0]=0.0;
│ │ │ │ +
645 out[59][1]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y;
│ │ │ │ +
646
│ │ │ │ +
647 } else if (direction == 1) {
│ │ │ │ +
648 auto dyl1_y = 2.0;
│ │ │ │ +
649 auto dyl2_y = 12*y - 6;
│ │ │ │ +
650 auto dyl3_y = y*(60*y - 60) + 12;
│ │ │ │ +
651 auto dyl4_y = y*(y*(280*y - 420) + 180) - 20;
│ │ │ │ +
652 auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30;
│ │ │ │ +
653
│ │ │ │ +
654 out[0][0]=0.0;
│ │ │ │ +
655 out[0][1]=0.0;
│ │ │ │ +
656 out[1][0]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y;
│ │ │ │ +
657 out[1][1]=0.0;
│ │ │ │ +
658 out[2][0]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
│ │ │ │ +
659 out[2][1]=0.0;
│ │ │ │ +
660 out[3][0]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y;
│ │ │ │ +
661 out[3][1]=0.0;
│ │ │ │ +
662 out[4][0]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
│ │ │ │ +
663 out[4][1]=0.0;
│ │ │ │ +
664
│ │ │ │ +
665 out[5][0]=0.0;
│ │ │ │ +
666 out[5][1]=0.0;
│ │ │ │ +
667 out[6][0]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y;
│ │ │ │ +
668 out[6][1]=0.0;
│ │ │ │ +
669 out[7][0]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y);
│ │ │ │ +
670 out[7][1]=0.0;
│ │ │ │ +
671 out[8][0]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y;
│ │ │ │ +
672 out[8][1]=0.0;
│ │ │ │ +
673 out[9][0]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y);
│ │ │ │ +
674 out[9][1]=0.0;
│ │ │ │ +
675
│ │ │ │ +
676 out[10][0]=0.0;
│ │ │ │ +
677 out[10][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y);
│ │ │ │ +
678 out[11][0]=0.0;
│ │ │ │ +
679 out[11][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y;
│ │ │ │ +
680 out[12][0]=0.0;
│ │ │ │ +
681 out[12][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
│ │ │ │ +
682 out[13][0]=0.0;
│ │ │ │ +
683 out[13][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y;
│ │ │ │ +
684 out[14][0]=0.0;
│ │ │ │ +
685 out[14][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
│ │ │ │ +
686
│ │ │ │ +
687 out[15][0]=0.0;
│ │ │ │ +
688 out[15][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y);
│ │ │ │ +
689 out[16][0]=0.0;
│ │ │ │ +
690 out[16][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y;
│ │ │ │ +
691 out[17][0]=0.0;
│ │ │ │ +
692 out[17][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y);
│ │ │ │ +
693 out[18][0]=0.0;
│ │ │ │ +
694 out[18][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y;
│ │ │ │ +
695 out[19][0]=0.0;
│ │ │ │ +
696 out[19][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y);
│ │ │ │ +
697
│ │ │ │ +
698 out[20][0]=0.0;
│ │ │ │ +
699 out[20][1]=0.0;
│ │ │ │ +
700 out[21][0]=3.0*dyl1_y-3.0*l4_x*dyl1_y;
│ │ │ │ +
701 out[21][1]=0.0;
│ │ │ │ +
702 out[22][0]=5.0*dyl2_y-5.0*l4_x*dyl2_y;
│ │ │ │ +
703 out[22][1]=0.0;
│ │ │ │ +
704 out[23][0]=7.0*dyl3_y-7.0*l4_x*dyl3_y;
│ │ │ │ +
705 out[23][1]=0.0;
│ │ │ │ +
706 out[24][0]=9.0*dyl4_y-9.0*l4_x*dyl4_y;
│ │ │ │ +
707 out[24][1]=0.0;
│ │ │ │ +
708 out[25][0]=0.0;
│ │ │ │ +
709 out[25][1]=0.0;
│ │ │ │ +
710 out[26][0]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y;
│ │ │ │ +
711 out[26][1]=0.0;
│ │ │ │ +
712 out[27][0]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y;
│ │ │ │ +
713 out[27][1]=0.0;
│ │ │ │ +
714 out[28][0]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y;
│ │ │ │ +
715 out[28][1]=0.0;
│ │ │ │ +
716 out[29][0]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y;
│ │ │ │ +
717 out[29][1]=0.0;
│ │ │ │ +
718 out[30][0]=0.0;
│ │ │ │ +
719 out[30][1]=0.0;
│ │ │ │ +
720 out[31][0]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y;
│ │ │ │ +
721 out[31][1]=0.0;
│ │ │ │ +
722 out[32][0]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y;
│ │ │ │ +
723 out[32][1]=0.0;
│ │ │ │ +
724 out[33][0]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y;
│ │ │ │ +
725 out[33][1]=0.0;
│ │ │ │ +
726 out[34][0]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y;
│ │ │ │ +
727 out[34][1]=0.0;
│ │ │ │ +
728 out[35][0]=0.0;
│ │ │ │ +
729 out[35][1]=0.0;
│ │ │ │ +
730 out[36][0]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y;
│ │ │ │ +
731 out[36][1]=0.0;
│ │ │ │ +
732 out[37][0]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y;
│ │ │ │ +
733 out[37][1]=0.0;
│ │ │ │ +
734 out[38][0]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y;
│ │ │ │ +
735 out[38][1]=0.0;
│ │ │ │ +
736 out[39][0]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y;
│ │ │ │ +
737 out[39][1]=0.0;
│ │ │ │ +
738 out[40][0]=0.0;
│ │ │ │ +
739 out[40][1]=-dyl4_y;
│ │ │ │ +
740 out[41][0]=0.0;
│ │ │ │ +
741 out[41][1]=3.0*dyl1_y-3.0*dyl5_y;
│ │ │ │ +
742 out[42][0]=0.0;
│ │ │ │ +
743 out[42][1]=5.0*dyl2_y-5.0*dyl4_y;
│ │ │ │ +
744 out[43][0]=0.0;
│ │ │ │ +
745 out[43][1]=7.0*dyl3_y-7.0*dyl5_y;
│ │ │ │ +
746 out[44][0]=0.0;
│ │ │ │ +
747 out[44][1]=-3.0*l1_x*dyl4_y;
│ │ │ │ +
748 out[45][0]=0.0;
│ │ │ │ +
749 out[45][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y;
│ │ │ │ +
750 out[46][0]=0.0;
│ │ │ │ +
751 out[46][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y;
│ │ │ │ +
752 out[47][0]=0.0;
│ │ │ │ +
753 out[47][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y;
│ │ │ │ +
754 out[48][0]=0.0;
│ │ │ │ +
755 out[48][1]=-5.0*l2_x*dyl4_y;
│ │ │ │ +
756 out[49][0]=0.0;
│ │ │ │ +
757 out[49][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y;
│ │ │ │ +
758 out[50][0]=0.0;
│ │ │ │ +
759 out[50][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y;
│ │ │ │ +
760 out[51][0]=0.0;
│ │ │ │ +
761 out[51][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y;
│ │ │ │ +
762 out[52][0]=0.0;
│ │ │ │ +
763 out[52][1]=-7.0*l3_x*dyl4_y;
│ │ │ │ +
764 out[53][0]=0.0;
│ │ │ │ +
765 out[53][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y;
│ │ │ │ +
766 out[54][0]=0.0;
│ │ │ │ +
767 out[54][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y;
│ │ │ │ +
768 out[55][0]=0.0;
│ │ │ │ +
769 out[55][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y;
│ │ │ │ +
770 out[56][0]=0.0;
│ │ │ │ +
771 out[56][1]=-9.0*l4_x*dyl4_y;
│ │ │ │ +
772 out[57][0]=0.0;
│ │ │ │ +
773 out[57][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y;
│ │ │ │ +
774 out[58][0]=0.0;
│ │ │ │ +
775 out[58][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y;
│ │ │ │ +
776 out[59][0]=0.0;
│ │ │ │ +
777 out[59][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y;
│ │ │ │ +
778 } else {
│ │ │ │ +
779 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
780 }
│ │ │ │ +
781 } else {
│ │ │ │ +
782 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
783 }
│ │ │ │ +
784 }
│ │ │ │ +
│ │ │ │ +
785
│ │ │ │ +
│ │ │ │ +
787 unsigned int order () const
│ │ │ │ +
788 {
│ │ │ │ +
789 return 9;
│ │ │ │ +
790 }
│ │ │ │ +
│ │ │ │ +
791
│ │ │ │ +
792 private:
│ │ │ │ +
793 R sign0, sign1, sign2, sign3;
│ │ │ │ +
794 };
│ │ │ │ +
│ │ │ │ +
795}
│ │ │ │ +
796
│ │ │ │ +
797#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas4cube2dlocalbasis.hh:29
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas4cube2dlocalbasis.hh:492
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas4cube2dlocalbasis.hh:60
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas4cube2dlocalbasis.hh:33
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas4cube2dlocalbasis.hh:49
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas4cube2dlocalbasis.hh:787
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas4cube2dlocalbasis.hh:210
│ │ │ │ +
RT4Cube2DLocalBasis(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas4cube2dlocalbasis.hh:40
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,826 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -prismp1.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_4_c_u_b_e_2_d │ │ │ │ │ +raviartthomas4cube2dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_P13DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS4_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 using _P_r_i_s_m_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ -22 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ -23 │ │ │ │ │ -24} │ │ │ │ │ -25 │ │ │ │ │ -26#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include "../../common/localbasis.hh" │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_4_0 _R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ +41 { │ │ │ │ │ +42 sign0 = (s[0]) ? -1.0 : 1.0; │ │ │ │ │ +43 sign1 = (s[1]) ? -1.0 : 1.0; │ │ │ │ │ +44 sign2 = (s[2]) ? -1.0 : 1.0; │ │ │ │ │ +45 sign3 = (s[3]) ? -1.0 : 1.0; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_9 unsigned int _s_i_z_e () const │ │ │ │ │ +50 { │ │ │ │ │ +51 return 60; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_6_0 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +61 std::vector& out) const │ │ │ │ │ +62 { │ │ │ │ │ +63 out.resize(60); │ │ │ │ │ +64 │ │ │ │ │ +65 auto const& x = in[0], y = in[1]; │ │ │ │ │ +66 │ │ │ │ │ +67 const auto l1_x = 2*x - 1; │ │ │ │ │ +68 const auto l2_x = x*(6*x - 6) + 1; │ │ │ │ │ +69 const auto l3_x = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +70 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1; │ │ │ │ │ +71 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +72 const auto l1_y = 2*y - 1; │ │ │ │ │ +73 const auto l2_y = y*(6*y - 6) + 1; │ │ │ │ │ +74 const auto l3_y = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +75 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1; │ │ │ │ │ +76 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +77 │ │ │ │ │ +78 out[0][0]=sign0*(0.5*(-l4_x)+0.5*l5_x); │ │ │ │ │ +79 out[0][1]=0.0; │ │ │ │ │ +80 out[1][0]=-(1.5)*l4_x*l1_y+1.5*l5_x*l1_y; │ │ │ │ │ +81 out[1][1]=0.0; │ │ │ │ │ +82 out[2][0]=sign0*(-(2.5)*l4_x*l2_y+2.5*l5_x*l2_y); │ │ │ │ │ +83 out[2][1]=0.0; │ │ │ │ │ +84 out[3][0]=-(3.5)*l4_x*l3_y+3.5*l5_x*l3_y; │ │ │ │ │ +85 out[3][1]=0.0; │ │ │ │ │ +86 out[4][0]=sign0*(-(4.5)*l4_x*l4_y+4.5*l5_x*l4_y); │ │ │ │ │ +87 out[4][1]=0.0; │ │ │ │ │ +88 │ │ │ │ │ +89 out[5][0]=sign1*(0.5*l4_x+0.5*l5_x); │ │ │ │ │ +90 out[5][1]=0.0; │ │ │ │ │ +91 out[6][0]=-(1.5)*l4_x*l1_y-1.5*l5_x*l1_y; │ │ │ │ │ +92 out[6][1]=0.0; │ │ │ │ │ +93 out[7][0]=sign1*(2.5*l4_x*l2_y+2.5*l5_x*l2_y); │ │ │ │ │ +94 out[7][1]=0.0; │ │ │ │ │ +95 out[8][0]=-(3.5)*l4_x*l3_y-3.5*l5_x*l3_y; │ │ │ │ │ +96 out[8][1]=0.0; │ │ │ │ │ +97 out[9][0]=sign1*(4.5*l4_x*l4_y+4.5*l5_x*l4_y); │ │ │ │ │ +98 out[9][1]=0.0; │ │ │ │ │ +99 │ │ │ │ │ +100 out[10][0]=0.0; │ │ │ │ │ +101 out[10][1]=sign2*(0.5*(-l4_y)+0.5*l5_y); │ │ │ │ │ +102 out[11][0]=0.0; │ │ │ │ │ +103 out[11][1]=1.5*l1_x*l4_y-1.5*l1_x*l5_y; │ │ │ │ │ +104 out[12][0]=0.0; │ │ │ │ │ +105 out[12][1]=sign2*(-(2.5)*l2_x*l4_y+2.5*l2_x*l5_y); │ │ │ │ │ +106 out[13][0]=0.0; │ │ │ │ │ +107 out[13][1]=3.5*l3_x*l4_y-3.5*l3_x*l5_y; │ │ │ │ │ +108 out[14][0]=0.0; │ │ │ │ │ +109 out[14][1]=sign2*(-(4.5)*l4_x*l4_y+4.5*l4_x*l5_y); │ │ │ │ │ +110 │ │ │ │ │ +111 out[15][0]=0.0; │ │ │ │ │ +112 out[15][1]=sign3*(0.5*l4_y+0.5*l5_y); │ │ │ │ │ +113 out[16][0]=0.0; │ │ │ │ │ +114 out[16][1]=1.5*l1_x*l4_y+1.5*l1_x*l5_y; │ │ │ │ │ +115 out[17][0]=0.0; │ │ │ │ │ +116 out[17][1]=sign3*(2.5*l2_x*l4_y+2.5*l2_x*l5_y); │ │ │ │ │ +117 out[18][0]=0.0; │ │ │ │ │ +118 out[18][1]=3.5*l3_x*l4_y+3.5*l3_x*l5_y; │ │ │ │ │ +119 out[19][0]=0.0; │ │ │ │ │ +120 out[19][1]=sign3*(4.5*l4_x*l4_y+4.5*l4_x*l5_y); │ │ │ │ │ +121 │ │ │ │ │ +122 out[20][0]=1.0-l4_x; │ │ │ │ │ +123 out[20][1]=0.0; │ │ │ │ │ +124 out[21][0]=3.0*l1_y-3.0*l4_x*l1_y; │ │ │ │ │ +125 out[21][1]=0.0; │ │ │ │ │ +126 out[22][0]=5.0*l2_y-5.0*l4_x*l2_y; │ │ │ │ │ +127 out[22][1]=0.0; │ │ │ │ │ +128 out[23][0]=7.0*l3_y-7.0*l4_x*l3_y; │ │ │ │ │ +129 out[23][1]=0.0; │ │ │ │ │ +130 out[24][0]=9.0*l4_y-9.0*l4_x*l4_y; │ │ │ │ │ +131 out[24][1]=0.0; │ │ │ │ │ +132 out[25][0]=3.0*l1_x-3.0*l5_x; │ │ │ │ │ +133 out[25][1]=0.0; │ │ │ │ │ +134 out[26][0]=9.0*l1_x*l1_y-9.0*l5_x*l1_y; │ │ │ │ │ +135 out[26][1]=0.0; │ │ │ │ │ +136 out[27][0]=15.0*l1_x*l2_y-15.0*l5_x*l2_y; │ │ │ │ │ +137 out[27][1]=0.0; │ │ │ │ │ +138 out[28][0]=21.0*l1_x*l3_y-21.0*l5_x*l3_y; │ │ │ │ │ +139 out[28][1]=0.0; │ │ │ │ │ +140 out[29][0]=27.0*l1_x*l4_y-27.0*l5_x*l4_y; │ │ │ │ │ +141 out[29][1]=0.0; │ │ │ │ │ +142 out[30][0]=5.0*l2_x-5.0*l4_x; │ │ │ │ │ +143 out[30][1]=0.0; │ │ │ │ │ +144 out[31][0]=15.0*l2_x*l1_y-15.0*l4_x*l1_y; │ │ │ │ │ +145 out[31][1]=0.0; │ │ │ │ │ +146 out[32][0]=25.0*l2_x*l2_y-25.0*l4_x*l2_y; │ │ │ │ │ +147 out[32][1]=0.0; │ │ │ │ │ +148 out[33][0]=35.0*l2_x*l3_y-35.0*l4_x*l3_y; │ │ │ │ │ +149 out[33][1]=0.0; │ │ │ │ │ +150 out[34][0]=45.0*l2_x*l4_y-45.0*l4_x*l4_y; │ │ │ │ │ +151 out[34][1]=0.0; │ │ │ │ │ +152 out[35][0]=7.0*l3_x-7.0*l5_x; │ │ │ │ │ +153 out[35][1]=0.0; │ │ │ │ │ +154 out[36][0]=21.0*l3_x*l1_y-21.0*l5_x*l1_y; │ │ │ │ │ +155 out[36][1]=0.0; │ │ │ │ │ +156 out[37][0]=35.0*l3_x*l2_y-35.0*l5_x*l2_y; │ │ │ │ │ +157 out[37][1]=0.0; │ │ │ │ │ +158 out[38][0]=49.0*l3_x*l3_y-49.0*l5_x*l3_y; │ │ │ │ │ +159 out[38][1]=0.0; │ │ │ │ │ +160 out[39][0]=63.0*l3_x*l4_y-63.0*l5_x*l4_y; │ │ │ │ │ +161 out[39][1]=0.0; │ │ │ │ │ +162 out[40][0]=0.0; │ │ │ │ │ +163 out[40][1]=1.0-l4_y; │ │ │ │ │ +164 out[41][0]=0.0; │ │ │ │ │ +165 out[41][1]=3.0*l1_y-3.0*l5_y; │ │ │ │ │ +166 out[42][0]=0.0; │ │ │ │ │ +167 out[42][1]=5.0*l2_y-5.0*l4_y; │ │ │ │ │ +168 out[43][0]=0.0; │ │ │ │ │ +169 out[43][1]=7.0*l3_y-7.0*l5_y; │ │ │ │ │ +170 out[44][0]=0.0; │ │ │ │ │ +171 out[44][1]=3.0*l1_x-3.0*l1_x*l4_y; │ │ │ │ │ +172 out[45][0]=0.0; │ │ │ │ │ +173 out[45][1]=9.0*l1_x*l1_y-9.0*l1_x*l5_y; │ │ │ │ │ +174 out[46][0]=0.0; │ │ │ │ │ +175 out[46][1]=15.0*l1_x*l2_y-15.0*l1_x*l4_y; │ │ │ │ │ +176 out[47][0]=0.0; │ │ │ │ │ +177 out[47][1]=21.0*l1_x*l3_y-21.0*l1_x*l5_y; │ │ │ │ │ +178 out[48][0]=0.0; │ │ │ │ │ +179 out[48][1]=5.0*l2_x-5.0*l2_x*l4_y; │ │ │ │ │ +180 out[49][0]=0.0; │ │ │ │ │ +181 out[49][1]=15.0*l2_x*l1_y-15.0*l2_x*l5_y; │ │ │ │ │ +182 out[50][0]=0.0; │ │ │ │ │ +183 out[50][1]=25.0*l2_x*l2_y-25.0*l2_x*l4_y; │ │ │ │ │ +184 out[51][0]=0.0; │ │ │ │ │ +185 out[51][1]=35.0*l2_x*l3_y-35.0*l2_x*l5_y; │ │ │ │ │ +186 out[52][0]=0.0; │ │ │ │ │ +187 out[52][1]=7.0*l3_x-7.0*l3_x*l4_y; │ │ │ │ │ +188 out[53][0]=0.0; │ │ │ │ │ +189 out[53][1]=21.0*l3_x*l1_y-21.0*l3_x*l5_y; │ │ │ │ │ +190 out[54][0]=0.0; │ │ │ │ │ +191 out[54][1]=35.0*l3_x*l2_y-35.0*l3_x*l4_y; │ │ │ │ │ +192 out[55][0]=0.0; │ │ │ │ │ +193 out[55][1]=49.0*l3_x*l3_y-49.0*l3_x*l5_y; │ │ │ │ │ +194 out[56][0]=0.0; │ │ │ │ │ +195 out[56][1]=9.0*l4_x-9.0*l4_x*l4_y; │ │ │ │ │ +196 out[57][0]=0.0; │ │ │ │ │ +197 out[57][1]=27.0*l4_x*l1_y-27.0*l4_x*l5_y; │ │ │ │ │ +198 out[58][0]=0.0; │ │ │ │ │ +199 out[58][1]=45.0*l4_x*l2_y-45.0*l4_x*l4_y; │ │ │ │ │ +200 out[59][0]=0.0; │ │ │ │ │ +201 out[59][1]=63.0*l4_x*l3_y-63.0*l4_x*l5_y; │ │ │ │ │ +202 } │ │ │ │ │ +203 │ │ │ │ │ +_2_1_0 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +211 std::vector& out) const │ │ │ │ │ +212 { │ │ │ │ │ +213 out.resize(60); │ │ │ │ │ +214 auto const& x = in[0], y = in[1]; │ │ │ │ │ +215 │ │ │ │ │ +216 const auto l1_x = 2*x - 1; │ │ │ │ │ +217 const auto l2_x = x*(6*x - 6) + 1; │ │ │ │ │ +218 const auto l3_x = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +219 const auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1; │ │ │ │ │ +220 const auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +221 const auto l1_y = 2*y - 1; │ │ │ │ │ +222 const auto l2_y = y*(6*y - 6) + 1; │ │ │ │ │ +223 const auto l3_y = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +224 const auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1; │ │ │ │ │ +225 const auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +226 │ │ │ │ │ +227 const auto dxl1_x = 2.0; │ │ │ │ │ +228 const auto dxl2_x = 12*x - 6; │ │ │ │ │ +229 const auto dxl3_x = x*(60*x - 60) + 12; │ │ │ │ │ +230 const auto dxl4_x = x*(x*(280*x - 420) + 180) - 20; │ │ │ │ │ +231 const auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30; │ │ │ │ │ +232 const auto dyl1_y = 2.0; │ │ │ │ │ +233 const auto dyl2_y = 12*y - 6; │ │ │ │ │ +234 const auto dyl3_y = y*(60*y - 60) + 12; │ │ │ │ │ +235 const auto dyl4_y = y*(y*(280*y - 420) + 180) - 20; │ │ │ │ │ +236 const auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30; │ │ │ │ │ +237 │ │ │ │ │ +238 // x-component │ │ │ │ │ +239 out[0][0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x); │ │ │ │ │ +240 out[0][1][0]=0.0; │ │ │ │ │ +241 out[1][0][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y; │ │ │ │ │ +242 out[1][1][0]=0.0; │ │ │ │ │ +243 out[2][0][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y); │ │ │ │ │ +244 out[2][1][0]=0.0; │ │ │ │ │ +245 out[3][0][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y; │ │ │ │ │ +246 out[3][1][0]=0.0; │ │ │ │ │ +247 out[4][0][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y); │ │ │ │ │ +248 out[4][1][0]=0.0; │ │ │ │ │ +249 │ │ │ │ │ +250 out[5][0][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x); │ │ │ │ │ +251 out[5][1][0]=0.0; │ │ │ │ │ +252 out[6][0][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y; │ │ │ │ │ +253 out[6][1][0]=0.0; │ │ │ │ │ +254 out[7][0][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y); │ │ │ │ │ +255 out[7][1][0]=0.0; │ │ │ │ │ +256 out[8][0][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y; │ │ │ │ │ +257 out[8][1][0]=0.0; │ │ │ │ │ +258 out[9][0][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y); │ │ │ │ │ +259 out[9][1][0]=0.0; │ │ │ │ │ +260 │ │ │ │ │ +261 out[10][0][0]=0.0; │ │ │ │ │ +262 out[10][1][0]=0.0; │ │ │ │ │ +263 out[11][0][0]=0.0; │ │ │ │ │ +264 out[11][1][0]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y; │ │ │ │ │ +265 out[12][0][0]=0.0; │ │ │ │ │ +266 out[12][1][0]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y); │ │ │ │ │ +267 out[13][0][0]=0.0; │ │ │ │ │ +268 out[13][1][0]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y; │ │ │ │ │ +269 out[14][0][0]=0.0; │ │ │ │ │ +270 out[14][1][0]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y); │ │ │ │ │ +271 │ │ │ │ │ +272 out[15][0][0]=0.0; │ │ │ │ │ +273 out[15][1][0]=0.0; │ │ │ │ │ +274 out[16][0][0]=0.0; │ │ │ │ │ +275 out[16][1][0]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y; │ │ │ │ │ +276 out[17][0][0]=0.0; │ │ │ │ │ +277 out[17][1][0]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y); │ │ │ │ │ +278 out[18][0][0]=0.0; │ │ │ │ │ +279 out[18][1][0]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y; │ │ │ │ │ +280 out[19][0][0]=0.0; │ │ │ │ │ +281 out[19][1][0]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y); │ │ │ │ │ +282 │ │ │ │ │ +283 out[20][0][0]=-dxl4_x; │ │ │ │ │ +284 out[20][1][0]=0.0; │ │ │ │ │ +285 out[21][0][0]=-3.0*dxl4_x*l1_y; │ │ │ │ │ +286 out[21][1][0]=0.0; │ │ │ │ │ +287 out[22][0][0]=-5.0*dxl4_x*l2_y; │ │ │ │ │ +288 out[22][1][0]=0.0; │ │ │ │ │ +289 out[23][0][0]=-7.0*dxl4_x*l3_y; │ │ │ │ │ +290 out[23][1][0]=0.0; │ │ │ │ │ +291 out[24][0][0]=-9.0*dxl4_x*l4_y; │ │ │ │ │ +292 out[24][1][0]=0.0; │ │ │ │ │ +293 out[25][0][0]=3.0*dxl1_x-3.0*dxl5_x; │ │ │ │ │ +294 out[25][1][0]=0.0; │ │ │ │ │ +295 out[26][0][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y; │ │ │ │ │ +296 out[26][1][0]=0.0; │ │ │ │ │ +297 out[27][0][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y; │ │ │ │ │ +298 out[27][1][0]=0.0; │ │ │ │ │ +299 out[28][0][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y; │ │ │ │ │ +300 out[28][1][0]=0.0; │ │ │ │ │ +301 out[29][0][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y; │ │ │ │ │ +302 out[29][1][0]=0.0; │ │ │ │ │ +303 out[30][0][0]=5.0*dxl2_x-5.0*dxl4_x; │ │ │ │ │ +304 out[30][1][0]=0.0; │ │ │ │ │ +305 out[31][0][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y; │ │ │ │ │ +306 out[31][1][0]=0.0; │ │ │ │ │ +307 out[32][0][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y; │ │ │ │ │ +308 out[32][1][0]=0.0; │ │ │ │ │ +309 out[33][0][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y; │ │ │ │ │ +310 out[33][1][0]=0.0; │ │ │ │ │ +311 out[34][0][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y; │ │ │ │ │ +312 out[34][1][0]=0.0; │ │ │ │ │ +313 out[35][0][0]=7.0*dxl3_x-7.0*dxl5_x; │ │ │ │ │ +314 out[35][1][0]=0.0; │ │ │ │ │ +315 out[36][0][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y; │ │ │ │ │ +316 out[36][1][0]=0.0; │ │ │ │ │ +317 out[37][0][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y; │ │ │ │ │ +318 out[37][1][0]=0.0; │ │ │ │ │ +319 out[38][0][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y; │ │ │ │ │ +320 out[38][1][0]=0.0; │ │ │ │ │ +321 out[39][0][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y; │ │ │ │ │ +322 out[39][1][0]=0.0; │ │ │ │ │ +323 out[40][0][0]=0.0; │ │ │ │ │ +324 out[40][1][0]=0.0; │ │ │ │ │ +325 out[41][0][0]=0.0; │ │ │ │ │ +326 out[41][1][0]=0.0; │ │ │ │ │ +327 out[42][0][0]=0.0; │ │ │ │ │ +328 out[42][1][0]=0.0; │ │ │ │ │ +329 out[43][0][0]=0.0; │ │ │ │ │ +330 out[43][1][0]=0.0; │ │ │ │ │ +331 out[44][0][0]=0.0; │ │ │ │ │ +332 out[44][1][0]=3.0*dxl1_x-3.0*dxl1_x*l4_y; │ │ │ │ │ +333 out[45][0][0]=0.0; │ │ │ │ │ +334 out[45][1][0]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y; │ │ │ │ │ +335 out[46][0][0]=0.0; │ │ │ │ │ +336 out[46][1][0]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y; │ │ │ │ │ +337 out[47][0][0]=0.0; │ │ │ │ │ +338 out[47][1][0]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y; │ │ │ │ │ +339 out[48][0][0]=0.0; │ │ │ │ │ +340 out[48][1][0]=5.0*dxl2_x-5.0*dxl2_x*l4_y; │ │ │ │ │ +341 out[49][0][0]=0.0; │ │ │ │ │ +342 out[49][1][0]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y; │ │ │ │ │ +343 out[50][0][0]=0.0; │ │ │ │ │ +344 out[50][1][0]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y; │ │ │ │ │ +345 out[51][0][0]=0.0; │ │ │ │ │ +346 out[51][1][0]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y; │ │ │ │ │ +347 out[52][0][0]=0.0; │ │ │ │ │ +348 out[52][1][0]=7.0*dxl3_x-7.0*dxl3_x*l4_y; │ │ │ │ │ +349 out[53][0][0]=0.0; │ │ │ │ │ +350 out[53][1][0]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y; │ │ │ │ │ +351 out[54][0][0]=0.0; │ │ │ │ │ +352 out[54][1][0]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y; │ │ │ │ │ +353 out[55][0][0]=0.0; │ │ │ │ │ +354 out[55][1][0]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y; │ │ │ │ │ +355 out[56][0][0]=0.0; │ │ │ │ │ +356 out[56][1][0]=9.0*dxl4_x-9.0*dxl4_x*l4_y; │ │ │ │ │ +357 out[57][0][0]=0.0; │ │ │ │ │ +358 out[57][1][0]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y; │ │ │ │ │ +359 out[58][0][0]=0.0; │ │ │ │ │ +360 out[58][1][0]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y; │ │ │ │ │ +361 out[59][0][0]=0.0; │ │ │ │ │ +362 out[59][1][0]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y; │ │ │ │ │ +363 │ │ │ │ │ +364 // y-component │ │ │ │ │ +365 out[0][0][1]=0.0; │ │ │ │ │ +366 out[0][1][1]=0.0; │ │ │ │ │ +367 out[1][0][1]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y; │ │ │ │ │ +368 out[1][1][1]=0.0; │ │ │ │ │ +369 out[2][0][1]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y); │ │ │ │ │ +370 out[2][1][1]=0.0; │ │ │ │ │ +371 out[3][0][1]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y; │ │ │ │ │ +372 out[3][1][1]=0.0; │ │ │ │ │ +373 out[4][0][1]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y); │ │ │ │ │ +374 out[4][1][1]=0.0; │ │ │ │ │ +375 │ │ │ │ │ +376 out[5][0][1]=0.0; │ │ │ │ │ +377 out[5][1][1]=0.0; │ │ │ │ │ +378 out[6][0][1]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y; │ │ │ │ │ +379 out[6][1][1]=0.0; │ │ │ │ │ +380 out[7][0][1]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y); │ │ │ │ │ +381 out[7][1][1]=0.0; │ │ │ │ │ +382 out[8][0][1]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y; │ │ │ │ │ +383 out[8][1][1]=0.0; │ │ │ │ │ +384 out[9][0][1]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y); │ │ │ │ │ +385 out[9][1][1]=0.0; │ │ │ │ │ +386 │ │ │ │ │ +387 out[10][0][1]=0.0; │ │ │ │ │ +388 out[10][1][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y); │ │ │ │ │ +389 out[11][0][1]=0.0; │ │ │ │ │ +390 out[11][1][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y; │ │ │ │ │ +391 out[12][0][1]=0.0; │ │ │ │ │ +392 out[12][1][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y); │ │ │ │ │ +393 out[13][0][1]=0.0; │ │ │ │ │ +394 out[13][1][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y; │ │ │ │ │ +395 out[14][0][1]=0.0; │ │ │ │ │ +396 out[14][1][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y); │ │ │ │ │ +397 │ │ │ │ │ +398 out[15][0][1]=0.0; │ │ │ │ │ +399 out[15][1][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y); │ │ │ │ │ +400 out[16][0][1]=0.0; │ │ │ │ │ +401 out[16][1][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y; │ │ │ │ │ +402 out[17][0][1]=0.0; │ │ │ │ │ +403 out[17][1][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y); │ │ │ │ │ +404 out[18][0][1]=0.0; │ │ │ │ │ +405 out[18][1][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y; │ │ │ │ │ +406 out[19][0][1]=0.0; │ │ │ │ │ +407 out[19][1][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y); │ │ │ │ │ +408 │ │ │ │ │ +409 out[20][0][1]=0.0; │ │ │ │ │ +410 out[20][1][1]=0.0; │ │ │ │ │ +411 out[21][0][1]=3.0*dyl1_y-3.0*l4_x*dyl1_y; │ │ │ │ │ +412 out[21][1][1]=0.0; │ │ │ │ │ +413 out[22][0][1]=5.0*dyl2_y-5.0*l4_x*dyl2_y; │ │ │ │ │ +414 out[22][1][1]=0.0; │ │ │ │ │ +415 out[23][0][1]=7.0*dyl3_y-7.0*l4_x*dyl3_y; │ │ │ │ │ +416 out[23][1][1]=0.0; │ │ │ │ │ +417 out[24][0][1]=9.0*dyl4_y-9.0*l4_x*dyl4_y; │ │ │ │ │ +418 out[24][1][1]=0.0; │ │ │ │ │ +419 out[25][0][1]=0.0; │ │ │ │ │ +420 out[25][1][1]=0.0; │ │ │ │ │ +421 out[26][0][1]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y; │ │ │ │ │ +422 out[26][1][1]=0.0; │ │ │ │ │ +423 out[27][0][1]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y; │ │ │ │ │ +424 out[27][1][1]=0.0; │ │ │ │ │ +425 out[28][0][1]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y; │ │ │ │ │ +426 out[28][1][1]=0.0; │ │ │ │ │ +427 out[29][0][1]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y; │ │ │ │ │ +428 out[29][1][1]=0.0; │ │ │ │ │ +429 out[30][0][1]=0.0; │ │ │ │ │ +430 out[30][1][1]=0.0; │ │ │ │ │ +431 out[31][0][1]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y; │ │ │ │ │ +432 out[31][1][1]=0.0; │ │ │ │ │ +433 out[32][0][1]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y; │ │ │ │ │ +434 out[32][1][1]=0.0; │ │ │ │ │ +435 out[33][0][1]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y; │ │ │ │ │ +436 out[33][1][1]=0.0; │ │ │ │ │ +437 out[34][0][1]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y; │ │ │ │ │ +438 out[34][1][1]=0.0; │ │ │ │ │ +439 out[35][0][1]=0.0; │ │ │ │ │ +440 out[35][1][1]=0.0; │ │ │ │ │ +441 out[36][0][1]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y; │ │ │ │ │ +442 out[36][1][1]=0.0; │ │ │ │ │ +443 out[37][0][1]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y; │ │ │ │ │ +444 out[37][1][1]=0.0; │ │ │ │ │ +445 out[38][0][1]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y; │ │ │ │ │ +446 out[38][1][1]=0.0; │ │ │ │ │ +447 out[39][0][1]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y; │ │ │ │ │ +448 out[39][1][1]=0.0; │ │ │ │ │ +449 out[40][0][1]=0.0; │ │ │ │ │ +450 out[40][1][1]=-dyl4_y; │ │ │ │ │ +451 out[41][0][1]=0.0; │ │ │ │ │ +452 out[41][1][1]=3.0*dyl1_y-3.0*dyl5_y; │ │ │ │ │ +453 out[42][0][1]=0.0; │ │ │ │ │ +454 out[42][1][1]=5.0*dyl2_y-5.0*dyl4_y; │ │ │ │ │ +455 out[43][0][1]=0.0; │ │ │ │ │ +456 out[43][1][1]=7.0*dyl3_y-7.0*dyl5_y; │ │ │ │ │ +457 out[44][0][1]=0.0; │ │ │ │ │ +458 out[44][1][1]=-3.0*l1_x*dyl4_y; │ │ │ │ │ +459 out[45][0][1]=0.0; │ │ │ │ │ +460 out[45][1][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y; │ │ │ │ │ +461 out[46][0][1]=0.0; │ │ │ │ │ +462 out[46][1][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y; │ │ │ │ │ +463 out[47][0][1]=0.0; │ │ │ │ │ +464 out[47][1][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y; │ │ │ │ │ +465 out[48][0][1]=0.0; │ │ │ │ │ +466 out[48][1][1]=-5.0*l2_x*dyl4_y; │ │ │ │ │ +467 out[49][0][1]=0.0; │ │ │ │ │ +468 out[49][1][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y; │ │ │ │ │ +469 out[50][0][1]=0.0; │ │ │ │ │ +470 out[50][1][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y; │ │ │ │ │ +471 out[51][0][1]=0.0; │ │ │ │ │ +472 out[51][1][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y; │ │ │ │ │ +473 out[52][0][1]=0.0; │ │ │ │ │ +474 out[52][1][1]=-7.0*l3_x*dyl4_y; │ │ │ │ │ +475 out[53][0][1]=0.0; │ │ │ │ │ +476 out[53][1][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y; │ │ │ │ │ +477 out[54][0][1]=0.0; │ │ │ │ │ +478 out[54][1][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y; │ │ │ │ │ +479 out[55][0][1]=0.0; │ │ │ │ │ +480 out[55][1][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y; │ │ │ │ │ +481 out[56][0][1]=0.0; │ │ │ │ │ +482 out[56][1][1]=-9.0*l4_x*dyl4_y; │ │ │ │ │ +483 out[57][0][1]=0.0; │ │ │ │ │ +484 out[57][1][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y; │ │ │ │ │ +485 out[58][0][1]=0.0; │ │ │ │ │ +486 out[58][1][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y; │ │ │ │ │ +487 out[59][0][1]=0.0; │ │ │ │ │ +488 out[59][1][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y; │ │ │ │ │ +489 } │ │ │ │ │ +490 │ │ │ │ │ +_4_9_2 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +493 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +494 std::vector& out) const // return value │ │ │ │ │ +495 { │ │ │ │ │ +496 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +497 if (totalOrder == 0) { │ │ │ │ │ +498 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +499 } else if (totalOrder == 1) { │ │ │ │ │ +500 out.resize(_s_i_z_e()); │ │ │ │ │ +501 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ +(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ +502 auto const& x = in[0], y = in[1]; │ │ │ │ │ +503 │ │ │ │ │ +504 auto l1_x = 2*x - 1; │ │ │ │ │ +505 auto l2_x = x*(6*x - 6) + 1; │ │ │ │ │ +506 auto l3_x = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +507 auto l4_x = x*(x*(x*(70*x - 140) + 90) - 20) + 1; │ │ │ │ │ +508 auto l5_x = x*(x*(x*(x*(252*x - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +509 auto l1_y = 2*y - 1; │ │ │ │ │ +510 auto l2_y = y*(6*y - 6) + 1; │ │ │ │ │ +511 auto l3_y = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +512 auto l4_y = y*(y*(y*(70*y - 140) + 90) - 20) + 1; │ │ │ │ │ +513 auto l5_y = y*(y*(y*(y*(252*y - 630) + 560) - 210) + 30) - 1; │ │ │ │ │ +514 │ │ │ │ │ +515 if (direction == 0) { │ │ │ │ │ +516 auto dxl1_x = 2.0; │ │ │ │ │ +517 auto dxl2_x = 12*x - 6; │ │ │ │ │ +518 auto dxl3_x = x*(60*x - 60) + 12; │ │ │ │ │ +519 auto dxl4_x = x*(x*(280*x - 420) + 180) - 20; │ │ │ │ │ +520 auto dxl5_x = x*(x*(x*(1260*x - 2520) + 1680) - 420) + 30; │ │ │ │ │ +521 │ │ │ │ │ +522 out[0][0]=sign0*(0.5*(-dxl4_x)+0.5*dxl5_x); │ │ │ │ │ +523 out[0][1]=0.0; │ │ │ │ │ +524 out[1][0]=-(1.5)*dxl4_x*l1_y+1.5*dxl5_x*l1_y; │ │ │ │ │ +525 out[1][1]=0.0; │ │ │ │ │ +526 out[2][0]=sign0*(-(2.5)*dxl4_x*l2_y+2.5*dxl5_x*l2_y); │ │ │ │ │ +527 out[2][1]=0.0; │ │ │ │ │ +528 out[3][0]=-(3.5)*dxl4_x*l3_y+3.5*dxl5_x*l3_y; │ │ │ │ │ +529 out[3][1]=0.0; │ │ │ │ │ +530 out[4][0]=sign0*(-(4.5)*dxl4_x*l4_y+4.5*dxl5_x*l4_y); │ │ │ │ │ +531 out[4][1]=0.0; │ │ │ │ │ +532 │ │ │ │ │ +533 out[5][0]=sign1*(0.5*dxl4_x+0.5*dxl5_x); │ │ │ │ │ +534 out[5][1]=0.0; │ │ │ │ │ +535 out[6][0]=-(1.5)*dxl4_x*l1_y-1.5*dxl5_x*l1_y; │ │ │ │ │ +536 out[6][1]=0.0; │ │ │ │ │ +537 out[7][0]=sign1*(2.5*dxl4_x*l2_y+2.5*dxl5_x*l2_y); │ │ │ │ │ +538 out[7][1]=0.0; │ │ │ │ │ +539 out[8][0]=-(3.5)*dxl4_x*l3_y-3.5*dxl5_x*l3_y; │ │ │ │ │ +540 out[8][1]=0.0; │ │ │ │ │ +541 out[9][0]=sign1*(4.5*dxl4_x*l4_y+4.5*dxl5_x*l4_y); │ │ │ │ │ +542 out[9][1]=0.0; │ │ │ │ │ +543 │ │ │ │ │ +544 out[10][0]=0.0; │ │ │ │ │ +545 out[10][1]=0.0; │ │ │ │ │ +546 out[11][0]=0.0; │ │ │ │ │ +547 out[11][1]=1.5*dxl1_x*l4_y-1.5*dxl1_x*l5_y; │ │ │ │ │ +548 out[12][0]=0.0; │ │ │ │ │ +549 out[12][1]=sign2*(-(2.5)*dxl2_x*l4_y+2.5*dxl2_x*l5_y); │ │ │ │ │ +550 out[13][0]=0.0; │ │ │ │ │ +551 out[13][1]=3.5*dxl3_x*l4_y-3.5*dxl3_x*l5_y; │ │ │ │ │ +552 out[14][0]=0.0; │ │ │ │ │ +553 out[14][1]=sign2*(-(4.5)*dxl4_x*l4_y+4.5*dxl4_x*l5_y); │ │ │ │ │ +554 │ │ │ │ │ +555 out[15][0]=0.0; │ │ │ │ │ +556 out[15][1]=0.0; │ │ │ │ │ +557 out[16][0]=0.0; │ │ │ │ │ +558 out[16][1]=1.5*dxl1_x*l4_y+1.5*dxl1_x*l5_y; │ │ │ │ │ +559 out[17][0]=0.0; │ │ │ │ │ +560 out[17][1]=sign3*(2.5*dxl2_x*l4_y+2.5*dxl2_x*l5_y); │ │ │ │ │ +561 out[18][0]=0.0; │ │ │ │ │ +562 out[18][1]=3.5*dxl3_x*l4_y+3.5*dxl3_x*l5_y; │ │ │ │ │ +563 out[19][0]=0.0; │ │ │ │ │ +564 out[19][1]=sign3*(4.5*dxl4_x*l4_y+4.5*dxl4_x*l5_y); │ │ │ │ │ +565 │ │ │ │ │ +566 out[20][0]=-dxl4_x; │ │ │ │ │ +567 out[20][1]=0.0; │ │ │ │ │ +568 out[21][0]=-3.0*dxl4_x*l1_y; │ │ │ │ │ +569 out[21][1]=0.0; │ │ │ │ │ +570 out[22][0]=-5.0*dxl4_x*l2_y; │ │ │ │ │ +571 out[22][1]=0.0; │ │ │ │ │ +572 out[23][0]=-7.0*dxl4_x*l3_y; │ │ │ │ │ +573 out[23][1]=0.0; │ │ │ │ │ +574 out[24][0]=-9.0*dxl4_x*l4_y; │ │ │ │ │ +575 out[24][1]=0.0; │ │ │ │ │ +576 out[25][0]=3.0*dxl1_x-3.0*dxl5_x; │ │ │ │ │ +577 out[25][1]=0.0; │ │ │ │ │ +578 out[26][0]=9.0*dxl1_x*l1_y-9.0*dxl5_x*l1_y; │ │ │ │ │ +579 out[26][1]=0.0; │ │ │ │ │ +580 out[27][0]=15.0*dxl1_x*l2_y-15.0*dxl5_x*l2_y; │ │ │ │ │ +581 out[27][1]=0.0; │ │ │ │ │ +582 out[28][0]=21.0*dxl1_x*l3_y-21.0*dxl5_x*l3_y; │ │ │ │ │ +583 out[28][1]=0.0; │ │ │ │ │ +584 out[29][0]=27.0*dxl1_x*l4_y-27.0*dxl5_x*l4_y; │ │ │ │ │ +585 out[29][1]=0.0; │ │ │ │ │ +586 out[30][0]=5.0*dxl2_x-5.0*dxl4_x; │ │ │ │ │ +587 out[30][1]=0.0; │ │ │ │ │ +588 out[31][0]=15.0*dxl2_x*l1_y-15.0*dxl4_x*l1_y; │ │ │ │ │ +589 out[31][1]=0.0; │ │ │ │ │ +590 out[32][0]=25.0*dxl2_x*l2_y-25.0*dxl4_x*l2_y; │ │ │ │ │ +591 out[32][1]=0.0; │ │ │ │ │ +592 out[33][0]=35.0*dxl2_x*l3_y-35.0*dxl4_x*l3_y; │ │ │ │ │ +593 out[33][1]=0.0; │ │ │ │ │ +594 out[34][0]=45.0*dxl2_x*l4_y-45.0*dxl4_x*l4_y; │ │ │ │ │ +595 out[34][1]=0.0; │ │ │ │ │ +596 out[35][0]=7.0*dxl3_x-7.0*dxl5_x; │ │ │ │ │ +597 out[35][1]=0.0; │ │ │ │ │ +598 out[36][0]=21.0*dxl3_x*l1_y-21.0*dxl5_x*l1_y; │ │ │ │ │ +599 out[36][1]=0.0; │ │ │ │ │ +600 out[37][0]=35.0*dxl3_x*l2_y-35.0*dxl5_x*l2_y; │ │ │ │ │ +601 out[37][1]=0.0; │ │ │ │ │ +602 out[38][0]=49.0*dxl3_x*l3_y-49.0*dxl5_x*l3_y; │ │ │ │ │ +603 out[38][1]=0.0; │ │ │ │ │ +604 out[39][0]=63.0*dxl3_x*l4_y-63.0*dxl5_x*l4_y; │ │ │ │ │ +605 out[39][1]=0.0; │ │ │ │ │ +606 out[40][0]=0.0; │ │ │ │ │ +607 out[40][1]=0.0; │ │ │ │ │ +608 out[41][0]=0.0; │ │ │ │ │ +609 out[41][1]=0.0; │ │ │ │ │ +610 out[42][0]=0.0; │ │ │ │ │ +611 out[42][1]=0.0; │ │ │ │ │ +612 out[43][0]=0.0; │ │ │ │ │ +613 out[43][1]=0.0; │ │ │ │ │ +614 out[44][0]=0.0; │ │ │ │ │ +615 out[44][1]=3.0*dxl1_x-3.0*dxl1_x*l4_y; │ │ │ │ │ +616 out[45][0]=0.0; │ │ │ │ │ +617 out[45][1]=9.0*dxl1_x*l1_y-9.0*dxl1_x*l5_y; │ │ │ │ │ +618 out[46][0]=0.0; │ │ │ │ │ +619 out[46][1]=15.0*dxl1_x*l2_y-15.0*dxl1_x*l4_y; │ │ │ │ │ +620 out[47][0]=0.0; │ │ │ │ │ +621 out[47][1]=21.0*dxl1_x*l3_y-21.0*dxl1_x*l5_y; │ │ │ │ │ +622 out[48][0]=0.0; │ │ │ │ │ +623 out[48][1]=5.0*dxl2_x-5.0*dxl2_x*l4_y; │ │ │ │ │ +624 out[49][0]=0.0; │ │ │ │ │ +625 out[49][1]=15.0*dxl2_x*l1_y-15.0*dxl2_x*l5_y; │ │ │ │ │ +626 out[50][0]=0.0; │ │ │ │ │ +627 out[50][1]=25.0*dxl2_x*l2_y-25.0*dxl2_x*l4_y; │ │ │ │ │ +628 out[51][0]=0.0; │ │ │ │ │ +629 out[51][1]=35.0*dxl2_x*l3_y-35.0*dxl2_x*l5_y; │ │ │ │ │ +630 out[52][0]=0.0; │ │ │ │ │ +631 out[52][1]=7.0*dxl3_x-7.0*dxl3_x*l4_y; │ │ │ │ │ +632 out[53][0]=0.0; │ │ │ │ │ +633 out[53][1]=21.0*dxl3_x*l1_y-21.0*dxl3_x*l5_y; │ │ │ │ │ +634 out[54][0]=0.0; │ │ │ │ │ +635 out[54][1]=35.0*dxl3_x*l2_y-35.0*dxl3_x*l4_y; │ │ │ │ │ +636 out[55][0]=0.0; │ │ │ │ │ +637 out[55][1]=49.0*dxl3_x*l3_y-49.0*dxl3_x*l5_y; │ │ │ │ │ +638 out[56][0]=0.0; │ │ │ │ │ +639 out[56][1]=9.0*dxl4_x-9.0*dxl4_x*l4_y; │ │ │ │ │ +640 out[57][0]=0.0; │ │ │ │ │ +641 out[57][1]=27.0*dxl4_x*l1_y-27.0*dxl4_x*l5_y; │ │ │ │ │ +642 out[58][0]=0.0; │ │ │ │ │ +643 out[58][1]=45.0*dxl4_x*l2_y-45.0*dxl4_x*l4_y; │ │ │ │ │ +644 out[59][0]=0.0; │ │ │ │ │ +645 out[59][1]=63.0*dxl4_x*l3_y-63.0*dxl4_x*l5_y; │ │ │ │ │ +646 │ │ │ │ │ +647 } else if (direction == 1) { │ │ │ │ │ +648 auto dyl1_y = 2.0; │ │ │ │ │ +649 auto dyl2_y = 12*y - 6; │ │ │ │ │ +650 auto dyl3_y = y*(60*y - 60) + 12; │ │ │ │ │ +651 auto dyl4_y = y*(y*(280*y - 420) + 180) - 20; │ │ │ │ │ +652 auto dyl5_y = y*(y*(y*(1260*y - 2520) + 1680) - 420) + 30; │ │ │ │ │ +653 │ │ │ │ │ +654 out[0][0]=0.0; │ │ │ │ │ +655 out[0][1]=0.0; │ │ │ │ │ +656 out[1][0]=-(1.5)*l4_x*dyl1_y+1.5*l5_x*dyl1_y; │ │ │ │ │ +657 out[1][1]=0.0; │ │ │ │ │ +658 out[2][0]=sign0*(-(2.5)*l4_x*dyl2_y+2.5*l5_x*dyl2_y); │ │ │ │ │ +659 out[2][1]=0.0; │ │ │ │ │ +660 out[3][0]=-(3.5)*l4_x*dyl3_y+3.5*l5_x*dyl3_y; │ │ │ │ │ +661 out[3][1]=0.0; │ │ │ │ │ +662 out[4][0]=sign0*(-(4.5)*l4_x*dyl4_y+4.5*l5_x*dyl4_y); │ │ │ │ │ +663 out[4][1]=0.0; │ │ │ │ │ +664 │ │ │ │ │ +665 out[5][0]=0.0; │ │ │ │ │ +666 out[5][1]=0.0; │ │ │ │ │ +667 out[6][0]=-(1.5)*l4_x*dyl1_y-1.5*l5_x*dyl1_y; │ │ │ │ │ +668 out[6][1]=0.0; │ │ │ │ │ +669 out[7][0]=sign1*(2.5*l4_x*dyl2_y+2.5*l5_x*dyl2_y); │ │ │ │ │ +670 out[7][1]=0.0; │ │ │ │ │ +671 out[8][0]=-(3.5)*l4_x*dyl3_y-3.5*l5_x*dyl3_y; │ │ │ │ │ +672 out[8][1]=0.0; │ │ │ │ │ +673 out[9][0]=sign1*(4.5*l4_x*dyl4_y+4.5*l5_x*dyl4_y); │ │ │ │ │ +674 out[9][1]=0.0; │ │ │ │ │ +675 │ │ │ │ │ +676 out[10][0]=0.0; │ │ │ │ │ +677 out[10][1]=sign2*(0.5*(-dyl4_y)+0.5*dyl5_y); │ │ │ │ │ +678 out[11][0]=0.0; │ │ │ │ │ +679 out[11][1]=1.5*l1_x*dyl4_y-1.5*l1_x*dyl5_y; │ │ │ │ │ +680 out[12][0]=0.0; │ │ │ │ │ +681 out[12][1]=sign2*(-(2.5)*l2_x*dyl4_y+2.5*l2_x*dyl5_y); │ │ │ │ │ +682 out[13][0]=0.0; │ │ │ │ │ +683 out[13][1]=3.5*l3_x*dyl4_y-3.5*l3_x*dyl5_y; │ │ │ │ │ +684 out[14][0]=0.0; │ │ │ │ │ +685 out[14][1]=sign2*(-(4.5)*l4_x*dyl4_y+4.5*l4_x*dyl5_y); │ │ │ │ │ +686 │ │ │ │ │ +687 out[15][0]=0.0; │ │ │ │ │ +688 out[15][1]=sign3*(0.5*dyl4_y+0.5*dyl5_y); │ │ │ │ │ +689 out[16][0]=0.0; │ │ │ │ │ +690 out[16][1]=1.5*l1_x*dyl4_y+1.5*l1_x*dyl5_y; │ │ │ │ │ +691 out[17][0]=0.0; │ │ │ │ │ +692 out[17][1]=sign3*(2.5*l2_x*dyl4_y+2.5*l2_x*dyl5_y); │ │ │ │ │ +693 out[18][0]=0.0; │ │ │ │ │ +694 out[18][1]=3.5*l3_x*dyl4_y+3.5*l3_x*dyl5_y; │ │ │ │ │ +695 out[19][0]=0.0; │ │ │ │ │ +696 out[19][1]=sign3*(4.5*l4_x*dyl4_y+4.5*l4_x*dyl5_y); │ │ │ │ │ +697 │ │ │ │ │ +698 out[20][0]=0.0; │ │ │ │ │ +699 out[20][1]=0.0; │ │ │ │ │ +700 out[21][0]=3.0*dyl1_y-3.0*l4_x*dyl1_y; │ │ │ │ │ +701 out[21][1]=0.0; │ │ │ │ │ +702 out[22][0]=5.0*dyl2_y-5.0*l4_x*dyl2_y; │ │ │ │ │ +703 out[22][1]=0.0; │ │ │ │ │ +704 out[23][0]=7.0*dyl3_y-7.0*l4_x*dyl3_y; │ │ │ │ │ +705 out[23][1]=0.0; │ │ │ │ │ +706 out[24][0]=9.0*dyl4_y-9.0*l4_x*dyl4_y; │ │ │ │ │ +707 out[24][1]=0.0; │ │ │ │ │ +708 out[25][0]=0.0; │ │ │ │ │ +709 out[25][1]=0.0; │ │ │ │ │ +710 out[26][0]=9.0*l1_x*dyl1_y-9.0*l5_x*dyl1_y; │ │ │ │ │ +711 out[26][1]=0.0; │ │ │ │ │ +712 out[27][0]=15.0*l1_x*dyl2_y-15.0*l5_x*dyl2_y; │ │ │ │ │ +713 out[27][1]=0.0; │ │ │ │ │ +714 out[28][0]=21.0*l1_x*dyl3_y-21.0*l5_x*dyl3_y; │ │ │ │ │ +715 out[28][1]=0.0; │ │ │ │ │ +716 out[29][0]=27.0*l1_x*dyl4_y-27.0*l5_x*dyl4_y; │ │ │ │ │ +717 out[29][1]=0.0; │ │ │ │ │ +718 out[30][0]=0.0; │ │ │ │ │ +719 out[30][1]=0.0; │ │ │ │ │ +720 out[31][0]=15.0*l2_x*dyl1_y-15.0*l4_x*dyl1_y; │ │ │ │ │ +721 out[31][1]=0.0; │ │ │ │ │ +722 out[32][0]=25.0*l2_x*dyl2_y-25.0*l4_x*dyl2_y; │ │ │ │ │ +723 out[32][1]=0.0; │ │ │ │ │ +724 out[33][0]=35.0*l2_x*dyl3_y-35.0*l4_x*dyl3_y; │ │ │ │ │ +725 out[33][1]=0.0; │ │ │ │ │ +726 out[34][0]=45.0*l2_x*dyl4_y-45.0*l4_x*dyl4_y; │ │ │ │ │ +727 out[34][1]=0.0; │ │ │ │ │ +728 out[35][0]=0.0; │ │ │ │ │ +729 out[35][1]=0.0; │ │ │ │ │ +730 out[36][0]=21.0*l3_x*dyl1_y-21.0*l5_x*dyl1_y; │ │ │ │ │ +731 out[36][1]=0.0; │ │ │ │ │ +732 out[37][0]=35.0*l3_x*dyl2_y-35.0*l5_x*dyl2_y; │ │ │ │ │ +733 out[37][1]=0.0; │ │ │ │ │ +734 out[38][0]=49.0*l3_x*dyl3_y-49.0*l5_x*dyl3_y; │ │ │ │ │ +735 out[38][1]=0.0; │ │ │ │ │ +736 out[39][0]=63.0*l3_x*dyl4_y-63.0*l5_x*dyl4_y; │ │ │ │ │ +737 out[39][1]=0.0; │ │ │ │ │ +738 out[40][0]=0.0; │ │ │ │ │ +739 out[40][1]=-dyl4_y; │ │ │ │ │ +740 out[41][0]=0.0; │ │ │ │ │ +741 out[41][1]=3.0*dyl1_y-3.0*dyl5_y; │ │ │ │ │ +742 out[42][0]=0.0; │ │ │ │ │ +743 out[42][1]=5.0*dyl2_y-5.0*dyl4_y; │ │ │ │ │ +744 out[43][0]=0.0; │ │ │ │ │ +745 out[43][1]=7.0*dyl3_y-7.0*dyl5_y; │ │ │ │ │ +746 out[44][0]=0.0; │ │ │ │ │ +747 out[44][1]=-3.0*l1_x*dyl4_y; │ │ │ │ │ +748 out[45][0]=0.0; │ │ │ │ │ +749 out[45][1]=9.0*l1_x*dyl1_y-9.0*l1_x*dyl5_y; │ │ │ │ │ +750 out[46][0]=0.0; │ │ │ │ │ +751 out[46][1]=15.0*l1_x*dyl2_y-15.0*l1_x*dyl4_y; │ │ │ │ │ +752 out[47][0]=0.0; │ │ │ │ │ +753 out[47][1]=21.0*l1_x*dyl3_y-21.0*l1_x*dyl5_y; │ │ │ │ │ +754 out[48][0]=0.0; │ │ │ │ │ +755 out[48][1]=-5.0*l2_x*dyl4_y; │ │ │ │ │ +756 out[49][0]=0.0; │ │ │ │ │ +757 out[49][1]=15.0*l2_x*dyl1_y-15.0*l2_x*dyl5_y; │ │ │ │ │ +758 out[50][0]=0.0; │ │ │ │ │ +759 out[50][1]=25.0*l2_x*dyl2_y-25.0*l2_x*dyl4_y; │ │ │ │ │ +760 out[51][0]=0.0; │ │ │ │ │ +761 out[51][1]=35.0*l2_x*dyl3_y-35.0*l2_x*dyl5_y; │ │ │ │ │ +762 out[52][0]=0.0; │ │ │ │ │ +763 out[52][1]=-7.0*l3_x*dyl4_y; │ │ │ │ │ +764 out[53][0]=0.0; │ │ │ │ │ +765 out[53][1]=21.0*l3_x*dyl1_y-21.0*l3_x*dyl5_y; │ │ │ │ │ +766 out[54][0]=0.0; │ │ │ │ │ +767 out[54][1]=35.0*l3_x*dyl2_y-35.0*l3_x*dyl4_y; │ │ │ │ │ +768 out[55][0]=0.0; │ │ │ │ │ +769 out[55][1]=49.0*l3_x*dyl3_y-49.0*l3_x*dyl5_y; │ │ │ │ │ +770 out[56][0]=0.0; │ │ │ │ │ +771 out[56][1]=-9.0*l4_x*dyl4_y; │ │ │ │ │ +772 out[57][0]=0.0; │ │ │ │ │ +773 out[57][1]=27.0*l4_x*dyl1_y-27.0*l4_x*dyl5_y; │ │ │ │ │ +774 out[58][0]=0.0; │ │ │ │ │ +775 out[58][1]=45.0*l4_x*dyl2_y-45.0*l4_x*dyl4_y; │ │ │ │ │ +776 out[59][0]=0.0; │ │ │ │ │ +777 out[59][1]=63.0*l4_x*dyl3_y-63.0*l4_x*dyl5_y; │ │ │ │ │ +778 } else { │ │ │ │ │ +779 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +780 } │ │ │ │ │ +781 } else { │ │ │ │ │ +782 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +783 } │ │ │ │ │ +784 } │ │ │ │ │ +785 │ │ │ │ │ +_7_8_7 unsigned int _o_r_d_e_r () const │ │ │ │ │ +788 { │ │ │ │ │ +789 return 9; │ │ │ │ │ +790 } │ │ │ │ │ +791 │ │ │ │ │ +792 private: │ │ │ │ │ +793 R sign0, sign1, sign2, sign3; │ │ │ │ │ +794 }; │ │ │ │ │ +795} │ │ │ │ │ +796 │ │ │ │ │ +797#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:492 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:787 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:210 │ │ │ │ │ +_D_u_n_e_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_4_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT4Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas4cube2dlocalbasis.hh:40 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangecoefficients.hh File Reference
│ │ │ │ +
raviartthomas2cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <vector>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::LagrangeCoefficientsFactory< LP, dim, F >
class  Dune::RT2Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-2 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,23 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangecoefficients.hh File Reference │ │ │ │ │ +raviartthomas2cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _L_P_,_ _d_i_m_,_ _F_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-2 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00266_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangecoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,81 +70,83 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangecoefficients.hh
│ │ │ │ +
raviartthomas2cube2dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <vector>
│ │ │ │ -
9
│ │ │ │ -
10#include <dune/common/fvector.hh>
│ │ │ │ -
11
│ │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 template< template <class,unsigned int> class LP,
│ │ │ │ -
21 unsigned int dim, class F>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
23 {
│ │ │ │ -
24 static const unsigned int dimension = dim;
│ │ │ │ -
25 const typedef LP<F,dim> Object;
│ │ │ │ -
26 typedef std::size_t Key;
│ │ │ │ -
27
│ │ │ │ -
28 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
29 static Object *create ( const Key &order )
│ │ │ │ -
30 {
│ │ │ │ -
31 if (order == 0 || !Object::template supports<geometryId>(order))
│ │ │ │ -
32 return 0;
│ │ │ │ -
33 typedef typename std::remove_const<Object>::type LagrangeCoefficients;
│ │ │ │ -
34 LagrangeCoefficients *object = new LagrangeCoefficients(order);
│ │ │ │ -
35 if ( !object->template build<geometryId>() )
│ │ │ │ -
36 {
│ │ │ │ -
37 delete object;
│ │ │ │ -
38 object = nullptr;
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i = 0; i < 4; i++)
│ │ │ │ +
30 {
│ │ │ │ +
31 li[3*i] = LocalKey(i,1,0);
│ │ │ │ +
32 li[3*i + 1] = LocalKey(i,1,1);
│ │ │ │ +
33 li[3*i + 2] = LocalKey(i,1,2);
│ │ │ │ +
34 }
│ │ │ │ +
35
│ │ │ │ +
36 for (std::size_t i=0; i<12; i++)
│ │ │ │ +
37 {
│ │ │ │ +
38 li[12 + i] = LocalKey(0,0,i);
│ │ │ │
39 }
│ │ │ │ -
40 return object;
│ │ │ │ -
41 }
│ │ │ │ +
40 }
│ │ │ │
│ │ │ │ -
42 static void release( Object *object ) { delete object; }
│ │ │ │ -
43 };
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
43 std::size_t size () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return 24;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
50 {
│ │ │ │ +
51 return li[i];
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
54 private:
│ │ │ │ +
55 std::vector<LocalKey> li;
│ │ │ │ +
56 };
│ │ │ │
│ │ │ │ -
44
│ │ │ │ -
45}
│ │ │ │ -
46
│ │ │ │ -
47#endif // DUNE_LAGRANGECOEFFICIENTS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
57}
│ │ │ │ +
58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition lagrangecoefficients.hh:23
│ │ │ │ -
static const unsigned int dimension
Definition lagrangecoefficients.hh:24
│ │ │ │ -
static void release(Object *object)
Definition lagrangecoefficients.hh:42
│ │ │ │ -
const typedef LP< F, dim > Object
Definition lagrangecoefficients.hh:25
│ │ │ │ -
static Object * create(const Key &order)
Definition lagrangecoefficients.hh:29
│ │ │ │ -
std::size_t Key
Definition lagrangecoefficients.hh:26
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-2 elements on quadrilaterals.
Definition raviartthomas2cube2dlocalcoefficients.hh:23
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas2cube2dlocalcoefficients.hh:43
│ │ │ │ +
RT2Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas2cube2dlocalcoefficients.hh:27
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas2cube2dlocalcoefficients.hh:49
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,80 +1,81 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangecoefficients.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ +raviartthomas2cube2dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 template< template class LP, │ │ │ │ │ -21 unsigned int dim, class F> │ │ │ │ │ -_2_2 struct _L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +_2_2 class _R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ 23 { │ │ │ │ │ -_2_4 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -_2_5 const typedef LP _O_b_j_e_c_t; │ │ │ │ │ -_2_6 typedef std::size_t _K_e_y; │ │ │ │ │ -27 │ │ │ │ │ -28 template< GeometryType::Id geometryId > │ │ │ │ │ -_2_9 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(24) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i = 0; i < 4; i++) │ │ │ │ │ 30 { │ │ │ │ │ -31 if (order == 0 || !Object::template supports(order)) │ │ │ │ │ -32 return 0; │ │ │ │ │ -33 typedef typename std::remove_const::type LagrangeCoefficients; │ │ │ │ │ -34 LagrangeCoefficients *object = new LagrangeCoefficients(order); │ │ │ │ │ -35 if ( !object->template build() ) │ │ │ │ │ -36 { │ │ │ │ │ -37 delete object; │ │ │ │ │ -38 object = nullptr; │ │ │ │ │ +31 li[3*i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 li[3*i + 1] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +33 li[3*i + 2] = _L_o_c_a_l_K_e_y(i,1,2); │ │ │ │ │ +34 } │ │ │ │ │ +35 │ │ │ │ │ +36 for (std::size_t i=0; i<12; i++) │ │ │ │ │ +37 { │ │ │ │ │ +38 li[12 + i] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ 39 } │ │ │ │ │ -40 return object; │ │ │ │ │ -41 } │ │ │ │ │ -_4_2 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -43 }; │ │ │ │ │ -44 │ │ │ │ │ -45} │ │ │ │ │ -46 │ │ │ │ │ -47#endif // DUNE_LAGRANGECOEFFICIENTS_HH │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +40 } │ │ │ │ │ +41 │ │ │ │ │ +_4_3 std::size_t _s_i_z_e () const │ │ │ │ │ +44 { │ │ │ │ │ +45 return 24; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_9 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +50 { │ │ │ │ │ +51 return li[i]; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +54 private: │ │ │ │ │ +55 std::vector li; │ │ │ │ │ +56 }; │ │ │ │ │ +57} │ │ │ │ │ +58#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const typedef LP< F, dim > Object │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn lagrangecoefficients.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-2 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalcoefficients.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT2Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalcoefficients.hh:49 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk3d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk3d.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas2cube2dlocalinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT2Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , unsigned int k>
using Dune::Pk3DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pk3d.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas2cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_k_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 3, k > │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00269_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk3d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,140 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk3d.hh
│ │ │ │ +
raviartthomas2cube2dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_Pk3DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R, unsigned int k>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ -
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
35 RT2Cube2DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ +
36 {
│ │ │ │ +
37 for (size_t i=0; i<4; i++)
│ │ │ │ +
38 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
39
│ │ │ │ +
40 n_[0] = {-1.0, 0.0};
│ │ │ │ +
41 n_[1] = { 1.0, 0.0};
│ │ │ │ +
42 n_[2] = { 0.0, -1.0};
│ │ │ │ +
43 n_[3] = { 0.0, 1.0};
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
54 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
55 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
56 {
│ │ │ │ +
57 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
58 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
59 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
60
│ │ │ │ +
61 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
62
│ │ │ │ +
63 out.resize(24);
│ │ │ │ +
64 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
65
│ │ │ │ +
66 const int qOrder = 6;
│ │ │ │ +
67 const auto& rule1 = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
68
│ │ │ │ +
69 for (auto&& qp : rule1)
│ │ │ │ +
70 {
│ │ │ │ +
71 Scalar qPos = qp.position();
│ │ │ │ +
72 typename LB::Traits::DomainType localPos;
│ │ │ │ +
73
│ │ │ │ +
74 localPos = {0.0, qPos};
│ │ │ │ +
75 auto y = f(localPos);
│ │ │ │ +
76 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0];
│ │ │ │ +
77 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
78 out[2] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[0];
│ │ │ │ +
79
│ │ │ │ +
80 localPos = {1.0, qPos};
│ │ │ │ +
81 y = f(localPos);
│ │ │ │ +
82 out[3] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1];
│ │ │ │ +
83 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
84 out[5] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[1];
│ │ │ │ +
85
│ │ │ │ +
86 localPos = {qPos, 0.0};
│ │ │ │ +
87 y = f(localPos);
│ │ │ │ +
88 out[6] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2];
│ │ │ │ +
89 out[7] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
90 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[2];
│ │ │ │ +
91
│ │ │ │ +
92 localPos = {qPos, 1.0};
│ │ │ │ +
93 y = f(localPos);
│ │ │ │ +
94 out[9] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3];
│ │ │ │ +
95 out[10] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
96 out[11] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[3];
│ │ │ │ +
97 }
│ │ │ │ +
98
│ │ │ │ +
99 const auto& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
100
│ │ │ │ +
101 for (auto&& qp : rule2)
│ │ │ │ +
102 {
│ │ │ │ +
103 FieldVector<double,2> qPos = qp.position();
│ │ │ │ +
104
│ │ │ │ +
105 auto y = f(qPos);
│ │ │ │ +
106 out[12] += y[0]*qp.weight();
│ │ │ │ +
107 out[13] += y[1]*qp.weight();
│ │ │ │ +
108 out[14] += y[0]*qPos[0]*qp.weight();
│ │ │ │ +
109 out[15] += y[1]*qPos[0]*qp.weight();
│ │ │ │ +
110 out[16] += y[0]*qPos[1]*qp.weight();
│ │ │ │ +
111 out[17] += y[1]*qPos[1]*qp.weight();
│ │ │ │ +
112 out[18] += y[0]*qPos[0]*qPos[1]*qp.weight();
│ │ │ │ +
113 out[19] += y[1]*qPos[0]*qPos[1]*qp.weight();
│ │ │ │ +
114 out[20] += y[0]*qPos[1]*qPos[1]*qp.weight();
│ │ │ │ +
115 out[21] += y[1]*qPos[0]*qPos[0]*qp.weight();
│ │ │ │ +
116 out[22] += y[0]*qPos[0]*qPos[1]*qPos[1]*qp.weight();
│ │ │ │ +
117 out[23] += y[1]*qPos[0]*qPos[0]*qPos[1]*qp.weight();
│ │ │ │ +
118 }
│ │ │ │ +
119 }
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
121 private:
│ │ │ │ +
122 // Edge orientations
│ │ │ │ +
123 std::array<typename LB::Traits::RangeFieldType, 4> sign_;
│ │ │ │ +
124
│ │ │ │ +
125 // Edge normals
│ │ │ │ +
126 std::array<typename LB::Traits::DomainType, 4> n_;
│ │ │ │ +
127 };
│ │ │ │ +
│ │ │ │ +
128}
│ │ │ │ +
129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas2cube2dlocalinterpolation.hh:26
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas2cube2dlocalinterpolation.hh:55
│ │ │ │ +
RT2Cube2DLocalInterpolation(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas2cube2dlocalinterpolation.hh:35
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,142 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pk3d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ +raviartthomas2cube2dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_Pk3DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 using _P_k_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -22 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_,_k_>; │ │ │ │ │ -23 │ │ │ │ │ -24} │ │ │ │ │ -25 │ │ │ │ │ -26#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +29 │ │ │ │ │ +_3_5 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ +36 { │ │ │ │ │ +37 for (size_t i=0; i<4; i++) │ │ │ │ │ +38 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +39 │ │ │ │ │ +40 n_[0] = {-1.0, 0.0}; │ │ │ │ │ +41 n_[1] = { 1.0, 0.0}; │ │ │ │ │ +42 n_[2] = { 0.0, -1.0}; │ │ │ │ │ +43 n_[3] = { 0.0, 1.0}; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +54 template │ │ │ │ │ +_5_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +56 { │ │ │ │ │ +57 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +58 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +59 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +60 │ │ │ │ │ +61 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +62 │ │ │ │ │ +63 out.resize(24); │ │ │ │ │ +64 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +65 │ │ │ │ │ +66 const int qOrder = 6; │ │ │ │ │ +67 const auto& rule1 = QuadratureRules::rule(GeometryTypes::cube(1), │ │ │ │ │ +qOrder); │ │ │ │ │ +68 │ │ │ │ │ +69 for (auto&& qp : rule1) │ │ │ │ │ +70 { │ │ │ │ │ +71 Scalar qPos = qp.position(); │ │ │ │ │ +72 typename LB::Traits::DomainType localPos; │ │ │ │ │ +73 │ │ │ │ │ +74 localPos = {0.0, qPos}; │ │ │ │ │ +75 auto y = f(localPos); │ │ │ │ │ +76 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0]; │ │ │ │ │ +77 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +78 out[2] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[0]; │ │ │ │ │ +79 │ │ │ │ │ +80 localPos = {1.0, qPos}; │ │ │ │ │ +81 y = f(localPos); │ │ │ │ │ +82 out[3] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1]; │ │ │ │ │ +83 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +84 out[5] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[1]; │ │ │ │ │ +85 │ │ │ │ │ +86 localPos = {qPos, 0.0}; │ │ │ │ │ +87 y = f(localPos); │ │ │ │ │ +88 out[6] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2]; │ │ │ │ │ +89 out[7] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +90 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[2]; │ │ │ │ │ +91 │ │ │ │ │ +92 localPos = {qPos, 1.0}; │ │ │ │ │ +93 y = f(localPos); │ │ │ │ │ +94 out[9] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3]; │ │ │ │ │ +95 out[10] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +96 out[11] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[3]; │ │ │ │ │ +97 } │ │ │ │ │ +98 │ │ │ │ │ +99 const auto& rule2 = QuadratureRules::rule(GeometryTypes::cube(2), │ │ │ │ │ +qOrder); │ │ │ │ │ +100 │ │ │ │ │ +101 for (auto&& qp : rule2) │ │ │ │ │ +102 { │ │ │ │ │ +103 FieldVector qPos = qp.position(); │ │ │ │ │ +104 │ │ │ │ │ +105 auto y = f(qPos); │ │ │ │ │ +106 out[12] += y[0]*qp.weight(); │ │ │ │ │ +107 out[13] += y[1]*qp.weight(); │ │ │ │ │ +108 out[14] += y[0]*qPos[0]*qp.weight(); │ │ │ │ │ +109 out[15] += y[1]*qPos[0]*qp.weight(); │ │ │ │ │ +110 out[16] += y[0]*qPos[1]*qp.weight(); │ │ │ │ │ +111 out[17] += y[1]*qPos[1]*qp.weight(); │ │ │ │ │ +112 out[18] += y[0]*qPos[0]*qPos[1]*qp.weight(); │ │ │ │ │ +113 out[19] += y[1]*qPos[0]*qPos[1]*qp.weight(); │ │ │ │ │ +114 out[20] += y[0]*qPos[1]*qPos[1]*qp.weight(); │ │ │ │ │ +115 out[21] += y[1]*qPos[0]*qPos[0]*qp.weight(); │ │ │ │ │ +116 out[22] += y[0]*qPos[0]*qPos[1]*qPos[1]*qp.weight(); │ │ │ │ │ +117 out[23] += y[1]*qPos[0]*qPos[0]*qPos[1]*qp.weight(); │ │ │ │ │ +118 } │ │ │ │ │ +119 } │ │ │ │ │ +120 │ │ │ │ │ +121 private: │ │ │ │ │ +122 // Edge orientations │ │ │ │ │ +123 std::array sign_; │ │ │ │ │ +124 │ │ │ │ │ +125 // Edge normals │ │ │ │ │ +126 std::array n_; │ │ │ │ │ +127 }; │ │ │ │ │ +128} │ │ │ │ │ +129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalinterpolation.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalinterpolation.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT2Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalinterpolation.hh:35 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: equidistantpoints.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,57 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Namespaces | │ │ │ │ -Functions
│ │ │ │ -
equidistantpoints.hh File Reference
│ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas2cube2dlocalbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <algorithm>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/emptypoints.hh>
│ │ │ │ -#include <dune/localfunctions/utility/field.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::EquidistantPointSet< F, dim >
class  Dune::RT2Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Functions

std::size_t Dune::numLagrangePoints (const GeometryType &gt, std::size_t order)
 
std::size_t Dune::numLagrangePoints (unsigned int topologyId, unsigned int dim, std::size_t order)
 
template<class ct , unsigned int cdim>
static unsigned int Dune::equidistantLagrangePoints (const GeometryType &gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
 
template<class ct , unsigned int cdim>
static unsigned int Dune::equidistantLagrangePoints (unsigned int topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,42 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s | _F_u_n_c_t_i_o_n_s │ │ │ │ │ -equidistantpoints.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas2cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_e_m_p_t_y_p_o_i_n_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -FFuunnccttiioonnss │ │ │ │ │ - std::size_t  _D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s (const GeometryType >, std:: │ │ │ │ │ - size_t order) │ │ │ │ │ -  │ │ │ │ │ - std::size_t  _D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s (unsigned int topologyId, unsigned │ │ │ │ │ - int dim, std::size_t order) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -static unsigned int  _D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s (const GeometryType >, │ │ │ │ │ - unsigned int codim, std::size_t order, unsigned int │ │ │ │ │ - *count, _L_a_g_r_a_n_g_e_P_o_i_n_t< ct, cdim > *points) │ │ │ │ │ -  │ │ │ │ │ -template │ │ │ │ │ -static unsigned int  _D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s (unsigned int topologyId, │ │ │ │ │ - unsigned int dim, unsigned int codim, std::size_t order, │ │ │ │ │ - unsigned int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t< ct, cdim > *points) │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00272_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: equidistantpoints.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas2cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,276 +70,300 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
equidistantpoints.hh
│ │ │ │ +
raviartthomas2cube2dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ -Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ -
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
3#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ -
4#define DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ -
5
│ │ │ │ -
6#include <cstddef>
│ │ │ │ +Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │ +
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ +
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <algorithm>
│ │ │ │ +
8#include <numeric>
│ │ │ │
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
12#include <dune/geometry/type.hh>
│ │ │ │ -
13
│ │ │ │ - │ │ │ │ - │ │ │ │ -
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
19
│ │ │ │ -
20 // numLagrangePoints
│ │ │ │ -
21 // -----------------
│ │ │ │ -
22
│ │ │ │ -
│ │ │ │ -
23 inline std::size_t numLagrangePoints ( const GeometryType& gt, std::size_t order )
│ │ │ │ -
24 {
│ │ │ │ -
25 const int dim = gt.dim();
│ │ │ │ -
26 if( dim > 0 )
│ │ │ │ -
27 {
│ │ │ │ -
28 const GeometryType baseGeometryType = Impl::getBase( gt );
│ │ │ │ -
29 if( gt.isConical() )
│ │ │ │ -
30 {
│ │ │ │ -
31 std::size_t size = 0;
│ │ │ │ -
32 for( unsigned int o = 0; o <= order; ++o )
│ │ │ │ -
33 size += numLagrangePoints( baseGeometryType, o );
│ │ │ │ -
34 return size;
│ │ │ │ -
35 }
│ │ │ │ -
36 else
│ │ │ │ -
37 return numLagrangePoints( baseGeometryType, order ) * (order+1);
│ │ │ │ -
38 }
│ │ │ │ -
39 else
│ │ │ │ -
40 return 1;
│ │ │ │ -
41 }
│ │ │ │ -
│ │ │ │ -
42
│ │ │ │ -
43 [[deprecated("Use numLagrangePoints(const GeometryType& gt, std::size_t order ) instead.")]]
│ │ │ │ -
│ │ │ │ -
44 inline std::size_t numLagrangePoints ( unsigned int topologyId, unsigned int dim, std::size_t order )
│ │ │ │ -
45 {
│ │ │ │ -
46 return numLagrangePoints ( GeometryType(topologyId, dim), order);
│ │ │ │ -
47 }
│ │ │ │ -
│ │ │ │ -
48
│ │ │ │ -
49
│ │ │ │ -
50
│ │ │ │ -
51 // equidistantLagrangePoints
│ │ │ │ -
52 // -------------------------
│ │ │ │ -
53
│ │ │ │ -
54 template< class ct, unsigned int cdim >
│ │ │ │ -
│ │ │ │ -
55 inline static unsigned int equidistantLagrangePoints ( const GeometryType& gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points )
│ │ │ │ -
56 {
│ │ │ │ -
57 const unsigned int dim = gt.dim();
│ │ │ │ -
58 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) );
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
32 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT2Cube2DLocalBasis (unsigned int s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 sign0 = sign1 = sign2 = sign3 = 1.0;
│ │ │ │ +
42 if (s & 1)
│ │ │ │ +
43 {
│ │ │ │ +
44 sign0 = -1.0;
│ │ │ │ +
45 }
│ │ │ │ +
46 if (s & 2)
│ │ │ │ +
47 {
│ │ │ │ +
48 sign1 = -1.0;
│ │ │ │ +
49 }
│ │ │ │ +
50 if (s & 4)
│ │ │ │ +
51 {
│ │ │ │ +
52 sign2 = -1.0;
│ │ │ │ +
53 }
│ │ │ │ +
54 if (s & 8)
│ │ │ │ +
55 {
│ │ │ │ +
56 sign3 = -1.0;
│ │ │ │ +
57 }
│ │ │ │ +
58 }
│ │ │ │ +
│ │ │ │
59
│ │ │ │ -
60 if( dim > 0 )
│ │ │ │ -
61 {
│ │ │ │ -
62 const GeometryType baseGeometryType = Impl::getBase( gt );
│ │ │ │ -
63 const unsigned int numBaseN = (codim < dim ? Geo::Impl::size( baseGeometryType.id(), baseGeometryType.dim(), codim ) : 0);
│ │ │ │ -
64 const unsigned int numBaseM = (codim > 0 ? Geo::Impl::size( baseGeometryType.id(), baseGeometryType.dim(), codim-1 ) : 0);
│ │ │ │ -
65
│ │ │ │ -
66 if( gt.isPrismatic() )
│ │ │ │ -
67 {
│ │ │ │ -
68 unsigned int size = 0;
│ │ │ │ -
69 if( codim < dim )
│ │ │ │ -
70 {
│ │ │ │ -
71 for( unsigned int i = 1; i < order; ++i )
│ │ │ │ -
72 {
│ │ │ │ -
73 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim, order, count, points );
│ │ │ │ -
74 for( unsigned int j = 0; j < n; ++j )
│ │ │ │ -
75 {
│ │ │ │ -
76 LocalKey &key = points->localKey_;
│ │ │ │ -
77 key = LocalKey( key.subEntity(), codim, key.index() );
│ │ │ │ -
78 points->point_[ dim-1 ] = ct( i ) / ct( order );
│ │ │ │ -
79 ++points;
│ │ │ │ -
80 }
│ │ │ │ -
81 size += n;
│ │ │ │ -
82 }
│ │ │ │ -
83 }
│ │ │ │ -
84
│ │ │ │ -
85 if( codim > 0 )
│ │ │ │ -
86 {
│ │ │ │ -
87 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim-1, order, count+numBaseN, points );
│ │ │ │ -
88 for( unsigned int j = 0; j < n; ++j )
│ │ │ │ -
89 {
│ │ │ │ -
90 LocalKey &key = points[ j ].localKey_;
│ │ │ │ -
91 key = LocalKey( key.subEntity() + numBaseN, codim, key.index() );
│ │ │ │ -
92
│ │ │ │ -
93 points[ j + n ].point_ = points[ j ].point_;
│ │ │ │ -
94 points[ j + n ].point_[ dim-1 ] = ct( 1 );
│ │ │ │ -
95 points[ j + n ].localKey_ = LocalKey( key.subEntity() + numBaseM, codim, key.index() );
│ │ │ │ -
96 ++count[ key.subEntity() + numBaseM ];
│ │ │ │ -
97 }
│ │ │ │ -
98 size += 2*n;
│ │ │ │ -
99 }
│ │ │ │ -
100
│ │ │ │ -
101 return size;
│ │ │ │ -
102 }
│ │ │ │ -
103 else
│ │ │ │ -
104 {
│ │ │ │ -
105 unsigned int size = (codim > 0 ? equidistantLagrangePoints( baseGeometryType, codim-1, order, count, points ) : 0);
│ │ │ │ -
106 LagrangePoint< ct, cdim > *const end = points + size;
│ │ │ │ -
107 for( ; points != end; ++points )
│ │ │ │ -
108 points->localKey_ = LocalKey( points->localKey_.subEntity(), codim, points->localKey_.index() );
│ │ │ │ -
109
│ │ │ │ -
110 if( codim < dim )
│ │ │ │ -
111 {
│ │ │ │ -
112 for( unsigned int i = order-1; i > 0; --i )
│ │ │ │ -
113 {
│ │ │ │ -
114 const unsigned int n = equidistantLagrangePoints( baseGeometryType, codim, i, count+numBaseM, points );
│ │ │ │ -
115 LagrangePoint< ct, cdim > *const end = points + n;
│ │ │ │ -
116 for( ; points != end; ++points )
│ │ │ │ -
117 {
│ │ │ │ -
118 points->localKey_ = LocalKey( points->localKey_.subEntity()+numBaseM, codim, points->localKey_.index() );
│ │ │ │ -
119 for( unsigned int j = 0; j < dim-1; ++j )
│ │ │ │ -
120 points->point_[ j ] *= ct( i ) / ct( order );
│ │ │ │ -
121 points->point_[ dim-1 ] = ct( order - i ) / ct( order );
│ │ │ │ -
122 }
│ │ │ │ -
123 size += n;
│ │ │ │ -
124 }
│ │ │ │ -
125 }
│ │ │ │ -
126 else
│ │ │ │ -
127 {
│ │ │ │ -
128 points->localKey_ = LocalKey( numBaseM, dim, count[ numBaseM ]++ );
│ │ │ │ -
129 points->point_ = 0;
│ │ │ │ -
130 points->point_[ dim-1 ] = ct( 1 );
│ │ │ │ -
131 ++size;
│ │ │ │ -
132 }
│ │ │ │ -
133
│ │ │ │ -
134 return size;
│ │ │ │ -
135 }
│ │ │ │ -
136 }
│ │ │ │ -
137 else
│ │ │ │ -
138 {
│ │ │ │ -
139 points->localKey_ = LocalKey( 0, 0, count[ 0 ]++ );
│ │ │ │ -
140 points->point_ = 0;
│ │ │ │ -
141 return 1;
│ │ │ │ -
142 }
│ │ │ │ -
143 }
│ │ │ │ -
│ │ │ │ -
144
│ │ │ │ -
145 template< class ct, unsigned int cdim >
│ │ │ │ -
146 [[deprecated("Use equidistantLagrangePoints ( GeometryType gt, ... ) instead.")]]
│ │ │ │ -
│ │ │ │ -
147 inline static unsigned int equidistantLagrangePoints ( unsigned int topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points )
│ │ │ │ -
148 {
│ │ │ │ -
149 return equidistantLagrangePoints ( GeometryType(topologyId, dim), codim, order, *count, *points );
│ │ │ │ -
150 }
│ │ │ │ +
│ │ │ │ +
61 unsigned int size () const
│ │ │ │ +
62 {
│ │ │ │ +
63 return 24;
│ │ │ │ +
64 }
│ │ │ │
│ │ │ │ -
151
│ │ │ │ +
65
│ │ │ │ +
│ │ │ │ +
72 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
73 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
74 {
│ │ │ │ +
75 out.resize(24);
│ │ │ │ +
76
│ │ │ │ +
77 out[0][0] = sign0*(-1.0 + 9.0*in[0] - 18.0*in[0]*in[0] + 10.0*in[0]*in[0]*in[0]);
│ │ │ │ +
78 out[0][1] = 0.0;
│ │ │ │ +
79 out[1][0] = 3.0 - 27.0*in[0] - 6.0*in[1] + 54.0*in[0]*in[1] + 54.0*in[0]*in[0] - 108.0*in[0]*in[0]*in[1] - 30.0*in[0]*in[0]*in[0] + 60.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
80 out[1][1] = 0.0;
│ │ │ │ +
81 out[2][0] = sign0*(-5.0 + 45.0*in[0] + 30.0*in[1] - 270.0*in[0]*in[1] - 90.0*in[0]*in[0] - 30.0*in[1]*in[1] + 540.0*in[0]*in[0]*in[1] + 270.0*in[0]*in[1]*in[1] + 50.0*in[0]*in[0]*in[0] - 540.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[0]*in[0]*in[1] + 300.0*in[0]*in[0]*in[0]*in[1]*in[1]);
│ │ │ │ +
82 out[2][1] = 0.0;
│ │ │ │ +
83 out[3][0] = sign1*(3.0*in[0] - 12.0*in[0]*in[0] + 10.0*in[0]*in[0]*in[0]);
│ │ │ │ +
84 out[3][1] = 0.0;
│ │ │ │ +
85 out[4][0] = 9.0*in[0] - 18.0*in[0]*in[1] - 36.0*in[0]*in[0] + 72.0*in[0]*in[0]*in[1] + 30.0*in[0]*in[0]*in[0] - 60.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
86 out[4][1] = 0.0;
│ │ │ │ +
87 out[5][0] = sign1*(15.0*in[0] - 90.0*in[0]*in[1] - 60.0*in[0]*in[0] + 360.0*in[0]*in[0]*in[1] + 90.0*in[0]*in[1]*in[1] + 50.0*in[0]*in[0]*in[0] - 360.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[0]*in[0]*in[1] + 300.0*in[0]*in[0]*in[0]*in[1]*in[1]);
│ │ │ │ +
88 out[5][1] = 0.0;
│ │ │ │ +
89 out[6][0] = 0.0;
│ │ │ │ +
90 out[6][1] = sign2*(-1.0 + 9.0*in[1] - 18.0*in[1]*in[1] + 10.0*in[1]*in[1]*in[1]);
│ │ │ │ +
91 out[7][0] = 0.0;
│ │ │ │ +
92 out[7][1] = -3.0 + 6.0*in[0] + 27.0*in[1] - 54.0*in[0]*in[1] - 54.0*in[1]*in[1] + 108.0*in[0]*in[1]*in[1] + 30.0*in[1]*in[1]*in[1] - 60.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
93 out[8][0] = 0.0;
│ │ │ │ +
94 out[8][1] = sign2*(-5.0 + 30.0*in[0] + 45.0*in[1] - 270.0*in[0]*in[1] - 30.0*in[0]*in[0] - 90.0*in[1]*in[1] + 270.0*in[0]*in[0]*in[1] + 540.0*in[0]*in[1]*in[1] + 50.0*in[1]*in[1]*in[1] - 540.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[1]*in[1]*in[1] + 300.0*in[1]*in[1]*in[1]*in[0]*in[0]);
│ │ │ │ +
95 out[9][0] = 0.0;
│ │ │ │ +
96 out[9][1] = sign3*(3.0*in[1] - 12.0*in[1]*in[1] + 10.0*in[1]*in[1]*in[1]);
│ │ │ │ +
97 out[10][0] = 0.0;
│ │ │ │ +
98 out[10][1] = -9.0*in[1] + 18.0*in[0]*in[1] + 36.0*in[1]*in[1] - 72.0*in[0]*in[1]*in[1] - 30.0*in[1]*in[1]*in[1] + 60.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
99 out[11][0] = 0.0;
│ │ │ │ +
100 out[11][1] = sign3*(15.0*in[1] - 90.0*in[0]*in[1] - 60.0*in[1]*in[1] + 90.0*in[0]*in[0]*in[1] + 360.0*in[0]*in[1]*in[1] + 50.0*in[1]*in[1]*in[1] - 360.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[1]*in[1]*in[1] + 300.0*in[1]*in[1]*in[1]*in[0]*in[0]);
│ │ │ │ +
101 out[12][0] = 324.0*in[0] -1296.0*in[0]*in[1] - 864.0*in[0]*in[0] + 3456.0*in[0]*in[0]*in[1] + 1080.0*in[0]*in[1]*in[1] + 540.0*in[0]*in[0]*in[0] - 2880.0*in[0]*in[0]*in[1]*in[1] - 2160.0*in[0]*in[0]*in[0]*in[1] + 1800.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
102 out[12][1] = 0.0;
│ │ │ │ +
103 out[13][0] = 0.0;
│ │ │ │ +
104 out[13][1] = 324.0*in[1] - 1296.0*in[0]*in[1] - 864.0*in[1]*in[1] + 1080.0*in[0]*in[0]*in[1] + 3456.0*in[0]*in[1]*in[1] + 540.0*in[1]*in[1]*in[1] - 2880.0*in[0]*in[0]*in[1]*in[1] - 2160.0*in[0]*in[1]*in[1]*in[1] + 1800.0*in[1]*in[1]*in[1]*in[0]*in[0];
│ │ │ │ +
105 out[14][0] = -540.0*in[0] + 2160.0*in[0]*in[1] + 1620.0*in[0]*in[0] - 6480.0*in[0]*in[0]*in[1] - 1800.0*in[0]*in[1]*in[1] - 1080.0*in[0]*in[0]*in[0] + 5400.0*in[0]*in[0]*in[1]*in[1] + 4320.0*in[0]*in[0]*in[0]*in[1] - 3600.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
106 out[14][1] = 0.0;
│ │ │ │ +
107 out[15][0] = 0.0;
│ │ │ │ +
108 out[15][1] = -1296.0*in[1] + 6912.0*in[0]*in[1] + 3456.0*in[1]*in[1] - 6480.0*in[0]*in[0]*in[1] - 18432.0*in[0]*in[1]*in[1] - 2160.0*in[1]*in[1]*in[1] + 17280.0*in[0]*in[0]*in[1]*in[1] + 11520.0*in[0]*in[1]*in[1]*in[1] - 10800.0*in[0]*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
109 out[16][0] = -1296.0*in[0] + 6912.0*in[0]*in[1] + 3456.0*in[0]*in[0] - 6480.0*in[0]*in[1]*in[1] - 18432.0*in[0]*in[0]*in[1] - 2160.0*in[0]*in[0]*in[0] + 17280.0*in[0]*in[0]*in[1]*in[1] + 11520.0*in[1]*in[0]*in[0]*in[0] - 10800.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
110 out[16][1] = 0.0;
│ │ │ │ +
111 out[17][0] = 0.0;
│ │ │ │ +
112 out[17][1] = -540.0*in[1] + 2160.0*in[0]*in[1] + 1620.0*in[1]*in[1] - 1800.0*in[0]*in[0]*in[1] - 6480.0*in[0]*in[1]*in[1] - 1080.0*in[1]*in[1]*in[1] + 5400.0*in[0]*in[0]*in[1]*in[1] + 4320.0*in[0]*in[1]*in[1]*in[1] - 3600.0*in[0]*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
113 out[18][0] = 2160.0*in[0] - 11520.0*in[0]*in[1] - 6480.0*in[0]*in[0] + 34560.0*in[0]*in[0]*in[1] + 10800.0*in[0]*in[1]*in[1] + 4320.0*in[0]*in[0]*in[0] - 32400.0*in[0]*in[0]*in[1]*in[1] - 23040.0*in[0]*in[0]*in[0]*in[1] + 21600.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
114 out[18][1] = 0.0;
│ │ │ │ +
115 out[19][0] = 0.0;
│ │ │ │ +
116 out[19][1] = 2160.0*in[1] - 11520.0*in[0]*in[1] - 6480.0*in[1]*in[1] + 10800.0*in[0]*in[0]*in[1] + 34560.0*in[0]*in[1]*in[1] + 4320.0*in[1]*in[1]*in[1] - 32400.0*in[0]*in[0]*in[1]*in[1] - 23040.0*in[0]*in[1]*in[1]*in[1] + 21600.0*in[0]*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
117 out[20][0] = 1080.0*in[0] - 6480.0*in[0]*in[1] - 2880.0*in[0]*in[0] + 17280.0*in[0]*in[0]*in[1] + 6480.0*in[0]*in[1]*in[1] + 1800.0*in[0]*in[0]*in[0] - 17280.0*in[0]*in[0]*in[1]*in[1] - 10800.0*in[0]*in[0]*in[0]*in[1] + 10800.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
118 out[20][1] = 0.0;
│ │ │ │ +
119 out[21][0] = 0.0;
│ │ │ │ +
120 out[21][1] = 1080.0*in[1] - 6480.0*in[0]*in[1] - 2880.0*in[1]*in[1] + 6480.0*in[0]*in[0]*in[1] + 17280.0*in[0]*in[1]*in[1] + 1800.0*in[1]*in[1]*in[1] - 17280.0*in[0]*in[0]*in[1]*in[1] - 10800.0*in[0]*in[1]*in[1]*in[1] + 10800.0*in[0]*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
121 out[22][0] = -1800.0*in[0] + 10800.0*in[0]*in[1] + 5400.0*in[0]*in[0] - 32400.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[1]*in[1] - 3600.0*in[0]*in[0]*in[0] + 32400.0*in[0]*in[0]*in[1]*in[1] + 21600.0*in[0]*in[0]*in[0]*in[1] - 21600.0*in[0]*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
122 out[22][1] = 0.0;
│ │ │ │ +
123 out[23][0] = 0.0;
│ │ │ │ +
124 out[23][1] = -1800.0*in[1] + 10800.0*in[0]*in[1] + 5400.0*in[1]*in[1] - 10800.0*in[0]*in[0]*in[1] - 32400.0*in[0]*in[1]*in[1] - 3600.0*in[1]*in[1]*in[1] + 32400.0*in[0]*in[0]*in[1]*in[1] + 21600.0*in[0]*in[1]*in[1]*in[1] - 21600.0*in[0]*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
│ │ │ │ +
133 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
134 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
135 {
│ │ │ │ +
136 out.resize(24);
│ │ │ │ +
137
│ │ │ │ +
138 out[0][0][0] = sign0*(9.0 - 36.0*in[0] + 30.0*in[0]*in[0]);
│ │ │ │ +
139 out[0][0][1] = 0.0;
│ │ │ │ +
140 out[0][1][0] = 0.0;
│ │ │ │ +
141 out[0][1][1] = 0.0;
│ │ │ │ +
142
│ │ │ │ +
143 out[1][0][0] = -27.0 + 54.0*in[1] + 108.0*in[0] - 216.0*in[0]*in[1] - 90.0*in[0]*in[0] + 180.0*in[0]*in[0]*in[1];
│ │ │ │ +
144 out[1][0][1] = -6.0 + 54.0*in[0] - 108.0*in[0]*in[0] + 60.0*in[0]*in[0]*in[0];
│ │ │ │ +
145 out[1][1][0] = 0.0;
│ │ │ │ +
146 out[1][1][1] = 0.0;
│ │ │ │ +
147
│ │ │ │ +
148 out[2][0][0] = sign0*(45.0 - 270.0*in[1] - 180.0*in[0] + 1080.0*in[0]*in[1] + 270.0*in[1]*in[1] + 150.0*in[0]*in[0] - 1080.0*in[0]*in[1]*in[1] - 900.0*in[0]*in[0]*in[1] + 900.0*in[0]*in[0]*in[1]*in[1]);
│ │ │ │ +
149 out[2][0][1] = sign0*(30.0 - 270.0*in[0] - 60.0*in[1] + 540.0*in[0]*in[0] + 540.0*in[0]*in[1] - 1080.0*in[0]*in[0]*in[1] - 300.0*in[0]*in[0]*in[0] + 600.0*in[0]*in[0]*in[0]*in[1]);
│ │ │ │ +
150 out[2][1][0] = 0.0;
│ │ │ │ +
151 out[2][1][1] = 0.0;
│ │ │ │
152
│ │ │ │ -
153
│ │ │ │ -
154 // EquidistantPointSet
│ │ │ │ -
155 // -------------------
│ │ │ │ -
156
│ │ │ │ -
157 template< class F, unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
159 : public EmptyPointSet< F, dim >
│ │ │ │ -
160 {
│ │ │ │ - │ │ │ │ +
153 out[3][0][0] = sign1*(3.0 - 24.0*in[0] + 30.0*in[0]*in[0]);
│ │ │ │ +
154 out[3][0][1] = 0.0;
│ │ │ │ +
155 out[3][1][0] = 0.0;
│ │ │ │ +
156 out[3][1][1] = 0.0;
│ │ │ │ +
157
│ │ │ │ +
158 out[4][0][0] = 9.0 - 18.0*in[1] - 72.0*in[0] + 144.0*in[0]*in[1] + 90.0*in[0]*in[0] - 180.0*in[0]*in[0]*in[1];
│ │ │ │ +
159 out[4][0][1] = -18.0*in[0] + 72.0*in[0]*in[0] - 60.0*in[0]*in[0]*in[0];
│ │ │ │ +
160 out[4][1][0] = 0.0;
│ │ │ │ +
161 out[4][1][1] = 0.0;
│ │ │ │
162
│ │ │ │ -
163 public:
│ │ │ │ -
164 static const unsigned int dimension = dim;
│ │ │ │ -
165
│ │ │ │ -
166 using Base::order;
│ │ │ │ +
163 out[5][0][0] = sign1*(15.0 - 90.0*in[1] - 120.0*in[0] + 720.0*in[0]*in[1] + 90.0*in[1]*in[1] + 150.0*in[0]*in[0] - 720.0*in[0]*in[1]*in[1] - 900.0*in[0]*in[0]*in[1] + 900.0*in[0]*in[0]*in[1]*in[1]);
│ │ │ │ +
164 out[5][0][1] = sign1*(-90.0*in[0] + 360.0*in[0]*in[0] + 180.0*in[0]*in[1] - 720.0*in[0]*in[0]*in[1] - 300.0*in[0]*in[0]*in[0] + 600.0*in[0]*in[0]*in[0]*in[1]);
│ │ │ │ +
165 out[5][1][0] = 0.0;
│ │ │ │ +
166 out[5][1][1] = 0.0;
│ │ │ │
167
│ │ │ │ -
168 EquidistantPointSet ( std::size_t order ) : Base( order ) {}
│ │ │ │ -
169
│ │ │ │ -
│ │ │ │ -
170 void build ( GeometryType gt )
│ │ │ │ -
171 {
│ │ │ │ -
172 assert( gt.dim() == dimension );
│ │ │ │ -
173 points_.resize( numLagrangePoints( gt, order() ) );
│ │ │ │ -
174
│ │ │ │ -
175 typename Base::LagrangePoint *p = points_.data();
│ │ │ │ -
176 std::vector< unsigned int > count;
│ │ │ │ -
177 for( unsigned int mydim = 0; mydim <= dimension; ++mydim )
│ │ │ │ -
178 {
│ │ │ │ -
179 count.resize( Geo::Impl::size( gt.id(), dimension, dimension-mydim ) );
│ │ │ │ -
180 std::fill( count.begin(), count.end(), 0u );
│ │ │ │ -
181 p += equidistantLagrangePoints( gt, dimension-mydim, order(), count.data(), p );
│ │ │ │ -
182 }
│ │ │ │ -
183 const auto &refElement = referenceElement<F,dimension>(gt);
│ │ │ │ -
184 F weight = refElement.volume()/F(double(points_.size()));
│ │ │ │ -
185 for (auto &p : points_)
│ │ │ │ -
186 p.weight_ = weight;
│ │ │ │ -
187 }
│ │ │ │ -
│ │ │ │ +
168
│ │ │ │ +
169 out[6][0][0] = 0.0;
│ │ │ │ +
170 out[6][0][1] = 0.0;
│ │ │ │ +
171 out[6][1][0] = 0.0;
│ │ │ │ +
172 out[6][1][1] = sign2*(9.0 - 36.0*in[1] + 30.0*in[1]*in[1]);
│ │ │ │ +
173
│ │ │ │ +
174 out[7][0][0] = 0.0;
│ │ │ │ +
175 out[7][0][1] = 0.0;
│ │ │ │ +
176 out[7][1][0] = 6.0 - 54.0*in[1] + 108.0*in[1]*in[1] - 60.0*in[1]*in[1]*in[1];
│ │ │ │ +
177 out[7][1][1] = 27.0 - 54.0*in[0] - 108.0*in[1] + 216.0*in[0]*in[1] + 90.0*in[1]*in[1] - 180.0*in[0]*in[1]*in[1];
│ │ │ │ +
178
│ │ │ │ +
179 out[8][0][0] = 0.0;
│ │ │ │ +
180 out[8][0][1] = 0.0;
│ │ │ │ +
181 out[8][1][0] = sign2*(30.0 - 270.0*in[1] - 60.0*in[0] + 540.0*in[0]*in[1] + 540.0*in[1]*in[1] - 1080.0*in[0]*in[1]*in[1] - 300.0*in[1]*in[1]*in[1] + 600.0*in[1]*in[1]*in[1]*in[0]);
│ │ │ │ +
182 out[8][1][1] = sign2*(45.0 - 270.0*in[0] - 180.0*in[1] + 270.0*in[0]*in[0] + 1080.0*in[0]*in[1] + 150.0*in[1]*in[1] - 1080.0*in[0]*in[0]*in[1] - 900.0*in[0]*in[1]*in[1] + 900.0*in[1]*in[1]*in[0]*in[0]);
│ │ │ │ +
183
│ │ │ │ +
184 out[9][0][0] = 0.0;
│ │ │ │ +
185 out[9][0][1] = 0.0;
│ │ │ │ +
186 out[9][1][0] = 0.0;
│ │ │ │ +
187 out[9][1][1] = sign3*(3.0 - 24.0*in[1] + 30.0*in[1]*in[1]);
│ │ │ │
188
│ │ │ │ -
189 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
190 bool build ()
│ │ │ │ -
191 {
│ │ │ │ -
192 build( GeometryType( geometryId ) );
│ │ │ │ -
193 return true;
│ │ │ │ -
194 }
│ │ │ │ -
│ │ │ │ -
195
│ │ │ │ -
│ │ │ │ -
196 bool buildCube ()
│ │ │ │ -
197 {
│ │ │ │ -
198 return build< GeometryTypes::cube(dim) > ();
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
201 static bool supports ( GeometryType, std::size_t /*order*/ ) { return true; }
│ │ │ │ -
202 template< GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
203 static bool supports ( std::size_t order ) {
│ │ │ │ -
204 return supports( GeometryType( geometryId ), order );
│ │ │ │ -
205 }
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207 private:
│ │ │ │ -
208 using Base::points_;
│ │ │ │ -
209 };
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
211} // namespace Dune
│ │ │ │ -
212
│ │ │ │ -
213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
189 out[10][0][0] = 0.0;
│ │ │ │ +
190 out[10][0][1] = 0.0;
│ │ │ │ +
191 out[10][1][0] = 18.0*in[1] - 72.0*in[1]*in[1] + 60.0*in[1]*in[1]*in[1];
│ │ │ │ +
192 out[10][1][1] = -9.0 + 18.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] - 90.0*in[1]*in[1] + 180.0*in[0]*in[1]*in[1];
│ │ │ │ +
193
│ │ │ │ +
194 out[11][0][0] = 0.0;
│ │ │ │ +
195 out[11][0][1] = 0.0;
│ │ │ │ +
196 out[11][1][0] = sign3*(-90.0*in[1] + 180.0*in[0]*in[1] + 360.0*in[1]*in[1] - 720.0*in[0]*in[1]*in[1] - 300.0*in[1]*in[1]*in[1] + 600.0*in[1]*in[1]*in[1]*in[0]);
│ │ │ │ +
197 out[11][1][1] = sign3*(15.0 - 90.0*in[0] - 120.0*in[1] + 90.0*in[0]*in[0] + 720.0*in[0]*in[1] + 150.0*in[1]*in[1] - 720.0*in[0]*in[0]*in[1] - 900.0*in[0]*in[1]*in[1] + 900.0*in[1]*in[1]*in[0]*in[0]);
│ │ │ │ +
198
│ │ │ │ +
199 out[12][0][0] = 324 -1296.0*in[1] - 1728.0*in[0] + 6912.0*in[0]*in[1] + 1080.0*in[1]*in[1] + 1620.0*in[0]*in[0] - 5760.0*in[0]*in[1]*in[1] - 6480.0*in[0]*in[0]*in[1] + 5400.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
200 out[12][0][1] = -1296.0*in[0] + 3456.0*in[0]*in[0] + 2160.0*in[0]*in[1] - 5760.0*in[0]*in[0]*in[1] - 2160.0*in[0]*in[0]*in[0] + 3600.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
201 out[12][1][0] = 0.0;
│ │ │ │ +
202 out[12][1][1] = 0.0;
│ │ │ │ +
203
│ │ │ │ +
204 out[13][0][0] = 0.0;
│ │ │ │ +
205 out[13][0][1] = 0.0;
│ │ │ │ +
206 out[13][1][0] = -1296.0*in[1] + 2160.0*in[0]*in[1] + 3456.0*in[1]*in[1] - 5760.0*in[0]*in[1]*in[1] - 2160.0*in[1]*in[1]*in[1] + 3600.0*in[1]*in[1]*in[1]*in[0];
│ │ │ │ +
207 out[13][1][1] = 324.0 - 1296.0*in[0] - 1728.0*in[1] + 1080.0*in[0]*in[0] + 6912.0*in[0]*in[1] + 1620.0*in[1]*in[1] - 5760.0*in[0]*in[0]*in[1] - 6480.0*in[0]*in[1]*in[1] + 5400.0*in[1]*in[1]*in[0]*in[0];
│ │ │ │ +
208
│ │ │ │ +
209 out[14][0][0] = -540.0 + 2160.0*in[1] + 3240.0*in[0] - 12960.0*in[0]*in[1] - 1800.0*in[1]*in[1] - 3240.0*in[0]*in[0] + 10800.0*in[0]*in[1]*in[1] + 12960.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
210 out[14][0][1] = 2160.0*in[0] - 6480.0*in[0]*in[0] - 3600.0*in[0]*in[1] + 10800.0*in[0]*in[0]*in[1] + 4320.0*in[0]*in[0]*in[0] - 7200.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
211 out[14][1][0] = 0.0;
│ │ │ │ +
212 out[14][1][1] = 0.0;
│ │ │ │ +
213
│ │ │ │ +
214 out[15][0][0] = 0.0;
│ │ │ │ +
215 out[15][0][1] = 0.0;
│ │ │ │ +
216 out[15][1][0] = 6912.0*in[1] - 12960.0*in[0]*in[1] - 18432.0*in[1]*in[1] + 34560.0*in[0]*in[1]*in[1] + 11520.0*in[1]*in[1]*in[1] - 21600.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
217 out[15][1][1] = -1296.0 + 6912.0*in[0] + 6912.0*in[1] - 6480.0*in[0]*in[0] - 36864.0*in[0]*in[1] - 6480.0*in[1]*in[1] + 34560.0*in[0]*in[0]*in[1] + 34560.0*in[0]*in[1]*in[1] - 32400.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
218
│ │ │ │ +
219 out[16][0][0] = -1296.0 + 6912.0*in[1] + 6912.0*in[0] - 6480.0*in[1]*in[1] - 36864.0*in[0]*in[1] - 6480.0*in[0]*in[0] + 34560.0*in[0]*in[1]*in[1] + 34560.0*in[1]*in[0]*in[0] - 32400.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
220 out[16][0][1] = 6912.0*in[0] - 12960.0*in[0]*in[1] - 18432.0*in[0]*in[0] + 34560.0*in[0]*in[0]*in[1] + 11520.0*in[0]*in[0]*in[0] - 21600.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
221 out[16][1][0] = 0.0;
│ │ │ │ +
222 out[16][1][1] = 0.0;
│ │ │ │ +
223
│ │ │ │ +
224 out[17][0][0] = 0.0;
│ │ │ │ +
225 out[17][0][1] = 0.0;
│ │ │ │ +
226 out[17][1][0] = 2160.0*in[1] - 3600.0*in[0]*in[1] - 6480.0*in[1]*in[1] + 10800.0*in[0]*in[1]*in[1] + 4320.0*in[1]*in[1]*in[1] - 7200.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
227 out[17][1][1] = -540.0 + 2160.0*in[0] + 3240.0*in[1] - 1800.0*in[0]*in[0] - 12960.0*in[0]*in[1] - 3240.0*in[1]*in[1] + 10800.0*in[0]*in[0]*in[1] + 12960.0*in[0]*in[1]*in[1] - 10800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
228
│ │ │ │ +
229 out[18][0][0] = 2160.0 - 11520.0*in[1] - 12960.0*in[0] + 69120.0*in[0]*in[1] + 10800.0*in[1]*in[1] + 12960.0*in[0]*in[0] - 64800.0*in[0]*in[1]*in[1] - 69120.0*in[0]*in[0]*in[1] + 64800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
230 out[18][0][1] = -11520.0*in[0] + 34560.0*in[0]*in[0] + 21600.0*in[0]*in[1] - 64800.0*in[0]*in[0]*in[1] - 23040.0*in[0]*in[0]*in[0] + 43200.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
231 out[18][1][0] = 0.0;
│ │ │ │ +
232 out[18][1][1] = 0.0;
│ │ │ │ +
233
│ │ │ │ +
234 out[19][0][0] = 0.0;
│ │ │ │ +
235 out[19][0][1] = 0.0;
│ │ │ │ +
236 out[19][1][0] = -11520.0*in[1] + 21600.0*in[0]*in[1] + 34560.0*in[1]*in[1] - 64800.0*in[0]*in[1]*in[1] - 23040.0*in[1]*in[1]*in[1] + 43200.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
237 out[19][1][1] = 2160.0 - 11520.0*in[0] - 12960.0*in[1] + 10800.0*in[0]*in[0] + 69120.0*in[0]*in[1] + 12960.0*in[1]*in[1] - 64800.0*in[0]*in[0]*in[1] - 69120.0*in[0]*in[1]*in[1] + 64800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
238
│ │ │ │ +
239 out[20][0][0] = 1080.0 - 6480.0*in[1] - 5760.0*in[0] + 34560.0*in[0]*in[1] + 6480.0*in[1]*in[1] + 5400.0*in[0]*in[0] - 34560.0*in[0]*in[1]*in[1] - 32400.0*in[0]*in[0]*in[1] + 32400.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
240 out[20][0][1] = -6480.0*in[0] + 17280.0*in[0]*in[0] + 12960.0*in[0]*in[1] - 34560.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[0]*in[0] + 21600.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
241 out[20][1][0] = 0.0;
│ │ │ │ +
242 out[20][1][1] = 0.0;
│ │ │ │ +
243
│ │ │ │ +
244 out[21][0][0] = 0.0;
│ │ │ │ +
245 out[21][0][1] = 0.0;
│ │ │ │ +
246 out[21][1][0] = -6480.0*in[1] + 12960.0*in[0]*in[1] + 17280.0*in[1]*in[1] - 34560.0*in[0]*in[1]*in[1] - 10800.0*in[1]*in[1]*in[1] + 21600.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
247 out[21][1][1] = 1080.0 - 6480.0*in[0] - 5760.0*in[1] + 6480.0*in[0]*in[0] + 34560.0*in[0]*in[1] + 5400.0*in[1]*in[1] - 34560.0*in[0]*in[0]*in[1] - 32400.0*in[0]*in[1]*in[1] + 32400.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
248
│ │ │ │ +
249 out[22][0][0] = -1800.0 + 10800.0*in[1] + 10800.0*in[0] - 64800.0*in[0]*in[1] - 10800.0*in[1]*in[1] - 10800.0*in[0]*in[0] + 64800.0*in[0]*in[1]*in[1] + 64800.0*in[0]*in[0]*in[1] - 64800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
250 out[22][0][1] = 10800.0*in[0] - 32400.0*in[0]*in[0] - 21600.0*in[0]*in[1] + 64800.0*in[0]*in[0]*in[1] + 21600.0*in[0]*in[0]*in[0] - 43200.0*in[0]*in[0]*in[0]*in[1];
│ │ │ │ +
251 out[22][1][0] = 0.0;
│ │ │ │ +
252 out[22][1][1] = 0.0;
│ │ │ │ +
253
│ │ │ │ +
254 out[23][0][0] = 0.0;
│ │ │ │ +
255 out[23][0][1] = 0.0;
│ │ │ │ +
256 out[23][1][0] = 10800.0*in[1] - 21600.0*in[0]*in[1] - 32400.0*in[1]*in[1] + 64800.0*in[0]*in[1]*in[1] + 21600.0*in[1]*in[1]*in[1] - 43200.0*in[0]*in[1]*in[1]*in[1];
│ │ │ │ +
257 out[23][1][1] = -1800.0 + 10800.0*in[0] + 10800.0*in[1] - 10800.0*in[0]*in[0] - 64800.0*in[0]*in[1] - 10800.0*in[1]*in[1] + 64800.0*in[0]*in[0]*in[1] + 64800.0*in[0]*in[1]*in[1] - 64800.0*in[0]*in[0]*in[1]*in[1];
│ │ │ │ +
258 }
│ │ │ │ +
│ │ │ │ +
259
│ │ │ │ +
│ │ │ │ +
261 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
262 const typename Traits::DomainType& in, // position
│ │ │ │ +
263 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
264 {
│ │ │ │ +
265 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
266 if (totalOrder == 0) {
│ │ │ │ +
267 evaluateFunction(in, out);
│ │ │ │ +
268 } else {
│ │ │ │ +
269 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
270 }
│ │ │ │ +
271 }
│ │ │ │ +
│ │ │ │ +
272
│ │ │ │ +
│ │ │ │ +
274 unsigned int order () const
│ │ │ │ +
275 {
│ │ │ │ +
276 return 5;
│ │ │ │ +
277 }
│ │ │ │ +
│ │ │ │ +
278
│ │ │ │ +
279 private:
│ │ │ │ +
280 R sign0, sign1, sign2, sign3;
│ │ │ │ +
281 };
│ │ │ │ +
│ │ │ │ +
282}
│ │ │ │ +
283#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
std::size_t numLagrangePoints(const GeometryType &gt, std::size_t order)
Definition equidistantpoints.hh:23
│ │ │ │ -
static unsigned int equidistantLagrangePoints(const GeometryType &gt, unsigned int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > *points)
Definition equidistantpoints.hh:55
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
unsigned int index() const
Return offset within subentity.
Definition localkey.hh:68
│ │ │ │ -
unsigned int subEntity() const
Return number of associated subentity.
Definition localkey.hh:56
│ │ │ │ -
Definition emptypoints.hh:18
│ │ │ │ -
Field weight_
Definition emptypoints.hh:48
│ │ │ │ -
Vector point_
Definition emptypoints.hh:46
│ │ │ │ -
LocalKey localKey_
Definition emptypoints.hh:47
│ │ │ │ -
Definition emptypoints.hh:56
│ │ │ │ -
std::size_t order() const
Definition emptypoints.hh:95
│ │ │ │ -
std::vector< LagrangePoint > points_
Definition emptypoints.hh:107
│ │ │ │ -
Definition equidistantpoints.hh:160
│ │ │ │ -
std::size_t order() const
Definition emptypoints.hh:95
│ │ │ │ -
bool build()
Definition equidistantpoints.hh:190
│ │ │ │ -
static bool supports(std::size_t order)
Definition equidistantpoints.hh:203
│ │ │ │ -
static const unsigned int dimension
Definition equidistantpoints.hh:164
│ │ │ │ -
static bool supports(GeometryType, std::size_t)
Definition equidistantpoints.hh:201
│ │ │ │ -
void build(GeometryType gt)
Definition equidistantpoints.hh:170
│ │ │ │ -
bool buildCube()
Definition equidistantpoints.hh:196
│ │ │ │ -
EquidistantPointSet(std::size_t order)
Definition equidistantpoints.hh:168
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas2cube2dlocalbasis.hh:28
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas2cube2dlocalbasis.hh:261
│ │ │ │ +
RT2Cube2DLocalBasis(unsigned int s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas2cube2dlocalbasis.hh:39
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas2cube2dlocalbasis.hh:133
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas2cube2dlocalbasis.hh:274
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas2cube2dlocalbasis.hh:32
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas2cube2dlocalbasis.hh:61
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas2cube2dlocalbasis.hh:72
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,313 +1,437 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -equidistantpoints.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_2_c_u_b_e_2_d │ │ │ │ │ +raviartthomas2cube2dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -1// SPDX-FileCopyrightText: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ +2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ +3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ -2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -3#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ -4#define DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ -5 │ │ │ │ │ -6#include │ │ │ │ │ +4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_e_m_p_t_y_p_o_i_n_t_s_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_f_i_e_l_d_._h_h> │ │ │ │ │ -16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ -19 │ │ │ │ │ -20 // numLagrangePoints │ │ │ │ │ -21 // ----------------- │ │ │ │ │ -22 │ │ │ │ │ -_2_3 inline std::size_t _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( const GeometryType& gt, std::size_t │ │ │ │ │ -order ) │ │ │ │ │ -24 { │ │ │ │ │ -25 const int dim = gt.dim(); │ │ │ │ │ -26 if( dim > 0 ) │ │ │ │ │ -27 { │ │ │ │ │ -28 const GeometryType baseGeometryType = Impl::getBase( gt ); │ │ │ │ │ -29 if( gt.isConical() ) │ │ │ │ │ -30 { │ │ │ │ │ -31 std::size_t size = 0; │ │ │ │ │ -32 for( unsigned int o = 0; o <= order; ++o ) │ │ │ │ │ -33 size += _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, o ); │ │ │ │ │ -34 return size; │ │ │ │ │ -35 } │ │ │ │ │ -36 else │ │ │ │ │ -37 return _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, order ) * (order+1); │ │ │ │ │ -38 } │ │ │ │ │ -39 else │ │ │ │ │ -40 return 1; │ │ │ │ │ -41 } │ │ │ │ │ -42 │ │ │ │ │ -43 [[deprecated("Use numLagrangePoints(const GeometryType& gt, std::size_t │ │ │ │ │ -order ) instead.")]] │ │ │ │ │ -_4_4 inline std::size_t _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( unsigned int topologyId, unsigned int │ │ │ │ │ -dim, std::size_t order ) │ │ │ │ │ -45 { │ │ │ │ │ -46 return _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( GeometryType(topologyId, dim), order); │ │ │ │ │ -47 } │ │ │ │ │ -48 │ │ │ │ │ -49 │ │ │ │ │ -50 │ │ │ │ │ -51 // equidistantLagrangePoints │ │ │ │ │ -52 // ------------------------- │ │ │ │ │ -53 │ │ │ │ │ -54 template< class ct, unsigned int cdim > │ │ │ │ │ -_5_5 inline static unsigned int _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( const GeometryType& │ │ │ │ │ -gt, unsigned int codim, std::size_t order, unsigned int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t_< │ │ │ │ │ -_c_t_,_ _c_d_i_m_ _> *points ) │ │ │ │ │ -56 { │ │ │ │ │ -57 const unsigned int dim = gt.dim(); │ │ │ │ │ -58 assert( (0 <= codim) && (codim <= dim) && (dim <= cdim) ); │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +28 { │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (unsigned int s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 sign0 = sign1 = sign2 = sign3 = 1.0; │ │ │ │ │ +42 if (s & 1) │ │ │ │ │ +43 { │ │ │ │ │ +44 sign0 = -1.0; │ │ │ │ │ +45 } │ │ │ │ │ +46 if (s & 2) │ │ │ │ │ +47 { │ │ │ │ │ +48 sign1 = -1.0; │ │ │ │ │ +49 } │ │ │ │ │ +50 if (s & 4) │ │ │ │ │ +51 { │ │ │ │ │ +52 sign2 = -1.0; │ │ │ │ │ +53 } │ │ │ │ │ +54 if (s & 8) │ │ │ │ │ +55 { │ │ │ │ │ +56 sign3 = -1.0; │ │ │ │ │ +57 } │ │ │ │ │ +58 } │ │ │ │ │ 59 │ │ │ │ │ -60 if( dim > 0 ) │ │ │ │ │ -61 { │ │ │ │ │ -62 const GeometryType baseGeometryType = Impl::getBase( gt ); │ │ │ │ │ -63 const unsigned int numBaseN = (codim < dim ? Geo::Impl::size │ │ │ │ │ -( baseGeometryType.id(), baseGeometryType.dim(), codim ) : 0); │ │ │ │ │ -64 const unsigned int numBaseM = (codim > 0 ? Geo::Impl::size │ │ │ │ │ -( baseGeometryType.id(), baseGeometryType.dim(), codim-1 ) : 0); │ │ │ │ │ +_6_1 unsigned int _s_i_z_e () const │ │ │ │ │ +62 { │ │ │ │ │ +63 return 24; │ │ │ │ │ +64 } │ │ │ │ │ 65 │ │ │ │ │ -66 if( gt.isPrismatic() ) │ │ │ │ │ -67 { │ │ │ │ │ -68 unsigned int size = 0; │ │ │ │ │ -69 if( codim < dim ) │ │ │ │ │ -70 { │ │ │ │ │ -71 for( unsigned int i = 1; i < order; ++i ) │ │ │ │ │ -72 { │ │ │ │ │ -73 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim, │ │ │ │ │ -order, count, points ); │ │ │ │ │ -74 for( unsigned int j = 0; j < n; ++j ) │ │ │ │ │ -75 { │ │ │ │ │ -76 _L_o_c_a_l_K_e_y &key = points->_l_o_c_a_l_K_e_y__; │ │ │ │ │ -77 key = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y(), codim, key._i_n_d_e_x() ); │ │ │ │ │ -78 points->_p_o_i_n_t__[ dim-1 ] = ct( i ) / ct( order ); │ │ │ │ │ -79 ++points; │ │ │ │ │ -80 } │ │ │ │ │ -81 size += n; │ │ │ │ │ -82 } │ │ │ │ │ -83 } │ │ │ │ │ -84 │ │ │ │ │ -85 if( codim > 0 ) │ │ │ │ │ -86 { │ │ │ │ │ -87 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim-1, │ │ │ │ │ -order, count+numBaseN, points ); │ │ │ │ │ -88 for( unsigned int j = 0; j < n; ++j ) │ │ │ │ │ -89 { │ │ │ │ │ -90 _L_o_c_a_l_K_e_y &key = points[ j ]._l_o_c_a_l_K_e_y__; │ │ │ │ │ -91 key = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y() + numBaseN, codim, key._i_n_d_e_x() ); │ │ │ │ │ -92 │ │ │ │ │ -93 points[ j + n ]._p_o_i_n_t__ = points[ j ]._p_o_i_n_t__; │ │ │ │ │ -94 points[ j + n ]._p_o_i_n_t__[ dim-1 ] = ct( 1 ); │ │ │ │ │ -95 points[ j + n ]._l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( key._s_u_b_E_n_t_i_t_y() + numBaseM, codim, │ │ │ │ │ -key._i_n_d_e_x() ); │ │ │ │ │ -96 ++count[ key._s_u_b_E_n_t_i_t_y() + numBaseM ]; │ │ │ │ │ -97 } │ │ │ │ │ -98 size += 2*n; │ │ │ │ │ -99 } │ │ │ │ │ -100 │ │ │ │ │ -101 return size; │ │ │ │ │ -102 } │ │ │ │ │ -103 else │ │ │ │ │ -104 { │ │ │ │ │ -105 unsigned int size = (codim > 0 ? _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ -( baseGeometryType, codim-1, order, count, points ) : 0); │ │ │ │ │ -106 _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *const end = points + size; │ │ │ │ │ -107 for( ; points != end; ++points ) │ │ │ │ │ -108 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( points->_l_o_c_a_l_K_e_y__._s_u_b_E_n_t_i_t_y(), codim, points- │ │ │ │ │ ->_l_o_c_a_l_K_e_y__._i_n_d_e_x() ); │ │ │ │ │ -109 │ │ │ │ │ -110 if( codim < dim ) │ │ │ │ │ -111 { │ │ │ │ │ -112 for( unsigned int i = order-1; i > 0; --i ) │ │ │ │ │ -113 { │ │ │ │ │ -114 const unsigned int n = _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( baseGeometryType, codim, │ │ │ │ │ -i, count+numBaseM, points ); │ │ │ │ │ -115 _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *const end = points + n; │ │ │ │ │ -116 for( ; points != end; ++points ) │ │ │ │ │ -117 { │ │ │ │ │ -118 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( points->_l_o_c_a_l_K_e_y__._s_u_b_E_n_t_i_t_y()+numBaseM, │ │ │ │ │ -codim, points->_l_o_c_a_l_K_e_y__._i_n_d_e_x() ); │ │ │ │ │ -119 for( unsigned int j = 0; j < dim-1; ++j ) │ │ │ │ │ -120 points->_p_o_i_n_t__[ j ] *= ct( i ) / ct( order ); │ │ │ │ │ -121 points->_p_o_i_n_t__[ dim-1 ] = ct( order - i ) / ct( order ); │ │ │ │ │ -122 } │ │ │ │ │ -123 size += n; │ │ │ │ │ -124 } │ │ │ │ │ +_7_2 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +73 std::vector& out) const │ │ │ │ │ +74 { │ │ │ │ │ +75 out.resize(24); │ │ │ │ │ +76 │ │ │ │ │ +77 out[0][0] = sign0*(-1.0 + 9.0*in[0] - 18.0*in[0]*in[0] + 10.0*in[0]*in[0]*in │ │ │ │ │ +[0]); │ │ │ │ │ +78 out[0][1] = 0.0; │ │ │ │ │ +79 out[1][0] = 3.0 - 27.0*in[0] - 6.0*in[1] + 54.0*in[0]*in[1] + 54.0*in[0]*in │ │ │ │ │ +[0] - 108.0*in[0]*in[0]*in[1] - 30.0*in[0]*in[0]*in[0] + 60.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +80 out[1][1] = 0.0; │ │ │ │ │ +81 out[2][0] = sign0*(-5.0 + 45.0*in[0] + 30.0*in[1] - 270.0*in[0]*in[1] - │ │ │ │ │ +90.0*in[0]*in[0] - 30.0*in[1]*in[1] + 540.0*in[0]*in[0]*in[1] + 270.0*in[0]*in │ │ │ │ │ +[1]*in[1] + 50.0*in[0]*in[0]*in[0] - 540.0*in[0]*in[0]*in[1]*in[1] - 300.0*in │ │ │ │ │ +[0]*in[0]*in[0]*in[1] + 300.0*in[0]*in[0]*in[0]*in[1]*in[1]); │ │ │ │ │ +82 out[2][1] = 0.0; │ │ │ │ │ +83 out[3][0] = sign1*(3.0*in[0] - 12.0*in[0]*in[0] + 10.0*in[0]*in[0]*in[0]); │ │ │ │ │ +84 out[3][1] = 0.0; │ │ │ │ │ +85 out[4][0] = 9.0*in[0] - 18.0*in[0]*in[1] - 36.0*in[0]*in[0] + 72.0*in[0]*in │ │ │ │ │ +[0]*in[1] + 30.0*in[0]*in[0]*in[0] - 60.0*in[0]*in[0]*in[0]*in[1]; │ │ │ │ │ +86 out[4][1] = 0.0; │ │ │ │ │ +87 out[5][0] = sign1*(15.0*in[0] - 90.0*in[0]*in[1] - 60.0*in[0]*in[0] + │ │ │ │ │ +360.0*in[0]*in[0]*in[1] + 90.0*in[0]*in[1]*in[1] + 50.0*in[0]*in[0]*in[0] - │ │ │ │ │ +360.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[0]*in[0]*in[1] + 300.0*in[0]*in │ │ │ │ │ +[0]*in[0]*in[1]*in[1]); │ │ │ │ │ +88 out[5][1] = 0.0; │ │ │ │ │ +89 out[6][0] = 0.0; │ │ │ │ │ +90 out[6][1] = sign2*(-1.0 + 9.0*in[1] - 18.0*in[1]*in[1] + 10.0*in[1]*in[1]*in │ │ │ │ │ +[1]); │ │ │ │ │ +91 out[7][0] = 0.0; │ │ │ │ │ +92 out[7][1] = -3.0 + 6.0*in[0] + 27.0*in[1] - 54.0*in[0]*in[1] - 54.0*in[1]*in │ │ │ │ │ +[1] + 108.0*in[0]*in[1]*in[1] + 30.0*in[1]*in[1]*in[1] - 60.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +93 out[8][0] = 0.0; │ │ │ │ │ +94 out[8][1] = sign2*(-5.0 + 30.0*in[0] + 45.0*in[1] - 270.0*in[0]*in[1] - │ │ │ │ │ +30.0*in[0]*in[0] - 90.0*in[1]*in[1] + 270.0*in[0]*in[0]*in[1] + 540.0*in[0]*in │ │ │ │ │ +[1]*in[1] + 50.0*in[1]*in[1]*in[1] - 540.0*in[0]*in[0]*in[1]*in[1] - 300.0*in │ │ │ │ │ +[0]*in[1]*in[1]*in[1] + 300.0*in[1]*in[1]*in[1]*in[0]*in[0]); │ │ │ │ │ +95 out[9][0] = 0.0; │ │ │ │ │ +96 out[9][1] = sign3*(3.0*in[1] - 12.0*in[1]*in[1] + 10.0*in[1]*in[1]*in[1]); │ │ │ │ │ +97 out[10][0] = 0.0; │ │ │ │ │ +98 out[10][1] = -9.0*in[1] + 18.0*in[0]*in[1] + 36.0*in[1]*in[1] - 72.0*in │ │ │ │ │ +[0]*in[1]*in[1] - 30.0*in[1]*in[1]*in[1] + 60.0*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ +99 out[11][0] = 0.0; │ │ │ │ │ +100 out[11][1] = sign3*(15.0*in[1] - 90.0*in[0]*in[1] - 60.0*in[1]*in[1] + │ │ │ │ │ +90.0*in[0]*in[0]*in[1] + 360.0*in[0]*in[1]*in[1] + 50.0*in[1]*in[1]*in[1] - │ │ │ │ │ +360.0*in[0]*in[0]*in[1]*in[1] - 300.0*in[0]*in[1]*in[1]*in[1] + 300.0*in[1]*in │ │ │ │ │ +[1]*in[1]*in[0]*in[0]); │ │ │ │ │ +101 out[12][0] = 324.0*in[0] -1296.0*in[0]*in[1] - 864.0*in[0]*in[0] + │ │ │ │ │ +3456.0*in[0]*in[0]*in[1] + 1080.0*in[0]*in[1]*in[1] + 540.0*in[0]*in[0]*in[0] - │ │ │ │ │ +2880.0*in[0]*in[0]*in[1]*in[1] - 2160.0*in[0]*in[0]*in[0]*in[1] + 1800.0*in │ │ │ │ │ +[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +102 out[12][1] = 0.0; │ │ │ │ │ +103 out[13][0] = 0.0; │ │ │ │ │ +104 out[13][1] = 324.0*in[1] - 1296.0*in[0]*in[1] - 864.0*in[1]*in[1] + │ │ │ │ │ +1080.0*in[0]*in[0]*in[1] + 3456.0*in[0]*in[1]*in[1] + 540.0*in[1]*in[1]*in[1] - │ │ │ │ │ +2880.0*in[0]*in[0]*in[1]*in[1] - 2160.0*in[0]*in[1]*in[1]*in[1] + 1800.0*in │ │ │ │ │ +[1]*in[1]*in[1]*in[0]*in[0]; │ │ │ │ │ +105 out[14][0] = -540.0*in[0] + 2160.0*in[0]*in[1] + 1620.0*in[0]*in[0] - │ │ │ │ │ +6480.0*in[0]*in[0]*in[1] - 1800.0*in[0]*in[1]*in[1] - 1080.0*in[0]*in[0]*in[0] │ │ │ │ │ ++ 5400.0*in[0]*in[0]*in[1]*in[1] + 4320.0*in[0]*in[0]*in[0]*in[1] - 3600.0*in │ │ │ │ │ +[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +106 out[14][1] = 0.0; │ │ │ │ │ +107 out[15][0] = 0.0; │ │ │ │ │ +108 out[15][1] = -1296.0*in[1] + 6912.0*in[0]*in[1] + 3456.0*in[1]*in[1] - │ │ │ │ │ +6480.0*in[0]*in[0]*in[1] - 18432.0*in[0]*in[1]*in[1] - 2160.0*in[1]*in[1]*in[1] │ │ │ │ │ ++ 17280.0*in[0]*in[0]*in[1]*in[1] + 11520.0*in[0]*in[1]*in[1]*in[1] - │ │ │ │ │ +10800.0*in[0]*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ +109 out[16][0] = -1296.0*in[0] + 6912.0*in[0]*in[1] + 3456.0*in[0]*in[0] - │ │ │ │ │ +6480.0*in[0]*in[1]*in[1] - 18432.0*in[0]*in[0]*in[1] - 2160.0*in[0]*in[0]*in[0] │ │ │ │ │ ++ 17280.0*in[0]*in[0]*in[1]*in[1] + 11520.0*in[1]*in[0]*in[0]*in[0] - │ │ │ │ │ +10800.0*in[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +110 out[16][1] = 0.0; │ │ │ │ │ +111 out[17][0] = 0.0; │ │ │ │ │ +112 out[17][1] = -540.0*in[1] + 2160.0*in[0]*in[1] + 1620.0*in[1]*in[1] - │ │ │ │ │ +1800.0*in[0]*in[0]*in[1] - 6480.0*in[0]*in[1]*in[1] - 1080.0*in[1]*in[1]*in[1] │ │ │ │ │ ++ 5400.0*in[0]*in[0]*in[1]*in[1] + 4320.0*in[0]*in[1]*in[1]*in[1] - 3600.0*in │ │ │ │ │ +[0]*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ +113 out[18][0] = 2160.0*in[0] - 11520.0*in[0]*in[1] - 6480.0*in[0]*in[0] + │ │ │ │ │ +34560.0*in[0]*in[0]*in[1] + 10800.0*in[0]*in[1]*in[1] + 4320.0*in[0]*in[0]*in │ │ │ │ │ +[0] - 32400.0*in[0]*in[0]*in[1]*in[1] - 23040.0*in[0]*in[0]*in[0]*in[1] + │ │ │ │ │ +21600.0*in[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +114 out[18][1] = 0.0; │ │ │ │ │ +115 out[19][0] = 0.0; │ │ │ │ │ +116 out[19][1] = 2160.0*in[1] - 11520.0*in[0]*in[1] - 6480.0*in[1]*in[1] + │ │ │ │ │ +10800.0*in[0]*in[0]*in[1] + 34560.0*in[0]*in[1]*in[1] + 4320.0*in[1]*in[1]*in │ │ │ │ │ +[1] - 32400.0*in[0]*in[0]*in[1]*in[1] - 23040.0*in[0]*in[1]*in[1]*in[1] + │ │ │ │ │ +21600.0*in[0]*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ +117 out[20][0] = 1080.0*in[0] - 6480.0*in[0]*in[1] - 2880.0*in[0]*in[0] + │ │ │ │ │ +17280.0*in[0]*in[0]*in[1] + 6480.0*in[0]*in[1]*in[1] + 1800.0*in[0]*in[0]*in[0] │ │ │ │ │ +- 17280.0*in[0]*in[0]*in[1]*in[1] - 10800.0*in[0]*in[0]*in[0]*in[1] + │ │ │ │ │ +10800.0*in[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +118 out[20][1] = 0.0; │ │ │ │ │ +119 out[21][0] = 0.0; │ │ │ │ │ +120 out[21][1] = 1080.0*in[1] - 6480.0*in[0]*in[1] - 2880.0*in[1]*in[1] + │ │ │ │ │ +6480.0*in[0]*in[0]*in[1] + 17280.0*in[0]*in[1]*in[1] + 1800.0*in[1]*in[1]*in[1] │ │ │ │ │ +- 17280.0*in[0]*in[0]*in[1]*in[1] - 10800.0*in[0]*in[1]*in[1]*in[1] + │ │ │ │ │ +10800.0*in[0]*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ +121 out[22][0] = -1800.0*in[0] + 10800.0*in[0]*in[1] + 5400.0*in[0]*in[0] - │ │ │ │ │ +32400.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[1]*in[1] - 3600.0*in[0]*in[0]*in │ │ │ │ │ +[0] + 32400.0*in[0]*in[0]*in[1]*in[1] + 21600.0*in[0]*in[0]*in[0]*in[1] - │ │ │ │ │ +21600.0*in[0]*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +122 out[22][1] = 0.0; │ │ │ │ │ +123 out[23][0] = 0.0; │ │ │ │ │ +124 out[23][1] = -1800.0*in[1] + 10800.0*in[0]*in[1] + 5400.0*in[1]*in[1] - │ │ │ │ │ +10800.0*in[0]*in[0]*in[1] - 32400.0*in[0]*in[1]*in[1] - 3600.0*in[1]*in[1]*in │ │ │ │ │ +[1] + 32400.0*in[0]*in[0]*in[1]*in[1] + 21600.0*in[0]*in[1]*in[1]*in[1] - │ │ │ │ │ +21600.0*in[0]*in[0]*in[1]*in[1]*in[1]; │ │ │ │ │ 125 } │ │ │ │ │ -126 else │ │ │ │ │ -127 { │ │ │ │ │ -128 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( numBaseM, dim, count[ numBaseM ]++ ); │ │ │ │ │ -129 points->_p_o_i_n_t__ = 0; │ │ │ │ │ -130 points->_p_o_i_n_t__[ dim-1 ] = ct( 1 ); │ │ │ │ │ -131 ++size; │ │ │ │ │ -132 } │ │ │ │ │ -133 │ │ │ │ │ -134 return size; │ │ │ │ │ -135 } │ │ │ │ │ -136 } │ │ │ │ │ -137 else │ │ │ │ │ -138 { │ │ │ │ │ -139 points->_l_o_c_a_l_K_e_y__ = _L_o_c_a_l_K_e_y( 0, 0, count[ 0 ]++ ); │ │ │ │ │ -140 points->_p_o_i_n_t__ = 0; │ │ │ │ │ -141 return 1; │ │ │ │ │ -142 } │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -145 template< class ct, unsigned int cdim > │ │ │ │ │ -146 [[deprecated("Use equidistantLagrangePoints ( GeometryType gt, ... ) │ │ │ │ │ -instead.")]] │ │ │ │ │ -_1_4_7 inline static unsigned int _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( unsigned int │ │ │ │ │ -topologyId, unsigned int dim, unsigned int codim, std::size_t order, unsigned │ │ │ │ │ -int *count, _L_a_g_r_a_n_g_e_P_o_i_n_t_<_ _c_t_,_ _c_d_i_m_ _> *points ) │ │ │ │ │ -148 { │ │ │ │ │ -149 return _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s ( GeometryType(topologyId, dim), codim, │ │ │ │ │ -order, *count, *points ); │ │ │ │ │ -150 } │ │ │ │ │ -151 │ │ │ │ │ +126 │ │ │ │ │ +_1_3_3 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +134 std::vector& out) const │ │ │ │ │ +135 { │ │ │ │ │ +136 out.resize(24); │ │ │ │ │ +137 │ │ │ │ │ +138 out[0][0][0] = sign0*(9.0 - 36.0*in[0] + 30.0*in[0]*in[0]); │ │ │ │ │ +139 out[0][0][1] = 0.0; │ │ │ │ │ +140 out[0][1][0] = 0.0; │ │ │ │ │ +141 out[0][1][1] = 0.0; │ │ │ │ │ +142 │ │ │ │ │ +143 out[1][0][0] = -27.0 + 54.0*in[1] + 108.0*in[0] - 216.0*in[0]*in[1] - │ │ │ │ │ +90.0*in[0]*in[0] + 180.0*in[0]*in[0]*in[1]; │ │ │ │ │ +144 out[1][0][1] = -6.0 + 54.0*in[0] - 108.0*in[0]*in[0] + 60.0*in[0]*in[0]*in │ │ │ │ │ +[0]; │ │ │ │ │ +145 out[1][1][0] = 0.0; │ │ │ │ │ +146 out[1][1][1] = 0.0; │ │ │ │ │ +147 │ │ │ │ │ +148 out[2][0][0] = sign0*(45.0 - 270.0*in[1] - 180.0*in[0] + 1080.0*in[0]*in[1] │ │ │ │ │ ++ 270.0*in[1]*in[1] + 150.0*in[0]*in[0] - 1080.0*in[0]*in[1]*in[1] - 900.0*in │ │ │ │ │ +[0]*in[0]*in[1] + 900.0*in[0]*in[0]*in[1]*in[1]); │ │ │ │ │ +149 out[2][0][1] = sign0*(30.0 - 270.0*in[0] - 60.0*in[1] + 540.0*in[0]*in[0] + │ │ │ │ │ +540.0*in[0]*in[1] - 1080.0*in[0]*in[0]*in[1] - 300.0*in[0]*in[0]*in[0] + │ │ │ │ │ +600.0*in[0]*in[0]*in[0]*in[1]); │ │ │ │ │ +150 out[2][1][0] = 0.0; │ │ │ │ │ +151 out[2][1][1] = 0.0; │ │ │ │ │ 152 │ │ │ │ │ -153 │ │ │ │ │ -154 // EquidistantPointSet │ │ │ │ │ -155 // ------------------- │ │ │ │ │ -156 │ │ │ │ │ -157 template< class F, unsigned int dim > │ │ │ │ │ -_1_5_8 class _E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ -159 : public _E_m_p_t_y_P_o_i_n_t_S_e_t< F, dim > │ │ │ │ │ -160 { │ │ │ │ │ -161 typedef _E_m_p_t_y_P_o_i_n_t_S_e_t_<_ _F_,_ _d_i_m_ _> _B_a_s_e; │ │ │ │ │ +153 out[3][0][0] = sign1*(3.0 - 24.0*in[0] + 30.0*in[0]*in[0]); │ │ │ │ │ +154 out[3][0][1] = 0.0; │ │ │ │ │ +155 out[3][1][0] = 0.0; │ │ │ │ │ +156 out[3][1][1] = 0.0; │ │ │ │ │ +157 │ │ │ │ │ +158 out[4][0][0] = 9.0 - 18.0*in[1] - 72.0*in[0] + 144.0*in[0]*in[1] + 90.0*in │ │ │ │ │ +[0]*in[0] - 180.0*in[0]*in[0]*in[1]; │ │ │ │ │ +159 out[4][0][1] = -18.0*in[0] + 72.0*in[0]*in[0] - 60.0*in[0]*in[0]*in[0]; │ │ │ │ │ +160 out[4][1][0] = 0.0; │ │ │ │ │ +161 out[4][1][1] = 0.0; │ │ │ │ │ 162 │ │ │ │ │ -163 public: │ │ │ │ │ -_1_6_4 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -165 │ │ │ │ │ -166 using _B_a_s_e_:_:_o_r_d_e_r; │ │ │ │ │ +163 out[5][0][0] = sign1*(15.0 - 90.0*in[1] - 120.0*in[0] + 720.0*in[0]*in[1] + │ │ │ │ │ +90.0*in[1]*in[1] + 150.0*in[0]*in[0] - 720.0*in[0]*in[1]*in[1] - 900.0*in[0]*in │ │ │ │ │ +[0]*in[1] + 900.0*in[0]*in[0]*in[1]*in[1]); │ │ │ │ │ +164 out[5][0][1] = sign1*(-90.0*in[0] + 360.0*in[0]*in[0] + 180.0*in[0]*in[1] - │ │ │ │ │ +720.0*in[0]*in[0]*in[1] - 300.0*in[0]*in[0]*in[0] + 600.0*in[0]*in[0]*in[0]*in │ │ │ │ │ +[1]); │ │ │ │ │ +165 out[5][1][0] = 0.0; │ │ │ │ │ +166 out[5][1][1] = 0.0; │ │ │ │ │ 167 │ │ │ │ │ -_1_6_8 _E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t ( std::size_t _o_r_d_e_r ) : _B_a_s_e( _o_r_d_e_r ) {} │ │ │ │ │ -169 │ │ │ │ │ -_1_7_0 void _b_u_i_l_d ( GeometryType gt ) │ │ │ │ │ -171 { │ │ │ │ │ -172 assert( gt.dim() == _d_i_m_e_n_s_i_o_n ); │ │ │ │ │ -173 points_.resize( _n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s( gt, _o_r_d_e_r() ) ); │ │ │ │ │ -174 │ │ │ │ │ -175 typename _B_a_s_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t *p = points_.data(); │ │ │ │ │ -176 std::vector< unsigned int > count; │ │ │ │ │ -177 for( unsigned int mydim = 0; mydim <= _d_i_m_e_n_s_i_o_n; ++mydim ) │ │ │ │ │ -178 { │ │ │ │ │ -179 count.resize( Geo::Impl::size( gt.id(), _d_i_m_e_n_s_i_o_n, _d_i_m_e_n_s_i_o_n-mydim ) ); │ │ │ │ │ -180 std::fill( count.begin(), count.end(), 0u ); │ │ │ │ │ -181 p += _e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s( gt, _d_i_m_e_n_s_i_o_n-mydim, _o_r_d_e_r(), count.data(), │ │ │ │ │ -p ); │ │ │ │ │ -182 } │ │ │ │ │ -183 const auto &refElement = referenceElement(gt); │ │ │ │ │ -184 F weight = refElement.volume()/F(double(points_.size())); │ │ │ │ │ -185 for (auto &p : points_) │ │ │ │ │ -186 p._w_e_i_g_h_t__ = weight; │ │ │ │ │ -187 } │ │ │ │ │ +168 │ │ │ │ │ +169 out[6][0][0] = 0.0; │ │ │ │ │ +170 out[6][0][1] = 0.0; │ │ │ │ │ +171 out[6][1][0] = 0.0; │ │ │ │ │ +172 out[6][1][1] = sign2*(9.0 - 36.0*in[1] + 30.0*in[1]*in[1]); │ │ │ │ │ +173 │ │ │ │ │ +174 out[7][0][0] = 0.0; │ │ │ │ │ +175 out[7][0][1] = 0.0; │ │ │ │ │ +176 out[7][1][0] = 6.0 - 54.0*in[1] + 108.0*in[1]*in[1] - 60.0*in[1]*in[1]*in │ │ │ │ │ +[1]; │ │ │ │ │ +177 out[7][1][1] = 27.0 - 54.0*in[0] - 108.0*in[1] + 216.0*in[0]*in[1] + │ │ │ │ │ +90.0*in[1]*in[1] - 180.0*in[0]*in[1]*in[1]; │ │ │ │ │ +178 │ │ │ │ │ +179 out[8][0][0] = 0.0; │ │ │ │ │ +180 out[8][0][1] = 0.0; │ │ │ │ │ +181 out[8][1][0] = sign2*(30.0 - 270.0*in[1] - 60.0*in[0] + 540.0*in[0]*in[1] + │ │ │ │ │ +540.0*in[1]*in[1] - 1080.0*in[0]*in[1]*in[1] - 300.0*in[1]*in[1]*in[1] + │ │ │ │ │ +600.0*in[1]*in[1]*in[1]*in[0]); │ │ │ │ │ +182 out[8][1][1] = sign2*(45.0 - 270.0*in[0] - 180.0*in[1] + 270.0*in[0]*in[0] │ │ │ │ │ ++ 1080.0*in[0]*in[1] + 150.0*in[1]*in[1] - 1080.0*in[0]*in[0]*in[1] - 900.0*in │ │ │ │ │ +[0]*in[1]*in[1] + 900.0*in[1]*in[1]*in[0]*in[0]); │ │ │ │ │ +183 │ │ │ │ │ +184 out[9][0][0] = 0.0; │ │ │ │ │ +185 out[9][0][1] = 0.0; │ │ │ │ │ +186 out[9][1][0] = 0.0; │ │ │ │ │ +187 out[9][1][1] = sign3*(3.0 - 24.0*in[1] + 30.0*in[1]*in[1]); │ │ │ │ │ 188 │ │ │ │ │ -189 template< GeometryType::Id geometryId > │ │ │ │ │ -_1_9_0 bool _b_u_i_l_d () │ │ │ │ │ -191 { │ │ │ │ │ -192 _b_u_i_l_d( GeometryType( geometryId ) ); │ │ │ │ │ -193 return true; │ │ │ │ │ -194 } │ │ │ │ │ -195 │ │ │ │ │ -_1_9_6 bool _b_u_i_l_d_C_u_b_e () │ │ │ │ │ -197 { │ │ │ │ │ -198 return build< GeometryTypes::cube(dim) > (); │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -_2_0_1 static bool _s_u_p_p_o_r_t_s ( GeometryType, std::size_t /*order*/ ) { return true; │ │ │ │ │ -} │ │ │ │ │ -202 template< GeometryType::Id geometryId> │ │ │ │ │ -_2_0_3 static bool _s_u_p_p_o_r_t_s ( std::size_t _o_r_d_e_r ) { │ │ │ │ │ -204 return _s_u_p_p_o_r_t_s( GeometryType( geometryId ), _o_r_d_e_r ); │ │ │ │ │ -205 } │ │ │ │ │ -206 │ │ │ │ │ -207 private: │ │ │ │ │ -208 using _B_a_s_e_:_:_p_o_i_n_t_s__; │ │ │ │ │ -209 }; │ │ │ │ │ -210 │ │ │ │ │ -211} // namespace Dune │ │ │ │ │ -212 │ │ │ │ │ -213#endif // #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_EQUIDISTANTPOINTS_HH │ │ │ │ │ -_f_i_e_l_d_._h_h │ │ │ │ │ -_e_m_p_t_y_p_o_i_n_t_s_._h_h │ │ │ │ │ +189 out[10][0][0] = 0.0; │ │ │ │ │ +190 out[10][0][1] = 0.0; │ │ │ │ │ +191 out[10][1][0] = 18.0*in[1] - 72.0*in[1]*in[1] + 60.0*in[1]*in[1]*in[1]; │ │ │ │ │ +192 out[10][1][1] = -9.0 + 18.0*in[0] + 72.0*in[1] - 144.0*in[0]*in[1] - │ │ │ │ │ +90.0*in[1]*in[1] + 180.0*in[0]*in[1]*in[1]; │ │ │ │ │ +193 │ │ │ │ │ +194 out[11][0][0] = 0.0; │ │ │ │ │ +195 out[11][0][1] = 0.0; │ │ │ │ │ +196 out[11][1][0] = sign3*(-90.0*in[1] + 180.0*in[0]*in[1] + 360.0*in[1]*in[1] │ │ │ │ │ +- 720.0*in[0]*in[1]*in[1] - 300.0*in[1]*in[1]*in[1] + 600.0*in[1]*in[1]*in │ │ │ │ │ +[1]*in[0]); │ │ │ │ │ +197 out[11][1][1] = sign3*(15.0 - 90.0*in[0] - 120.0*in[1] + 90.0*in[0]*in[0] + │ │ │ │ │ +720.0*in[0]*in[1] + 150.0*in[1]*in[1] - 720.0*in[0]*in[0]*in[1] - 900.0*in │ │ │ │ │ +[0]*in[1]*in[1] + 900.0*in[1]*in[1]*in[0]*in[0]); │ │ │ │ │ +198 │ │ │ │ │ +199 out[12][0][0] = 324 -1296.0*in[1] - 1728.0*in[0] + 6912.0*in[0]*in[1] + │ │ │ │ │ +1080.0*in[1]*in[1] + 1620.0*in[0]*in[0] - 5760.0*in[0]*in[1]*in[1] - 6480.0*in │ │ │ │ │ +[0]*in[0]*in[1] + 5400.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +200 out[12][0][1] = -1296.0*in[0] + 3456.0*in[0]*in[0] + 2160.0*in[0]*in[1] - │ │ │ │ │ +5760.0*in[0]*in[0]*in[1] - 2160.0*in[0]*in[0]*in[0] + 3600.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +201 out[12][1][0] = 0.0; │ │ │ │ │ +202 out[12][1][1] = 0.0; │ │ │ │ │ +203 │ │ │ │ │ +204 out[13][0][0] = 0.0; │ │ │ │ │ +205 out[13][0][1] = 0.0; │ │ │ │ │ +206 out[13][1][0] = -1296.0*in[1] + 2160.0*in[0]*in[1] + 3456.0*in[1]*in[1] - │ │ │ │ │ +5760.0*in[0]*in[1]*in[1] - 2160.0*in[1]*in[1]*in[1] + 3600.0*in[1]*in[1]*in │ │ │ │ │ +[1]*in[0]; │ │ │ │ │ +207 out[13][1][1] = 324.0 - 1296.0*in[0] - 1728.0*in[1] + 1080.0*in[0]*in[0] + │ │ │ │ │ +6912.0*in[0]*in[1] + 1620.0*in[1]*in[1] - 5760.0*in[0]*in[0]*in[1] - 6480.0*in │ │ │ │ │ +[0]*in[1]*in[1] + 5400.0*in[1]*in[1]*in[0]*in[0]; │ │ │ │ │ +208 │ │ │ │ │ +209 out[14][0][0] = -540.0 + 2160.0*in[1] + 3240.0*in[0] - 12960.0*in[0]*in[1] │ │ │ │ │ +- 1800.0*in[1]*in[1] - 3240.0*in[0]*in[0] + 10800.0*in[0]*in[1]*in[1] + │ │ │ │ │ +12960.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +210 out[14][0][1] = 2160.0*in[0] - 6480.0*in[0]*in[0] - 3600.0*in[0]*in[1] + │ │ │ │ │ +10800.0*in[0]*in[0]*in[1] + 4320.0*in[0]*in[0]*in[0] - 7200.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +211 out[14][1][0] = 0.0; │ │ │ │ │ +212 out[14][1][1] = 0.0; │ │ │ │ │ +213 │ │ │ │ │ +214 out[15][0][0] = 0.0; │ │ │ │ │ +215 out[15][0][1] = 0.0; │ │ │ │ │ +216 out[15][1][0] = 6912.0*in[1] - 12960.0*in[0]*in[1] - 18432.0*in[1]*in[1] + │ │ │ │ │ +34560.0*in[0]*in[1]*in[1] + 11520.0*in[1]*in[1]*in[1] - 21600.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +217 out[15][1][1] = -1296.0 + 6912.0*in[0] + 6912.0*in[1] - 6480.0*in[0]*in[0] │ │ │ │ │ +- 36864.0*in[0]*in[1] - 6480.0*in[1]*in[1] + 34560.0*in[0]*in[0]*in[1] + │ │ │ │ │ +34560.0*in[0]*in[1]*in[1] - 32400.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +218 │ │ │ │ │ +219 out[16][0][0] = -1296.0 + 6912.0*in[1] + 6912.0*in[0] - 6480.0*in[1]*in[1] │ │ │ │ │ +- 36864.0*in[0]*in[1] - 6480.0*in[0]*in[0] + 34560.0*in[0]*in[1]*in[1] + │ │ │ │ │ +34560.0*in[1]*in[0]*in[0] - 32400.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +220 out[16][0][1] = 6912.0*in[0] - 12960.0*in[0]*in[1] - 18432.0*in[0]*in[0] + │ │ │ │ │ +34560.0*in[0]*in[0]*in[1] + 11520.0*in[0]*in[0]*in[0] - 21600.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +221 out[16][1][0] = 0.0; │ │ │ │ │ +222 out[16][1][1] = 0.0; │ │ │ │ │ +223 │ │ │ │ │ +224 out[17][0][0] = 0.0; │ │ │ │ │ +225 out[17][0][1] = 0.0; │ │ │ │ │ +226 out[17][1][0] = 2160.0*in[1] - 3600.0*in[0]*in[1] - 6480.0*in[1]*in[1] + │ │ │ │ │ +10800.0*in[0]*in[1]*in[1] + 4320.0*in[1]*in[1]*in[1] - 7200.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +227 out[17][1][1] = -540.0 + 2160.0*in[0] + 3240.0*in[1] - 1800.0*in[0]*in[0] - │ │ │ │ │ +12960.0*in[0]*in[1] - 3240.0*in[1]*in[1] + 10800.0*in[0]*in[0]*in[1] + │ │ │ │ │ +12960.0*in[0]*in[1]*in[1] - 10800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +228 │ │ │ │ │ +229 out[18][0][0] = 2160.0 - 11520.0*in[1] - 12960.0*in[0] + 69120.0*in[0]*in │ │ │ │ │ +[1] + 10800.0*in[1]*in[1] + 12960.0*in[0]*in[0] - 64800.0*in[0]*in[1]*in[1] - │ │ │ │ │ +69120.0*in[0]*in[0]*in[1] + 64800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +230 out[18][0][1] = -11520.0*in[0] + 34560.0*in[0]*in[0] + 21600.0*in[0]*in[1] │ │ │ │ │ +- 64800.0*in[0]*in[0]*in[1] - 23040.0*in[0]*in[0]*in[0] + 43200.0*in[0]*in │ │ │ │ │ +[0]*in[0]*in[1]; │ │ │ │ │ +231 out[18][1][0] = 0.0; │ │ │ │ │ +232 out[18][1][1] = 0.0; │ │ │ │ │ +233 │ │ │ │ │ +234 out[19][0][0] = 0.0; │ │ │ │ │ +235 out[19][0][1] = 0.0; │ │ │ │ │ +236 out[19][1][0] = -11520.0*in[1] + 21600.0*in[0]*in[1] + 34560.0*in[1]*in[1] │ │ │ │ │ +- 64800.0*in[0]*in[1]*in[1] - 23040.0*in[1]*in[1]*in[1] + 43200.0*in[0]*in │ │ │ │ │ +[1]*in[1]*in[1]; │ │ │ │ │ +237 out[19][1][1] = 2160.0 - 11520.0*in[0] - 12960.0*in[1] + 10800.0*in[0]*in │ │ │ │ │ +[0] + 69120.0*in[0]*in[1] + 12960.0*in[1]*in[1] - 64800.0*in[0]*in[0]*in[1] - │ │ │ │ │ +69120.0*in[0]*in[1]*in[1] + 64800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +238 │ │ │ │ │ +239 out[20][0][0] = 1080.0 - 6480.0*in[1] - 5760.0*in[0] + 34560.0*in[0]*in[1] │ │ │ │ │ ++ 6480.0*in[1]*in[1] + 5400.0*in[0]*in[0] - 34560.0*in[0]*in[1]*in[1] - │ │ │ │ │ +32400.0*in[0]*in[0]*in[1] + 32400.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +240 out[20][0][1] = -6480.0*in[0] + 17280.0*in[0]*in[0] + 12960.0*in[0]*in[1] - │ │ │ │ │ +34560.0*in[0]*in[0]*in[1] - 10800.0*in[0]*in[0]*in[0] + 21600.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +241 out[20][1][0] = 0.0; │ │ │ │ │ +242 out[20][1][1] = 0.0; │ │ │ │ │ +243 │ │ │ │ │ +244 out[21][0][0] = 0.0; │ │ │ │ │ +245 out[21][0][1] = 0.0; │ │ │ │ │ +246 out[21][1][0] = -6480.0*in[1] + 12960.0*in[0]*in[1] + 17280.0*in[1]*in[1] - │ │ │ │ │ +34560.0*in[0]*in[1]*in[1] - 10800.0*in[1]*in[1]*in[1] + 21600.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +247 out[21][1][1] = 1080.0 - 6480.0*in[0] - 5760.0*in[1] + 6480.0*in[0]*in[0] + │ │ │ │ │ +34560.0*in[0]*in[1] + 5400.0*in[1]*in[1] - 34560.0*in[0]*in[0]*in[1] - │ │ │ │ │ +32400.0*in[0]*in[1]*in[1] + 32400.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +248 │ │ │ │ │ +249 out[22][0][0] = -1800.0 + 10800.0*in[1] + 10800.0*in[0] - 64800.0*in[0]*in │ │ │ │ │ +[1] - 10800.0*in[1]*in[1] - 10800.0*in[0]*in[0] + 64800.0*in[0]*in[1]*in[1] + │ │ │ │ │ +64800.0*in[0]*in[0]*in[1] - 64800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +250 out[22][0][1] = 10800.0*in[0] - 32400.0*in[0]*in[0] - 21600.0*in[0]*in[1] + │ │ │ │ │ +64800.0*in[0]*in[0]*in[1] + 21600.0*in[0]*in[0]*in[0] - 43200.0*in[0]*in[0]*in │ │ │ │ │ +[0]*in[1]; │ │ │ │ │ +251 out[22][1][0] = 0.0; │ │ │ │ │ +252 out[22][1][1] = 0.0; │ │ │ │ │ +253 │ │ │ │ │ +254 out[23][0][0] = 0.0; │ │ │ │ │ +255 out[23][0][1] = 0.0; │ │ │ │ │ +256 out[23][1][0] = 10800.0*in[1] - 21600.0*in[0]*in[1] - 32400.0*in[1]*in[1] + │ │ │ │ │ +64800.0*in[0]*in[1]*in[1] + 21600.0*in[1]*in[1]*in[1] - 43200.0*in[0]*in[1]*in │ │ │ │ │ +[1]*in[1]; │ │ │ │ │ +257 out[23][1][1] = -1800.0 + 10800.0*in[0] + 10800.0*in[1] - 10800.0*in[0]*in │ │ │ │ │ +[0] - 64800.0*in[0]*in[1] - 10800.0*in[1]*in[1] + 64800.0*in[0]*in[0]*in[1] + │ │ │ │ │ +64800.0*in[0]*in[1]*in[1] - 64800.0*in[0]*in[0]*in[1]*in[1]; │ │ │ │ │ +258 } │ │ │ │ │ +259 │ │ │ │ │ +_2_6_1 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +262 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +263 std::vector& out) const // return value │ │ │ │ │ +264 { │ │ │ │ │ +265 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +266 if (totalOrder == 0) { │ │ │ │ │ +267 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +268 } else { │ │ │ │ │ +269 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +270 } │ │ │ │ │ +271 } │ │ │ │ │ +272 │ │ │ │ │ +_2_7_4 unsigned int _o_r_d_e_r () const │ │ │ │ │ +275 { │ │ │ │ │ +276 return 5; │ │ │ │ │ +277 } │ │ │ │ │ +278 │ │ │ │ │ +279 private: │ │ │ │ │ +280 R sign0, sign1, sign2, sign3; │ │ │ │ │ +281 }; │ │ │ │ │ +282} │ │ │ │ │ +283#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS2_CUBE2D_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_n_u_m_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ -std::size_t numLagrangePoints(const GeometryType >, std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_e_q_u_i_d_i_s_t_a_n_t_L_a_g_r_a_n_g_e_P_o_i_n_t_s │ │ │ │ │ -static unsigned int equidistantLagrangePoints(const GeometryType >, unsigned │ │ │ │ │ -int codim, std::size_t order, unsigned int *count, LagrangePoint< ct, cdim > │ │ │ │ │ -*points) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_i_n_d_e_x │ │ │ │ │ -unsigned int index() const │ │ │ │ │ -Return offset within subentity. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_s_u_b_E_n_t_i_t_y │ │ │ │ │ -unsigned int subEntity() const │ │ │ │ │ -Return number of associated subentity. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_w_e_i_g_h_t__ │ │ │ │ │ -Field weight_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_p_o_i_n_t__ │ │ │ │ │ -Vector point_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_o_i_n_t_:_:_l_o_c_a_l_K_e_y__ │ │ │ │ │ -LocalKey localKey_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_E_m_p_t_y_P_o_i_n_t_S_e_t_:_:_p_o_i_n_t_s__ │ │ │ │ │ -std::vector< LagrangePoint > points_ │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:160 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn emptypoints.hh:95 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d │ │ │ │ │ -bool build() │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:190 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:164 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(GeometryType, std::size_t) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:201 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d │ │ │ │ │ -void build(GeometryType gt) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:170 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_b_u_i_l_d_C_u_b_e │ │ │ │ │ -bool buildCube() │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t_:_:_E_q_u_i_d_i_s_t_a_n_t_P_o_i_n_t_S_e_t │ │ │ │ │ -EquidistantPointSet(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn equidistantpoints.hh:168 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:261 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT2Cube2DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:133 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:274 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_2_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas2cube2dlocalbasis.hh:72 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,41 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pk.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas03dlocalcoefficients.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <iostream>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT03DLocalCoefficients
 Layout map for RT0 elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , int d, int k>
using Dune::PkLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, d, k >
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,21 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pk.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for RT0 elements. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, d, │ │ │ │ │ - k > │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00275_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pk.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,45 +70,78 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pk.hh
│ │ │ │ +
raviartthomas03dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │ -
3/* vim: set ai expandtab sw=4 ts=4: */
│ │ │ │ -
4// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ -
5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
6#ifndef DUNE_PK_LOCALFINITEELEMENT_HH
│ │ │ │ -
7#define DUNE_PK_LOCALFINITEELEMENT_HH
│ │ │ │ -
8
│ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#warning This header is deprecated
│ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
18 template<class D, class R, int d, int k>
│ │ │ │ - │ │ │ │ -
20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
22}
│ │ │ │ -
23
│ │ │ │ -
24#endif
│ │ │ │ - │ │ │ │ +
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │ +
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <iostream>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i=0; i<4; i++)
│ │ │ │ +
30 li[i] = LocalKey(i,1,0);
│ │ │ │ +
31 }
│ │ │ │ +
│ │ │ │ +
32
│ │ │ │ +
│ │ │ │ +
34 std::size_t size () const
│ │ │ │ +
35 {
│ │ │ │ +
36 return 4;
│ │ │ │ +
37 }
│ │ │ │ +
│ │ │ │ +
38
│ │ │ │ +
│ │ │ │ +
40 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
41 {
│ │ │ │ +
42 return li[i];
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
45 private:
│ │ │ │ +
46 std::vector<LocalKey> li;
│ │ │ │ +
47 };
│ │ │ │ +
│ │ │ │ +
48
│ │ │ │ +
49}
│ │ │ │ +
50
│ │ │ │ +
51#endif
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for RT0 elements.
Definition raviartthomas03dlocalcoefficients.hh:24
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas03dlocalcoefficients.hh:40
│ │ │ │ +
RT03DLocalCoefficients()
Standard constructor.
Definition raviartthomas03dlocalcoefficients.hh:27
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas03dlocalcoefficients.hh:34
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,40 +1,78 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pk.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +raviartthomas03dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ -3/* vim: set ai expandtab sw=4 ts=4: */ │ │ │ │ │ -4// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ +3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ -5// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -6#ifndef DUNE_PK_LOCALFINITEELEMENT_HH │ │ │ │ │ -7#define DUNE_PK_LOCALFINITEELEMENT_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include<_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11#warning This header is deprecated │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -18 template │ │ │ │ │ -_1_9 using _P_k_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -20 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -21 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_ _R_,_ _d_,_ _k_>; │ │ │ │ │ -22} │ │ │ │ │ -23 │ │ │ │ │ -24#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ +5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 │ │ │ │ │ +_2_3 class _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(4) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i=0; i<4; i++) │ │ │ │ │ +30 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +31 } │ │ │ │ │ +32 │ │ │ │ │ +_3_4 std::size_t _s_i_z_e () const │ │ │ │ │ +35 { │ │ │ │ │ +36 return 4; │ │ │ │ │ +37 } │ │ │ │ │ +38 │ │ │ │ │ +_4_0 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +41 { │ │ │ │ │ +42 return li[i]; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +45 private: │ │ │ │ │ +46 std::vector li; │ │ │ │ │ +47 }; │ │ │ │ │ +48 │ │ │ │ │ +49} │ │ │ │ │ +50 │ │ │ │ │ +51#endif │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT03DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:34 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p23d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,41 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
p23d.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas03dlocalinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <cmath>
│ │ │ │ +#include <array>
│ │ │ │ +#include <bitset>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT03DLocalInterpolation< LB >
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R >
using Dune::P23DLocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, 3, 2 >
 Second-order Lagrange local finite element on the reference tetrahedron.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -p23d.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_2_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 3, 2 > │ │ │ │ │ -  Second-order Lagrange local finite element on the reference tetrahedron. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00278_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p23d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,100 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p23d.hh
│ │ │ │ +
raviartthomas03dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_P2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ -
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ -
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
22 template<class D, class R>
│ │ │ │ - │ │ │ │ -
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27}
│ │ │ │ -
28
│ │ │ │ -
29#endif
│ │ │ │ - │ │ │ │ +
8#include <cmath>
│ │ │ │ +
9#include <array>
│ │ │ │ +
10#include <bitset>
│ │ │ │ +
11#include <vector>
│ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
16 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
18 {
│ │ │ │ +
19 public:
│ │ │ │ +
20
│ │ │ │ +
│ │ │ │ +
22 RT03DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ +
23 {
│ │ │ │ +
24 using std::sqrt;
│ │ │ │ +
25 for (std::size_t i=0; i<sign_.size(); i++)
│ │ │ │ +
26 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
27
│ │ │ │ +
28 m_[0] = {1/3.0, 1/3.0, 0.0};
│ │ │ │ +
29 m_[1] = {1/3.0, 0.0, 1/3.0};
│ │ │ │ +
30 m_[2] = { 0.0, 1/3.0, 1/3.0};
│ │ │ │ +
31 m_[3] = {1/3.0, 1/3.0, 1/3.0};
│ │ │ │ +
32 n_[0] = { 0.0, 0.0, -1.0};
│ │ │ │ +
33 n_[1] = { 0.0, -1.0, 0.0};
│ │ │ │ +
34 n_[2] = { -1.0, 0.0, 0.0};
│ │ │ │ +
35 n_[3] = {1.0/sqrt(3.0), 1.0/sqrt(3.0), 1.0/sqrt(3.0)};
│ │ │ │ +
36 c_[0] = sqrt(2.0);
│ │ │ │ +
37 c_[1] = sqrt(2.0);
│ │ │ │ +
38 c_[2] = sqrt(2.0);
│ │ │ │ +
39 c_[3] = sqrt(2.0)/sqrt(3.0);
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
42 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
43 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
44 {
│ │ │ │ +
45 // f gives v*outer normal at a point on the face!
│ │ │ │ +
46 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
47
│ │ │ │ +
48 out.resize(4);
│ │ │ │ +
49
│ │ │ │ +
50 for (int i=0; i<4; i++)
│ │ │ │ +
51 {
│ │ │ │ +
52 auto y = f(m_[i]);
│ │ │ │ +
53 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1]+y[2]*n_[i][2])*sign_[i]/c_[i];
│ │ │ │ +
54 }
│ │ │ │ +
55 }
│ │ │ │ +
│ │ │ │ +
56
│ │ │ │ +
57 private:
│ │ │ │ +
58 // Face orientations
│ │ │ │ +
59 std::array<typename LB::Traits::RangeFieldType,4> sign_;
│ │ │ │ +
60 // Face midpoints of the reference tetrahedron
│ │ │ │ +
61 std::array<typename LB::Traits::DomainType,4> m_;
│ │ │ │ +
62 // Unit outer normals of the reference tetrahedron
│ │ │ │ +
63 std::array<typename LB::Traits::DomainType,4> n_;
│ │ │ │ +
64 // Inverse triangle face area
│ │ │ │ +
65 std::array<typename LB::Traits::RangeFieldType,4> c_;
│ │ │ │ +
66 };
│ │ │ │ +
│ │ │ │ +
67}
│ │ │ │ +
68
│ │ │ │ +
69#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Definition raviartthomas03dlocalinterpolation.hh:18
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas03dlocalinterpolation.hh:43
│ │ │ │ +
RT03DLocalInterpolation(std::bitset< 4 > s=0)
Constructor with given set of face orientations.
Definition raviartthomas03dlocalinterpolation.hh:22
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,96 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -p23d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +raviartthomas03dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_P2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ +6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ -11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 using _P_2_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -25 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_3_,_2_>; │ │ │ │ │ -26 │ │ │ │ │ -27} │ │ │ │ │ -28 │ │ │ │ │ -29#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +16 template │ │ │ │ │ +_1_7 class _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +18 { │ │ │ │ │ +19 public: │ │ │ │ │ +20 │ │ │ │ │ +_2_2 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ +23 { │ │ │ │ │ +24 using std::sqrt; │ │ │ │ │ +25 for (std::size_t i=0; i │ │ │ │ │ +_4_3 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +44 { │ │ │ │ │ +45 // f gives v*outer normal at a point on the face! │ │ │ │ │ +46 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +47 │ │ │ │ │ +48 out.resize(4); │ │ │ │ │ +49 │ │ │ │ │ +50 for (int i=0; i<4; i++) │ │ │ │ │ +51 { │ │ │ │ │ +52 auto y = f(m_[i]); │ │ │ │ │ +53 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1]+y[2]*n_[i][2])*sign_[i]/c_[i]; │ │ │ │ │ +54 } │ │ │ │ │ +55 } │ │ │ │ │ +56 │ │ │ │ │ +57 private: │ │ │ │ │ +58 // Face orientations │ │ │ │ │ +59 std::array sign_; │ │ │ │ │ +60 // Face midpoints of the reference tetrahedron │ │ │ │ │ +61 std::array m_; │ │ │ │ │ +62 // Unit outer normals of the reference tetrahedron │ │ │ │ │ +63 std::array n_; │ │ │ │ │ +64 // Inverse triangle face area │ │ │ │ │ +65 std::array c_; │ │ │ │ │ +66 }; │ │ │ │ │ +67} │ │ │ │ │ +68 │ │ │ │ │ +69#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT03DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with given set of face orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:22 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p1.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,40 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
p1.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas03dlocalbasis.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT03DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference tetrahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R , int dim>
using Dune::P1LocalFiniteElement = LagrangeSimplexLocalFiniteElement< D, R, dim, 1 >
 The local p1 finite element on simplices.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -p1.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + tetrahedron. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - dim, 1 > │ │ │ │ │ -  The local p1 finite element on simplices. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00281_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p1.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas03dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,143 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p1.hh
│ │ │ │ +
raviartthomas03dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_P1LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ +
10#include <dune/common/fmatrix.hh>
│ │ │ │
11
│ │ │ │ -
12namespace Dune
│ │ │ │ -
13{
│ │ │ │ -
14
│ │ │ │ -
22 template<class D, class R, int dim>
│ │ │ │ - │ │ │ │ -
24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
26
│ │ │ │ -
27}
│ │ │ │ -
28
│ │ │ │ -
29#endif
│ │ │ │ - │ │ │ │ + │ │ │ │ +
13
│ │ │ │ +
14namespace Dune
│ │ │ │ +
15{
│ │ │ │ +
24 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27 public:
│ │ │ │ +
28 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
29 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
30
│ │ │ │ +
│ │ │ │ +
32 RT03DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ +
33 {
│ │ │ │ +
34 for (int i=0; i<4; i++)
│ │ │ │ +
35 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
36 }
│ │ │ │ +
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 unsigned int size () const
│ │ │ │ +
40 {
│ │ │ │ +
41 return 4;
│ │ │ │ +
42 }
│ │ │ │ +
│ │ │ │ +
43
│ │ │ │ +
│ │ │ │ +
45 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
46 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
47 {
│ │ │ │ +
48 out.resize(4);
│ │ │ │ +
49 auto c = std::sqrt(2.0);
│ │ │ │ +
50 out[0] = {sign_[0]*c* in[0], sign_[0]*c* in[1], sign_[0]*c*(in[2]-D(1))};
│ │ │ │ +
51 out[1] = {sign_[1]*c* in[0], sign_[1]*c*(in[1]-D(1)), sign_[1]*c* in[2] };
│ │ │ │ +
52 out[2] = {sign_[2]*c*(in[0]-D(1)), sign_[2]*c* in[1], sign_[2]*c* in[2] };
│ │ │ │ +
53 out[3] = {sign_[3]*c* in[0], sign_[3]*c* in[1], sign_[3]*c* in[2] };
│ │ │ │ +
54 }
│ │ │ │ +
│ │ │ │ +
55
│ │ │ │ +
57 inline void
│ │ │ │ +
│ │ │ │ +
58 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
59 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
60 {
│ │ │ │ +
61 out.resize(4);
│ │ │ │ +
62 for (int i=0; i<4; i++)
│ │ │ │ +
63 {
│ │ │ │ +
64 auto c = std::sqrt(2.0);
│ │ │ │ +
65 out[i][0] = {c*sign_[i], 0, 0};
│ │ │ │ +
66 out[i][1] = { 0,c*sign_[i], 0};
│ │ │ │ +
67 out[i][2] = { 0, 0,c*sign_[i]};
│ │ │ │ +
68 }
│ │ │ │ +
69 }
│ │ │ │ +
│ │ │ │ +
70
│ │ │ │ +
│ │ │ │ +
72 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
73 const typename Traits::DomainType& in, // position
│ │ │ │ +
74 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
75 {
│ │ │ │ +
76 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
77 if (totalOrder == 0) {
│ │ │ │ +
78 evaluateFunction(in, out);
│ │ │ │ +
79 } else if (totalOrder == 1) {
│ │ │ │ +
80 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
81 out.resize(size());
│ │ │ │ +
82
│ │ │ │ +
83 for (int i=0; i<size(); i++)
│ │ │ │ +
84 {
│ │ │ │ +
85 out[i][direction] = sign_[i]* std::sqrt(2.0) ;
│ │ │ │ +
86 out[i][(direction+1)%3] = 0;
│ │ │ │ +
87 out[i][(direction+2)%3] = 0;
│ │ │ │ +
88 }
│ │ │ │ +
89 } else {
│ │ │ │ +
90 out.resize(size());
│ │ │ │ +
91 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
92 for (std::size_t j = 0; j < 3; ++j)
│ │ │ │ +
93 out[i][j] = 0;
│ │ │ │ +
94 }
│ │ │ │ +
95
│ │ │ │ +
96 }
│ │ │ │ +
│ │ │ │ +
97
│ │ │ │ +
│ │ │ │ +
99 unsigned int order () const
│ │ │ │ +
100 {
│ │ │ │ +
101 return 1;
│ │ │ │ +
102 }
│ │ │ │ +
│ │ │ │ +
103
│ │ │ │ +
104 private:
│ │ │ │ +
105
│ │ │ │ +
106 // Signs of the face normals
│ │ │ │ +
107 std::array<R,4> sign_;
│ │ │ │ +
108 };
│ │ │ │ +
│ │ │ │ +
109}
│ │ │ │ +
110#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference tetrahedron.
Definition raviartthomas03dlocalbasis.hh:26
│ │ │ │ +
RT03DLocalBasis(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas03dlocalbasis.hh:32
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas03dlocalbasis.hh:72
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas03dlocalbasis.hh:99
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas03dlocalbasis.hh:39
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas03dlocalbasis.hh:58
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas03dlocalbasis.hh:45
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas03dlocalbasis.hh:29
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,157 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -p1.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ +raviartthomas03dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_P1LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ +6#define │ │ │ │ │ +DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12namespace _D_u_n_e │ │ │ │ │ -13{ │ │ │ │ │ -14 │ │ │ │ │ -22 template │ │ │ │ │ -_2_3 using _P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -24 [[deprecated("use LagrangeSimplexLocalFiniteElement instead")]] │ │ │ │ │ -25 = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_d_i_m_,_1_>; │ │ │ │ │ -26 │ │ │ │ │ -27} │ │ │ │ │ -28 │ │ │ │ │ -29#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ +12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +13 │ │ │ │ │ +14namespace _D_u_n_e │ │ │ │ │ +15{ │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +26 { │ │ │ │ │ +27 public: │ │ │ │ │ +28 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_2_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +30 │ │ │ │ │ +_3_2 _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ +33 { │ │ │ │ │ +34 for (int i=0; i<4; i++) │ │ │ │ │ +35 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ +36 } │ │ │ │ │ +37 │ │ │ │ │ +_3_9 unsigned int _s_i_z_e () const │ │ │ │ │ +40 { │ │ │ │ │ +41 return 4; │ │ │ │ │ +42 } │ │ │ │ │ +43 │ │ │ │ │ +_4_5 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +46 std::vector& out) const │ │ │ │ │ +47 { │ │ │ │ │ +48 out.resize(4); │ │ │ │ │ +49 auto c = std::sqrt(2.0); │ │ │ │ │ +50 out[0] = {sign_[0]*c* in[0], sign_[0]*c* in[1], sign_[0]*c*(in[2]-D(1))}; │ │ │ │ │ +51 out[1] = {sign_[1]*c* in[0], sign_[1]*c*(in[1]-D(1)), sign_[1]*c* in[2] }; │ │ │ │ │ +52 out[2] = {sign_[2]*c*(in[0]-D(1)), sign_[2]*c* in[1], sign_[2]*c* in[2] }; │ │ │ │ │ +53 out[3] = {sign_[3]*c* in[0], sign_[3]*c* in[1], sign_[3]*c* in[2] }; │ │ │ │ │ +54 } │ │ │ │ │ +55 │ │ │ │ │ +57 inline void │ │ │ │ │ +_5_8 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +59 std::vector& out) const // return value │ │ │ │ │ +60 { │ │ │ │ │ +61 out.resize(4); │ │ │ │ │ +62 for (int i=0; i<4; i++) │ │ │ │ │ +63 { │ │ │ │ │ +64 auto c = std::sqrt(2.0); │ │ │ │ │ +65 out[i][0] = {c*sign_[i], 0, 0}; │ │ │ │ │ +66 out[i][1] = { 0,c*sign_[i], 0}; │ │ │ │ │ +67 out[i][2] = { 0, 0,c*sign_[i]}; │ │ │ │ │ +68 } │ │ │ │ │ +69 } │ │ │ │ │ +70 │ │ │ │ │ +_7_2 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +73 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +74 std::vector& out) const // return value │ │ │ │ │ +75 { │ │ │ │ │ +76 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +77 if (totalOrder == 0) { │ │ │ │ │ +78 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +79 } else if (totalOrder == 1) { │ │ │ │ │ +80 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ +_o_r_d_e_r.end(), 1)); │ │ │ │ │ +81 out.resize(_s_i_z_e()); │ │ │ │ │ +82 │ │ │ │ │ +83 for (int i=0; i<_s_i_z_e(); i++) │ │ │ │ │ +84 { │ │ │ │ │ +85 out[i][direction] = sign_[i]* std::sqrt(2.0) ; │ │ │ │ │ +86 out[i][(direction+1)%3] = 0; │ │ │ │ │ +87 out[i][(direction+2)%3] = 0; │ │ │ │ │ +88 } │ │ │ │ │ +89 } else { │ │ │ │ │ +90 out.resize(_s_i_z_e()); │ │ │ │ │ +91 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +92 for (std::size_t j = 0; j < 3; ++j) │ │ │ │ │ +93 out[i][j] = 0; │ │ │ │ │ +94 } │ │ │ │ │ +95 │ │ │ │ │ +96 } │ │ │ │ │ +97 │ │ │ │ │ +_9_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +100 { │ │ │ │ │ +101 return 1; │ │ │ │ │ +102 } │ │ │ │ │ +103 │ │ │ │ │ +104 private: │ │ │ │ │ +105 │ │ │ │ │ +106 // Signs of the face normals │ │ │ │ │ +107 std::array sign_; │ │ │ │ │ +108 }; │ │ │ │ │ +109} │ │ │ │ │ +110#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT03DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:72 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:99 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:58 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:29 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q2.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomaslfecache.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
q2.hh File Reference
│ │ │ │ +Namespaces | │ │ │ │ +Typedefs
│ │ │ │ +
raviartthomaslfecache.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/common/typetraits.hh>
│ │ │ │ +
#include <tuple>
│ │ │ │ +#include <utility>
│ │ │ │ #include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localtoglobaladaptors.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ +#include <dune/geometry/typeindex.hh>
│ │ │ │ +#include <dune/localfunctions/raviartthomas.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementvariantcache.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::Q2FiniteElementFactory< Geometry, RF >
 Factory for global-valued Q23D elements. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ +

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

template<class D , class R , std::size_t dim, std::size_t order>
using Dune::RaviartThomasLocalFiniteElementCache = LocalFiniteElementVariantCache< Impl::ImplementedRaviartThomasLocalFiniteElements< D, R, dim, order > >
 A cache that stores all available Raviart-Thomas local finite elements for the given dimension and order.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,29 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -q2.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ +raviartthomaslfecache.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_<_ _G_e_o_m_e_t_r_y_,_ _R_F_ _> │ │ │ │ │ -  Factory for global-valued Q23D elements. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ +TTyyppeeddeeffss │ │ │ │ │ +template │ │ │ │ │ +using  _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e = │ │ │ │ │ + _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e< Impl:: │ │ │ │ │ + ImplementedRaviartThomasLocalFiniteElements< D, R, dim, order > > │ │ │ │ │ +  A cache that stores all available Raviart-Thomas local finite elements │ │ │ │ │ + for the given dimension and order. │ │ │ │ │ +  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00284_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: q2.hh Source File │ │ │ │ +dune-localfunctions: raviartthomaslfecache.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,77 +70,124 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
q2.hh
│ │ │ │ +
raviartthomaslfecache.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_Q2_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/typetraits.hh>
│ │ │ │ -
9#include <dune/geometry/type.hh>
│ │ │ │ +
8#include <tuple>
│ │ │ │ +
9#include <utility>
│ │ │ │
10
│ │ │ │ - │ │ │ │ - │ │ │ │ +
11#include <dune/geometry/type.hh>
│ │ │ │ +
12#include <dune/geometry/typeindex.hh>
│ │ │ │
13
│ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │
16
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ +
17namespace Dune {
│ │ │ │ +
18
│ │ │ │ +
19namespace Impl {
│ │ │ │
20
│ │ │ │ -
25 template<class Geometry, class RF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ -
28 typename std::conditional<Geometry::mydimension == 1,
│ │ │ │ -
29 LagrangeSimplexLocalFiniteElement<typename Geometry::ctype, RF, 1, 2>,
│ │ │ │ -
30 LagrangeCubeLocalFiniteElement<typename Geometry::ctype, RF, Geometry::mydimension, 2> >::type,
│ │ │ │ -
31 Geometry>
│ │ │ │ -
32 {
│ │ │ │ -
33 typedef typename std::conditional<Geometry::mydimension == 1,
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
37
│ │ │ │ -
38 static const LFE lfe;
│ │ │ │ +
21 // Provide implemented Raviart-Thomas local finite elements
│ │ │ │ +
22
│ │ │ │ +
23 template<class D, class R, std::size_t dim, std::size_t order>
│ │ │ │ +
24 struct ImplementedRaviartThomasLocalFiniteElements
│ │ │ │ +
25 {};
│ │ │ │ +
26
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
28 struct ImplementedRaviartThomasLocalFiniteElements<D,R,2,0> : public FixedDimLocalGeometryTypeIndex<2>
│ │ │ │ +
29 {
│ │ │ │ +
30 using FixedDimLocalGeometryTypeIndex<2>::index;
│ │ │ │ +
31 static auto getImplementations()
│ │ │ │ +
32 {
│ │ │ │ +
33 return std::make_tuple(
│ │ │ │ +
34 std::make_pair(index(GeometryTypes::triangle), []() { return RT02DLocalFiniteElement<D,R>(); }),
│ │ │ │ +
35 std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT0Cube2DLocalFiniteElement<D,R>(); })
│ │ │ │ +
36 );
│ │ │ │ +
37 }
│ │ │ │ +
38 };
│ │ │ │
39
│ │ │ │ -
40 public:
│ │ │ │ - │ │ │ │ -
43 };
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
45 template<class Geometry, class RF>
│ │ │ │ -
46 const typename Q2FiniteElementFactory<Geometry, RF>::LFE
│ │ │ │ -
47 Q2FiniteElementFactory<Geometry, RF>::lfe;
│ │ │ │ -
48}
│ │ │ │ -
49
│ │ │ │ -
50#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
40 template<class D, class R>
│ │ │ │ +
41 struct ImplementedRaviartThomasLocalFiniteElements<D,R,2,1> : public FixedDimLocalGeometryTypeIndex<2>
│ │ │ │ +
42 {
│ │ │ │ +
43 using FixedDimLocalGeometryTypeIndex<2>::index;
│ │ │ │ +
44 static auto getImplementations()
│ │ │ │ +
45 {
│ │ │ │ +
46 return std::make_tuple(
│ │ │ │ +
47 std::make_pair(index(GeometryTypes::triangle), []() { return RT12DLocalFiniteElement<D,R>(); }),
│ │ │ │ +
48 std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT1Cube2DLocalFiniteElement<D,R>(); })
│ │ │ │ +
49 );
│ │ │ │ +
50 }
│ │ │ │ +
51 };
│ │ │ │ +
52
│ │ │ │ +
53 template<class D, class R>
│ │ │ │ +
54 struct ImplementedRaviartThomasLocalFiniteElements<D,R,2,2> : public FixedDimLocalGeometryTypeIndex<2>
│ │ │ │ +
55 {
│ │ │ │ +
56 using FixedDimLocalGeometryTypeIndex<2>::index;
│ │ │ │ +
57 static auto getImplementations()
│ │ │ │ +
58 {
│ │ │ │ +
59 return std::make_tuple(
│ │ │ │ +
60 std::make_pair(index(GeometryTypes::quadrilateral), []() { return RT2Cube2DLocalFiniteElement<D,R>(); })
│ │ │ │ +
61 );
│ │ │ │ +
62 }
│ │ │ │ +
63 };
│ │ │ │ +
64
│ │ │ │ +
65 template<class D, class R>
│ │ │ │ +
66 struct ImplementedRaviartThomasLocalFiniteElements<D,R,3,0> : public FixedDimLocalGeometryTypeIndex<3>
│ │ │ │ +
67 {
│ │ │ │ +
68 using FixedDimLocalGeometryTypeIndex<3>::index;
│ │ │ │ +
69 static auto getImplementations()
│ │ │ │ +
70 {
│ │ │ │ +
71 return std::make_tuple(
│ │ │ │ +
72 std::make_pair(index(GeometryTypes::tetrahedron), []() { return RT03DLocalFiniteElement<D,R>(); }),
│ │ │ │ +
73 std::make_pair(index(GeometryTypes::hexahedron), []() { return RT0Cube3DLocalFiniteElement<D,R>(); })
│ │ │ │ +
74 );
│ │ │ │ +
75 }
│ │ │ │ +
76 };
│ │ │ │ +
77
│ │ │ │ +
78 template<class D, class R>
│ │ │ │ +
79 struct ImplementedRaviartThomasLocalFiniteElements<D,R,3,1> : public FixedDimLocalGeometryTypeIndex<3>
│ │ │ │ +
80 {
│ │ │ │ +
81 using FixedDimLocalGeometryTypeIndex<3>::index;
│ │ │ │ +
82 static auto getImplementations()
│ │ │ │ +
83 {
│ │ │ │ +
84 return std::make_tuple(
│ │ │ │ +
85 std::make_pair(index(GeometryTypes::hexahedron), []() { RT1Cube3DLocalFiniteElement<D,R>(); })
│ │ │ │ +
86 );
│ │ │ │ +
87 }
│ │ │ │ +
88 };
│ │ │ │ +
89
│ │ │ │ +
90} // namespace Impl
│ │ │ │ +
91
│ │ │ │ +
92
│ │ │ │ +
93
│ │ │ │ +
103template<class D, class R, std::size_t dim, std::size_t order>
│ │ │ │ + │ │ │ │ +
105
│ │ │ │ +
106} // namespace Dune
│ │ │ │ +
107
│ │ │ │ +
108#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Factory for ScalarLocalToGlobalFiniteElementAdaptor objects.
Definition localtoglobaladaptors.hh:244
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
Factory for global-valued Q23D elements.
Definition q2.hh:32
│ │ │ │ -
Q2FiniteElementFactory()
default constructor
Definition q2.hh:42
│ │ │ │ +
A cache storing a compile time selection of local finite element implementations.
Definition localfiniteelementvariantcache.hh:68
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,82 +1,134 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -q2.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ +raviartthomaslfecache.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_Q2_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h> │ │ │ │ │ +11#include │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_v_i_a_r_t_t_h_o_m_a_s_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h> │ │ │ │ │ 16 │ │ │ │ │ -17namespace _D_u_n_e │ │ │ │ │ -18{ │ │ │ │ │ +17namespace _D_u_n_e { │ │ │ │ │ +18 │ │ │ │ │ +19namespace Impl { │ │ │ │ │ 20 │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 class _Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y : │ │ │ │ │ -27 public _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y< │ │ │ │ │ -28 typename std::conditional, │ │ │ │ │ -30 LagrangeCubeLocalFiniteElement >::type, │ │ │ │ │ -31 Geometry> │ │ │ │ │ +21 // Provide implemented Raviart-Thomas local finite elements │ │ │ │ │ +22 │ │ │ │ │ +23 template │ │ │ │ │ +24 struct ImplementedRaviartThomasLocalFiniteElements │ │ │ │ │ +25 {}; │ │ │ │ │ +26 │ │ │ │ │ +27 template │ │ │ │ │ +28 struct ImplementedRaviartThomasLocalFiniteElements : public │ │ │ │ │ +FixedDimLocalGeometryTypeIndex<2> │ │ │ │ │ +29 { │ │ │ │ │ +30 using FixedDimLocalGeometryTypeIndex<2>::index; │ │ │ │ │ +31 static auto getImplementations() │ │ │ │ │ 32 { │ │ │ │ │ -33 typedef typename std::conditional, │ │ │ │ │ -35 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_t_y_p_e_n_a_m_e_ _G_e_o_m_e_t_r_y_:_:_c_t_y_p_e_,_ _R_F_,_ _G_e_o_m_e_t_r_y_:_: │ │ │ │ │ -_m_y_d_i_m_e_n_s_i_o_n_,_ _2_> >::type LFE; │ │ │ │ │ -36 typedef _S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y_<_L_F_E_,_ _G_e_o_m_e_t_r_y_> _B_a_s_e; │ │ │ │ │ -37 │ │ │ │ │ -38 static const LFE lfe; │ │ │ │ │ +33 return std::make_tuple( │ │ │ │ │ +34 std::make_pair(index(GeometryTypes::triangle), []() { return │ │ │ │ │ +RT02DLocalFiniteElement(); }), │ │ │ │ │ +35 std::make_pair(index(GeometryTypes::quadrilateral), []() { return │ │ │ │ │ +RT0Cube2DLocalFiniteElement(); }) │ │ │ │ │ +36 ); │ │ │ │ │ +37 } │ │ │ │ │ +38 }; │ │ │ │ │ 39 │ │ │ │ │ -40 public: │ │ │ │ │ -_4_2 _Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y() : _B_a_s_e(lfe) {} │ │ │ │ │ -43 }; │ │ │ │ │ -44 │ │ │ │ │ -45 template │ │ │ │ │ -46 const typename Q2FiniteElementFactory::LFE │ │ │ │ │ -47 Q2FiniteElementFactory::lfe; │ │ │ │ │ -48} │ │ │ │ │ -49 │ │ │ │ │ -50#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_t_o_g_l_o_b_a_l_a_d_a_p_t_o_r_s_._h_h │ │ │ │ │ +40 template │ │ │ │ │ +41 struct ImplementedRaviartThomasLocalFiniteElements : public │ │ │ │ │ +FixedDimLocalGeometryTypeIndex<2> │ │ │ │ │ +42 { │ │ │ │ │ +43 using FixedDimLocalGeometryTypeIndex<2>::index; │ │ │ │ │ +44 static auto getImplementations() │ │ │ │ │ +45 { │ │ │ │ │ +46 return std::make_tuple( │ │ │ │ │ +47 std::make_pair(index(GeometryTypes::triangle), []() { return │ │ │ │ │ +RT12DLocalFiniteElement(); }), │ │ │ │ │ +48 std::make_pair(index(GeometryTypes::quadrilateral), []() { return │ │ │ │ │ +RT1Cube2DLocalFiniteElement(); }) │ │ │ │ │ +49 ); │ │ │ │ │ +50 } │ │ │ │ │ +51 }; │ │ │ │ │ +52 │ │ │ │ │ +53 template │ │ │ │ │ +54 struct ImplementedRaviartThomasLocalFiniteElements : public │ │ │ │ │ +FixedDimLocalGeometryTypeIndex<2> │ │ │ │ │ +55 { │ │ │ │ │ +56 using FixedDimLocalGeometryTypeIndex<2>::index; │ │ │ │ │ +57 static auto getImplementations() │ │ │ │ │ +58 { │ │ │ │ │ +59 return std::make_tuple( │ │ │ │ │ +60 std::make_pair(index(GeometryTypes::quadrilateral), []() { return │ │ │ │ │ +RT2Cube2DLocalFiniteElement(); }) │ │ │ │ │ +61 ); │ │ │ │ │ +62 } │ │ │ │ │ +63 }; │ │ │ │ │ +64 │ │ │ │ │ +65 template │ │ │ │ │ +66 struct ImplementedRaviartThomasLocalFiniteElements : public │ │ │ │ │ +FixedDimLocalGeometryTypeIndex<3> │ │ │ │ │ +67 { │ │ │ │ │ +68 using FixedDimLocalGeometryTypeIndex<3>::index; │ │ │ │ │ +69 static auto getImplementations() │ │ │ │ │ +70 { │ │ │ │ │ +71 return std::make_tuple( │ │ │ │ │ +72 std::make_pair(index(GeometryTypes::tetrahedron), []() { return │ │ │ │ │ +RT03DLocalFiniteElement(); }), │ │ │ │ │ +73 std::make_pair(index(GeometryTypes::hexahedron), []() { return │ │ │ │ │ +RT0Cube3DLocalFiniteElement(); }) │ │ │ │ │ +74 ); │ │ │ │ │ +75 } │ │ │ │ │ +76 }; │ │ │ │ │ +77 │ │ │ │ │ +78 template │ │ │ │ │ +79 struct ImplementedRaviartThomasLocalFiniteElements : public │ │ │ │ │ +FixedDimLocalGeometryTypeIndex<3> │ │ │ │ │ +80 { │ │ │ │ │ +81 using FixedDimLocalGeometryTypeIndex<3>::index; │ │ │ │ │ +82 static auto getImplementations() │ │ │ │ │ +83 { │ │ │ │ │ +84 return std::make_tuple( │ │ │ │ │ +85 std::make_pair(index(GeometryTypes::hexahedron), []() │ │ │ │ │ +{ RT1Cube3DLocalFiniteElement(); }) │ │ │ │ │ +86 ); │ │ │ │ │ +87 } │ │ │ │ │ +88 }; │ │ │ │ │ +89 │ │ │ │ │ +90} // namespace Impl │ │ │ │ │ +91 │ │ │ │ │ +92 │ │ │ │ │ +93 │ │ │ │ │ +103template │ │ │ │ │ +_1_0_4using _R_a_v_i_a_r_t_T_h_o_m_a_s_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_C_a_c_h_e = │ │ │ │ │ +_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e_<_I_m_p_l_:_: │ │ │ │ │ +_I_m_p_l_e_m_e_n_t_e_d_R_a_v_i_a_r_t_T_h_o_m_a_s_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_s_<_D_,_R_,_d_i_m_,_o_r_d_e_r_>>; │ │ │ │ │ +105 │ │ │ │ │ +106} // namespace Dune │ │ │ │ │ +107 │ │ │ │ │ +108#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASLFECACHE_HH │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_c_a_c_h_e_._h_h │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_S_c_a_l_a_r_L_o_c_a_l_T_o_G_l_o_b_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_A_d_a_p_t_o_r_F_a_c_t_o_r_y │ │ │ │ │ -Factory for ScalarLocalToGlobalFiniteElementAdaptor objects. │ │ │ │ │ -DDeeffiinniittiioonn localtoglobaladaptors.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Factory for global-valued Q23D elements. │ │ │ │ │ -DDeeffiinniittiioonn q2.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y_:_:_Q_2_F_i_n_i_t_e_E_l_e_m_e_n_t_F_a_c_t_o_r_y │ │ │ │ │ -Q2FiniteElementFactory() │ │ │ │ │ -default constructor │ │ │ │ │ -DDeeffiinniittiioonn q2.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_C_a_c_h_e │ │ │ │ │ +A cache storing a compile time selection of local finite element │ │ │ │ │ +implementations. │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementvariantcache.hh:68 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pq22d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube2dall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
pq22d.hh File Reference
│ │ │ │ +
raviartthomas0cube2dall.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementvariant.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangesimplex.hh>
│ │ │ │ -#include <dune/localfunctions/lagrange/lagrangecube.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::PQ22DLocalFiniteElement< D, R >
class  Dune::RT0Cube2DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
class  Dune::RT0Cube2DLocalInterpolation< LB >
 Lowest order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
class  Dune::RT0Cube2DLocalCoefficients
 Layout map for RT0 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -pq22d.hh File Reference │ │ │ │ │ +raviartthomas0cube2dall.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for RT0 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00287_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pq22d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube2dall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,132 +70,252 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pq22d.hh
│ │ │ │ +
raviartthomas0cube2dall.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PQ22DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/common/fmatrix.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │
11
│ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
19 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
22 public:
│ │ │ │ -
23 using Traits = typename LFEVariant::Traits;
│ │ │ │ -
24
│ │ │ │ -
│ │ │ │ -
25 PQ22DLocalFiniteElement ( const GeometryType &gt )
│ │ │ │ -
26 {
│ │ │ │ -
27 if ( gt.isTriangle() )
│ │ │ │ - │ │ │ │ -
29 else if ( gt.isQuadrilateral() )
│ │ │ │ - │ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ -
33 PQ22DLocalFiniteElement ( const GeometryType &gt, const std::vector<unsigned int> vertexmap )
│ │ │ │ -
34 {
│ │ │ │ -
35 if ( gt.isTriangle() )
│ │ │ │ -
36 lfeVariant_ = LagrangeSimplexLocalFiniteElement<D,R,2,2>(vertexmap);
│ │ │ │ -
37 else if ( gt.isQuadrilateral() )
│ │ │ │ - │ │ │ │ -
39 }
│ │ │ │ -
│ │ │ │ -
40
│ │ │ │ -
│ │ │ │ -
41 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
42 {
│ │ │ │ -
43 return lfeVariant_.localBasis();
│ │ │ │ -
44 }
│ │ │ │ -
│ │ │ │ -
45
│ │ │ │ -
│ │ │ │ -
46 const typename Traits::LocalCoefficientsType& localCoefficients () const
│ │ │ │ -
47 {
│ │ │ │ -
48 return lfeVariant_.localCoefficients();
│ │ │ │ -
49 }
│ │ │ │ -
│ │ │ │ -
50
│ │ │ │ -
│ │ │ │ -
51 const typename Traits::LocalInterpolationType& localInterpolation () const
│ │ │ │ -
52 {
│ │ │ │ -
53 return lfeVariant_.localInterpolation();
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
│ │ │ │ -
57 unsigned int size () const
│ │ │ │ -
58 {
│ │ │ │ -
59 return lfeVariant_.size();
│ │ │ │ -
60 }
│ │ │ │ -
│ │ │ │ -
61
│ │ │ │ -
│ │ │ │ -
62 GeometryType type () const
│ │ │ │ -
63 {
│ │ │ │ -
64 return lfeVariant_.type();
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
67 private:
│ │ │ │ -
68
│ │ │ │ -
69 LFEVariant lfeVariant_;
│ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71
│ │ │ │ -
72}
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 public:
│ │ │ │ +
32 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
33 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
36 RT0Cube2DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ +
37 {
│ │ │ │ +
38 for (int i=0; i<4; i++)
│ │ │ │ +
39 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
40 }
│ │ │ │ +
│ │ │ │ +
41
│ │ │ │ +
│ │ │ │ +
43 unsigned int size () const
│ │ │ │ +
44 {
│ │ │ │ +
45 return 4;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
50 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
51 {
│ │ │ │ +
52 out.resize(4);
│ │ │ │ +
53 out[0] = {sign_[0]*(in[0]-1.0), 0.0};
│ │ │ │ +
54 out[1] = {sign_[1]*(in[0]), 0.0};
│ │ │ │ +
55 out[2] = {0.0, sign_[2]*(in[1]-1.0)};
│ │ │ │ +
56 out[3] = {0.0, sign_[3]*(in[1])};
│ │ │ │ +
57 }
│ │ │ │ +
│ │ │ │ +
58
│ │ │ │ +
60 inline void
│ │ │ │ +
│ │ │ │ +
61 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
62 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
63 {
│ │ │ │ +
64 out.resize(4);
│ │ │ │ +
65 out[0][0] = {sign_[0], 0};
│ │ │ │ +
66 out[0][1] = {0, 0};
│ │ │ │ +
67
│ │ │ │ +
68 out[1][0] = {sign_[1], 0};
│ │ │ │ +
69 out[1][1] = {0, 0};
│ │ │ │ +
70
│ │ │ │ +
71 out[2][0] = {0, 0};
│ │ │ │ +
72 out[2][1] = {0, sign_[2]};
│ │ │ │
73
│ │ │ │ -
74#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
74 out[3][0] = {0, 0};
│ │ │ │ +
75 out[3][1] = {0, sign_[3]};
│ │ │ │ +
76 }
│ │ │ │ +
│ │ │ │ +
77
│ │ │ │ +
│ │ │ │ +
79 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
80 const typename Traits::DomainType& in, // position
│ │ │ │ +
81 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
82 {
│ │ │ │ +
83 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
84 if (totalOrder == 0) {
│ │ │ │ +
85 evaluateFunction(in, out);
│ │ │ │ +
86 } else if (totalOrder == 1) {
│ │ │ │ +
87 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
88 out.resize(size());
│ │ │ │ +
89
│ │ │ │ +
90 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
91 out[i] = {0, 0};
│ │ │ │ +
92
│ │ │ │ +
93 switch (direction) {
│ │ │ │ +
94 case 0:
│ │ │ │ +
95 out[0][0] = sign_[0];
│ │ │ │ +
96 out[1][0] = sign_[1];
│ │ │ │ +
97 break;
│ │ │ │ +
98 case 1:
│ │ │ │ +
99 out[2][1] = sign_[2];
│ │ │ │ +
100 out[3][1] = sign_[3];
│ │ │ │ +
101 break;
│ │ │ │ +
102 default:
│ │ │ │ +
103 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
104 }
│ │ │ │ +
105 } else {
│ │ │ │ +
106 out.resize(size());
│ │ │ │ +
107 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
108 for (std::size_t j = 0; j < 2; ++j)
│ │ │ │ +
109 out[i][j] = 0;
│ │ │ │ +
110 }
│ │ │ │ +
111
│ │ │ │ +
112 }
│ │ │ │ +
│ │ │ │ +
113
│ │ │ │ +
│ │ │ │ +
115 unsigned int order () const
│ │ │ │ +
116 {
│ │ │ │ +
117 return 1;
│ │ │ │ +
118 }
│ │ │ │ +
│ │ │ │ +
119
│ │ │ │ +
120 private:
│ │ │ │ +
121 std::array<R,4> sign_;
│ │ │ │ +
122 };
│ │ │ │ +
│ │ │ │ +
123
│ │ │ │ +
124
│ │ │ │ +
132 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
134 {
│ │ │ │ +
135 public:
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
138 RT0Cube2DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ +
139 {
│ │ │ │ +
140 for (int i=0; i<4; i++)
│ │ │ │ +
141 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ +
142
│ │ │ │ +
143 m0 = {0.0, 0.5};
│ │ │ │ +
144 m1 = {1.0, 0.5};
│ │ │ │ +
145 m2 = {0.5, 0.0};
│ │ │ │ +
146 m3 = {0.5, 1.0};
│ │ │ │ +
147
│ │ │ │ +
148 n0 = {-1.0, 0.0};
│ │ │ │ +
149 n1 = { 1.0, 0.0};
│ │ │ │ +
150 n2 = { 0.0, -1.0};
│ │ │ │ +
151 n3 = { 0.0, 1.0};
│ │ │ │ +
152 }
│ │ │ │ +
│ │ │ │ +
153
│ │ │ │ +
154 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
155 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
156 {
│ │ │ │ +
157 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
158 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
159
│ │ │ │ +
160 out.resize(4);
│ │ │ │ +
161
│ │ │ │ +
162 // Evaluate the normal components at the edge midpoints
│ │ │ │ +
163 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1])*sign_[0];
│ │ │ │ +
164 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1])*sign_[1];
│ │ │ │ +
165 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1])*sign_[2];
│ │ │ │ +
166 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1])*sign_[3];
│ │ │ │ +
167 }
│ │ │ │ +
│ │ │ │ +
168
│ │ │ │ +
169 private:
│ │ │ │ +
170 std::array<typename LB::Traits::RangeFieldType,4> sign_;
│ │ │ │ +
171
│ │ │ │ +
172 // The four edge midpoints of the reference quadrilateral
│ │ │ │ +
173 typename LB::Traits::DomainType m0,m1,m2,m3;
│ │ │ │ +
174
│ │ │ │ +
175 // The four edge normals of the reference quadrilateral
│ │ │ │ +
176 typename LB::Traits::DomainType n0,n1,n2,n3;
│ │ │ │ +
177 };
│ │ │ │ +
│ │ │ │ +
178
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
186 {
│ │ │ │ +
187 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
190 {
│ │ │ │ +
191 for (std::size_t i=0; i<4; i++)
│ │ │ │ +
192 li[i] = LocalKey(i,1,0);
│ │ │ │ +
193 }
│ │ │ │ +
│ │ │ │ +
194
│ │ │ │ +
│ │ │ │ +
196 std::size_t size () const
│ │ │ │ +
197 {
│ │ │ │ +
198 return 4;
│ │ │ │ +
199 }
│ │ │ │ +
│ │ │ │ +
200
│ │ │ │ +
│ │ │ │ +
202 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
203 {
│ │ │ │ +
204 return li[i];
│ │ │ │ +
205 }
│ │ │ │ +
│ │ │ │ +
206
│ │ │ │ +
207 private:
│ │ │ │ +
208 std::vector<LocalKey> li;
│ │ │ │ +
209 };
│ │ │ │ +
│ │ │ │ +
210
│ │ │ │ +
211}
│ │ │ │ +
212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ - │ │ │ │ -
typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, LocalInterpolation > Traits
Export LocalFiniteElementTraits.
Definition localfiniteelementvariant.hh:269
│ │ │ │ -
unsigned int size() const
Number of shape functions.
Definition localfiniteelementvariant.hh:374
│ │ │ │ -
constexpr GeometryType type() const
Number of shape functions.
Definition localfiniteelementvariant.hh:382
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Provide access to LocalBasis implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:350
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Provide access to LocalCoefficients implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:358
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Provide access to LocalInterpolation implementation of this LocalFiniteElement.
Definition localfiniteelementvariant.hh:366
│ │ │ │ -
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order.
Definition lagrangecube.hh:711
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
Definition pq22d.hh:19
│ │ │ │ -
typename LFEVariant::Traits Traits
Definition pq22d.hh:23
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition pq22d.hh:46
│ │ │ │ -
PQ22DLocalFiniteElement(const GeometryType &gt, const std::vector< unsigned int > vertexmap)
Definition pq22d.hh:33
│ │ │ │ -
PQ22DLocalFiniteElement(const GeometryType &gt)
Definition pq22d.hh:25
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition pq22d.hh:57
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition pq22d.hh:51
│ │ │ │ -
GeometryType type() const
Definition pq22d.hh:62
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition pq22d.hh:41
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:30
│ │ │ │ +
RT0Cube2DLocalBasis(std::bitset< 4 > s=0)
Constructor with a set of edge orientations.
Definition raviartthomas0cube2dall.hh:36
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas0cube2dall.hh:33
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas0cube2dall.hh:49
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas0cube2dall.hh:79
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas0cube2dall.hh:61
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas0cube2dall.hh:115
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas0cube2dall.hh:43
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:134
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas0cube2dall.hh:155
│ │ │ │ +
RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0)
Constructor with explicitly given edge orientations.
Definition raviartthomas0cube2dall.hh:138
│ │ │ │ +
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube2dall.hh:186
│ │ │ │ +
RT0Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas0cube2dall.hh:189
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas0cube2dall.hh:196
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas0cube2dall.hh:202
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,156 +1,271 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pq22d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d │ │ │ │ │ +raviartthomas0cube2dall.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_PQ22DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ 11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h> │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_c_u_b_e_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 template │ │ │ │ │ -_1_8 class _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -19 { │ │ │ │ │ -20 using _L_F_E_V_a_r_i_a_n_t = │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>, │ │ │ │ │ -21 _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_> >; │ │ │ │ │ -22 public: │ │ │ │ │ -_2_3 using _T_r_a_i_t_s = typename _L_F_E_V_a_r_i_a_n_t_:_:_T_r_a_i_t_s; │ │ │ │ │ -24 │ │ │ │ │ -_2_5 _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t ( const GeometryType > ) │ │ │ │ │ -26 { │ │ │ │ │ -27 if ( gt.isTriangle() ) │ │ │ │ │ -28 lfeVariant_ = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ -29 else if ( gt.isQuadrilateral() ) │ │ │ │ │ -30 lfeVariant_ = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ -31 } │ │ │ │ │ -32 │ │ │ │ │ -_3_3 _P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t ( const GeometryType >, const std::vector vertexmap ) │ │ │ │ │ -34 { │ │ │ │ │ -35 if ( gt.isTriangle() ) │ │ │ │ │ -36 lfeVariant_ = _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(vertexmap); │ │ │ │ │ -37 else if ( gt.isQuadrilateral() ) │ │ │ │ │ -38 lfeVariant_ = _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_,_2_>(); │ │ │ │ │ -39 } │ │ │ │ │ -40 │ │ │ │ │ -_4_1 const typename Traits::LocalBasisType& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -42 { │ │ │ │ │ -43 return lfeVariant_._l_o_c_a_l_B_a_s_i_s(); │ │ │ │ │ -44 } │ │ │ │ │ -45 │ │ │ │ │ -_4_6 const typename Traits::LocalCoefficientsType& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -47 { │ │ │ │ │ -48 return lfeVariant_._l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s(); │ │ │ │ │ -49 } │ │ │ │ │ -50 │ │ │ │ │ -_5_1 const typename Traits::LocalInterpolationType& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -52 { │ │ │ │ │ -53 return lfeVariant_._l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n(); │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -_5_7 unsigned int _s_i_z_e () const │ │ │ │ │ -58 { │ │ │ │ │ -59 return lfeVariant_._s_i_z_e(); │ │ │ │ │ -60 } │ │ │ │ │ -61 │ │ │ │ │ -_6_2 GeometryType _t_y_p_e () const │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +28 template │ │ │ │ │ +_2_9 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +30 { │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ +37 { │ │ │ │ │ +38 for (int i=0; i<4; i++) │ │ │ │ │ +39 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ +40 } │ │ │ │ │ +41 │ │ │ │ │ +_4_3 unsigned int _s_i_z_e () const │ │ │ │ │ +44 { │ │ │ │ │ +45 return 4; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +50 std::vector& out) const │ │ │ │ │ +51 { │ │ │ │ │ +52 out.resize(4); │ │ │ │ │ +53 out[0] = {sign_[0]*(in[0]-1.0), 0.0}; │ │ │ │ │ +54 out[1] = {sign_[1]*(in[0]), 0.0}; │ │ │ │ │ +55 out[2] = {0.0, sign_[2]*(in[1]-1.0)}; │ │ │ │ │ +56 out[3] = {0.0, sign_[3]*(in[1])}; │ │ │ │ │ +57 } │ │ │ │ │ +58 │ │ │ │ │ +60 inline void │ │ │ │ │ +_6_1 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +62 std::vector& out) const // return value │ │ │ │ │ 63 { │ │ │ │ │ -64 return lfeVariant_._t_y_p_e(); │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -67 private: │ │ │ │ │ -68 │ │ │ │ │ -69 LFEVariant lfeVariant_; │ │ │ │ │ -70 }; │ │ │ │ │ -71 │ │ │ │ │ -72} │ │ │ │ │ +64 out.resize(4); │ │ │ │ │ +65 out[0][0] = {sign_[0], 0}; │ │ │ │ │ +66 out[0][1] = {0, 0}; │ │ │ │ │ +67 │ │ │ │ │ +68 out[1][0] = {sign_[1], 0}; │ │ │ │ │ +69 out[1][1] = {0, 0}; │ │ │ │ │ +70 │ │ │ │ │ +71 out[2][0] = {0, 0}; │ │ │ │ │ +72 out[2][1] = {0, sign_[2]}; │ │ │ │ │ 73 │ │ │ │ │ -74#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_c_u_b_e_._h_h │ │ │ │ │ -_l_a_g_r_a_n_g_e_s_i_m_p_l_e_x_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_v_a_r_i_a_n_t_._h_h │ │ │ │ │ +74 out[3][0] = {0, 0}; │ │ │ │ │ +75 out[3][1] = {0, sign_[3]}; │ │ │ │ │ +76 } │ │ │ │ │ +77 │ │ │ │ │ +_7_9 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +80 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +81 std::vector& out) const // return value │ │ │ │ │ +82 { │ │ │ │ │ +83 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +84 if (totalOrder == 0) { │ │ │ │ │ +85 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +86 } else if (totalOrder == 1) { │ │ │ │ │ +87 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ +_o_r_d_e_r.end(), 1)); │ │ │ │ │ +88 out.resize(_s_i_z_e()); │ │ │ │ │ +89 │ │ │ │ │ +90 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +91 out[i] = {0, 0}; │ │ │ │ │ +92 │ │ │ │ │ +93 switch (direction) { │ │ │ │ │ +94 case 0: │ │ │ │ │ +95 out[0][0] = sign_[0]; │ │ │ │ │ +96 out[1][0] = sign_[1]; │ │ │ │ │ +97 break; │ │ │ │ │ +98 case 1: │ │ │ │ │ +99 out[2][1] = sign_[2]; │ │ │ │ │ +100 out[3][1] = sign_[3]; │ │ │ │ │ +101 break; │ │ │ │ │ +102 default: │ │ │ │ │ +103 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +104 } │ │ │ │ │ +105 } else { │ │ │ │ │ +106 out.resize(_s_i_z_e()); │ │ │ │ │ +107 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +108 for (std::size_t j = 0; j < 2; ++j) │ │ │ │ │ +109 out[i][j] = 0; │ │ │ │ │ +110 } │ │ │ │ │ +111 │ │ │ │ │ +112 } │ │ │ │ │ +113 │ │ │ │ │ +_1_1_5 unsigned int _o_r_d_e_r () const │ │ │ │ │ +116 { │ │ │ │ │ +117 return 1; │ │ │ │ │ +118 } │ │ │ │ │ +119 │ │ │ │ │ +120 private: │ │ │ │ │ +121 std::array sign_; │ │ │ │ │ +122 }; │ │ │ │ │ +123 │ │ │ │ │ +124 │ │ │ │ │ +132 template │ │ │ │ │ +_1_3_3 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +134 { │ │ │ │ │ +135 public: │ │ │ │ │ +136 │ │ │ │ │ +_1_3_8 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ +139 { │ │ │ │ │ +140 for (int i=0; i<4; i++) │ │ │ │ │ +141 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ +142 │ │ │ │ │ +143 m0 = {0.0, 0.5}; │ │ │ │ │ +144 m1 = {1.0, 0.5}; │ │ │ │ │ +145 m2 = {0.5, 0.0}; │ │ │ │ │ +146 m3 = {0.5, 1.0}; │ │ │ │ │ +147 │ │ │ │ │ +148 n0 = {-1.0, 0.0}; │ │ │ │ │ +149 n1 = { 1.0, 0.0}; │ │ │ │ │ +150 n2 = { 0.0, -1.0}; │ │ │ │ │ +151 n3 = { 0.0, 1.0}; │ │ │ │ │ +152 } │ │ │ │ │ +153 │ │ │ │ │ +154 template │ │ │ │ │ +_1_5_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +156 { │ │ │ │ │ +157 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +158 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +159 │ │ │ │ │ +160 out.resize(4); │ │ │ │ │ +161 │ │ │ │ │ +162 // Evaluate the normal components at the edge midpoints │ │ │ │ │ +163 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1])*sign_[0]; │ │ │ │ │ +164 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1])*sign_[1]; │ │ │ │ │ +165 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1])*sign_[2]; │ │ │ │ │ +166 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1])*sign_[3]; │ │ │ │ │ +167 } │ │ │ │ │ +168 │ │ │ │ │ +169 private: │ │ │ │ │ +170 std::array sign_; │ │ │ │ │ +171 │ │ │ │ │ +172 // The four edge midpoints of the reference quadrilateral │ │ │ │ │ +173 typename LB::Traits::DomainType m0,m1,m2,m3; │ │ │ │ │ +174 │ │ │ │ │ +175 // The four edge normals of the reference quadrilateral │ │ │ │ │ +176 typename LB::Traits::DomainType n0,n1,n2,n3; │ │ │ │ │ +177 }; │ │ │ │ │ +178 │ │ │ │ │ +_1_8_5 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +186 { │ │ │ │ │ +187 public: │ │ │ │ │ +_1_8_9 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(4) │ │ │ │ │ +190 { │ │ │ │ │ +191 for (std::size_t i=0; i<4; i++) │ │ │ │ │ +192 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +193 } │ │ │ │ │ +194 │ │ │ │ │ +_1_9_6 std::size_t _s_i_z_e () const │ │ │ │ │ +197 { │ │ │ │ │ +198 return 4; │ │ │ │ │ +199 } │ │ │ │ │ +200 │ │ │ │ │ +_2_0_2 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +203 { │ │ │ │ │ +204 return li[i]; │ │ │ │ │ +205 } │ │ │ │ │ +206 │ │ │ │ │ +207 private: │ │ │ │ │ +208 std::vector li; │ │ │ │ │ +209 }; │ │ │ │ │ +210 │ │ │ │ │ +211} │ │ │ │ │ +212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_ _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2 │ │ │ │ │ -_>_,_ _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_ _> │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_<_ _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2 │ │ │ │ │ -_>_,_ _L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _2_,_ _2_ _>_ _>_:_:_T_r_a_i_t_s │ │ │ │ │ -typename Dune::LocalFiniteElementTraits< LocalBasis, LocalCoefficients, │ │ │ │ │ -LocalInterpolation > Traits │ │ │ │ │ -Export LocalFiniteElementTraits. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:269 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT0Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with a set of edge orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:115 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:374 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_t_y_p_e │ │ │ │ │ -constexpr GeometryType type() const │ │ │ │ │ -Number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:382 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Provide access to LocalBasis implementation of this LocalFiniteElement. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:350 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Provide access to LocalCoefficients implementation of this LocalFiniteElement. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:358 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_V_a_r_i_a_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Provide access to LocalInterpolation implementation of this LocalFiniteElement. │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementvariant.hh:366 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_C_u_b_e_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for cubes with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangecube.hh:711 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:19 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -typename LFEVariant::Traits Traits │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:46 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -PQ22DLocalFiniteElement(const GeometryType >, const std::vector< unsigned int │ │ │ │ │ -> vertexmap) │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -PQ22DLocalFiniteElement(const GeometryType >) │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:62 │ │ │ │ │ -_D_u_n_e_:_:_P_Q_2_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn pq22d.hh:41 │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:43 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:155 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Constructor with explicitly given edge orientations. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:186 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT0Cube2DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:196 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:202 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp2.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,39 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
prismp2.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas0pyramidlocalinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangeprism.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT0PyramidLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference hexahedron. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R >
using Dune::PrismP2LocalFiniteElement = LagrangePrismLocalFiniteElement< D, R, 2 >
 Second-order Lagrange finite element on a three-dimensional prism.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -prismp2.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas0pyramidlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< D, R, │ │ │ │ │ - 2 > │ │ │ │ │ -  Second-order Lagrange finite element on a three-dimensional prism. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00290_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: prismp2.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,46 +70,102 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
prismp2.hh
│ │ │ │ +
raviartthomas0pyramidlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ - │ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#warning This header is deprecated
│ │ │ │ + │ │ │ │
11
│ │ │ │
12namespace Dune
│ │ │ │
13{
│ │ │ │ -
14
│ │ │ │ -
19 template<class D, class R>
│ │ │ │ - │ │ │ │ -
21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
23
│ │ │ │ -
24}
│ │ │ │ +
22 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │
25
│ │ │ │ -
26#endif
│ │ │ │ - │ │ │ │ +
26 public:
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
33 RT0PyramidLocalInterpolation (std::bitset<5> s = 0)
│ │ │ │ +
34 {
│ │ │ │ +
35 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
36
│ │ │ │ +
37 for (size_t i=0; i<5; i++)
│ │ │ │ +
38 sign[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
39
│ │ │ │ +
40 Scalar r = 1/std::sqrt(2);
│ │ │ │ +
41
│ │ │ │ +
42 n[0] = { 0.0, 0.0, -1.0};
│ │ │ │ +
43 n[1] = {-1.0, 0.0, 0.0};
│ │ │ │ +
44 n[2] = { r, 0.0, r};
│ │ │ │ +
45 n[3] = { 0.0, -1.0, 0.0};
│ │ │ │ +
46 n[4] = { 0.0, r, r};
│ │ │ │ +
47
│ │ │ │ +
48 c[0] = 1.0;
│ │ │ │ +
49 c[1] = 1/2.0;
│ │ │ │ +
50 c[2] = 1/2.0 * std::sqrt(2);
│ │ │ │ +
51 c[3] = 1/2.0;
│ │ │ │ +
52 c[4] = 1/2.0 * std::sqrt(2);
│ │ │ │ +
53
│ │ │ │ +
54 m[0] = { 0.5, 0.5, 0.0};
│ │ │ │ +
55 m[1] = { 0.0, 1/3.0, 1/3.0};
│ │ │ │ +
56 m[2] = { 2/3.0, 1/3.0, 1/3.0};
│ │ │ │ +
57 m[3] = { 1/3.0, 0.0, 1/3.0};
│ │ │ │ +
58 m[4] = { 1/3.0, 2/3.0, 1/3.0};
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
69 template<class F, class C>
│ │ │ │ +
│ │ │ │ +
70 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
71 {
│ │ │ │ +
72 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
73
│ │ │ │ +
74 out.resize(5);
│ │ │ │ +
75 for(int i=0; i<5; i++)
│ │ │ │ +
76 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i];
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 private:
│ │ │ │ +
80 // Facet orientations
│ │ │ │ +
81 std::array<typename LB::Traits::RangeFieldType, 5> sign;
│ │ │ │ +
82 // Facet area
│ │ │ │ +
83 std::array<typename LB::Traits::RangeFieldType, 5> c;
│ │ │ │ +
84
│ │ │ │ +
85 // Facet normals
│ │ │ │ +
86 std::array<typename LB::Traits::DomainType, 5> n;
│ │ │ │ +
87 // Facet midpoints
│ │ │ │ +
88 std::array<typename LB::Traits::DomainType, 5> m;
│ │ │ │ +
89 };
│ │ │ │ +
│ │ │ │ +
90}
│ │ │ │ +
91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition lagrangeprism.hh:652
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0pyramidlocalinterpolation.hh:24
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas0pyramidlocalinterpolation.hh:70
│ │ │ │ +
RT0PyramidLocalInterpolation(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0pyramidlocalinterpolation.hh:33
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,98 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -prismp2.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ +raviartthomas0pyramidlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_PRISM2_3DLOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#warning This header is deprecated │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ 11 │ │ │ │ │ 12namespace _D_u_n_e │ │ │ │ │ 13{ │ │ │ │ │ -14 │ │ │ │ │ -19 template │ │ │ │ │ -_2_0 using _P_r_i_s_m_P_2_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -21 [[deprecated("use LagrangePrismLocalFiniteElement instead")]] │ │ │ │ │ -22 = _L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_2_>; │ │ │ │ │ -23 │ │ │ │ │ -24} │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +24 { │ │ │ │ │ 25 │ │ │ │ │ -26#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_r_i_s_m_._h_h │ │ │ │ │ +26 public: │ │ │ │ │ +27 │ │ │ │ │ +_3_3 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<5> s = 0) │ │ │ │ │ +34 { │ │ │ │ │ +35 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +36 │ │ │ │ │ +37 for (size_t i=0; i<5; i++) │ │ │ │ │ +38 sign[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +39 │ │ │ │ │ +40 Scalar r = 1/std::sqrt(2); │ │ │ │ │ +41 │ │ │ │ │ +42 n[0] = { 0.0, 0.0, -1.0}; │ │ │ │ │ +43 n[1] = {-1.0, 0.0, 0.0}; │ │ │ │ │ +44 n[2] = { r, 0.0, r}; │ │ │ │ │ +45 n[3] = { 0.0, -1.0, 0.0}; │ │ │ │ │ +46 n[4] = { 0.0, r, r}; │ │ │ │ │ +47 │ │ │ │ │ +48 c[0] = 1.0; │ │ │ │ │ +49 c[1] = 1/2.0; │ │ │ │ │ +50 c[2] = 1/2.0 * std::sqrt(2); │ │ │ │ │ +51 c[3] = 1/2.0; │ │ │ │ │ +52 c[4] = 1/2.0 * std::sqrt(2); │ │ │ │ │ +53 │ │ │ │ │ +54 m[0] = { 0.5, 0.5, 0.0}; │ │ │ │ │ +55 m[1] = { 0.0, 1/3.0, 1/3.0}; │ │ │ │ │ +56 m[2] = { 2/3.0, 1/3.0, 1/3.0}; │ │ │ │ │ +57 m[3] = { 1/3.0, 0.0, 1/3.0}; │ │ │ │ │ +58 m[4] = { 1/3.0, 2/3.0, 1/3.0}; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +69 template │ │ │ │ │ +_7_0 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +71 { │ │ │ │ │ +72 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +73 │ │ │ │ │ +74 out.resize(5); │ │ │ │ │ +75 for(int i=0; i<5; i++) │ │ │ │ │ +76 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i]; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 private: │ │ │ │ │ +80 // Facet orientations │ │ │ │ │ +81 std::array sign; │ │ │ │ │ +82 // Facet area │ │ │ │ │ +83 std::array c; │ │ │ │ │ +84 │ │ │ │ │ +85 // Facet normals │ │ │ │ │ +86 std::array n; │ │ │ │ │ +87 // Facet midpoints │ │ │ │ │ +88 std::array m; │ │ │ │ │ +89 }; │ │ │ │ │ +90} │ │ │ │ │ +91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_r_i_s_m_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d prisms with arbitrary compile-time polynomial │ │ │ │ │ -order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangeprism.hh:652 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalinterpolation.hh:70 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT0PyramidLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalinterpolation.hh:33 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangesimplex.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,42 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
lagrangesimplex.hh File Reference
│ │ │ │ +
raviartthomas0pyramidlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <array>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <dune/common/deprecated.hh>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/common/fvector.hh>
│ │ │ │ -#include <dune/common/math.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LagrangeSimplexLocalFiniteElement< D, R, d, k >
 Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order. More...
class  Dune::RT0PyramidLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on pyramids. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,31 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -lagrangesimplex.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +raviartthomas0pyramidlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_,_ _k_ _> │ │ │ │ │ -  Lagrange finite element for simplices with arbitrary compile-time │ │ │ │ │ - dimension and polynomial order. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on pyramids. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00293_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: lagrangesimplex.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,879 +70,75 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
lagrangesimplex.hh
│ │ │ │ +
raviartthomas0pyramidlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <array>
│ │ │ │ -
9#include <numeric>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/deprecated.hh>
│ │ │ │ -
12#include <dune/common/fmatrix.hh>
│ │ │ │ -
13#include <dune/common/fvector.hh>
│ │ │ │ -
14#include <dune/common/math.hh>
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │
15
│ │ │ │ -
16#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune { namespace Impl
│ │ │ │ -
24{
│ │ │ │ -
35 template<class D, class R, unsigned int dim, unsigned int k>
│ │ │ │ -
36 class LagrangeSimplexLocalBasis
│ │ │ │ -
37 {
│ │ │ │ -
38 public:
│ │ │ │ -
39 using Traits = LocalBasisTraits<D,dim,FieldVector<D,dim>,R,1,FieldVector<R,1>,FieldMatrix<R,1,dim> >;
│ │ │ │ -
40
│ │ │ │ -
45 static constexpr unsigned int size ()
│ │ │ │ -
46 {
│ │ │ │ -
47 return binomial(k+dim,dim);
│ │ │ │ -
48 }
│ │ │ │ -
49
│ │ │ │ -
51 void evaluateFunction(const typename Traits::DomainType& x,
│ │ │ │ -
52 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
53 {
│ │ │ │ -
54 out.resize(size());
│ │ │ │ -
55
│ │ │ │ -
56 // Specialization for zero-order case
│ │ │ │ -
57 if (k==0)
│ │ │ │ -
58 {
│ │ │ │ -
59 out[0] = 1;
│ │ │ │ -
60 return;
│ │ │ │ -
61 }
│ │ │ │ -
62
│ │ │ │ -
63 // Specialization for first-order case
│ │ │ │ -
64 if (k==1)
│ │ │ │ -
65 {
│ │ │ │ -
66 out[0] = 1.0;
│ │ │ │ -
67 for (size_t i=0; i<dim; i++)
│ │ │ │ -
68 {
│ │ │ │ -
69 out[0] -= x[i];
│ │ │ │ -
70 out[i+1] = x[i];
│ │ │ │ -
71 }
│ │ │ │ -
72 return;
│ │ │ │ -
73 }
│ │ │ │ -
74
│ │ │ │ -
75 assert(k>=2);
│ │ │ │ -
76
│ │ │ │ -
77 auto lagrangeNode = [](unsigned int i) { return ((D)i)/k; };
│ │ │ │ -
78
│ │ │ │ -
79 if (dim==1)
│ │ │ │ -
80 {
│ │ │ │ -
81 for (unsigned int i=0; i<size(); i++)
│ │ │ │ -
82 {
│ │ │ │ -
83 out[i] = 1.0;
│ │ │ │ -
84 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
85 out[i] *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
86 for (unsigned int gamma=i+1; gamma<=k; gamma++)
│ │ │ │ -
87 out[i] *= (x[0]-lagrangeNode(gamma))/(lagrangeNode(i)-lagrangeNode(gamma));
│ │ │ │ -
88 }
│ │ │ │ -
89 return;
│ │ │ │ -
90 }
│ │ │ │ -
91
│ │ │ │ -
92 if (dim==2)
│ │ │ │ -
93 {
│ │ │ │ -
94 int n=0;
│ │ │ │ -
95 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
96 for (unsigned int i=0; i<=k-j; i++)
│ │ │ │ -
97 {
│ │ │ │ -
98 out[n] = 1.0;
│ │ │ │ -
99 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
100 out[n] *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
101 for (unsigned int beta=0; beta<j; beta++)
│ │ │ │ -
102 out[n] *= (x[1]-lagrangeNode(beta))/(lagrangeNode(j)-lagrangeNode(beta));
│ │ │ │ -
103 for (unsigned int gamma=i+j+1; gamma<=k; gamma++)
│ │ │ │ -
104 out[n] *= (lagrangeNode(gamma)-x[0]-x[1])/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
105 n++;
│ │ │ │ -
106 }
│ │ │ │ -
107
│ │ │ │ -
108 return;
│ │ │ │ -
109 }
│ │ │ │ -
110
│ │ │ │ -
111 if (dim!=3)
│ │ │ │ -
112 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalBasis for k>=2 only implemented for dim==1 or dim==3");
│ │ │ │ -
113
│ │ │ │ -
114 typename Traits::DomainType kx = x;
│ │ │ │ -
115 kx *= k;
│ │ │ │ -
116 unsigned int n = 0;
│ │ │ │ -
117 unsigned int i[4];
│ │ │ │ -
118 R factor[4];
│ │ │ │ -
119 for (i[2] = 0; i[2] <= k; ++i[2])
│ │ │ │ -
120 {
│ │ │ │ -
121 factor[2] = 1.0;
│ │ │ │ -
122 for (unsigned int j = 0; j < i[2]; ++j)
│ │ │ │ -
123 factor[2] *= (kx[2]-j) / (i[2]-j);
│ │ │ │ -
124 for (i[1] = 0; i[1] <= k - i[2]; ++i[1])
│ │ │ │ -
125 {
│ │ │ │ -
126 factor[1] = 1.0;
│ │ │ │ -
127 for (unsigned int j = 0; j < i[1]; ++j)
│ │ │ │ -
128 factor[1] *= (kx[1]-j) / (i[1]-j);
│ │ │ │ -
129 for (i[0] = 0; i[0] <= k - i[1] - i[2]; ++i[0])
│ │ │ │ -
130 {
│ │ │ │ -
131 factor[0] = 1.0;
│ │ │ │ -
132 for (unsigned int j = 0; j < i[0]; ++j)
│ │ │ │ -
133 factor[0] *= (kx[0]-j) / (i[0]-j);
│ │ │ │ -
134 i[3] = k - i[0] - i[1] - i[2];
│ │ │ │ -
135 D kx3 = k - kx[0] - kx[1] - kx[2];
│ │ │ │ -
136 factor[3] = 1.0;
│ │ │ │ -
137 for (unsigned int j = 0; j < i[3]; ++j)
│ │ │ │ -
138 factor[3] *= (kx3-j) / (i[3]-j);
│ │ │ │ -
139 out[n++] = factor[0] * factor[1] * factor[2] * factor[3];
│ │ │ │ -
140 }
│ │ │ │ -
141 }
│ │ │ │ -
142 }
│ │ │ │ -
143 }
│ │ │ │ -
144
│ │ │ │ -
150 void evaluateJacobian(const typename Traits::DomainType& x,
│ │ │ │ -
151 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ -
152 {
│ │ │ │ -
153 out.resize(size());
│ │ │ │ -
154
│ │ │ │ -
155 // Specialization for k==0
│ │ │ │ -
156 if (k==0)
│ │ │ │ -
157 {
│ │ │ │ -
158 std::fill(out[0][0].begin(), out[0][0].end(), 0);
│ │ │ │ -
159 return;
│ │ │ │ -
160 }
│ │ │ │ -
161
│ │ │ │ -
162 // Specialization for k==1
│ │ │ │ -
163 if (k==1)
│ │ │ │ -
164 {
│ │ │ │ -
165 std::fill(out[0][0].begin(), out[0][0].end(), -1);
│ │ │ │ -
166
│ │ │ │ -
167 for (unsigned int i=0; i<dim; i++)
│ │ │ │ -
168 for (unsigned int j=0; j<dim; j++)
│ │ │ │ -
169 out[i+1][0][j] = (i==j);
│ │ │ │ -
170
│ │ │ │ -
171 return;
│ │ │ │ -
172 }
│ │ │ │ -
173
│ │ │ │ -
174 auto lagrangeNode = [](unsigned int i) { return ((D)i)/k; };
│ │ │ │ -
175
│ │ │ │ -
176 // Specialization for dim==1
│ │ │ │ -
177 if (dim==1)
│ │ │ │ -
178 {
│ │ │ │ -
179 for (unsigned int i=0; i<=k; i++)
│ │ │ │ -
180 {
│ │ │ │ -
181 // x_0 derivative
│ │ │ │ -
182 out[i][0][0] = 0.0;
│ │ │ │ -
183 R factor=1.0;
│ │ │ │ -
184 for (unsigned int a=0; a<i; a++)
│ │ │ │ -
185 {
│ │ │ │ -
186 R product=factor;
│ │ │ │ -
187 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
188 product *= (alpha==a) ? 1.0/(lagrangeNode(i)-lagrangeNode(alpha))
│ │ │ │ -
189 : (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
190 for (unsigned int gamma=i+1; gamma<=k; gamma++)
│ │ │ │ -
191 product *= (lagrangeNode(gamma)-x[0])/(lagrangeNode(gamma)-lagrangeNode(i));
│ │ │ │ -
192 out[i][0][0] += product;
│ │ │ │ -
193 }
│ │ │ │ -
194 for (unsigned int c=i+1; c<=k; c++)
│ │ │ │ -
195 {
│ │ │ │ -
196 R product=factor;
│ │ │ │ -
197 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
198 product *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
199 for (unsigned int gamma=i+1; gamma<=k; gamma++)
│ │ │ │ -
200 product *= (gamma==c) ? -1.0/(lagrangeNode(gamma)-lagrangeNode(i))
│ │ │ │ -
201 : (lagrangeNode(gamma)-x[0])/(lagrangeNode(gamma)-lagrangeNode(i));
│ │ │ │ -
202 out[i][0][0] += product;
│ │ │ │ -
203 }
│ │ │ │ -
204 }
│ │ │ │ -
205 return;
│ │ │ │ -
206 }
│ │ │ │ -
207
│ │ │ │ -
208 if (dim==2)
│ │ │ │ -
209 {
│ │ │ │ -
210 int n=0;
│ │ │ │ -
211 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
212 for (unsigned int i=0; i<=k-j; i++)
│ │ │ │ -
213 {
│ │ │ │ -
214 // x_0 derivative
│ │ │ │ -
215 out[n][0][0] = 0.0;
│ │ │ │ -
216 R factor=1.0;
│ │ │ │ -
217 for (unsigned int beta=0; beta<j; beta++)
│ │ │ │ -
218 factor *= (x[1]-lagrangeNode(beta))/(lagrangeNode(j)-lagrangeNode(beta));
│ │ │ │ -
219 for (unsigned int a=0; a<i; a++)
│ │ │ │ -
220 {
│ │ │ │ -
221 R product=factor;
│ │ │ │ -
222 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
223 if (alpha==a)
│ │ │ │ -
224 product *= D(1)/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
225 else
│ │ │ │ -
226 product *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
227 for (unsigned int gamma=i+j+1; gamma<=k; gamma++)
│ │ │ │ -
228 product *= (lagrangeNode(gamma)-x[0]-x[1])/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
229 out[n][0][0] += product;
│ │ │ │ -
230 }
│ │ │ │ -
231 for (unsigned int c=i+j+1; c<=k; c++)
│ │ │ │ -
232 {
│ │ │ │ -
233 R product=factor;
│ │ │ │ -
234 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
235 product *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
236 for (unsigned int gamma=i+j+1; gamma<=k; gamma++)
│ │ │ │ -
237 if (gamma==c)
│ │ │ │ -
238 product *= -D(1)/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
239 else
│ │ │ │ -
240 product *= (lagrangeNode(gamma)-x[0]-x[1])/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
241 out[n][0][0] += product;
│ │ │ │ -
242 }
│ │ │ │ -
243
│ │ │ │ -
244 // x_1 derivative
│ │ │ │ -
245 out[n][0][1] = 0.0;
│ │ │ │ -
246 factor = 1.0;
│ │ │ │ -
247 for (unsigned int alpha=0; alpha<i; alpha++)
│ │ │ │ -
248 factor *= (x[0]-lagrangeNode(alpha))/(lagrangeNode(i)-lagrangeNode(alpha));
│ │ │ │ -
249 for (unsigned int b=0; b<j; b++)
│ │ │ │ -
250 {
│ │ │ │ -
251 R product=factor;
│ │ │ │ -
252 for (unsigned int beta=0; beta<j; beta++)
│ │ │ │ -
253 if (beta==b)
│ │ │ │ -
254 product *= D(1)/(lagrangeNode(j)-lagrangeNode(beta));
│ │ │ │ -
255 else
│ │ │ │ -
256 product *= (x[1]-lagrangeNode(beta))/(lagrangeNode(j)-lagrangeNode(beta));
│ │ │ │ -
257 for (unsigned int gamma=i+j+1; gamma<=k; gamma++)
│ │ │ │ -
258 product *= (lagrangeNode(gamma)-x[0]-x[1])/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
259 out[n][0][1] += product;
│ │ │ │ -
260 }
│ │ │ │ -
261 for (unsigned int c=i+j+1; c<=k; c++)
│ │ │ │ -
262 {
│ │ │ │ -
263 R product=factor;
│ │ │ │ -
264 for (unsigned int beta=0; beta<j; beta++)
│ │ │ │ -
265 product *= (x[1]-lagrangeNode(beta))/(lagrangeNode(j)-lagrangeNode(beta));
│ │ │ │ -
266 for (unsigned int gamma=i+j+1; gamma<=k; gamma++)
│ │ │ │ -
267 if (gamma==c)
│ │ │ │ -
268 product *= -D(1)/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
269 else
│ │ │ │ -
270 product *= (lagrangeNode(gamma)-x[0]-x[1])/(lagrangeNode(gamma)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
271 out[n][0][1] += product;
│ │ │ │ -
272 }
│ │ │ │ -
273
│ │ │ │ -
274 n++;
│ │ │ │ -
275 }
│ │ │ │ -
276
│ │ │ │ -
277 return;
│ │ │ │ -
278 }
│ │ │ │ -
279
│ │ │ │ -
280 if (dim!=3)
│ │ │ │ -
281 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalBasis only implemented for dim==3!");
│ │ │ │ -
282
│ │ │ │ -
283 // Specialization for arbitrary order and dim==3
│ │ │ │ -
284 typename Traits::DomainType kx = x;
│ │ │ │ -
285 kx *= k;
│ │ │ │ -
286 unsigned int n = 0;
│ │ │ │ -
287 unsigned int i[4];
│ │ │ │ -
288 R factor[4];
│ │ │ │ -
289 for (i[2] = 0; i[2] <= k; ++i[2])
│ │ │ │ -
290 {
│ │ │ │ -
291 factor[2] = 1.0;
│ │ │ │ -
292 for (unsigned int j = 0; j < i[2]; ++j)
│ │ │ │ -
293 factor[2] *= (kx[2]-j) / (i[2]-j);
│ │ │ │ -
294 for (i[1] = 0; i[1] <= k - i[2]; ++i[1])
│ │ │ │ -
295 {
│ │ │ │ -
296 factor[1] = 1.0;
│ │ │ │ -
297 for (unsigned int j = 0; j < i[1]; ++j)
│ │ │ │ -
298 factor[1] *= (kx[1]-j) / (i[1]-j);
│ │ │ │ -
299 for (i[0] = 0; i[0] <= k - i[1] - i[2]; ++i[0])
│ │ │ │ -
300 {
│ │ │ │ -
301 factor[0] = 1.0;
│ │ │ │ -
302 for (unsigned int j = 0; j < i[0]; ++j)
│ │ │ │ -
303 factor[0] *= (kx[0]-j) / (i[0]-j);
│ │ │ │ -
304 i[3] = k - i[0] - i[1] - i[2];
│ │ │ │ -
305 D kx3 = k - kx[0] - kx[1] - kx[2];
│ │ │ │ -
306 R sum3 = 0.0;
│ │ │ │ -
307 factor[3] = 1.0;
│ │ │ │ -
308 for (unsigned int j = 0; j < i[3]; ++j)
│ │ │ │ -
309 factor[3] /= i[3] - j;
│ │ │ │ -
310 R prod_all = factor[0] * factor[1] * factor[2] * factor[3];
│ │ │ │ -
311 for (unsigned int j = 0; j < i[3]; ++j)
│ │ │ │ -
312 {
│ │ │ │ -
313 R prod = prod_all;
│ │ │ │ -
314 for (unsigned int l = 0; l < i[3]; ++l)
│ │ │ │ -
315 if (j == l)
│ │ │ │ -
316 prod *= -R(k);
│ │ │ │ -
317 else
│ │ │ │ -
318 prod *= kx3 - l;
│ │ │ │ -
319 sum3 += prod;
│ │ │ │ -
320 }
│ │ │ │ -
321 for (unsigned int j = 0; j < i[3]; ++j)
│ │ │ │ -
322 factor[3] *= kx3 - j;
│ │ │ │ -
323 for (unsigned int m = 0; m < 3; ++m)
│ │ │ │ -
324 {
│ │ │ │ -
325 out[n][0][m] = sum3;
│ │ │ │ -
326 for (unsigned int j = 0; j < i[m]; ++j)
│ │ │ │ -
327 {
│ │ │ │ -
328 R prod = factor[3];
│ │ │ │ -
329 for (unsigned int p = 0; p < 3; ++p)
│ │ │ │ -
330 {
│ │ │ │ -
331 if (m == p)
│ │ │ │ -
332 for (unsigned int l = 0; l < i[p]; ++l)
│ │ │ │ -
333 prod *= (j==l) ? R(k) / (i[p]-l) : (kx[p]-l) / (i[p]-l);
│ │ │ │ -
334 else
│ │ │ │ -
335 prod *= factor[p];
│ │ │ │ -
336 }
│ │ │ │ -
337 out[n][0][m] += prod;
│ │ │ │ -
338 }
│ │ │ │ -
339 }
│ │ │ │ -
340 n++;
│ │ │ │ -
341 }
│ │ │ │ -
342 }
│ │ │ │ -
343 }
│ │ │ │ -
344 }
│ │ │ │ -
345
│ │ │ │ -
352 void partial(const std::array<unsigned int,dim>& order,
│ │ │ │ -
353 const typename Traits::DomainType& in,
│ │ │ │ -
354 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
355 {
│ │ │ │ -
356 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
357
│ │ │ │ -
358 out.resize(size());
│ │ │ │ -
359
│ │ │ │ -
360 if (totalOrder == 0) {
│ │ │ │ -
361 evaluateFunction(in, out);
│ │ │ │ -
362 return;
│ │ │ │ -
363 }
│ │ │ │ -
364
│ │ │ │ -
365 if (k==0)
│ │ │ │ -
366 {
│ │ │ │ -
367 out[0] = 0;
│ │ │ │ -
368 return;
│ │ │ │ -
369 }
│ │ │ │ -
370
│ │ │ │ -
371 if (k==1)
│ │ │ │ -
372 {
│ │ │ │ -
373 if (totalOrder==1)
│ │ │ │ -
374 {
│ │ │ │ -
375 auto direction = std::find(order.begin(), order.end(), 1);
│ │ │ │ -
376
│ │ │ │ -
377 out[0] = -1;
│ │ │ │ -
378 for (unsigned int i=0; i<dim; i++)
│ │ │ │ -
379 out[i+1] = (i==(direction-order.begin()));
│ │ │ │ -
380 }
│ │ │ │ -
381 else // all higher order derivatives are zero
│ │ │ │ -
382 std::fill(out.begin(), out.end(), 0);
│ │ │ │ -
383 return;
│ │ │ │ -
384 }
│ │ │ │ -
385
│ │ │ │ -
386 if (dim==2)
│ │ │ │ -
387 {
│ │ │ │ -
388 auto lagrangeNode = [](unsigned int i) { return ((D)i)/k; };
│ │ │ │ -
389
│ │ │ │ -
390 // Helper method: Return a single Lagrangian factor of l_ij evaluated at x
│ │ │ │ -
391 auto lagrangianFactor = [&lagrangeNode]
│ │ │ │ -
392 (const int no, const int i, const int j, const typename Traits::DomainType& x)
│ │ │ │ -
393 -> typename Traits::RangeType
│ │ │ │ -
394 {
│ │ │ │ -
395 if ( no < i)
│ │ │ │ -
396 return (x[0]-lagrangeNode(no))/(lagrangeNode(i)-lagrangeNode(no));
│ │ │ │ -
397 if (no < i+j)
│ │ │ │ -
398 return (x[1]-lagrangeNode(no-i))/(lagrangeNode(j)-lagrangeNode(no-i));
│ │ │ │ -
399 return (lagrangeNode(no+1)-x[0]-x[1])/(lagrangeNode(no+1)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
400 };
│ │ │ │ -
401
│ │ │ │ -
402 // Helper method: Return the derivative of a single Lagrangian factor of l_ij evaluated at x
│ │ │ │ -
403 // direction: Derive in x-direction if this is 0, otherwise derive in y direction
│ │ │ │ -
404 auto lagrangianFactorDerivative = [&lagrangeNode]
│ │ │ │ -
405 (const int direction, const int no, const int i, const int j, const typename Traits::DomainType&)
│ │ │ │ -
406 -> typename Traits::RangeType
│ │ │ │ -
407 {
│ │ │ │ -
408 using T = typename Traits::RangeType;
│ │ │ │ -
409 if ( no < i)
│ │ │ │ -
410 return (direction == 0) ? T(1.0/(lagrangeNode(i)-lagrangeNode(no))) : T(0);
│ │ │ │ -
411
│ │ │ │ -
412 if (no < i+j)
│ │ │ │ -
413 return (direction == 0) ? T(0) : T(1.0/(lagrangeNode(j)-lagrangeNode(no-i)));
│ │ │ │ -
414
│ │ │ │ -
415 return -1.0/(lagrangeNode(no+1)-lagrangeNode(i)-lagrangeNode(j));
│ │ │ │ -
416 };
│ │ │ │ -
417
│ │ │ │ -
418 if (totalOrder==1)
│ │ │ │ -
419 {
│ │ │ │ -
420 int direction = std::find(order.begin(), order.end(), 1)-order.begin();
│ │ │ │ -
421
│ │ │ │ -
422 int n=0;
│ │ │ │ -
423 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
424 {
│ │ │ │ -
425 for (unsigned int i=0; i<=k-j; i++, n++)
│ │ │ │ -
426 {
│ │ │ │ -
427 out[n] = 0.0;
│ │ │ │ -
428 for (unsigned int no1=0; no1 < k; no1++)
│ │ │ │ -
429 {
│ │ │ │ -
430 R factor = lagrangianFactorDerivative(direction, no1, i, j, in);
│ │ │ │ -
431 for (unsigned int no2=0; no2 < k; no2++)
│ │ │ │ -
432 if (no1 != no2)
│ │ │ │ -
433 factor *= lagrangianFactor(no2, i, j, in);
│ │ │ │ -
434
│ │ │ │ -
435 out[n] += factor;
│ │ │ │ -
436 }
│ │ │ │ -
437 }
│ │ │ │ -
438 }
│ │ │ │ -
439 return;
│ │ │ │ -
440 }
│ │ │ │ -
441
│ │ │ │ -
442 if (totalOrder==2)
│ │ │ │ -
443 {
│ │ │ │ -
444 std::array<int,2> directions;
│ │ │ │ -
445 unsigned int counter = 0;
│ │ │ │ -
446 auto nonconstOrder = order; // need a copy that I can modify
│ │ │ │ -
447 for (int i=0; i<2; i++)
│ │ │ │ -
448 {
│ │ │ │ -
449 while (nonconstOrder[i])
│ │ │ │ -
450 {
│ │ │ │ -
451 directions[counter++] = i;
│ │ │ │ -
452 nonconstOrder[i]--;
│ │ │ │ -
453 }
│ │ │ │ -
454 }
│ │ │ │ -
455
│ │ │ │ -
456 //f = prod_{i} f_i -> dxa dxb f = sum_{i} {dxa f_i sum_{k \neq i} dxb f_k prod_{l \neq k,i} f_l
│ │ │ │ -
457 int n=0;
│ │ │ │ -
458 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
459 {
│ │ │ │ -
460 for (unsigned int i=0; i<=k-j; i++, n++)
│ │ │ │ -
461 {
│ │ │ │ -
462 R res = 0.0;
│ │ │ │ -
463
│ │ │ │ -
464 for (unsigned int no1=0; no1 < k; no1++)
│ │ │ │ -
465 {
│ │ │ │ -
466 R factor1 = lagrangianFactorDerivative(directions[0], no1, i, j, in);
│ │ │ │ -
467 for (unsigned int no2=0; no2 < k; no2++)
│ │ │ │ -
468 {
│ │ │ │ -
469 if (no1 == no2)
│ │ │ │ -
470 continue;
│ │ │ │ -
471 R factor2 = factor1*lagrangianFactorDerivative(directions[1], no2, i, j, in);
│ │ │ │ -
472 for (unsigned int no3=0; no3 < k; no3++)
│ │ │ │ -
473 {
│ │ │ │ -
474 if (no3 == no1 || no3 == no2)
│ │ │ │ -
475 continue;
│ │ │ │ -
476 factor2 *= lagrangianFactor(no3, i, j, in);
│ │ │ │ -
477 }
│ │ │ │ -
478 res += factor2;
│ │ │ │ -
479 }
│ │ │ │ -
480 }
│ │ │ │ -
481 out[n] = res;
│ │ │ │ -
482 }
│ │ │ │ -
483 }
│ │ │ │ -
484
│ │ │ │ -
485 return;
│ │ │ │ -
486 } // totalOrder==2
│ │ │ │ -
487
│ │ │ │ -
488 } // dim==2
│ │ │ │ -
489
│ │ │ │ -
490 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ -
491 }
│ │ │ │ -
492
│ │ │ │ -
494 static constexpr unsigned int order ()
│ │ │ │ -
495 {
│ │ │ │ -
496 return k;
│ │ │ │ -
497 }
│ │ │ │ -
498 };
│ │ │ │ -
499
│ │ │ │ -
505 template<unsigned int dim, unsigned int k>
│ │ │ │ -
506 class LagrangeSimplexLocalCoefficients
│ │ │ │ -
507 {
│ │ │ │ -
508 public:
│ │ │ │ -
510 LagrangeSimplexLocalCoefficients ()
│ │ │ │ -
511 : localKeys_(size())
│ │ │ │ -
512 {
│ │ │ │ -
513 if (k==0)
│ │ │ │ -
514 {
│ │ │ │ -
515 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ -
516 return;
│ │ │ │ -
517 }
│ │ │ │ -
518
│ │ │ │ -
519 if (k==1)
│ │ │ │ -
520 {
│ │ │ │ -
521 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
522 localKeys_[i] = LocalKey(i,dim,0);
│ │ │ │ -
523 return;
│ │ │ │ -
524 }
│ │ │ │ -
525
│ │ │ │ -
526 if (dim==1)
│ │ │ │ -
527 {
│ │ │ │ -
528 // Order is at least 2 here
│ │ │ │ -
529 localKeys_[0] = LocalKey(0,1,0); // vertex dof
│ │ │ │ -
530 for (unsigned int i=1; i<k; i++)
│ │ │ │ -
531 localKeys_[i] = LocalKey(0,0,i-1); // element dofs
│ │ │ │ -
532 localKeys_.back() = LocalKey(1,1,0); // vertex dof
│ │ │ │ -
533 return;
│ │ │ │ -
534 }
│ │ │ │ -
535
│ │ │ │ -
536 if (dim==2)
│ │ │ │ -
537 {
│ │ │ │ -
538 int n=0;
│ │ │ │ -
539 int c=0;
│ │ │ │ -
540 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
541 for (unsigned int i=0; i<=k-j; i++)
│ │ │ │ -
542 {
│ │ │ │ -
543 if (i==0 && j==0)
│ │ │ │ -
544 {
│ │ │ │ -
545 localKeys_[n++] = LocalKey(0,2,0);
│ │ │ │ -
546 continue;
│ │ │ │ -
547 }
│ │ │ │ -
548 if (i==k && j==0)
│ │ │ │ -
549 {
│ │ │ │ -
550 localKeys_[n++] = LocalKey(1,2,0);
│ │ │ │ -
551 continue;
│ │ │ │ -
552 }
│ │ │ │ -
553 if (i==0 && j==k)
│ │ │ │ -
554 {
│ │ │ │ -
555 localKeys_[n++] = LocalKey(2,2,0);
│ │ │ │ -
556 continue;
│ │ │ │ -
557 }
│ │ │ │ -
558 if (j==0)
│ │ │ │ -
559 {
│ │ │ │ -
560 localKeys_[n++] = LocalKey(0,1,i-1);
│ │ │ │ -
561 continue;
│ │ │ │ -
562 }
│ │ │ │ -
563 if (i==0)
│ │ │ │ -
564 {
│ │ │ │ -
565 localKeys_[n++] = LocalKey(1,1,j-1);
│ │ │ │ -
566 continue;
│ │ │ │ -
567 }
│ │ │ │ -
568 if (i+j==k)
│ │ │ │ -
569 {
│ │ │ │ -
570 localKeys_[n++] = LocalKey(2,1,j-1);
│ │ │ │ -
571 continue;
│ │ │ │ -
572 }
│ │ │ │ -
573 localKeys_[n++] = LocalKey(0,0,c++);
│ │ │ │ -
574 }
│ │ │ │ -
575 return;
│ │ │ │ -
576 }
│ │ │ │ -
577
│ │ │ │ -
578 if (dim==3)
│ │ │ │ -
579 {
│ │ │ │ -
580 std::array<unsigned int, dim+1> vertexMap;
│ │ │ │ -
581 for (unsigned int i=0; i<=dim; i++)
│ │ │ │ -
582 vertexMap[i] = i;
│ │ │ │ -
583 generateLocalKeys(vertexMap);
│ │ │ │ -
584 return;
│ │ │ │ -
585 }
│ │ │ │ -
586 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only implemented for k<=1 or dim<=3!");
│ │ │ │ -
587 }
│ │ │ │ -
588
│ │ │ │ -
595 LagrangeSimplexLocalCoefficients (const std::array<unsigned int, dim+1> vertexMap)
│ │ │ │ -
596 : localKeys_(size())
│ │ │ │ -
597 {
│ │ │ │ -
598 if (dim!=2 && dim!=3)
│ │ │ │ -
599 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only implemented for dim==2 and dim==3!");
│ │ │ │ -
600
│ │ │ │ -
601 generateLocalKeys(vertexMap);
│ │ │ │ -
602 }
│ │ │ │ -
603
│ │ │ │ -
604
│ │ │ │ -
605 template<class VertexMap>
│ │ │ │ -
606 LagrangeSimplexLocalCoefficients(const VertexMap &vertexmap)
│ │ │ │ -
607 : localKeys_(size())
│ │ │ │ -
608 {
│ │ │ │ -
609 if (dim!=2 && dim!=3)
│ │ │ │ -
610 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only implemented for dim==2 and dim==3!");
│ │ │ │ -
611
│ │ │ │ -
612 std::array<unsigned int, dim+1> vertexmap_array;
│ │ │ │ -
613 std::copy(vertexmap, vertexmap + dim + 1, vertexmap_array.begin());
│ │ │ │ -
614 generateLocalKeys(vertexmap_array);
│ │ │ │ -
615 }
│ │ │ │ -
616
│ │ │ │ -
618 static constexpr std::size_t size ()
│ │ │ │ -
619 {
│ │ │ │ -
620 return binomial(k+dim,dim);
│ │ │ │ -
621 }
│ │ │ │ -
622
│ │ │ │ -
624 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
625 {
│ │ │ │ -
626 return localKeys_[i];
│ │ │ │ -
627 }
│ │ │ │ -
628
│ │ │ │ -
629 private:
│ │ │ │ -
630 std::vector<LocalKey> localKeys_;
│ │ │ │ -
631
│ │ │ │ -
632 void generateLocalKeys(const std::array<unsigned int, dim+1> vertexMap)
│ │ │ │ -
633 {
│ │ │ │ -
634 if (k==0)
│ │ │ │ -
635 {
│ │ │ │ -
636 localKeys_[0] = LocalKey(0,0,0);
│ │ │ │ -
637 return;
│ │ │ │ -
638 }
│ │ │ │ -
639
│ │ │ │ -
640 if (dim==2)
│ │ │ │ -
641 {
│ │ │ │ -
642 // Create default assignment
│ │ │ │ -
643 int n=0;
│ │ │ │ -
644 int c=0;
│ │ │ │ -
645 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
646 for (unsigned int i=0; i<=k-j; i++)
│ │ │ │ -
647 {
│ │ │ │ -
648 if (i==0 && j==0)
│ │ │ │ -
649 {
│ │ │ │ -
650 localKeys_[n++] = LocalKey(0,2,0);
│ │ │ │ -
651 continue;
│ │ │ │ -
652 }
│ │ │ │ -
653 if (i==k && j==0)
│ │ │ │ -
654 {
│ │ │ │ -
655 localKeys_[n++] = LocalKey(1,2,0);
│ │ │ │ -
656 continue;
│ │ │ │ -
657 }
│ │ │ │ -
658 if (i==0 && j==k)
│ │ │ │ -
659 {
│ │ │ │ -
660 localKeys_[n++] = LocalKey(2,2,0);
│ │ │ │ -
661 continue;
│ │ │ │ -
662 }
│ │ │ │ -
663 if (j==0)
│ │ │ │ -
664 {
│ │ │ │ -
665 localKeys_[n++] = LocalKey(0,1,i-1);
│ │ │ │ -
666 continue;
│ │ │ │ -
667 }
│ │ │ │ -
668 if (i==0)
│ │ │ │ -
669 {
│ │ │ │ -
670 localKeys_[n++] = LocalKey(1,1,j-1);
│ │ │ │ -
671 continue;
│ │ │ │ -
672 }
│ │ │ │ -
673 if (i+j==k)
│ │ │ │ -
674 {
│ │ │ │ -
675 localKeys_[n++] = LocalKey(2,1,j-1);
│ │ │ │ -
676 continue;
│ │ │ │ -
677 }
│ │ │ │ -
678 localKeys_[n++] = LocalKey(0,0,c++);
│ │ │ │ -
679 }
│ │ │ │ -
680
│ │ │ │ -
681 // Flip edge orientations, if requested
│ │ │ │ -
682 bool flip[3];
│ │ │ │ -
683 flip[0] = vertexMap[0] > vertexMap[1];
│ │ │ │ -
684 flip[1] = vertexMap[0] > vertexMap[2];
│ │ │ │ -
685 flip[2] = vertexMap[1] > vertexMap[2];
│ │ │ │ -
686 for (std::size_t i=0; i<size(); i++)
│ │ │ │ -
687 if (localKeys_[i].codim()==1 && flip[localKeys_[i].subEntity()])
│ │ │ │ -
688 localKeys_[i].index(k-2-localKeys_[i].index());
│ │ │ │ -
689
│ │ │ │ -
690 return;
│ │ │ │ -
691 }
│ │ │ │ -
692
│ │ │ │ -
693 if (dim!=3)
│ │ │ │ -
694 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only implemented for dim==3!");
│ │ │ │ -
695
│ │ │ │ -
696 unsigned int subindex[16];
│ │ │ │ -
697 unsigned int codim_count[4] = {0};
│ │ │ │ -
698 for (unsigned int m = 1; m < 16; ++m)
│ │ │ │ -
699 {
│ │ │ │ -
700 unsigned int codim = !(m&1) + !(m&2) + !(m&4) + !(m&8);
│ │ │ │ -
701 subindex[m] = codim_count[codim]++;
│ │ │ │ -
702 }
│ │ │ │ -
703
│ │ │ │ -
704 int a1 = (3*k + 12)*k + 11;
│ │ │ │ -
705 int a2 = -3*k - 6;
│ │ │ │ -
706 unsigned int dof_count[16] = {0};
│ │ │ │ -
707 unsigned int i[4];
│ │ │ │ -
708 for (i[3] = 0; i[3] <= k; ++i[3])
│ │ │ │ -
709 for (i[2] = 0; i[2] <= k - i[3]; ++i[2])
│ │ │ │ -
710 for (i[1] = 0; i[1] <= k - i[2] - i[3]; ++i[1])
│ │ │ │ -
711 {
│ │ │ │ -
712 i[0] = k - i[1] - i[2] - i[3];
│ │ │ │ -
713 unsigned int j[4];
│ │ │ │ -
714 unsigned int entity = 0;
│ │ │ │ -
715 unsigned int codim = 0;
│ │ │ │ -
716 for (unsigned int m = 0; m < 4; ++m)
│ │ │ │ -
717 {
│ │ │ │ -
718 j[m] = i[vertexMap[m]];
│ │ │ │ -
719 entity += !!j[m] << m;
│ │ │ │ -
720 codim += !j[m];
│ │ │ │ -
721 }
│ │ │ │ -
722 int local_index = j[3]*(a1 + (a2 + j[3])*j[3])/6
│ │ │ │ -
723 + j[2]*(2*(k - j[3]) + 3 - j[2])/2 + j[1];
│ │ │ │ -
724 localKeys_[local_index] = LocalKey(subindex[entity], codim, dof_count[entity]++);
│ │ │ │ -
725 }
│ │ │ │ -
726 }
│ │ │ │ -
727 };
│ │ │ │ -
728
│ │ │ │ -
733 template<class LocalBasis>
│ │ │ │ -
734 class LagrangeSimplexLocalInterpolation
│ │ │ │ -
735 {
│ │ │ │ -
736 static const int kdiv = (LocalBasis::order() == 0 ? 1 : LocalBasis::order());
│ │ │ │ -
737 public:
│ │ │ │ -
738
│ │ │ │ -
746 template<typename F, typename C>
│ │ │ │ -
747 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
748 {
│ │ │ │ -
749 constexpr auto dim = LocalBasis::Traits::dimDomain;
│ │ │ │ -
750 constexpr auto k = LocalBasis::order();
│ │ │ │ -
751 using D = typename LocalBasis::Traits::DomainFieldType;
│ │ │ │ -
752
│ │ │ │ -
753 typename LocalBasis::Traits::DomainType x;
│ │ │ │ -
754 auto&& f = Impl::makeFunctionWithCallOperator<typename LocalBasis::Traits::DomainType>(ff);
│ │ │ │ -
755
│ │ │ │ -
756 out.resize(LocalBasis::size());
│ │ │ │ -
757
│ │ │ │ -
758 // Specialization for zero-order case
│ │ │ │ -
759 if (k==0)
│ │ │ │ -
760 {
│ │ │ │ -
761 auto center = ReferenceElements<D,dim>::simplex().position(0,0);
│ │ │ │ -
762 out[0] = f(center);
│ │ │ │ -
763 return;
│ │ │ │ -
764 }
│ │ │ │ -
765
│ │ │ │ -
766 // Specialization for first-order case
│ │ │ │ -
767 if (k==1)
│ │ │ │ -
768 {
│ │ │ │ -
769 // vertex 0
│ │ │ │ -
770 std::fill(x.begin(), x.end(), 0);
│ │ │ │ -
771 out[0] = f(x);
│ │ │ │ -
772
│ │ │ │ -
773 // remaining vertices
│ │ │ │ -
774 for (int i=0; i<dim; i++)
│ │ │ │ -
775 {
│ │ │ │ -
776 for (int j=0; j<dim; j++)
│ │ │ │ -
777 x[j] = (i==j);
│ │ │ │ -
778
│ │ │ │ -
779 out[i+1] = f(x);
│ │ │ │ -
780 }
│ │ │ │ -
781 return;
│ │ │ │ -
782 }
│ │ │ │ -
783
│ │ │ │ -
784 if (dim==1)
│ │ │ │ -
785 {
│ │ │ │ -
786 for (unsigned int i=0; i<k+1; i++)
│ │ │ │ -
787 {
│ │ │ │ -
788 x[0] = ((D)i)/k;
│ │ │ │ -
789 out[i] = f(x);
│ │ │ │ -
790 }
│ │ │ │ -
791 return;
│ │ │ │ -
792 }
│ │ │ │ -
793
│ │ │ │ -
794 if (dim==2)
│ │ │ │ -
795 {
│ │ │ │ -
796 int n=0;
│ │ │ │ -
797 for (unsigned int j=0; j<=k; j++)
│ │ │ │ -
798 for (unsigned int i=0; i<=k-j; i++)
│ │ │ │ -
799 {
│ │ │ │ -
800 x = { ((D)i)/k, ((D)j)/k };
│ │ │ │ -
801 out[n] = f(x);
│ │ │ │ -
802 n++;
│ │ │ │ -
803 }
│ │ │ │ -
804 return;
│ │ │ │ -
805 }
│ │ │ │ -
806
│ │ │ │ -
807 if (dim!=3)
│ │ │ │ -
808 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalInterpolation only implemented for dim<=3!");
│ │ │ │ -
809
│ │ │ │ -
810 int n=0;
│ │ │ │ -
811 for (int i2 = 0; i2 <= (int)k; i2++)
│ │ │ │ -
812 for (int i1 = 0; i1 <= (int)k-i2; i1++)
│ │ │ │ -
813 for (int i0 = 0; i0 <= (int)k-i1-i2; i0++)
│ │ │ │ -
814 {
│ │ │ │ -
815 x[0] = ((D)i0)/((D)kdiv);
│ │ │ │ -
816 x[1] = ((D)i1)/((D)kdiv);
│ │ │ │ -
817 x[2] = ((D)i2)/((D)kdiv);
│ │ │ │ -
818 out[n] = f(x);
│ │ │ │ -
819 n++;
│ │ │ │ -
820 }
│ │ │ │ -
821 }
│ │ │ │ -
822
│ │ │ │ -
823 };
│ │ │ │ -
824
│ │ │ │ -
825} } // namespace Dune::Impl
│ │ │ │ -
826
│ │ │ │ -
827namespace Dune
│ │ │ │ -
828{
│ │ │ │ -
836 template<class D, class R, int d, int k>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
838 {
│ │ │ │ -
839 public:
│ │ │ │ - │ │ │ │ -
843 Impl::LagrangeSimplexLocalCoefficients<d,k>,
│ │ │ │ -
844 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,d,k> > >;
│ │ │ │ -
845
│ │ │ │ - │ │ │ │ -
848
│ │ │ │ -
853 template<typename VertexMap>
│ │ │ │ -
│ │ │ │ -
854 LagrangeSimplexLocalFiniteElement(const VertexMap& vertexmap)
│ │ │ │ -
855 : coefficients_(vertexmap)
│ │ │ │ -
856 {}
│ │ │ │ -
│ │ │ │ -
857
│ │ │ │ -
│ │ │ │ -
860 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
861 {
│ │ │ │ -
862 return basis_;
│ │ │ │ -
863 }
│ │ │ │ -
│ │ │ │ -
864
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
868 {
│ │ │ │ -
869 return coefficients_;
│ │ │ │ -
870 }
│ │ │ │ -
│ │ │ │ -
871
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
875 {
│ │ │ │ -
876 return interpolation_;
│ │ │ │ -
877 }
│ │ │ │ -
│ │ │ │ -
878
│ │ │ │ -
│ │ │ │ -
880 static constexpr std::size_t size ()
│ │ │ │ -
881 {
│ │ │ │ -
882 return Impl::LagrangeSimplexLocalBasis<D,R,d,k>::size();
│ │ │ │ -
883 }
│ │ │ │ -
│ │ │ │ -
884
│ │ │ │ -
│ │ │ │ -
887 static constexpr GeometryType type ()
│ │ │ │ -
888 {
│ │ │ │ -
889 return GeometryTypes::simplex(d);
│ │ │ │ -
890 }
│ │ │ │ -
│ │ │ │ -
891
│ │ │ │ -
892 private:
│ │ │ │ -
893 Impl::LagrangeSimplexLocalBasis<D,R,d,k> basis_;
│ │ │ │ -
894 Impl::LagrangeSimplexLocalCoefficients<d,k> coefficients_;
│ │ │ │ -
895 Impl::LagrangeSimplexLocalInterpolation<Impl::LagrangeSimplexLocalBasis<D,R,d,k> > interpolation_;
│ │ │ │ -
896 };
│ │ │ │ -
│ │ │ │ -
897
│ │ │ │ -
898} // namespace Dune
│ │ │ │ -
899
│ │ │ │ -
900#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for(int i=0; i< size(); i++)
│ │ │ │ +
31 li[i] = LocalKey(i,1,0);
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 std::size_t size () const
│ │ │ │ +
36 {
│ │ │ │ +
37 return 5;
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
42 {
│ │ │ │ +
43 return li[i];
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector<LocalKey> li;
│ │ │ │ +
48 };
│ │ │ │ +
│ │ │ │ +
49}
│ │ │ │ +
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
R RangeType
range type
Definition common/localbasis.hh:51
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order.
Definition lagrangesimplex.hh:838
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Returns object that evaluates degrees of freedom.
Definition lagrangesimplex.hh:874
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Returns the local basis, i.e., the set of shape functions.
Definition lagrangesimplex.hh:860
│ │ │ │ -
LagrangeSimplexLocalFiniteElement()
Definition lagrangesimplex.hh:847
│ │ │ │ -
static constexpr std::size_t size()
The number of shape functions.
Definition lagrangesimplex.hh:880
│ │ │ │ -
LagrangeSimplexLocalFiniteElement(const VertexMap &vertexmap)
Definition lagrangesimplex.hh:854
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Returns the assignment of the degrees of freedom to the element subentities.
Definition lagrangesimplex.hh:867
│ │ │ │ -
static constexpr GeometryType type()
The reference element that the local finite element is defined on.
Definition lagrangesimplex.hh:887
│ │ │ │ - │ │ │ │ - │ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on pyramids.
Definition raviartthomas0pyramidlocalcoefficients.hh:24
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas0pyramidlocalcoefficients.hh:41
│ │ │ │ +
RT0PyramidLocalCoefficients()
Standard constructor.
Definition raviartthomas0pyramidlocalcoefficients.hh:28
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas0pyramidlocalcoefficients.hh:35
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,926 +1,73 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -lagrangesimplex.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ +raviartthomas0pyramidlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ -12#include │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ 15 │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e { namespace Impl │ │ │ │ │ -24{ │ │ │ │ │ -35 template │ │ │ │ │ -36 class LagrangeSimplexLocalBasis │ │ │ │ │ -37 { │ │ │ │ │ -38 public: │ │ │ │ │ -39 using Traits = │ │ │ │ │ -LocalBasisTraits,R,1,FieldVector,FieldMatrix │ │ │ │ │ ->; │ │ │ │ │ -40 │ │ │ │ │ -45 static constexpr unsigned int size () │ │ │ │ │ -46 { │ │ │ │ │ -47 return binomial(k+dim,dim); │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -51 void evaluateFunction(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ -52 std::vector& out) const │ │ │ │ │ -53 { │ │ │ │ │ -54 out.resize(size()); │ │ │ │ │ -55 │ │ │ │ │ -56 // Specialization for zero-order case │ │ │ │ │ -57 if (k==0) │ │ │ │ │ -58 { │ │ │ │ │ -59 out[0] = 1; │ │ │ │ │ -60 return; │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -63 // Specialization for first-order case │ │ │ │ │ -64 if (k==1) │ │ │ │ │ -65 { │ │ │ │ │ -66 out[0] = 1.0; │ │ │ │ │ -67 for (size_t i=0; i=2); │ │ │ │ │ -76 │ │ │ │ │ -77 auto lagrangeNode = [](unsigned int i) { return ((D)i)/k; }; │ │ │ │ │ -78 │ │ │ │ │ -79 if (dim==1) │ │ │ │ │ -80 { │ │ │ │ │ -81 for (unsigned int i=0; i=2 only │ │ │ │ │ -implemented for dim==1 or dim==3"); │ │ │ │ │ -113 │ │ │ │ │ -114 typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e kx = x; │ │ │ │ │ -115 kx *= k; │ │ │ │ │ -116 unsigned int n = 0; │ │ │ │ │ -117 unsigned int i[4]; │ │ │ │ │ -118 R factor[4]; │ │ │ │ │ -119 for (i[2] = 0; i[2] <= k; ++i[2]) │ │ │ │ │ -120 { │ │ │ │ │ -121 factor[2] = 1.0; │ │ │ │ │ -122 for (unsigned int j = 0; j < i[2]; ++j) │ │ │ │ │ -123 factor[2] *= (kx[2]-j) / (i[2]-j); │ │ │ │ │ -124 for (i[1] = 0; i[1] <= k - i[2]; ++i[1]) │ │ │ │ │ -125 { │ │ │ │ │ -126 factor[1] = 1.0; │ │ │ │ │ -127 for (unsigned int j = 0; j < i[1]; ++j) │ │ │ │ │ -128 factor[1] *= (kx[1]-j) / (i[1]-j); │ │ │ │ │ -129 for (i[0] = 0; i[0] <= k - i[1] - i[2]; ++i[0]) │ │ │ │ │ -130 { │ │ │ │ │ -131 factor[0] = 1.0; │ │ │ │ │ -132 for (unsigned int j = 0; j < i[0]; ++j) │ │ │ │ │ -133 factor[0] *= (kx[0]-j) / (i[0]-j); │ │ │ │ │ -134 i[3] = k - i[0] - i[1] - i[2]; │ │ │ │ │ -135 D kx3 = k - kx[0] - kx[1] - kx[2]; │ │ │ │ │ -136 factor[3] = 1.0; │ │ │ │ │ -137 for (unsigned int j = 0; j < i[3]; ++j) │ │ │ │ │ -138 factor[3] *= (kx3-j) / (i[3]-j); │ │ │ │ │ -139 out[n++] = factor[0] * factor[1] * factor[2] * factor[3]; │ │ │ │ │ -140 } │ │ │ │ │ -141 } │ │ │ │ │ -142 } │ │ │ │ │ -143 } │ │ │ │ │ -144 │ │ │ │ │ -150 void evaluateJacobian(const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& x, │ │ │ │ │ -151 std::vector& out) const │ │ │ │ │ -152 { │ │ │ │ │ -153 out.resize(size()); │ │ │ │ │ -154 │ │ │ │ │ -155 // Specialization for k==0 │ │ │ │ │ -156 if (k==0) │ │ │ │ │ -157 { │ │ │ │ │ -158 std::fill(out[0][0].begin(), out[0][0].end(), 0); │ │ │ │ │ -159 return; │ │ │ │ │ -160 } │ │ │ │ │ -161 │ │ │ │ │ -162 // Specialization for k==1 │ │ │ │ │ -163 if (k==1) │ │ │ │ │ -164 { │ │ │ │ │ -165 std::fill(out[0][0].begin(), out[0][0].end(), -1); │ │ │ │ │ -166 │ │ │ │ │ -167 for (unsigned int i=0; i& order, │ │ │ │ │ -353 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -354 std::vector& out) const │ │ │ │ │ -355 { │ │ │ │ │ -356 auto totalOrder = std::accumulate(order.begin(), order.end(), 0); │ │ │ │ │ -357 │ │ │ │ │ -358 out.resize(size()); │ │ │ │ │ -359 │ │ │ │ │ -360 if (totalOrder == 0) { │ │ │ │ │ -361 evaluateFunction(in, out); │ │ │ │ │ -362 return; │ │ │ │ │ -363 } │ │ │ │ │ -364 │ │ │ │ │ -365 if (k==0) │ │ │ │ │ -366 { │ │ │ │ │ -367 out[0] = 0; │ │ │ │ │ -368 return; │ │ │ │ │ -369 } │ │ │ │ │ -370 │ │ │ │ │ -371 if (k==1) │ │ │ │ │ -372 { │ │ │ │ │ -373 if (totalOrder==1) │ │ │ │ │ -374 { │ │ │ │ │ -375 auto direction = std::find(order.begin(), order.end(), 1); │ │ │ │ │ -376 │ │ │ │ │ -377 out[0] = -1; │ │ │ │ │ -378 for (unsigned int i=0; i typename _T_r_a_i_t_s_:_:_R_a_n_g_e_T_y_p_e │ │ │ │ │ -394 { │ │ │ │ │ -395 if ( no < i) │ │ │ │ │ -396 return (x[0]-lagrangeNode(no))/(lagrangeNode(i)-lagrangeNode(no)); │ │ │ │ │ -397 if (no < i+j) │ │ │ │ │ -398 return (x[1]-lagrangeNode(no-i))/(lagrangeNode(j)-lagrangeNode(no-i)); │ │ │ │ │ -399 return (lagrangeNode(no+1)-x[0]-x[1])/(lagrangeNode(no+1)-lagrangeNode(i)- │ │ │ │ │ -lagrangeNode(j)); │ │ │ │ │ -400 }; │ │ │ │ │ -401 │ │ │ │ │ -402 // Helper method: Return the derivative of a single Lagrangian factor of │ │ │ │ │ -l_ij evaluated at x │ │ │ │ │ -403 // direction: Derive in x-direction if this is 0, otherwise derive in y │ │ │ │ │ -direction │ │ │ │ │ -404 auto lagrangianFactorDerivative = [&lagrangeNode] │ │ │ │ │ -405 (const int direction, const int no, const int i, const int j, const │ │ │ │ │ -typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e&) │ │ │ │ │ -406 -> typename _T_r_a_i_t_s_:_:_R_a_n_g_e_T_y_p_e │ │ │ │ │ -407 { │ │ │ │ │ -408 using T = typename _T_r_a_i_t_s_:_:_R_a_n_g_e_T_y_p_e; │ │ │ │ │ -409 if ( no < i) │ │ │ │ │ -410 return (direction == 0) ? T(1.0/(lagrangeNode(i)-lagrangeNode(no))) : T(0); │ │ │ │ │ -411 │ │ │ │ │ -412 if (no < i+j) │ │ │ │ │ -413 return (direction == 0) ? T(0) : T(1.0/(lagrangeNode(j)-lagrangeNode(no- │ │ │ │ │ -i))); │ │ │ │ │ -414 │ │ │ │ │ -415 return -1.0/(lagrangeNode(no+1)-lagrangeNode(i)-lagrangeNode(j)); │ │ │ │ │ -416 }; │ │ │ │ │ -417 │ │ │ │ │ -418 if (totalOrder==1) │ │ │ │ │ -419 { │ │ │ │ │ -420 int direction = std::find(order.begin(), order.end(), 1)-order.begin(); │ │ │ │ │ -421 │ │ │ │ │ -422 int n=0; │ │ │ │ │ -423 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ -424 { │ │ │ │ │ -425 for (unsigned int i=0; i<=k-j; i++, n++) │ │ │ │ │ -426 { │ │ │ │ │ -427 out[n] = 0.0; │ │ │ │ │ -428 for (unsigned int no1=0; no1 < k; no1++) │ │ │ │ │ -429 { │ │ │ │ │ -430 R factor = lagrangianFactorDerivative(direction, no1, i, j, in); │ │ │ │ │ -431 for (unsigned int no2=0; no2 < k; no2++) │ │ │ │ │ -432 if (no1 != no2) │ │ │ │ │ -433 factor *= lagrangianFactor(no2, i, j, in); │ │ │ │ │ -434 │ │ │ │ │ -435 out[n] += factor; │ │ │ │ │ -436 } │ │ │ │ │ -437 } │ │ │ │ │ -438 } │ │ │ │ │ -439 return; │ │ │ │ │ -440 } │ │ │ │ │ -441 │ │ │ │ │ -442 if (totalOrder==2) │ │ │ │ │ -443 { │ │ │ │ │ -444 std::array directions; │ │ │ │ │ -445 unsigned int counter = 0; │ │ │ │ │ -446 auto nonconstOrder = order; // need a copy that I can modify │ │ │ │ │ -447 for (int i=0; i<2; i++) │ │ │ │ │ -448 { │ │ │ │ │ -449 while (nonconstOrder[i]) │ │ │ │ │ -450 { │ │ │ │ │ -451 directions[counter++] = i; │ │ │ │ │ -452 nonconstOrder[i]--; │ │ │ │ │ -453 } │ │ │ │ │ -454 } │ │ │ │ │ -455 │ │ │ │ │ -456 //f = prod_{i} f_i -> dxa dxb f = sum_{i} {dxa f_i sum_{k \neq i} dxb f_k │ │ │ │ │ -prod_{l \neq k,i} f_l │ │ │ │ │ -457 int n=0; │ │ │ │ │ -458 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ -459 { │ │ │ │ │ -460 for (unsigned int i=0; i<=k-j; i++, n++) │ │ │ │ │ -461 { │ │ │ │ │ -462 R res = 0.0; │ │ │ │ │ -463 │ │ │ │ │ -464 for (unsigned int no1=0; no1 < k; no1++) │ │ │ │ │ -465 { │ │ │ │ │ -466 R factor1 = lagrangianFactorDerivative(directions[0], no1, i, j, in); │ │ │ │ │ -467 for (unsigned int no2=0; no2 < k; no2++) │ │ │ │ │ -468 { │ │ │ │ │ -469 if (no1 == no2) │ │ │ │ │ -470 continue; │ │ │ │ │ -471 R factor2 = factor1*lagrangianFactorDerivative(directions[1], no2, i, j, │ │ │ │ │ -in); │ │ │ │ │ -472 for (unsigned int no3=0; no3 < k; no3++) │ │ │ │ │ -473 { │ │ │ │ │ -474 if (no3 == no1 || no3 == no2) │ │ │ │ │ -475 continue; │ │ │ │ │ -476 factor2 *= lagrangianFactor(no3, i, j, in); │ │ │ │ │ -477 } │ │ │ │ │ -478 res += factor2; │ │ │ │ │ -479 } │ │ │ │ │ -480 } │ │ │ │ │ -481 out[n] = res; │ │ │ │ │ -482 } │ │ │ │ │ -483 } │ │ │ │ │ -484 │ │ │ │ │ -485 return; │ │ │ │ │ -486 } // totalOrder==2 │ │ │ │ │ -487 │ │ │ │ │ -488 } // dim==2 │ │ │ │ │ -489 │ │ │ │ │ -490 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ -491 } │ │ │ │ │ -492 │ │ │ │ │ -494 static constexpr unsigned int order () │ │ │ │ │ -495 { │ │ │ │ │ -496 return k; │ │ │ │ │ -497 } │ │ │ │ │ -498 }; │ │ │ │ │ -499 │ │ │ │ │ -505 template │ │ │ │ │ -506 class LagrangeSimplexLocalCoefficients │ │ │ │ │ -507 { │ │ │ │ │ -508 public: │ │ │ │ │ -510 LagrangeSimplexLocalCoefficients () │ │ │ │ │ -511 : localKeys_(size()) │ │ │ │ │ -512 { │ │ │ │ │ -513 if (k==0) │ │ │ │ │ -514 { │ │ │ │ │ -515 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ -516 return; │ │ │ │ │ -517 } │ │ │ │ │ -518 │ │ │ │ │ -519 if (k==1) │ │ │ │ │ -520 { │ │ │ │ │ -521 for (std::size_t i=0; i vertexMap; │ │ │ │ │ -581 for (unsigned int i=0; i<=dim; i++) │ │ │ │ │ -582 vertexMap[i] = i; │ │ │ │ │ -583 generateLocalKeys(vertexMap); │ │ │ │ │ -584 return; │ │ │ │ │ -585 } │ │ │ │ │ -586 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only │ │ │ │ │ -implemented for k<=1 or dim<=3!"); │ │ │ │ │ -587 } │ │ │ │ │ -588 │ │ │ │ │ -595 LagrangeSimplexLocalCoefficients (const std::array │ │ │ │ │ -vertexMap) │ │ │ │ │ -596 : localKeys_(size()) │ │ │ │ │ -597 { │ │ │ │ │ -598 if (dim!=2 && dim!=3) │ │ │ │ │ -599 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only │ │ │ │ │ -implemented for dim==2 and dim==3!"); │ │ │ │ │ -600 │ │ │ │ │ -601 generateLocalKeys(vertexMap); │ │ │ │ │ -602 } │ │ │ │ │ -603 │ │ │ │ │ -604 │ │ │ │ │ -605 template │ │ │ │ │ -606 LagrangeSimplexLocalCoefficients(const VertexMap &vertexmap) │ │ │ │ │ -607 : localKeys_(size()) │ │ │ │ │ -608 { │ │ │ │ │ -609 if (dim!=2 && dim!=3) │ │ │ │ │ -610 DUNE_THROW(NotImplemented, "LagrangeSimplexLocalCoefficients only │ │ │ │ │ -implemented for dim==2 and dim==3!"); │ │ │ │ │ -611 │ │ │ │ │ -612 std::array vertexmap_array; │ │ │ │ │ -613 std::copy(vertexmap, vertexmap + dim + 1, vertexmap_array.begin()); │ │ │ │ │ -614 generateLocalKeys(vertexmap_array); │ │ │ │ │ -615 } │ │ │ │ │ -616 │ │ │ │ │ -618 static constexpr std::size_t size () │ │ │ │ │ -619 { │ │ │ │ │ -620 return binomial(k+dim,dim); │ │ │ │ │ -621 } │ │ │ │ │ -622 │ │ │ │ │ -624 const LocalKey& localKey (std::size_t i) const │ │ │ │ │ -625 { │ │ │ │ │ -626 return localKeys_[i]; │ │ │ │ │ -627 } │ │ │ │ │ -628 │ │ │ │ │ -629 private: │ │ │ │ │ -630 std::vector localKeys_; │ │ │ │ │ -631 │ │ │ │ │ -632 void generateLocalKeys(const std::array vertexMap) │ │ │ │ │ -633 { │ │ │ │ │ -634 if (k==0) │ │ │ │ │ -635 { │ │ │ │ │ -636 localKeys_[0] = LocalKey(0,0,0); │ │ │ │ │ -637 return; │ │ │ │ │ -638 } │ │ │ │ │ -639 │ │ │ │ │ -640 if (dim==2) │ │ │ │ │ -641 { │ │ │ │ │ -642 // Create default assignment │ │ │ │ │ -643 int n=0; │ │ │ │ │ -644 int c=0; │ │ │ │ │ -645 for (unsigned int j=0; j<=k; j++) │ │ │ │ │ -646 for (unsigned int i=0; i<=k-j; i++) │ │ │ │ │ -647 { │ │ │ │ │ -648 if (i==0 && j==0) │ │ │ │ │ -649 { │ │ │ │ │ -650 localKeys_[n++] = LocalKey(0,2,0); │ │ │ │ │ -651 continue; │ │ │ │ │ -652 } │ │ │ │ │ -653 if (i==k && j==0) │ │ │ │ │ -654 { │ │ │ │ │ -655 localKeys_[n++] = LocalKey(1,2,0); │ │ │ │ │ -656 continue; │ │ │ │ │ -657 } │ │ │ │ │ -658 if (i==0 && j==k) │ │ │ │ │ -659 { │ │ │ │ │ -660 localKeys_[n++] = LocalKey(2,2,0); │ │ │ │ │ -661 continue; │ │ │ │ │ -662 } │ │ │ │ │ -663 if (j==0) │ │ │ │ │ -664 { │ │ │ │ │ -665 localKeys_[n++] = LocalKey(0,1,i-1); │ │ │ │ │ -666 continue; │ │ │ │ │ -667 } │ │ │ │ │ -668 if (i==0) │ │ │ │ │ -669 { │ │ │ │ │ -670 localKeys_[n++] = LocalKey(1,1,j-1); │ │ │ │ │ -671 continue; │ │ │ │ │ -672 } │ │ │ │ │ -673 if (i+j==k) │ │ │ │ │ -674 { │ │ │ │ │ -675 localKeys_[n++] = LocalKey(2,1,j-1); │ │ │ │ │ -676 continue; │ │ │ │ │ -677 } │ │ │ │ │ -678 localKeys_[n++] = LocalKey(0,0,c++); │ │ │ │ │ -679 } │ │ │ │ │ -680 │ │ │ │ │ -681 // Flip edge orientations, if requested │ │ │ │ │ -682 bool flip[3]; │ │ │ │ │ -683 flip[0] = vertexMap[0] > vertexMap[1]; │ │ │ │ │ -684 flip[1] = vertexMap[0] > vertexMap[2]; │ │ │ │ │ -685 flip[2] = vertexMap[1] > vertexMap[2]; │ │ │ │ │ -686 for (std::size_t i=0; i │ │ │ │ │ -734 class LagrangeSimplexLocalInterpolation │ │ │ │ │ -735 { │ │ │ │ │ -736 static const int kdiv = (LocalBasis::order() == 0 ? 1 : LocalBasis::order │ │ │ │ │ -()); │ │ │ │ │ -737 public: │ │ │ │ │ -738 │ │ │ │ │ -746 template │ │ │ │ │ -747 void interpolate (const F& ff, std::vector& out) const │ │ │ │ │ -748 { │ │ │ │ │ -749 constexpr auto dim = LocalBasis::Traits::dimDomain; │ │ │ │ │ -750 constexpr auto k = LocalBasis::order(); │ │ │ │ │ -751 using D = typename LocalBasis::Traits::DomainFieldType; │ │ │ │ │ -752 │ │ │ │ │ -753 typename LocalBasis::Traits::DomainType x; │ │ │ │ │ -754 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -755 │ │ │ │ │ -756 out.resize(LocalBasis::size()); │ │ │ │ │ -757 │ │ │ │ │ -758 // Specialization for zero-order case │ │ │ │ │ -759 if (k==0) │ │ │ │ │ -760 { │ │ │ │ │ -761 auto center = ReferenceElements::simplex().position(0,0); │ │ │ │ │ -762 out[0] = f(center); │ │ │ │ │ -763 return; │ │ │ │ │ -764 } │ │ │ │ │ -765 │ │ │ │ │ -766 // Specialization for first-order case │ │ │ │ │ -767 if (k==1) │ │ │ │ │ -768 { │ │ │ │ │ -769 // vertex 0 │ │ │ │ │ -770 std::fill(x.begin(), x.end(), 0); │ │ │ │ │ -771 out[0] = f(x); │ │ │ │ │ -772 │ │ │ │ │ -773 // remaining vertices │ │ │ │ │ -774 for (int i=0; i │ │ │ │ │ -_8_3_7 class _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -838 { │ │ │ │ │ -839 public: │ │ │ │ │ -_8_4_2 using _T_r_a_i_t_s = _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_I_m_p_l_:_: │ │ │ │ │ -_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_,_k_>, │ │ │ │ │ -843 Impl::LagrangeSimplexLocalCoefficients, │ │ │ │ │ -844 Impl::LagrangeSimplexLocalInterpolation > >; │ │ │ │ │ -845 │ │ │ │ │ -_8_4_7 _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t() {} │ │ │ │ │ -848 │ │ │ │ │ -853 template │ │ │ │ │ -_8_5_4 _L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t(const VertexMap& vertexmap) │ │ │ │ │ -855 : coefficients_(vertexmap) │ │ │ │ │ -856 {} │ │ │ │ │ -857 │ │ │ │ │ -_8_6_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -861 { │ │ │ │ │ -862 return basis_; │ │ │ │ │ -863 } │ │ │ │ │ -864 │ │ │ │ │ -_8_6_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -868 { │ │ │ │ │ -869 return coefficients_; │ │ │ │ │ -870 } │ │ │ │ │ -871 │ │ │ │ │ -_8_7_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -875 { │ │ │ │ │ -876 return interpolation_; │ │ │ │ │ -877 } │ │ │ │ │ -878 │ │ │ │ │ -_8_8_0 static constexpr std::size_t _s_i_z_e () │ │ │ │ │ -881 { │ │ │ │ │ -882 return Impl::LagrangeSimplexLocalBasis::size(); │ │ │ │ │ -883 } │ │ │ │ │ -884 │ │ │ │ │ -_8_8_7 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -888 { │ │ │ │ │ -889 return GeometryTypes::simplex(d); │ │ │ │ │ -890 } │ │ │ │ │ -891 │ │ │ │ │ -892 private: │ │ │ │ │ -893 Impl::LagrangeSimplexLocalBasis basis_; │ │ │ │ │ -894 Impl::LagrangeSimplexLocalCoefficients coefficients_; │ │ │ │ │ -895 Impl::LagrangeSimplexLocalInterpolation > interpolation_; │ │ │ │ │ -896 }; │ │ │ │ │ -897 │ │ │ │ │ -898} // namespace Dune │ │ │ │ │ -899 │ │ │ │ │ -900#endif // DUNE_LOCALFUNCTIONS_LAGRANGE_LAGRANGESIMPLEX_HH │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_2_3 class _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ +25 │ │ │ │ │ +26 public: │ │ │ │ │ +_2_8 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(_s_i_z_e()) │ │ │ │ │ +29 { │ │ │ │ │ +30 for(int i=0; i< _s_i_z_e(); i++) │ │ │ │ │ +31 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 } │ │ │ │ │ +33 │ │ │ │ │ +_3_5 std::size_t _s_i_z_e () const │ │ │ │ │ +36 { │ │ │ │ │ +37 return 5; │ │ │ │ │ +38 } │ │ │ │ │ +39 │ │ │ │ │ +_4_1 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +42 { │ │ │ │ │ +43 return li[i]; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +46 private: │ │ │ │ │ +47 std::vector li; │ │ │ │ │ +48 }; │ │ │ │ │ +49} │ │ │ │ │ +50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_R_a_n_g_e_T_y_p_e │ │ │ │ │ -R RangeType │ │ │ │ │ -range type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for simplices with arbitrary compile-time dimension and │ │ │ │ │ -polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:838 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -Returns object that evaluates degrees of freedom. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:874 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -Returns the local basis, i.e., the set of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:860 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -LagrangeSimplexLocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:847 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -static constexpr std::size_t size() │ │ │ │ │ -The number of shape functions. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:880 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -LagrangeSimplexLocalFiniteElement(const VertexMap &vertexmap) │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:854 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -Returns the assignment of the degrees of freedom to the element subentities. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:867 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -The reference element that the local finite element is defined on. │ │ │ │ │ -DDeeffiinniittiioonn lagrangesimplex.hh:887 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT0PyramidLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:35 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
p0.hh File Reference
│ │ │ │ +
raviartthomas0pyramidlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "p0/p0localbasis.hh"
│ │ │ │ -#include "p0/p0localcoefficients.hh"
│ │ │ │ -#include "p0/p0localinterpolation.hh"
│ │ │ │ +
#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::P0LocalFiniteElement< D, R, d >
 The local p0 finite element on all types of reference elements. More...
class  Dune::RT0PyramidLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference pyramid. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -p0.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include "_p_0_/_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_p_0_/_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_p_0_/_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +raviartthomas0pyramidlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_,_ _d_ _> │ │ │ │ │ -  The local p0 finite element on all types of reference elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00296_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: p0.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0pyramidlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,118 +70,148 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
p0.hh
│ │ │ │ +
raviartthomas0pyramidlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_P0LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ -
11#include "p0/p0localbasis.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │
14
│ │ │ │
15namespace Dune
│ │ │ │
16{
│ │ │ │ -
17
│ │ │ │ -
23 template<class D, class R, int d>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
│ │ │ │ -
34 P0LocalFiniteElement (const GeometryType& type)
│ │ │ │ -
35 : interpolation(type), gt(type)
│ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
41 {
│ │ │ │ -
42 return basis;
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
32 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT0PyramidLocalBasis (std::bitset<5> s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 for (size_t i=0; i<size(); i++)
│ │ │ │ +
42 sign[i] = s[i] ? -1.0 : 1.0;
│ │ │ │
43 }
│ │ │ │
│ │ │ │
44
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
48 {
│ │ │ │ -
49 return coefficients;
│ │ │ │ -
50 }
│ │ │ │ -
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ -
56 return interpolation;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ -
60 unsigned int size () const
│ │ │ │ -
61 {
│ │ │ │ -
62 return 1;
│ │ │ │ -
63 }
│ │ │ │ -
│ │ │ │ -
64
│ │ │ │ -
│ │ │ │ -
67 GeometryType type () const
│ │ │ │ -
68 {
│ │ │ │ -
69 return gt;
│ │ │ │ -
70 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
46 unsigned int size () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return 5;
│ │ │ │ +
49 }
│ │ │ │ +
│ │ │ │ +
50
│ │ │ │ +
│ │ │ │ +
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
59 {
│ │ │ │ +
60 out.resize(5);
│ │ │ │ +
61 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ +
62 out[i] = {0.0,0.0,0.0};
│ │ │ │ +
63
│ │ │ │ +
64 out[0][0] = 1.5*in[0];
│ │ │ │ +
65 out[0][1] = 1.5*in[1];
│ │ │ │ +
66 out[0][2] = -1.0;
│ │ │ │ +
67
│ │ │ │ +
68 out[1][0] = -2.0 + 3.0*in[0];
│ │ │ │ +
69
│ │ │ │ +
70 out[2][0] = 3.0*in[0];
│ │ │ │
71
│ │ │ │ -
72 private:
│ │ │ │ - │ │ │ │ -
74 P0LocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
76 GeometryType gt;
│ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ +
72 out[3][1] = -2.0 + 3.0*in[1];
│ │ │ │ +
73
│ │ │ │ +
74 out[4][1] = 3.0*in[1];
│ │ │ │ +
75
│ │ │ │ +
76 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ +
77 out[i] *= sign[i];
│ │ │ │
78
│ │ │ │ -
79}
│ │ │ │ +
79 }
│ │ │ │ +
│ │ │ │
80
│ │ │ │ -
81#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
87 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
88 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
89 {
│ │ │ │ +
90 out.resize(5);
│ │ │ │ +
91
│ │ │ │ +
92 for(int i=0; i<size(); i++)
│ │ │ │ +
93 for(int j=0; j<3; j++)
│ │ │ │ +
94 out[i][j] = {0.0, 0.0, 0.0};
│ │ │ │ +
95
│ │ │ │ +
96 out[0][0][0] = sign[0]*(1.5);
│ │ │ │ +
97 out[0][1][1] = sign[0]*(1.5);
│ │ │ │ +
98
│ │ │ │ +
99 out[1][0][0] = sign[1]*(3.0);
│ │ │ │ +
100
│ │ │ │ +
101 out[2][0][0] = sign[2]*(3.0);
│ │ │ │ +
102
│ │ │ │ +
103 out[3][1][1] = sign[3]*(3.0);
│ │ │ │ +
104
│ │ │ │ +
105 out[4][1][1] = sign[4]*(3.0);
│ │ │ │ +
106 }
│ │ │ │ +
│ │ │ │ +
107
│ │ │ │ +
│ │ │ │ +
109 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
110 const typename Traits::DomainType& in, // position
│ │ │ │ +
111 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
112 {
│ │ │ │ +
113 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
114 if (totalOrder == 0) {
│ │ │ │ +
115 evaluateFunction(in, out);
│ │ │ │ +
116 } else {
│ │ │ │ +
117 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
118 }
│ │ │ │ +
119 }
│ │ │ │ +
│ │ │ │ +
120
│ │ │ │ +
│ │ │ │ +
122 unsigned int order () const
│ │ │ │ +
123 {
│ │ │ │ +
124 return 1;
│ │ │ │ +
125 }
│ │ │ │ +
│ │ │ │ +
126
│ │ │ │ +
127 private:
│ │ │ │ +
128 std::array<R,5> sign;
│ │ │ │ +
129 };
│ │ │ │ +
│ │ │ │ +
130}
│ │ │ │ +
131#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
The local p0 finite element on all types of reference elements.
Definition p0.hh:25
│ │ │ │ -
P0LocalFiniteElement(const GeometryType &type)
Definition p0.hh:34
│ │ │ │ -
unsigned int size() const
The number of shape functions – here: 1.
Definition p0.hh:60
│ │ │ │ -
GeometryType type() const
Definition p0.hh:67
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition p0.hh:40
│ │ │ │ -
LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits
Definition p0.hh:30
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition p0.hh:47
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition p0.hh:54
│ │ │ │ -
Constant shape function.
Definition p0localbasis.hh:30
│ │ │ │ -
Layout map for P0 elements.
Definition p0localcoefficients.hh:24
│ │ │ │ -
Definition p0localinterpolation.hh:18
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference pyramid.
Definition raviartthomas0pyramidlocalbasis.hh:28
│ │ │ │ +
RT0PyramidLocalBasis(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0pyramidlocalbasis.hh:39
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas0pyramidlocalbasis.hh:57
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas0pyramidlocalbasis.hh:87
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas0pyramidlocalbasis.hh:32
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas0pyramidlocalbasis.hh:122
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas0pyramidlocalbasis.hh:46
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas0pyramidlocalbasis.hh:109
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,127 +1,159 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -p0.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d │ │ │ │ │ +raviartthomas0pyramidlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_P0LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include "_p_0_/_p_0_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -12#include "_p_0_/_p_0_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -13#include "_p_0_/_p_0_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ 14 │ │ │ │ │ 15namespace _D_u_n_e │ │ │ │ │ 16{ │ │ │ │ │ -17 │ │ │ │ │ -23 template │ │ │ │ │ -_2_4 class _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -25 { │ │ │ │ │ -26 public: │ │ │ │ │ -29 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_>, _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ -_3_0 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_> > > _T_r_a_i_t_s; │ │ │ │ │ -31 │ │ │ │ │ -_3_4 _P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (const GeometryType& _t_y_p_e) │ │ │ │ │ -35 : interpolation(_t_y_p_e), gt(_t_y_p_e) │ │ │ │ │ -36 {} │ │ │ │ │ -37 │ │ │ │ │ -_4_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -41 { │ │ │ │ │ -42 return basis; │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +28 { │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s (std::bitset<5> s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 for (size_t i=0; i<_s_i_z_e(); i++) │ │ │ │ │ +42 sign[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ 43 } │ │ │ │ │ 44 │ │ │ │ │ -_4_7 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -48 { │ │ │ │ │ -49 return coefficients; │ │ │ │ │ -50 } │ │ │ │ │ -51 │ │ │ │ │ -_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return interpolation; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_6_0 unsigned int _s_i_z_e () const │ │ │ │ │ -61 { │ │ │ │ │ -62 return 1; │ │ │ │ │ -63 } │ │ │ │ │ -64 │ │ │ │ │ -_6_7 GeometryType _t_y_p_e () const │ │ │ │ │ -68 { │ │ │ │ │ -69 return gt; │ │ │ │ │ -70 } │ │ │ │ │ +_4_6 unsigned int _s_i_z_e () const │ │ │ │ │ +47 { │ │ │ │ │ +48 return 5; │ │ │ │ │ +49 } │ │ │ │ │ +50 │ │ │ │ │ +_5_7 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +58 std::vector& out) const │ │ │ │ │ +59 { │ │ │ │ │ +60 out.resize(5); │ │ │ │ │ +61 for (std::size_t i=0; i basis; │ │ │ │ │ -74 _P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ -75 _P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_P_0_L_o_c_a_l_B_a_s_i_s_<_D_,_R_,_d_> > interpolation; │ │ │ │ │ -76 GeometryType gt; │ │ │ │ │ -77 }; │ │ │ │ │ +72 out[3][1] = -2.0 + 3.0*in[1]; │ │ │ │ │ +73 │ │ │ │ │ +74 out[4][1] = 3.0*in[1]; │ │ │ │ │ +75 │ │ │ │ │ +76 for (std::size_t i=0; i& out) const │ │ │ │ │ +89 { │ │ │ │ │ +90 out.resize(5); │ │ │ │ │ +91 │ │ │ │ │ +92 for(int i=0; i<_s_i_z_e(); i++) │ │ │ │ │ +93 for(int j=0; j<3; j++) │ │ │ │ │ +94 out[i][j] = {0.0, 0.0, 0.0}; │ │ │ │ │ +95 │ │ │ │ │ +96 out[0][0][0] = sign[0]*(1.5); │ │ │ │ │ +97 out[0][1][1] = sign[0]*(1.5); │ │ │ │ │ +98 │ │ │ │ │ +99 out[1][0][0] = sign[1]*(3.0); │ │ │ │ │ +100 │ │ │ │ │ +101 out[2][0][0] = sign[2]*(3.0); │ │ │ │ │ +102 │ │ │ │ │ +103 out[3][1][1] = sign[3]*(3.0); │ │ │ │ │ +104 │ │ │ │ │ +105 out[4][1][1] = sign[4]*(3.0); │ │ │ │ │ +106 } │ │ │ │ │ +107 │ │ │ │ │ +_1_0_9 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +110 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +111 std::vector& out) const // return value │ │ │ │ │ +112 { │ │ │ │ │ +113 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +114 if (totalOrder == 0) { │ │ │ │ │ +115 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +116 } else { │ │ │ │ │ +117 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +118 } │ │ │ │ │ +119 } │ │ │ │ │ +120 │ │ │ │ │ +_1_2_2 unsigned int _o_r_d_e_r () const │ │ │ │ │ +123 { │ │ │ │ │ +124 return 1; │ │ │ │ │ +125 } │ │ │ │ │ +126 │ │ │ │ │ +127 private: │ │ │ │ │ +128 std::array sign; │ │ │ │ │ +129 }; │ │ │ │ │ +130} │ │ │ │ │ +131#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -The local p0 finite element on all types of reference elements. │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -P0LocalFiniteElement(const GeometryType &type) │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT0PyramidLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:87 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:122 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -The number of shape functions – here: 1. │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:60 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:67 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< P0LocalBasis< D, R, d >, P0LocalCoefficients, │ │ │ │ │ -P0LocalInterpolation< P0LocalBasis< D, R, d > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:47 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn p0.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Constant shape function. │ │ │ │ │ -DDeeffiinniittiioonn p0localbasis.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for P0 elements. │ │ │ │ │ -DDeeffiinniittiioonn p0localcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_P_0_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn p0localinterpolation.hh:18 │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:109 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp1.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,39 +65,40 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -Namespaces | │ │ │ │ -Typedefs
│ │ │ │ -
pyramidp1.hh File Reference
│ │ │ │ +Classes | │ │ │ │ +Namespaces
│ │ │ │ +
raviartthomas3cube2dlocalinterpolation.hh File Reference
│ │ │ │ │ │ │ │
│ │ │ │ -
#include <dune/localfunctions/lagrange/lagrangepyramid.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

class  Dune::RT3Cube2DLocalInterpolation< LB >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │

│ │ │ │ -Typedefs

template<class D , class R >
using Dune::PyramidP1LocalFiniteElement = LagrangePyramidLocalFiniteElement< D, R, 1 >
 First-order Lagrangian finite element on a three-dimensional pyramid.
 
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -_N_a_m_e_s_p_a_c_e_s | _T_y_p_e_d_e_f_s │ │ │ │ │ -pyramidp1.hh File Reference │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ +_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ +raviartthomas3cube2dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ +CCllaasssseess │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -TTyyppeeddeeffss │ │ │ │ │ -template │ │ │ │ │ -using  _D_u_n_e_:_:_P_y_r_a_m_i_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t< │ │ │ │ │ - D, R, 1 > │ │ │ │ │ -  First-order Lagrangian finite element on a three-dimensional pyramid. │ │ │ │ │ -  │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00299_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: pyramidp1.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,47 +70,167 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
pyramidp1.hh
│ │ │ │ +
raviartthomas3cube2dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5
│ │ │ │ -
6#ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
│ │ │ │ -
7#define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH
│ │ │ │ -
8
│ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
11#warning This header is deprecated
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │ +
7
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │
12
│ │ │ │
13namespace Dune
│ │ │ │
14{
│ │ │ │
15
│ │ │ │ -
20 template<class D, class R>
│ │ │ │ - │ │ │ │ -
22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]]
│ │ │ │ - │ │ │ │ -
24
│ │ │ │ -
25}
│ │ │ │ -
26
│ │ │ │ -
27#endif
│ │ │ │ - │ │ │ │ +
24 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
26 {
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
35 RT3Cube2DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ +
36 {
│ │ │ │ +
37 for (size_t i=0; i<4; i++)
│ │ │ │ +
38 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
39
│ │ │ │ +
40 n_[0] = {-1.0, 0.0};
│ │ │ │ +
41 n_[1] = { 1.0, 0.0};
│ │ │ │ +
42 n_[2] = { 0.0, -1.0};
│ │ │ │ +
43 n_[3] = { 0.0, 1.0};
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
54 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
55 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
56 {
│ │ │ │ +
57 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
58 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
59 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
60
│ │ │ │ +
61 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
62
│ │ │ │ +
63 out.resize(40);
│ │ │ │ +
64 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
65
│ │ │ │ +
66 const int qOrder = 9;
│ │ │ │ +
67 const auto& rule1 = QuadratureRules<Scalar,1>::rule(GeometryTypes::cube(1), qOrder);
│ │ │ │ +
68
│ │ │ │ +
69 for (auto&& qp : rule1)
│ │ │ │ +
70 {
│ │ │ │ +
71 Scalar qPos = qp.position();
│ │ │ │ +
72 typename LB::Traits::DomainType localPos;
│ │ │ │ +
73
│ │ │ │ +
74 localPos = {0.0, qPos};
│ │ │ │ +
75 auto y = f(localPos);
│ │ │ │ +
76 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0];
│ │ │ │ +
77 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
78 out[2] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[0];
│ │ │ │ +
79 out[3] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos + 12.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
80
│ │ │ │ +
81 localPos = {1.0, qPos};
│ │ │ │ +
82 y = f(localPos);
│ │ │ │ +
83 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1];
│ │ │ │ +
84 out[5] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
85 out[6] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[1];
│ │ │ │ +
86 out[7] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos - 12.0*qPos + 1.0)*qp.weight();
│ │ │ │ +
87
│ │ │ │ +
88 localPos = {qPos, 0.0};
│ │ │ │ +
89 y = f(localPos);
│ │ │ │ +
90 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2];
│ │ │ │ +
91 out[9] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight();
│ │ │ │ +
92 out[10] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[2];
│ │ │ │ +
93 out[11] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(-20.0*qPos*qPos*qPos + 30.0*qPos*qPos - 12.0*qPos + 1.0)*qp.weight();
│ │ │ │ +
94
│ │ │ │ +
95 localPos = {qPos, 1.0};
│ │ │ │ +
96 y = f(localPos);
│ │ │ │ +
97 out[12] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3];
│ │ │ │ +
98 out[13] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
99 out[14] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(6.0*qPos*qPos - 6.0*qPos + 1.0)*qp.weight()*sign_[3];
│ │ │ │ +
100 out[15] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(20.0*qPos*qPos*qPos - 30.0*qPos*qPos + 12.0*qPos - 1.0)*qp.weight();
│ │ │ │ +
101 }
│ │ │ │ +
102
│ │ │ │ +
103 const auto& rule2 = QuadratureRules<Vector,2>::rule(GeometryTypes::cube(2), qOrder);
│ │ │ │ +
104
│ │ │ │ +
105 for (auto&& qp : rule2)
│ │ │ │ +
106 {
│ │ │ │ +
107 auto qPos = qp.position();
│ │ │ │ +
108
│ │ │ │ +
109 auto y = f(qPos);
│ │ │ │ +
110 double l0_x=1.0;
│ │ │ │ +
111 double l1_x=2.0*qPos[0]-1.0;
│ │ │ │ +
112 double l2_x=6.0*qPos[0]*qPos[0]-6.0*qPos[0]+1.0;
│ │ │ │ +
113 double l3_x=20.0*qPos[0]*qPos[0]*qPos[0] - 30.0*qPos[0]*qPos[0] + 12.0*qPos[0] - 1.0;
│ │ │ │ +
114 double l0_y=1.0;
│ │ │ │ +
115 double l1_y=2.0*qPos[1]-1.0;
│ │ │ │ +
116 double l2_y=6.0*qPos[1]*qPos[1]-6.0*qPos[1]+1.0;
│ │ │ │ +
117 double l3_y=20.0*qPos[1]*qPos[1]*qPos[1] - 30.0*qPos[1]*qPos[1] + 12.0*qPos[1] - 1.0;
│ │ │ │ +
118
│ │ │ │ +
119 out[16] += y[0]*l0_x*l0_y*qp.weight();
│ │ │ │ +
120 out[17] += y[0]*l0_x*l1_y*qp.weight();
│ │ │ │ +
121 out[18] += y[0]*l0_x*l2_y*qp.weight();
│ │ │ │ +
122 out[19] += y[0]*l0_x*l3_y*qp.weight();
│ │ │ │ +
123 out[20] += y[0]*l1_x*l0_y*qp.weight();
│ │ │ │ +
124 out[21] += y[0]*l1_x*l1_y*qp.weight();
│ │ │ │ +
125 out[22] += y[0]*l1_x*l2_y*qp.weight();
│ │ │ │ +
126 out[23] += y[0]*l1_x*l3_y*qp.weight();
│ │ │ │ +
127 out[24] += y[0]*l2_x*l0_y*qp.weight();
│ │ │ │ +
128 out[25] += y[0]*l2_x*l1_y*qp.weight();
│ │ │ │ +
129 out[26] += y[0]*l2_x*l2_y*qp.weight();
│ │ │ │ +
130 out[27] += y[0]*l2_x*l3_y*qp.weight();
│ │ │ │ +
131
│ │ │ │ +
132 out[28] += y[1]*l0_x*l0_y*qp.weight();
│ │ │ │ +
133 out[29] += y[1]*l0_x*l1_y*qp.weight();
│ │ │ │ +
134 out[30] += y[1]*l0_x*l2_y*qp.weight();
│ │ │ │ +
135 out[31] += y[1]*l1_x*l0_y*qp.weight();
│ │ │ │ +
136 out[32] += y[1]*l1_x*l1_y*qp.weight();
│ │ │ │ +
137 out[33] += y[1]*l1_x*l2_y*qp.weight();
│ │ │ │ +
138 out[34] += y[1]*l2_x*l0_y*qp.weight();
│ │ │ │ +
139 out[35] += y[1]*l2_x*l1_y*qp.weight();
│ │ │ │ +
140 out[36] += y[1]*l2_x*l2_y*qp.weight();
│ │ │ │ +
141 out[37] += y[1]*l3_x*l0_y*qp.weight();
│ │ │ │ +
142 out[38] += y[1]*l3_x*l1_y*qp.weight();
│ │ │ │ +
143 out[39] += y[1]*l3_x*l2_y*qp.weight();
│ │ │ │ +
144 }
│ │ │ │ +
145 }
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147 private:
│ │ │ │ +
148 // Edge orientations
│ │ │ │ +
149 std::array<typename LB::Traits::RangeFieldType, 4> sign_;
│ │ │ │ +
150
│ │ │ │ +
151 // Edge normals
│ │ │ │ +
152 std::array<typename LB::Traits::DomainType, 4> n_;
│ │ │ │ +
153 };
│ │ │ │ +
│ │ │ │ +
154}
│ │ │ │ +
155
│ │ │ │ +
156#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition lagrangepyramid.hh:812
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas3cube2dlocalinterpolation.hh:26
│ │ │ │ +
RT3Cube2DLocalInterpolation(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas3cube2dlocalinterpolation.hh:35
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas3cube2dlocalinterpolation.hh:55
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,41 +1,175 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _l_a_g_r_a_n_g_e │ │ │ │ │ -pyramidp1.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ +raviartthomas3cube2dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5 │ │ │ │ │ -6#ifndef DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ -7#define DUNE_PYRAMID_P1_LOCALFINITEELEMENT_HH │ │ │ │ │ -8 │ │ │ │ │ -9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_l_a_g_r_a_n_g_e_/_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h> │ │ │ │ │ -10 │ │ │ │ │ -11#warning This header is deprecated │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ +7 │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ 12 │ │ │ │ │ 13namespace _D_u_n_e │ │ │ │ │ 14{ │ │ │ │ │ 15 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 using _P_y_r_a_m_i_d_P_1_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -22 [[deprecated("use LagrangePyramidLocalFiniteElement instead")]] │ │ │ │ │ -23 = _L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_D_,_R_,_1_>; │ │ │ │ │ -24 │ │ │ │ │ -25} │ │ │ │ │ -26 │ │ │ │ │ -27#endif │ │ │ │ │ -_l_a_g_r_a_n_g_e_p_y_r_a_m_i_d_._h_h │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +26 { │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +29 │ │ │ │ │ +_3_5 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ +36 { │ │ │ │ │ +37 for (size_t i=0; i<4; i++) │ │ │ │ │ +38 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +39 │ │ │ │ │ +40 n_[0] = {-1.0, 0.0}; │ │ │ │ │ +41 n_[1] = { 1.0, 0.0}; │ │ │ │ │ +42 n_[2] = { 0.0, -1.0}; │ │ │ │ │ +43 n_[3] = { 0.0, 1.0}; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +54 template │ │ │ │ │ +_5_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +56 { │ │ │ │ │ +57 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +58 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +59 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +60 │ │ │ │ │ +61 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +62 │ │ │ │ │ +63 out.resize(40); │ │ │ │ │ +64 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +65 │ │ │ │ │ +66 const int qOrder = 9; │ │ │ │ │ +67 const auto& rule1 = QuadratureRules::rule(GeometryTypes::cube(1), │ │ │ │ │ +qOrder); │ │ │ │ │ +68 │ │ │ │ │ +69 for (auto&& qp : rule1) │ │ │ │ │ +70 { │ │ │ │ │ +71 Scalar qPos = qp.position(); │ │ │ │ │ +72 typename LB::Traits::DomainType localPos; │ │ │ │ │ +73 │ │ │ │ │ +74 localPos = {0.0, qPos}; │ │ │ │ │ +75 auto y = f(localPos); │ │ │ │ │ +76 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0]; │ │ │ │ │ +77 out[1] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +78 out[2] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[0]; │ │ │ │ │ +79 out[3] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(20.0*qPos*qPos*qPos - │ │ │ │ │ +30.0*qPos*qPos + 12.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +80 │ │ │ │ │ +81 localPos = {1.0, qPos}; │ │ │ │ │ +82 y = f(localPos); │ │ │ │ │ +83 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1]; │ │ │ │ │ +84 out[5] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +85 out[6] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[1]; │ │ │ │ │ +86 out[7] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(-20.0*qPos*qPos*qPos + │ │ │ │ │ +30.0*qPos*qPos - 12.0*qPos + 1.0)*qp.weight(); │ │ │ │ │ +87 │ │ │ │ │ +88 localPos = {qPos, 0.0}; │ │ │ │ │ +89 y = f(localPos); │ │ │ │ │ +90 out[8] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2]; │ │ │ │ │ +91 out[9] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(1.0 - 2.0*qPos)*qp.weight(); │ │ │ │ │ +92 out[10] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[2]; │ │ │ │ │ +93 out[11] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(-20.0*qPos*qPos*qPos + │ │ │ │ │ +30.0*qPos*qPos - 12.0*qPos + 1.0)*qp.weight(); │ │ │ │ │ +94 │ │ │ │ │ +95 localPos = {qPos, 1.0}; │ │ │ │ │ +96 y = f(localPos); │ │ │ │ │ +97 out[12] += (y[0]*n_[3][0] + y[1]*n_[3][1])*qp.weight()*sign_[3]; │ │ │ │ │ +98 out[13] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(2.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +99 out[14] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(6.0*qPos*qPos - 6.0*qPos + │ │ │ │ │ +1.0)*qp.weight()*sign_[3]; │ │ │ │ │ +100 out[15] += (y[0]*n_[3][0] + y[1]*n_[3][1])*(20.0*qPos*qPos*qPos - │ │ │ │ │ +30.0*qPos*qPos + 12.0*qPos - 1.0)*qp.weight(); │ │ │ │ │ +101 } │ │ │ │ │ +102 │ │ │ │ │ +103 const auto& rule2 = QuadratureRules::rule(GeometryTypes::cube(2), │ │ │ │ │ +qOrder); │ │ │ │ │ +104 │ │ │ │ │ +105 for (auto&& qp : rule2) │ │ │ │ │ +106 { │ │ │ │ │ +107 auto qPos = qp.position(); │ │ │ │ │ +108 │ │ │ │ │ +109 auto y = f(qPos); │ │ │ │ │ +110 double l0_x=1.0; │ │ │ │ │ +111 double l1_x=2.0*qPos[0]-1.0; │ │ │ │ │ +112 double l2_x=6.0*qPos[0]*qPos[0]-6.0*qPos[0]+1.0; │ │ │ │ │ +113 double l3_x=20.0*qPos[0]*qPos[0]*qPos[0] - 30.0*qPos[0]*qPos[0] + 12.0*qPos │ │ │ │ │ +[0] - 1.0; │ │ │ │ │ +114 double l0_y=1.0; │ │ │ │ │ +115 double l1_y=2.0*qPos[1]-1.0; │ │ │ │ │ +116 double l2_y=6.0*qPos[1]*qPos[1]-6.0*qPos[1]+1.0; │ │ │ │ │ +117 double l3_y=20.0*qPos[1]*qPos[1]*qPos[1] - 30.0*qPos[1]*qPos[1] + 12.0*qPos │ │ │ │ │ +[1] - 1.0; │ │ │ │ │ +118 │ │ │ │ │ +119 out[16] += y[0]*l0_x*l0_y*qp.weight(); │ │ │ │ │ +120 out[17] += y[0]*l0_x*l1_y*qp.weight(); │ │ │ │ │ +121 out[18] += y[0]*l0_x*l2_y*qp.weight(); │ │ │ │ │ +122 out[19] += y[0]*l0_x*l3_y*qp.weight(); │ │ │ │ │ +123 out[20] += y[0]*l1_x*l0_y*qp.weight(); │ │ │ │ │ +124 out[21] += y[0]*l1_x*l1_y*qp.weight(); │ │ │ │ │ +125 out[22] += y[0]*l1_x*l2_y*qp.weight(); │ │ │ │ │ +126 out[23] += y[0]*l1_x*l3_y*qp.weight(); │ │ │ │ │ +127 out[24] += y[0]*l2_x*l0_y*qp.weight(); │ │ │ │ │ +128 out[25] += y[0]*l2_x*l1_y*qp.weight(); │ │ │ │ │ +129 out[26] += y[0]*l2_x*l2_y*qp.weight(); │ │ │ │ │ +130 out[27] += y[0]*l2_x*l3_y*qp.weight(); │ │ │ │ │ +131 │ │ │ │ │ +132 out[28] += y[1]*l0_x*l0_y*qp.weight(); │ │ │ │ │ +133 out[29] += y[1]*l0_x*l1_y*qp.weight(); │ │ │ │ │ +134 out[30] += y[1]*l0_x*l2_y*qp.weight(); │ │ │ │ │ +135 out[31] += y[1]*l1_x*l0_y*qp.weight(); │ │ │ │ │ +136 out[32] += y[1]*l1_x*l1_y*qp.weight(); │ │ │ │ │ +137 out[33] += y[1]*l1_x*l2_y*qp.weight(); │ │ │ │ │ +138 out[34] += y[1]*l2_x*l0_y*qp.weight(); │ │ │ │ │ +139 out[35] += y[1]*l2_x*l1_y*qp.weight(); │ │ │ │ │ +140 out[36] += y[1]*l2_x*l2_y*qp.weight(); │ │ │ │ │ +141 out[37] += y[1]*l3_x*l0_y*qp.weight(); │ │ │ │ │ +142 out[38] += y[1]*l3_x*l1_y*qp.weight(); │ │ │ │ │ +143 out[39] += y[1]*l3_x*l2_y*qp.weight(); │ │ │ │ │ +144 } │ │ │ │ │ +145 } │ │ │ │ │ +146 │ │ │ │ │ +147 private: │ │ │ │ │ +148 // Edge orientations │ │ │ │ │ +149 std::array sign_; │ │ │ │ │ +150 │ │ │ │ │ +151 // Edge normals │ │ │ │ │ +152 std::array n_; │ │ │ │ │ +153 }; │ │ │ │ │ +154} │ │ │ │ │ +155 │ │ │ │ │ +156#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_a_g_r_a_n_g_e_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Lagrange finite element for 3d pyramids with compile-time polynomial order. │ │ │ │ │ -DDeeffiinniittiioonn lagrangepyramid.hh:812 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalinterpolation.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT3Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalinterpolation.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalinterpolation.hh:55 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramid.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,36 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0pyramid.hh File Reference
│ │ │ │ +
raviartthomas3cube2dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include "../common/localfiniteelementtraits.hh"
│ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalbasis.hh"
│ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas0pyramid/raviartthomas0pyramidlocalinterpolation.hh"
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT0PyramidLocalFiniteElement< D, R >
 First order Raviart-Thomas shape functions on pyramids. More...
class  Dune::RT3Cube2DLocalCoefficients
 Layout map for Raviart-Thomas-3 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas0pyramid.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +raviartthomas3cube2dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ -  First order Raviart-Thomas shape functions on pyramids. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-3 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00302_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0pyramid.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,123 +70,85 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0pyramid.hh
│ │ │ │ +
raviartthomas3cube2dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ -
10#include "../common/localfiniteelementtraits.hh"
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
25 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
27 {
│ │ │ │ -
28
│ │ │ │ -
29 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 {}
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i = 0; i < 4; i++)
│ │ │ │ +
30 {
│ │ │ │ +
31 li[4*i] = LocalKey(i,1,0);
│ │ │ │ +
32 li[4*i + 1] = LocalKey(i,1,1);
│ │ │ │ +
33 li[4*i + 2] = LocalKey(i,1,2);
│ │ │ │ +
34 li[4*i + 3] = LocalKey(i,1,3);
│ │ │ │ +
35 }
│ │ │ │ +
36
│ │ │ │ +
37 for (std::size_t i=0; i<24; i++)
│ │ │ │ +
38 {
│ │ │ │ +
39 li[16 + i] = LocalKey(0,0,i);
│ │ │ │ +
40 }
│ │ │ │ +
41 }
│ │ │ │
│ │ │ │ -
38
│ │ │ │ +
42
│ │ │ │
│ │ │ │ - │ │ │ │ -
45 basis(s),
│ │ │ │ -
46 interpolation(s)
│ │ │ │ -
47 {}
│ │ │ │ +
44 std::size_t size () const
│ │ │ │ +
45 {
│ │ │ │ +
46 return 40;
│ │ │ │ +
47 }
│ │ │ │
│ │ │ │
48
│ │ │ │ -
│ │ │ │ -
49 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
50 {
│ │ │ │ -
51 return basis;
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
55 {
│ │ │ │ -
56 return coefficients;
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
60 {
│ │ │ │ -
61 return interpolation;
│ │ │ │ -
62 }
│ │ │ │ -
│ │ │ │ -
63
│ │ │ │ -
│ │ │ │ -
65 unsigned int size () const
│ │ │ │ -
66 {
│ │ │ │ -
67 return basis.size();
│ │ │ │ -
68 }
│ │ │ │ -
│ │ │ │ -
69
│ │ │ │ -
│ │ │ │ -
70 static constexpr GeometryType type ()
│ │ │ │ -
71 {
│ │ │ │ -
72 return GeometryTypes::pyramid;
│ │ │ │ -
73 }
│ │ │ │ -
│ │ │ │ -
74
│ │ │ │ -
75 private:
│ │ │ │ - │ │ │ │ -
77 RT0PyramidLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
79 };
│ │ │ │ -
│ │ │ │ -
80}
│ │ │ │ -
81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ +
50 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
51 {
│ │ │ │ +
52 return li[i];
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
55 private:
│ │ │ │ +
56 std::vector<LocalKey> li;
│ │ │ │ +
57 };
│ │ │ │ +
│ │ │ │ +
58}
│ │ │ │ +
59
│ │ │ │ +
60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
First order Raviart-Thomas shape functions on pyramids.
Definition raviartthomas0pyramid.hh:27
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0pyramid.hh:54
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0pyramid.hh:65
│ │ │ │ -
static constexpr GeometryType type()
Definition raviartthomas0pyramid.hh:70
│ │ │ │ -
RT0PyramidLocalFiniteElement(int s)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0pyramid.hh:44
│ │ │ │ -
LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< RT0PyramidLocalBasis< D, R > > > Traits
Definition raviartthomas0pyramid.hh:33
│ │ │ │ -
RT0PyramidLocalFiniteElement()
Standard constructor.
Definition raviartthomas0pyramid.hh:36
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0pyramid.hh:49
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0pyramid.hh:59
│ │ │ │ -
First order Raviart-Thomas shape functions on the reference pyramid.
Definition raviartthomas0pyramidlocalbasis.hh:28
│ │ │ │ -
Layout map for Raviart-Thomas-1 elements on pyramids.
Definition raviartthomas0pyramidlocalcoefficients.hh:24
│ │ │ │ -
First order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0pyramidlocalinterpolation.hh:24
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-3 elements on quadrilaterals.
Definition raviartthomas3cube2dlocalcoefficients.hh:23
│ │ │ │ +
RT3Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas3cube2dlocalcoefficients.hh:27
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas3cube2dlocalcoefficients.hh:44
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas3cube2dlocalcoefficients.hh:50
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,136 +1,83 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ -raviartthomas0pyramid.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ +raviartthomas3cube2dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include "../common/localfiniteelementtraits.hh" │ │ │ │ │ -11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -25 template │ │ │ │ │ -_2_6 class _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -27 { │ │ │ │ │ -28 │ │ │ │ │ -29 public: │ │ │ │ │ -30 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -31 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ -32 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ -_3_3 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ -34 │ │ │ │ │ -_3_6 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -37 {} │ │ │ │ │ -38 │ │ │ │ │ -_4_4 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ -45 basis(s), │ │ │ │ │ -46 interpolation(s) │ │ │ │ │ -47 {} │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +_2_2 class _R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +23 { │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(40) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i = 0; i < 4; i++) │ │ │ │ │ +30 { │ │ │ │ │ +31 li[4*i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 li[4*i + 1] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +33 li[4*i + 2] = _L_o_c_a_l_K_e_y(i,1,2); │ │ │ │ │ +34 li[4*i + 3] = _L_o_c_a_l_K_e_y(i,1,3); │ │ │ │ │ +35 } │ │ │ │ │ +36 │ │ │ │ │ +37 for (std::size_t i=0; i<24; i++) │ │ │ │ │ +38 { │ │ │ │ │ +39 li[16 + i] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ +40 } │ │ │ │ │ +41 } │ │ │ │ │ +42 │ │ │ │ │ +_4_4 std::size_t _s_i_z_e () const │ │ │ │ │ +45 { │ │ │ │ │ +46 return 40; │ │ │ │ │ +47 } │ │ │ │ │ 48 │ │ │ │ │ -_4_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -50 { │ │ │ │ │ -51 return basis; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_4 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return coefficients; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -_5_9 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -60 { │ │ │ │ │ -61 return interpolation; │ │ │ │ │ -62 } │ │ │ │ │ -63 │ │ │ │ │ -_6_5 unsigned int _s_i_z_e () const │ │ │ │ │ -66 { │ │ │ │ │ -67 return basis.size(); │ │ │ │ │ -68 } │ │ │ │ │ -69 │ │ │ │ │ -_7_0 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -71 { │ │ │ │ │ -72 return GeometryTypes::pyramid; │ │ │ │ │ -73 } │ │ │ │ │ -74 │ │ │ │ │ -75 private: │ │ │ │ │ -76 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ -77 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ -78 _R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ -79 }; │ │ │ │ │ -80} │ │ │ │ │ -81#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PYRAMID_HH │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_y_r_a_m_i_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_5_0 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +51 { │ │ │ │ │ +52 return li[i]; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +55 private: │ │ │ │ │ +56 std::vector li; │ │ │ │ │ +57 }; │ │ │ │ │ +58} │ │ │ │ │ +59 │ │ │ │ │ +60#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -First order Raviart-Thomas shape functions on pyramids. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT0PyramidLocalFiniteElement(int s) │ │ │ │ │ -Make set number s, where 0 <= s < 32. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:44 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RT0PyramidLocalBasis< D, R >, │ │ │ │ │ -RT0PyramidLocalCoefficients, RT0PyramidLocalInterpolation< │ │ │ │ │ -RT0PyramidLocalBasis< D, R > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT0PyramidLocalFiniteElement() │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-3 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT3Cube2DLocalCoefficients() │ │ │ │ │ Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramid.hh:59 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference pyramid. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramidlocalbasis.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for Raviart-Thomas-1 elements on pyramids. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramidlocalcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_P_y_r_a_m_i_d_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -First order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0pyramidlocalinterpolation.hh:24 │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalcoefficients.hh:44 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalcoefficients.hh:50 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube3d.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,36 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0cube3d.hh File Reference
│ │ │ │ +
raviartthomas3cube2dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "raviartthomas0cube3d/raviartthomas0cube3dall.hh"
│ │ │ │ +
#include <bitset>
│ │ │ │ +#include <numeric>
│ │ │ │ +#include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT0Cube3DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on cubes. More...
class  Dune::RT3Cube2DLocalBasis< D, R >
 Second order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,22 +1,26 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas0cube3d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h" │ │ │ │ │ +raviartthomas3cube2dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ -  _Z_e_r_o order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Second order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00305_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube3d.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas3cube2dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,119 +70,659 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0cube3d.hh
│ │ │ │ +
raviartthomas3cube2dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ -
12
│ │ │ │ -
13namespace Dune
│ │ │ │ -
14{
│ │ │ │ -
23 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
25 {
│ │ │ │ -
26 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
31
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {}
│ │ │ │ -
│ │ │ │ +
8#include <bitset>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │ +
13
│ │ │ │ +
14#include "../../common/localbasis.hh"
│ │ │ │ +
15
│ │ │ │ +
16namespace Dune
│ │ │ │ +
17{
│ │ │ │ +
27 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30
│ │ │ │ +
31 public:
│ │ │ │ +
32 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
33 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │
34
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 basis(s),
│ │ │ │ -
37 interpolation(s)
│ │ │ │ -
38 {}
│ │ │ │ -
│ │ │ │ -
39
│ │ │ │
│ │ │ │ -
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
41 {
│ │ │ │ -
42 return basis;
│ │ │ │ -
43 }
│ │ │ │ -
│ │ │ │ -
44
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
46 {
│ │ │ │ -
47 return coefficients;
│ │ │ │ -
48 }
│ │ │ │ -
│ │ │ │ -
49
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
51 {
│ │ │ │ -
52 return interpolation;
│ │ │ │ -
53 }
│ │ │ │ -
│ │ │ │ -
54
│ │ │ │ -
│ │ │ │ -
56 unsigned int size () const
│ │ │ │ -
57 {
│ │ │ │ -
58 return basis.size();
│ │ │ │ -
59 }
│ │ │ │ -
│ │ │ │ -
60
│ │ │ │ -
│ │ │ │ -
61 static constexpr GeometryType type ()
│ │ │ │ -
62 {
│ │ │ │ -
63 return GeometryTypes::hexahedron;
│ │ │ │ -
64 }
│ │ │ │ -
│ │ │ │ +
40 RT3Cube2DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ +
41 {
│ │ │ │ +
42 sign0 = (s[0]) ? -1.0 : 1.0;
│ │ │ │ +
43 sign1 = (s[1]) ? -1.0 : 1.0;
│ │ │ │ +
44 sign2 = (s[2]) ? -1.0 : 1.0;
│ │ │ │ +
45 sign3 = (s[3]) ? -1.0 : 1.0;
│ │ │ │ +
46 }
│ │ │ │ +
│ │ │ │ +
47
│ │ │ │ +
│ │ │ │ +
49 unsigned int size () const
│ │ │ │ +
50 {
│ │ │ │ +
51 return 40;
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
60 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
61 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
62 {
│ │ │ │ +
63 out.resize(40);
│ │ │ │ +
64 auto const& x = in[0], y = in[1];
│ │ │ │
65
│ │ │ │ -
66 private:
│ │ │ │ - │ │ │ │ -
68 RT0Cube3DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
70 };
│ │ │ │ -
│ │ │ │ -
71}
│ │ │ │ -
72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ +
66 const auto tmp1 = - x*(x*(x*(35*x - 80) + 60) - 16) - 1;
│ │ │ │ +
67 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1;
│ │ │ │ +
68 const auto tmp3 = 2*y - 1;
│ │ │ │ +
69 const auto tmp4 = y*(6*y - 6) + 1;
│ │ │ │ +
70 const auto tmp5 = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
71 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4);
│ │ │ │ +
72 const auto tmp7 = - y*(y*(y*(35*y - 80) + 60) - 16) - 1;
│ │ │ │ +
73 const auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1;
│ │ │ │ +
74 const auto tmp9 = 2*x - 1;
│ │ │ │ +
75 const auto tmp10 = x*(6*x - 6) + 1;
│ │ │ │ +
76 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
77 const auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4);
│ │ │ │ +
78 const auto tmp13 = -x*(x*(x*(7*x - 14) + 9) - 2);
│ │ │ │ +
79 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2);
│ │ │ │ +
80 const auto tmp15 = x*(x*(2*x - 3) + 1);
│ │ │ │ +
81 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1);
│ │ │ │ +
82 const auto tmp17 = -y*(y*(y*(7*y - 14) + 9) - 2);
│ │ │ │ +
83 const auto tmp18 = y*(y*(2*y - 3) + 1);
│ │ │ │ +
84 const auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1);
│ │ │ │ +
85 const auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2);
│ │ │ │ +
86
│ │ │ │ +
87 out[0][0]=sign0*tmp1;
│ │ │ │ +
88 out[0][1]=0;
│ │ │ │ +
89 out[1][0]=(-3.0*tmp2*tmp3);
│ │ │ │ +
90 out[1][1]=0;
│ │ │ │ +
91 out[2][0]=sign0*(-5.0*tmp2*tmp4);
│ │ │ │ +
92 out[2][1]=0;
│ │ │ │ +
93 out[3][0]=(-7.0*tmp2*tmp5);
│ │ │ │ +
94 out[3][1]=0;
│ │ │ │ +
95
│ │ │ │ +
96 out[4][0]=sign1*tmp6;
│ │ │ │ +
97 out[4][1]=0;
│ │ │ │ +
98 out[5][0]=(-3.0*tmp6*tmp3);
│ │ │ │ +
99 out[5][1]=0;
│ │ │ │ +
100 out[6][0]=sign1*(5.0*tmp6*tmp4);
│ │ │ │ +
101 out[6][1]=0;
│ │ │ │ +
102 out[7][0]=(-7.0*tmp6*tmp5);
│ │ │ │ +
103 out[7][1]=0;
│ │ │ │ +
104
│ │ │ │ +
105 out[8][0]=0;
│ │ │ │ +
106 out[8][1]=sign2*tmp7;
│ │ │ │ +
107 out[9][0]=0;
│ │ │ │ +
108 out[9][1]=3.0*tmp9*tmp8;
│ │ │ │ +
109 out[10][0]=0;
│ │ │ │ +
110 out[10][1]=sign2*(-5.0*tmp10*tmp8);
│ │ │ │ +
111 out[11][0]=0;
│ │ │ │ +
112 out[11][1]=7.0*tmp11*tmp8;
│ │ │ │ +
113
│ │ │ │ +
114 out[12][0]=0;
│ │ │ │ +
115 out[12][1]=sign3*tmp12;
│ │ │ │ +
116 out[13][0]=0;
│ │ │ │ +
117 out[13][1]=3.0*tmp9*tmp12;
│ │ │ │ +
118 out[14][0]=0;
│ │ │ │ +
119 out[14][1]=sign3*5.0*tmp10*tmp12;
│ │ │ │ +
120 out[15][0]=0;
│ │ │ │ +
121 out[15][1]=7.0*tmp11*tmp12;
│ │ │ │ +
122
│ │ │ │ +
123 out[16][0]=10.0*tmp13;
│ │ │ │ +
124 out[16][1]=0;
│ │ │ │ +
125 out[17][0]=-30.0*tmp14*tmp3;
│ │ │ │ +
126 out[17][1]=0;
│ │ │ │ +
127 out[18][0]=-50.0*tmp14*tmp4;
│ │ │ │ +
128 out[18][1]=0;
│ │ │ │ +
129 out[19][0]=-70.0*tmp14*tmp5;
│ │ │ │ +
130 out[19][1]=0;
│ │ │ │ +
131 out[20][0]=-30.0*tmp15;
│ │ │ │ +
132 out[20][1]=0;
│ │ │ │ +
133 out[21][0]=-90.0*tmp15*tmp3;
│ │ │ │ +
134 out[21][1]=0;
│ │ │ │ +
135 out[22][0]=-150.0*tmp15*tmp4;
│ │ │ │ +
136 out[22][1]=0;
│ │ │ │ +
137 out[23][0]=-210.0*tmp15*tmp5;
│ │ │ │ +
138 out[23][1]=0;
│ │ │ │ +
139 out[24][0]=-70.0*tmp16;
│ │ │ │ +
140 out[24][1]=0;
│ │ │ │ +
141 out[25][0]=-210.0*tmp16*tmp3;
│ │ │ │ +
142 out[25][1]=0;
│ │ │ │ +
143 out[26][0]=-350.0*tmp16*tmp4;
│ │ │ │ +
144 out[26][1]=0;
│ │ │ │ +
145 out[27][0]=-490.0*tmp16*tmp5;
│ │ │ │ +
146 out[27][1]=0;
│ │ │ │ +
147 out[28][0]=0;
│ │ │ │ +
148 out[28][1]=10.0*tmp17;
│ │ │ │ +
149 out[29][0]=0;
│ │ │ │ +
150 out[29][1]=-30.0*tmp18;
│ │ │ │ +
151 out[30][0]=0;
│ │ │ │ +
152 out[30][1]=-70.0*tmp19;
│ │ │ │ +
153 out[31][0]=0;
│ │ │ │ +
154 out[31][1]=-30.0*tmp9*tmp20;
│ │ │ │ +
155 out[32][0]=0;
│ │ │ │ +
156 out[32][1]=-90.0*tmp9*tmp18;
│ │ │ │ +
157 out[33][0]=0;
│ │ │ │ +
158 out[33][1]=-210.0*tmp9*tmp19;
│ │ │ │ +
159 out[34][0]=0;
│ │ │ │ +
160 out[34][1]=-50.0*tmp10*tmp20;
│ │ │ │ +
161 out[35][0]=0;
│ │ │ │ +
162 out[35][1]=-150.0*tmp10*tmp18;
│ │ │ │ +
163 out[36][0]=0;
│ │ │ │ +
164 out[36][1]=-350.0*tmp10*tmp19;
│ │ │ │ +
165 out[37][0]=0;
│ │ │ │ +
166 out[37][1]=-70.0*tmp11*tmp20;
│ │ │ │ +
167 out[38][0]=0;
│ │ │ │ +
168 out[38][1]=-210.0*tmp11*tmp18;
│ │ │ │ +
169 out[39][0]=0;
│ │ │ │ +
170 out[39][1]=-490.0*tmp11*tmp19;
│ │ │ │ +
171 }
│ │ │ │ +
│ │ │ │ +
172
│ │ │ │ +
│ │ │ │ +
179 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
180 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
181 {
│ │ │ │ +
182 out.resize(40);
│ │ │ │ +
183 auto const& x = in[0], y = in[1];
│ │ │ │ +
184
│ │ │ │ +
185 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1;
│ │ │ │ +
186 const auto tmp3 = 2*y - 1;
│ │ │ │ +
187 const auto tmp4 = y*(6*y - 6) + 1;
│ │ │ │ +
188 const auto tmp5 = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
189 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4);
│ │ │ │ +
190 const auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1;
│ │ │ │ +
191 const auto tmp9 = 2*x - 1;
│ │ │ │ +
192 const auto tmp10 = x*(6*x - 6) + 1;
│ │ │ │ +
193 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
194 const auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4);
│ │ │ │ +
195 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2);
│ │ │ │ +
196 const auto tmp15 = x*(x*(2*x - 3) + 1);
│ │ │ │ +
197 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1);
│ │ │ │ +
198 const auto tmp18 = y*(y*(2*y - 3) + 1);
│ │ │ │ +
199 const auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1);
│ │ │ │ +
200 const auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2);
│ │ │ │ +
201 // temporaries tmp1, tmp7, tmp13, tmp17 are not used in jacobian
│ │ │ │ +
202
│ │ │ │ +
203 const auto dxtmp1 = 16 - x*(x*(140*x - 240) + 120);
│ │ │ │ +
204 const auto dxtmp2 = x*(x*(140*x - 240) + 120) - 16;
│ │ │ │ +
205 const auto dytmp3 = 2;
│ │ │ │ +
206 const auto dytmp4 = 12*y - 6;
│ │ │ │ +
207 const auto dytmp5 = y*(60*y - 60) + 12;
│ │ │ │ +
208 const auto dxtmp6 = x*(x*(140*x - 180) + 60) - 4;
│ │ │ │ +
209 const auto dytmp7 = 16 - y*(y*(140*y - 240) + 120);
│ │ │ │ +
210 const auto dytmp8 = y*(y*(140*y - 240) + 120) - 16;
│ │ │ │ +
211 const auto dxtmp9 = 2;
│ │ │ │ +
212 const auto dxtmp10 = 12*x - 6;
│ │ │ │ +
213 const auto dxtmp11 = x*(60*x - 60) + 12;
│ │ │ │ +
214 const auto dytmp12 = y*(y*(140*y - 180) + 60) - 4;
│ │ │ │ +
215 const auto dxtmp13 = 2 - x*(x*(28*x - 42) + 18);
│ │ │ │ +
216 const auto dxtmp14 = x*(x*(28*x - 42) + 18) - 2;
│ │ │ │ +
217 const auto dxtmp15 = x*(6*x - 6) + 1;
│ │ │ │ +
218 const auto dxtmp16 = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
219 const auto dytmp17 = 2 - y*(y*(28*y - 42) + 18);
│ │ │ │ +
220 const auto dytmp18 = y*(6*y - 6) + 1;
│ │ │ │ +
221 const auto dytmp19 = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
222 const auto dytmp20 = y*(y*(28*y - 42) + 18) - 2;
│ │ │ │ +
223
│ │ │ │ +
224
│ │ │ │ +
225 // x-component
│ │ │ │ +
226 out[0][0][0]=sign0*dxtmp1;
│ │ │ │ +
227 out[0][1][0]=0;
│ │ │ │ +
228 out[1][0][0]=(-3.0*dxtmp2*tmp3);
│ │ │ │ +
229 out[1][1][0]=0;
│ │ │ │ +
230 out[2][0][0]=sign0*(-5.0*dxtmp2*tmp4);
│ │ │ │ +
231 out[2][1][0]=0;
│ │ │ │ +
232 out[3][0][0]=(-7.0*dxtmp2*tmp5);
│ │ │ │ +
233 out[3][1][0]=0;
│ │ │ │ +
234
│ │ │ │ +
235 out[4][0][0]=sign1*dxtmp6;
│ │ │ │ +
236 out[4][1][0]=0;
│ │ │ │ +
237 out[5][0][0]=(-3.0*dxtmp6*tmp3);
│ │ │ │ +
238 out[5][1][0]=0;
│ │ │ │ +
239 out[6][0][0]=sign1*(5.0*dxtmp6*tmp4);
│ │ │ │ +
240 out[6][1][0]=0;
│ │ │ │ +
241 out[7][0][0]=(-7.0*dxtmp6*tmp5);
│ │ │ │ +
242 out[7][1][0]=0;
│ │ │ │ +
243
│ │ │ │ +
244 out[8][0][0]=0;
│ │ │ │ +
245 out[8][1][0]=0;
│ │ │ │ +
246 out[9][0][0]=0;
│ │ │ │ +
247 out[9][1][0]=3.0*dxtmp9*tmp8;
│ │ │ │ +
248 out[10][0][0]=0;
│ │ │ │ +
249 out[10][1][0]=sign2*(-5.0*dxtmp10*tmp8);
│ │ │ │ +
250 out[11][0][0]=0;
│ │ │ │ +
251 out[11][1][0]=7.0*dxtmp11*tmp8;
│ │ │ │ +
252
│ │ │ │ +
253 out[12][0][0]=0;
│ │ │ │ +
254 out[12][1][0]=0;
│ │ │ │ +
255 out[13][0][0]=0;
│ │ │ │ +
256 out[13][1][0]=3.0*dxtmp9*tmp12;
│ │ │ │ +
257 out[14][0][0]=0;
│ │ │ │ +
258 out[14][1][0]=sign3*5.0*dxtmp10*tmp12;
│ │ │ │ +
259 out[15][0][0]=0;
│ │ │ │ +
260 out[15][1][0]=7.0*dxtmp11*tmp12;
│ │ │ │ +
261
│ │ │ │ +
262 out[16][0][0]=10.0*dxtmp13;
│ │ │ │ +
263 out[16][1][0]=0;
│ │ │ │ +
264 out[17][0][0]=-30.0*dxtmp14*tmp3;
│ │ │ │ +
265 out[17][1][0]=0;
│ │ │ │ +
266 out[18][0][0]=-50.0*dxtmp14*tmp4;
│ │ │ │ +
267 out[18][1][0]=0;
│ │ │ │ +
268 out[19][0][0]=-70.0*dxtmp14*tmp5;
│ │ │ │ +
269 out[19][1][0]=0;
│ │ │ │ +
270 out[20][0][0]=-30.0*dxtmp15;
│ │ │ │ +
271 out[20][1][0]=0;
│ │ │ │ +
272 out[21][0][0]=-90.0*dxtmp15*tmp3;
│ │ │ │ +
273 out[21][1][0]=0;
│ │ │ │ +
274 out[22][0][0]=-150.0*dxtmp15*tmp4;
│ │ │ │ +
275 out[22][1][0]=0;
│ │ │ │ +
276 out[23][0][0]=-210.0*dxtmp15*tmp5;
│ │ │ │ +
277 out[23][1][0]=0;
│ │ │ │ +
278 out[24][0][0]=-70.0*dxtmp16;
│ │ │ │ +
279 out[24][1][0]=0;
│ │ │ │ +
280 out[25][0][0]=-210.0*dxtmp16*tmp3;
│ │ │ │ +
281 out[25][1][0]=0;
│ │ │ │ +
282 out[26][0][0]=-350.0*dxtmp16*tmp4;
│ │ │ │ +
283 out[26][1][0]=0;
│ │ │ │ +
284 out[27][0][0]=-490.0*dxtmp16*tmp5;
│ │ │ │ +
285 out[27][1][0]=0;
│ │ │ │ +
286 out[28][0][0]=0;
│ │ │ │ +
287 out[28][1][0]=0;
│ │ │ │ +
288 out[29][0][0]=0;
│ │ │ │ +
289 out[29][1][0]=0;
│ │ │ │ +
290 out[30][0][0]=0;
│ │ │ │ +
291 out[30][1][0]=0;
│ │ │ │ +
292 out[31][0][0]=0;
│ │ │ │ +
293 out[31][1][0]=-30.0*dxtmp9*tmp20;
│ │ │ │ +
294 out[32][0][0]=0;
│ │ │ │ +
295 out[32][1][0]=-90.0*dxtmp9*tmp18;
│ │ │ │ +
296 out[33][0][0]=0;
│ │ │ │ +
297 out[33][1][0]=-210.0*dxtmp9*tmp19;
│ │ │ │ +
298 out[34][0][0]=0;
│ │ │ │ +
299 out[34][1][0]=-50.0*dxtmp10*tmp20;
│ │ │ │ +
300 out[35][0][0]=0;
│ │ │ │ +
301 out[35][1][0]=-150.0*dxtmp10*tmp18;
│ │ │ │ +
302 out[36][0][0]=0;
│ │ │ │ +
303 out[36][1][0]=-350.0*dxtmp10*tmp19;
│ │ │ │ +
304 out[37][0][0]=0;
│ │ │ │ +
305 out[37][1][0]=-70.0*dxtmp11*tmp20;
│ │ │ │ +
306 out[38][0][0]=0;
│ │ │ │ +
307 out[38][1][0]=-210.0*dxtmp11*tmp18;
│ │ │ │ +
308 out[39][0][0]=0;
│ │ │ │ +
309 out[39][1][0]=-490.0*dxtmp11*tmp19;
│ │ │ │ +
310
│ │ │ │ +
311
│ │ │ │ +
312 // y-component
│ │ │ │ +
313 out[0][0][1]=0;
│ │ │ │ +
314 out[0][1][1]=0;
│ │ │ │ +
315 out[1][0][1]=(-3.0*tmp2*dytmp3);
│ │ │ │ +
316 out[1][1][1]=0;
│ │ │ │ +
317 out[2][0][1]=sign0*(-5.0*tmp2*dytmp4);
│ │ │ │ +
318 out[2][1][1]=0;
│ │ │ │ +
319 out[3][0][1]=(-7.0*tmp2*dytmp5);
│ │ │ │ +
320 out[3][1][1]=0;
│ │ │ │ +
321
│ │ │ │ +
322 out[4][0][1]=0;
│ │ │ │ +
323 out[4][1][1]=0;
│ │ │ │ +
324 out[5][0][1]=(-3.0*tmp6*dytmp3);
│ │ │ │ +
325 out[5][1][1]=0;
│ │ │ │ +
326 out[6][0][1]=sign1*(5.0*tmp6*dytmp4);
│ │ │ │ +
327 out[6][1][1]=0;
│ │ │ │ +
328 out[7][0][1]=(-7.0*tmp6*dytmp5);
│ │ │ │ +
329 out[7][1][1]=0;
│ │ │ │ +
330
│ │ │ │ +
331 out[8][0][1]=0;
│ │ │ │ +
332 out[8][1][1]=sign2*dytmp7;
│ │ │ │ +
333 out[9][0][1]=0;
│ │ │ │ +
334 out[9][1][1]=3.0*tmp9*dytmp8;
│ │ │ │ +
335 out[10][0][1]=0;
│ │ │ │ +
336 out[10][1][1]=sign2*(-5.0*tmp10*dytmp8);
│ │ │ │ +
337 out[11][0][1]=0;
│ │ │ │ +
338 out[11][1][1]=7.0*tmp11*dytmp8;
│ │ │ │ +
339
│ │ │ │ +
340 out[12][0][1]=0;
│ │ │ │ +
341 out[12][1][1]=sign3*dytmp12;
│ │ │ │ +
342 out[13][0][1]=0;
│ │ │ │ +
343 out[13][1][1]=3.0*tmp9*dytmp12;
│ │ │ │ +
344 out[14][0][1]=0;
│ │ │ │ +
345 out[14][1][1]=sign3*5.0*tmp10*dytmp12;
│ │ │ │ +
346 out[15][0][1]=0;
│ │ │ │ +
347 out[15][1][1]=7.0*tmp11*dytmp12;
│ │ │ │ +
348
│ │ │ │ +
349 out[16][0][1]=0;
│ │ │ │ +
350 out[16][1][1]=0;
│ │ │ │ +
351 out[17][0][1]=-30.0*tmp14*dytmp3;
│ │ │ │ +
352 out[17][1][1]=0;
│ │ │ │ +
353 out[18][0][1]=-50.0*tmp14*dytmp4;
│ │ │ │ +
354 out[18][1][1]=0;
│ │ │ │ +
355 out[19][0][1]=-70.0*tmp14*dytmp5;
│ │ │ │ +
356 out[19][1][1]=0;
│ │ │ │ +
357 out[20][0][1]=0;
│ │ │ │ +
358 out[20][1][1]=0;
│ │ │ │ +
359 out[21][0][1]=-90.0*tmp15*dytmp3;
│ │ │ │ +
360 out[21][1][1]=0;
│ │ │ │ +
361 out[22][0][1]=-150.0*tmp15*dytmp4;
│ │ │ │ +
362 out[22][1][1]=0;
│ │ │ │ +
363 out[23][0][1]=-210.0*tmp15*dytmp5;
│ │ │ │ +
364 out[23][1][1]=0;
│ │ │ │ +
365 out[24][0][1]=0;
│ │ │ │ +
366 out[24][1][1]=0;
│ │ │ │ +
367 out[25][0][1]=-210.0*tmp16*dytmp3;
│ │ │ │ +
368 out[25][1][1]=0;
│ │ │ │ +
369 out[26][0][1]=-350.0*tmp16*dytmp4;
│ │ │ │ +
370 out[26][1][1]=0;
│ │ │ │ +
371 out[27][0][1]=-490.0*tmp16*dytmp5;
│ │ │ │ +
372 out[27][1][1]=0;
│ │ │ │ +
373 out[28][0][1]=0;
│ │ │ │ +
374 out[28][1][1]=10.0*dytmp17;
│ │ │ │ +
375 out[29][0][1]=0;
│ │ │ │ +
376 out[29][1][1]=-30.0*dytmp18;
│ │ │ │ +
377 out[30][0][1]=0;
│ │ │ │ +
378 out[30][1][1]=-70.0*dytmp19;
│ │ │ │ +
379 out[31][0][1]=0;
│ │ │ │ +
380 out[31][1][1]=-30.0*tmp9*dytmp20;
│ │ │ │ +
381 out[32][0][1]=0;
│ │ │ │ +
382 out[32][1][1]=-90.0*tmp9*dytmp18;
│ │ │ │ +
383 out[33][0][1]=0;
│ │ │ │ +
384 out[33][1][1]=-210.0*tmp9*dytmp19;
│ │ │ │ +
385 out[34][0][1]=0;
│ │ │ │ +
386 out[34][1][1]=-50.0*tmp10*dytmp20;
│ │ │ │ +
387 out[35][0][1]=0;
│ │ │ │ +
388 out[35][1][1]=-150.0*tmp10*dytmp18;
│ │ │ │ +
389 out[36][0][1]=0;
│ │ │ │ +
390 out[36][1][1]=-350.0*tmp10*dytmp19;
│ │ │ │ +
391 out[37][0][1]=0;
│ │ │ │ +
392 out[37][1][1]=-70.0*tmp11*dytmp20;
│ │ │ │ +
393 out[38][0][1]=0;
│ │ │ │ +
394 out[38][1][1]=-210.0*tmp11*dytmp18;
│ │ │ │ +
395 out[39][0][1]=0;
│ │ │ │ +
396 out[39][1][1]=-490.0*tmp11*dytmp19;
│ │ │ │ +
397
│ │ │ │ +
398 }
│ │ │ │ +
│ │ │ │ +
399
│ │ │ │ +
│ │ │ │ +
401 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
402 const typename Traits::DomainType& in, // position
│ │ │ │ +
403 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
404 {
│ │ │ │ +
405 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
406 if (totalOrder == 0) {
│ │ │ │ +
407 evaluateFunction(in, out);
│ │ │ │ +
408 } else if (totalOrder == 1) {
│ │ │ │ +
409 out.resize(size());
│ │ │ │ +
410 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
411 auto const& x = in[0], y = in[1];
│ │ │ │ +
412
│ │ │ │ +
413 if (direction == 0) {
│ │ │ │ +
414 auto tmp3 = 2*y - 1;
│ │ │ │ +
415 auto tmp4 = y*(6*y - 6) + 1;
│ │ │ │ +
416 auto tmp5 = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
417 auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1;
│ │ │ │ +
418 auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4);
│ │ │ │ +
419 auto tmp18 = y*(y*(2*y - 3) + 1);
│ │ │ │ +
420 auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1);
│ │ │ │ +
421 auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2);
│ │ │ │ +
422
│ │ │ │ +
423 auto dxtmp1 = 16 - x*(x*(140*x - 240) + 120);
│ │ │ │ +
424 auto dxtmp2 = x*(x*(140*x - 240) + 120) - 16;
│ │ │ │ +
425 auto dxtmp6 = x*(x*(140*x - 180) + 60) - 4;
│ │ │ │ +
426 auto dxtmp9 = 2;
│ │ │ │ +
427 auto dxtmp10 = 12*x - 6;
│ │ │ │ +
428 auto dxtmp11 = x*(60*x - 60) + 12;
│ │ │ │ +
429 auto dxtmp13 = 2 - x*(x*(28*x - 42) + 18);
│ │ │ │ +
430 auto dxtmp14 = x*(x*(28*x - 42) + 18) - 2;
│ │ │ │ +
431 auto dxtmp15 = x*(6*x - 6) + 1;
│ │ │ │ +
432 auto dxtmp16 = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
433
│ │ │ │ +
434 out[0][0]=sign0*dxtmp1;
│ │ │ │ +
435 out[0][1]=0;
│ │ │ │ +
436 out[1][0]=(-3.0*dxtmp2*tmp3);
│ │ │ │ +
437 out[1][1]=0;
│ │ │ │ +
438 out[2][0]=sign0*(-5.0*dxtmp2*tmp4);
│ │ │ │ +
439 out[2][1]=0;
│ │ │ │ +
440 out[3][0]=(-7.0*dxtmp2*tmp5);
│ │ │ │ +
441 out[3][1]=0;
│ │ │ │ +
442
│ │ │ │ +
443 out[4][0]=sign1*dxtmp6;
│ │ │ │ +
444 out[4][1]=0;
│ │ │ │ +
445 out[5][0]=(-3.0*dxtmp6*tmp3);
│ │ │ │ +
446 out[5][1]=0;
│ │ │ │ +
447 out[6][0]=sign1*(5.0*dxtmp6*tmp4);
│ │ │ │ +
448 out[6][1]=0;
│ │ │ │ +
449 out[7][0]=(-7.0*dxtmp6*tmp5);
│ │ │ │ +
450 out[7][1]=0;
│ │ │ │ +
451
│ │ │ │ +
452 out[8][0]=0;
│ │ │ │ +
453 out[8][1]=0;
│ │ │ │ +
454 out[9][0]=0;
│ │ │ │ +
455 out[9][1]=3.0*dxtmp9*tmp8;
│ │ │ │ +
456 out[10][0]=0;
│ │ │ │ +
457 out[10][1]=sign2*(-5.0*dxtmp10*tmp8);
│ │ │ │ +
458 out[11][0]=0;
│ │ │ │ +
459 out[11][1]=7.0*dxtmp11*tmp8;
│ │ │ │ +
460
│ │ │ │ +
461 out[12][0]=0;
│ │ │ │ +
462 out[12][1]=0;
│ │ │ │ +
463 out[13][0]=0;
│ │ │ │ +
464 out[13][1]=3.0*dxtmp9*tmp12;
│ │ │ │ +
465 out[14][0]=0;
│ │ │ │ +
466 out[14][1]=sign3*5.0*dxtmp10*tmp12;
│ │ │ │ +
467 out[15][0]=0;
│ │ │ │ +
468 out[15][1]=7.0*dxtmp11*tmp12;
│ │ │ │ +
469
│ │ │ │ +
470 out[16][0]=10.0*dxtmp13;
│ │ │ │ +
471 out[16][1]=0;
│ │ │ │ +
472 out[17][0]=-30.0*dxtmp14*tmp3;
│ │ │ │ +
473 out[17][1]=0;
│ │ │ │ +
474 out[18][0]=-50.0*dxtmp14*tmp4;
│ │ │ │ +
475 out[18][1]=0;
│ │ │ │ +
476 out[19][0]=-70.0*dxtmp14*tmp5;
│ │ │ │ +
477 out[19][1]=0;
│ │ │ │ +
478 out[20][0]=-30.0*dxtmp15;
│ │ │ │ +
479 out[20][1]=0;
│ │ │ │ +
480 out[21][0]=-90.0*dxtmp15*tmp3;
│ │ │ │ +
481 out[21][1]=0;
│ │ │ │ +
482 out[22][0]=-150.0*dxtmp15*tmp4;
│ │ │ │ +
483 out[22][1]=0;
│ │ │ │ +
484 out[23][0]=-210.0*dxtmp15*tmp5;
│ │ │ │ +
485 out[23][1]=0;
│ │ │ │ +
486 out[24][0]=-70.0*dxtmp16;
│ │ │ │ +
487 out[24][1]=0;
│ │ │ │ +
488 out[25][0]=-210.0*dxtmp16*tmp3;
│ │ │ │ +
489 out[25][1]=0;
│ │ │ │ +
490 out[26][0]=-350.0*dxtmp16*tmp4;
│ │ │ │ +
491 out[26][1]=0;
│ │ │ │ +
492 out[27][0]=-490.0*dxtmp16*tmp5;
│ │ │ │ +
493 out[27][1]=0;
│ │ │ │ +
494 out[28][0]=0;
│ │ │ │ +
495 out[28][1]=0;
│ │ │ │ +
496 out[29][0]=0;
│ │ │ │ +
497 out[29][1]=0;
│ │ │ │ +
498 out[30][0]=0;
│ │ │ │ +
499 out[30][1]=0;
│ │ │ │ +
500 out[31][0]=0;
│ │ │ │ +
501 out[31][1]=-30.0*dxtmp9*tmp20;
│ │ │ │ +
502 out[32][0]=0;
│ │ │ │ +
503 out[32][1]=-90.0*dxtmp9*tmp18;
│ │ │ │ +
504 out[33][0]=0;
│ │ │ │ +
505 out[33][1]=-210.0*dxtmp9*tmp19;
│ │ │ │ +
506 out[34][0]=0;
│ │ │ │ +
507 out[34][1]=-50.0*dxtmp10*tmp20;
│ │ │ │ +
508 out[35][0]=0;
│ │ │ │ +
509 out[35][1]=-150.0*dxtmp10*tmp18;
│ │ │ │ +
510 out[36][0]=0;
│ │ │ │ +
511 out[36][1]=-350.0*dxtmp10*tmp19;
│ │ │ │ +
512 out[37][0]=0;
│ │ │ │ +
513 out[37][1]=-70.0*dxtmp11*tmp20;
│ │ │ │ +
514 out[38][0]=0;
│ │ │ │ +
515 out[38][1]=-210.0*dxtmp11*tmp18;
│ │ │ │ +
516 out[39][0]=0;
│ │ │ │ +
517 out[39][1]=-490.0*dxtmp11*tmp19;
│ │ │ │ +
518 } else if (direction == 1) {
│ │ │ │ +
519 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1;
│ │ │ │ +
520 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4);
│ │ │ │ +
521 const auto tmp9 = 2*x - 1;
│ │ │ │ +
522 const auto tmp10 = x*(6*x - 6) + 1;
│ │ │ │ +
523 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1;
│ │ │ │ +
524 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2);
│ │ │ │ +
525 const auto tmp15 = x*(x*(2*x - 3) + 1);
│ │ │ │ +
526 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1);
│ │ │ │ +
527
│ │ │ │ +
528 const auto dytmp3 = 2;
│ │ │ │ +
529 const auto dytmp4 = 12*y - 6;
│ │ │ │ +
530 const auto dytmp5 = y*(60*y - 60) + 12;
│ │ │ │ +
531 const auto dytmp7 = 16 - y*(y*(140*y - 240) + 120);
│ │ │ │ +
532 const auto dytmp8 = y*(y*(140*y - 240) + 120) - 16;
│ │ │ │ +
533 const auto dytmp12 = y*(y*(140*y - 180) + 60) - 4;
│ │ │ │ +
534 const auto dytmp17 = 2 - y*(y*(28*y - 42) + 18);
│ │ │ │ +
535 const auto dytmp18 = y*(6*y - 6) + 1;
│ │ │ │ +
536 const auto dytmp19 = y*(y*(20*y - 30) + 12) - 1;
│ │ │ │ +
537 const auto dytmp20 = y*(y*(28*y - 42) + 18) - 2;
│ │ │ │ +
538
│ │ │ │ +
539 out[0][0]=0;
│ │ │ │ +
540 out[0][1]=0;
│ │ │ │ +
541 out[1][0]=(-3.0*tmp2*dytmp3);
│ │ │ │ +
542 out[1][1]=0;
│ │ │ │ +
543 out[2][0]=sign0*(-5.0*tmp2*dytmp4);
│ │ │ │ +
544 out[2][1]=0;
│ │ │ │ +
545 out[3][0]=(-7.0*tmp2*dytmp5);
│ │ │ │ +
546 out[3][1]=0;
│ │ │ │ +
547
│ │ │ │ +
548 out[4][0]=0;
│ │ │ │ +
549 out[4][1]=0;
│ │ │ │ +
550 out[5][0]=(-3.0*tmp6*dytmp3);
│ │ │ │ +
551 out[5][1]=0;
│ │ │ │ +
552 out[6][0]=sign1*(5.0*tmp6*dytmp4);
│ │ │ │ +
553 out[6][1]=0;
│ │ │ │ +
554 out[7][0]=(-7.0*tmp6*dytmp5);
│ │ │ │ +
555 out[7][1]=0;
│ │ │ │ +
556
│ │ │ │ +
557 out[8][0]=0;
│ │ │ │ +
558 out[8][1]=sign2*dytmp7;
│ │ │ │ +
559 out[9][0]=0;
│ │ │ │ +
560 out[9][1]=3.0*tmp9*dytmp8;
│ │ │ │ +
561 out[10][0]=0;
│ │ │ │ +
562 out[10][1]=sign2*(-5.0*tmp10*dytmp8);
│ │ │ │ +
563 out[11][0]=0;
│ │ │ │ +
564 out[11][1]=7.0*tmp11*dytmp8;
│ │ │ │ +
565
│ │ │ │ +
566 out[12][0]=0;
│ │ │ │ +
567 out[12][1]=sign3*dytmp12;
│ │ │ │ +
568 out[13][0]=0;
│ │ │ │ +
569 out[13][1]=3.0*tmp9*dytmp12;
│ │ │ │ +
570 out[14][0]=0;
│ │ │ │ +
571 out[14][1]=sign3*5.0*tmp10*dytmp12;
│ │ │ │ +
572 out[15][0]=0;
│ │ │ │ +
573 out[15][1]=7.0*tmp11*dytmp12;
│ │ │ │ +
574
│ │ │ │ +
575 out[16][0]=0;
│ │ │ │ +
576 out[16][1]=0;
│ │ │ │ +
577 out[17][0]=-30.0*tmp14*dytmp3;
│ │ │ │ +
578 out[17][1]=0;
│ │ │ │ +
579 out[18][0]=-50.0*tmp14*dytmp4;
│ │ │ │ +
580 out[18][1]=0;
│ │ │ │ +
581 out[19][0]=-70.0*tmp14*dytmp5;
│ │ │ │ +
582 out[19][1]=0;
│ │ │ │ +
583 out[20][0]=0;
│ │ │ │ +
584 out[20][1]=0;
│ │ │ │ +
585 out[21][0]=-90.0*tmp15*dytmp3;
│ │ │ │ +
586 out[21][1]=0;
│ │ │ │ +
587 out[22][0]=-150.0*tmp15*dytmp4;
│ │ │ │ +
588 out[22][1]=0;
│ │ │ │ +
589 out[23][0]=-210.0*tmp15*dytmp5;
│ │ │ │ +
590 out[23][1]=0;
│ │ │ │ +
591 out[24][0]=0;
│ │ │ │ +
592 out[24][1]=0;
│ │ │ │ +
593 out[25][0]=-210.0*tmp16*dytmp3;
│ │ │ │ +
594 out[25][1]=0;
│ │ │ │ +
595 out[26][0]=-350.0*tmp16*dytmp4;
│ │ │ │ +
596 out[26][1]=0;
│ │ │ │ +
597 out[27][0]=-490.0*tmp16*dytmp5;
│ │ │ │ +
598 out[27][1]=0;
│ │ │ │ +
599 out[28][0]=0;
│ │ │ │ +
600 out[28][1]=10.0*dytmp17;
│ │ │ │ +
601 out[29][0]=0;
│ │ │ │ +
602 out[29][1]=-30.0*dytmp18;
│ │ │ │ +
603 out[30][0]=0;
│ │ │ │ +
604 out[30][1]=-70.0*dytmp19;
│ │ │ │ +
605 out[31][0]=0;
│ │ │ │ +
606 out[31][1]=-30.0*tmp9*dytmp20;
│ │ │ │ +
607 out[32][0]=0;
│ │ │ │ +
608 out[32][1]=-90.0*tmp9*dytmp18;
│ │ │ │ +
609 out[33][0]=0;
│ │ │ │ +
610 out[33][1]=-210.0*tmp9*dytmp19;
│ │ │ │ +
611 out[34][0]=0;
│ │ │ │ +
612 out[34][1]=-50.0*tmp10*dytmp20;
│ │ │ │ +
613 out[35][0]=0;
│ │ │ │ +
614 out[35][1]=-150.0*tmp10*dytmp18;
│ │ │ │ +
615 out[36][0]=0;
│ │ │ │ +
616 out[36][1]=-350.0*tmp10*dytmp19;
│ │ │ │ +
617 out[37][0]=0;
│ │ │ │ +
618 out[37][1]=-70.0*tmp11*dytmp20;
│ │ │ │ +
619 out[38][0]=0;
│ │ │ │ +
620 out[38][1]=-210.0*tmp11*dytmp18;
│ │ │ │ +
621 out[39][0]=0;
│ │ │ │ +
622 out[39][1]=-490.0*tmp11*dytmp19;
│ │ │ │ +
623 } else {
│ │ │ │ +
624 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
625 }
│ │ │ │ +
626 } else {
│ │ │ │ +
627 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
628 }
│ │ │ │ +
629 }
│ │ │ │ +
│ │ │ │ +
630
│ │ │ │ +
│ │ │ │ +
632 unsigned int order () const
│ │ │ │ +
633 {
│ │ │ │ +
634 return 7;
│ │ │ │ +
635 }
│ │ │ │ +
│ │ │ │ +
636
│ │ │ │ +
637 private:
│ │ │ │ +
638 R sign0, sign1, sign2, sign3;
│ │ │ │ +
639 };
│ │ │ │ +
│ │ │ │ +
640}
│ │ │ │ +
641
│ │ │ │ +
642#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Zero order Raviart-Thomas shape functions on cubes.
Definition raviartthomas0cube3d.hh:25
│ │ │ │ -
static constexpr GeometryType type()
Definition raviartthomas0cube3d.hh:61
│ │ │ │ -
RT0Cube3DLocalFiniteElement(int s)
Definition raviartthomas0cube3d.hh:35
│ │ │ │ -
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0cube3d.hh:56
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0cube3d.hh:40
│ │ │ │ -
RT0Cube3DLocalFiniteElement()
Definition raviartthomas0cube3d.hh:32
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0cube3d.hh:50
│ │ │ │ -
LocalFiniteElementTraits< RT0Cube3DLocalBasis< D, R >, RT0Cube3DLocalCoefficients, RT0Cube3DLocalInterpolation< RT0Cube3DLocalBasis< D, R > > > Traits
Definition raviartthomas0cube3d.hh:30
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0cube3d.hh:45
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:30
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:157
│ │ │ │ -
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube3dall.hh:215
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Second order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas3cube2dlocalbasis.hh:29
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas3cube2dlocalbasis.hh:49
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas3cube2dlocalbasis.hh:179
│ │ │ │ +
RT3Cube2DLocalBasis(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas3cube2dlocalbasis.hh:40
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas3cube2dlocalbasis.hh:60
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas3cube2dlocalbasis.hh:632
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas3cube2dlocalbasis.hh:33
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas3cube2dlocalbasis.hh:401
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,130 +1,671 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ -raviartthomas0cube3d.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_3_c_u_b_e_2_d │ │ │ │ │ +raviartthomas3cube2dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h" │ │ │ │ │ -12 │ │ │ │ │ -13namespace _D_u_n_e │ │ │ │ │ -14{ │ │ │ │ │ -23 template │ │ │ │ │ -_2_4 class _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -25 { │ │ │ │ │ -26 public: │ │ │ │ │ -27 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ -28 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ -29 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ -_3_0 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ -31 │ │ │ │ │ -_3_2 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -33 {} │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ +13 │ │ │ │ │ +14#include "../../common/localbasis.hh" │ │ │ │ │ +15 │ │ │ │ │ +16namespace _D_u_n_e │ │ │ │ │ +17{ │ │ │ │ │ +27 template │ │ │ │ │ +_2_8 class _R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +29 { │ │ │ │ │ +30 │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ 34 │ │ │ │ │ -_3_5 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ -36 basis(s), │ │ │ │ │ -37 interpolation(s) │ │ │ │ │ -38 {} │ │ │ │ │ -39 │ │ │ │ │ -_4_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +_4_0 _R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ 41 { │ │ │ │ │ -42 return basis; │ │ │ │ │ -43 } │ │ │ │ │ -44 │ │ │ │ │ -_4_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -46 { │ │ │ │ │ -47 return coefficients; │ │ │ │ │ -48 } │ │ │ │ │ -49 │ │ │ │ │ -_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -51 { │ │ │ │ │ -52 return interpolation; │ │ │ │ │ -53 } │ │ │ │ │ -54 │ │ │ │ │ -_5_6 unsigned int _s_i_z_e () const │ │ │ │ │ -57 { │ │ │ │ │ -58 return basis.size(); │ │ │ │ │ -59 } │ │ │ │ │ -60 │ │ │ │ │ -_6_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +42 sign0 = (s[0]) ? -1.0 : 1.0; │ │ │ │ │ +43 sign1 = (s[1]) ? -1.0 : 1.0; │ │ │ │ │ +44 sign2 = (s[2]) ? -1.0 : 1.0; │ │ │ │ │ +45 sign3 = (s[3]) ? -1.0 : 1.0; │ │ │ │ │ +46 } │ │ │ │ │ +47 │ │ │ │ │ +_4_9 unsigned int _s_i_z_e () const │ │ │ │ │ +50 { │ │ │ │ │ +51 return 40; │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_6_0 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +61 std::vector& out) const │ │ │ │ │ 62 { │ │ │ │ │ -63 return GeometryTypes::hexahedron; │ │ │ │ │ -64 } │ │ │ │ │ +63 out.resize(40); │ │ │ │ │ +64 auto const& x = in[0], y = in[1]; │ │ │ │ │ 65 │ │ │ │ │ -66 private: │ │ │ │ │ -67 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ -68 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ -69 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ -70 }; │ │ │ │ │ -71} │ │ │ │ │ -72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ +66 const auto tmp1 = - x*(x*(x*(35*x - 80) + 60) - 16) - 1; │ │ │ │ │ +67 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1; │ │ │ │ │ +68 const auto tmp3 = 2*y - 1; │ │ │ │ │ +69 const auto tmp4 = y*(6*y - 6) + 1; │ │ │ │ │ +70 const auto tmp5 = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +71 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4); │ │ │ │ │ +72 const auto tmp7 = - y*(y*(y*(35*y - 80) + 60) - 16) - 1; │ │ │ │ │ +73 const auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1; │ │ │ │ │ +74 const auto tmp9 = 2*x - 1; │ │ │ │ │ +75 const auto tmp10 = x*(6*x - 6) + 1; │ │ │ │ │ +76 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +77 const auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4); │ │ │ │ │ +78 const auto tmp13 = -x*(x*(x*(7*x - 14) + 9) - 2); │ │ │ │ │ +79 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2); │ │ │ │ │ +80 const auto tmp15 = x*(x*(2*x - 3) + 1); │ │ │ │ │ +81 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1); │ │ │ │ │ +82 const auto tmp17 = -y*(y*(y*(7*y - 14) + 9) - 2); │ │ │ │ │ +83 const auto tmp18 = y*(y*(2*y - 3) + 1); │ │ │ │ │ +84 const auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1); │ │ │ │ │ +85 const auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2); │ │ │ │ │ +86 │ │ │ │ │ +87 out[0][0]=sign0*tmp1; │ │ │ │ │ +88 out[0][1]=0; │ │ │ │ │ +89 out[1][0]=(-3.0*tmp2*tmp3); │ │ │ │ │ +90 out[1][1]=0; │ │ │ │ │ +91 out[2][0]=sign0*(-5.0*tmp2*tmp4); │ │ │ │ │ +92 out[2][1]=0; │ │ │ │ │ +93 out[3][0]=(-7.0*tmp2*tmp5); │ │ │ │ │ +94 out[3][1]=0; │ │ │ │ │ +95 │ │ │ │ │ +96 out[4][0]=sign1*tmp6; │ │ │ │ │ +97 out[4][1]=0; │ │ │ │ │ +98 out[5][0]=(-3.0*tmp6*tmp3); │ │ │ │ │ +99 out[5][1]=0; │ │ │ │ │ +100 out[6][0]=sign1*(5.0*tmp6*tmp4); │ │ │ │ │ +101 out[6][1]=0; │ │ │ │ │ +102 out[7][0]=(-7.0*tmp6*tmp5); │ │ │ │ │ +103 out[7][1]=0; │ │ │ │ │ +104 │ │ │ │ │ +105 out[8][0]=0; │ │ │ │ │ +106 out[8][1]=sign2*tmp7; │ │ │ │ │ +107 out[9][0]=0; │ │ │ │ │ +108 out[9][1]=3.0*tmp9*tmp8; │ │ │ │ │ +109 out[10][0]=0; │ │ │ │ │ +110 out[10][1]=sign2*(-5.0*tmp10*tmp8); │ │ │ │ │ +111 out[11][0]=0; │ │ │ │ │ +112 out[11][1]=7.0*tmp11*tmp8; │ │ │ │ │ +113 │ │ │ │ │ +114 out[12][0]=0; │ │ │ │ │ +115 out[12][1]=sign3*tmp12; │ │ │ │ │ +116 out[13][0]=0; │ │ │ │ │ +117 out[13][1]=3.0*tmp9*tmp12; │ │ │ │ │ +118 out[14][0]=0; │ │ │ │ │ +119 out[14][1]=sign3*5.0*tmp10*tmp12; │ │ │ │ │ +120 out[15][0]=0; │ │ │ │ │ +121 out[15][1]=7.0*tmp11*tmp12; │ │ │ │ │ +122 │ │ │ │ │ +123 out[16][0]=10.0*tmp13; │ │ │ │ │ +124 out[16][1]=0; │ │ │ │ │ +125 out[17][0]=-30.0*tmp14*tmp3; │ │ │ │ │ +126 out[17][1]=0; │ │ │ │ │ +127 out[18][0]=-50.0*tmp14*tmp4; │ │ │ │ │ +128 out[18][1]=0; │ │ │ │ │ +129 out[19][0]=-70.0*tmp14*tmp5; │ │ │ │ │ +130 out[19][1]=0; │ │ │ │ │ +131 out[20][0]=-30.0*tmp15; │ │ │ │ │ +132 out[20][1]=0; │ │ │ │ │ +133 out[21][0]=-90.0*tmp15*tmp3; │ │ │ │ │ +134 out[21][1]=0; │ │ │ │ │ +135 out[22][0]=-150.0*tmp15*tmp4; │ │ │ │ │ +136 out[22][1]=0; │ │ │ │ │ +137 out[23][0]=-210.0*tmp15*tmp5; │ │ │ │ │ +138 out[23][1]=0; │ │ │ │ │ +139 out[24][0]=-70.0*tmp16; │ │ │ │ │ +140 out[24][1]=0; │ │ │ │ │ +141 out[25][0]=-210.0*tmp16*tmp3; │ │ │ │ │ +142 out[25][1]=0; │ │ │ │ │ +143 out[26][0]=-350.0*tmp16*tmp4; │ │ │ │ │ +144 out[26][1]=0; │ │ │ │ │ +145 out[27][0]=-490.0*tmp16*tmp5; │ │ │ │ │ +146 out[27][1]=0; │ │ │ │ │ +147 out[28][0]=0; │ │ │ │ │ +148 out[28][1]=10.0*tmp17; │ │ │ │ │ +149 out[29][0]=0; │ │ │ │ │ +150 out[29][1]=-30.0*tmp18; │ │ │ │ │ +151 out[30][0]=0; │ │ │ │ │ +152 out[30][1]=-70.0*tmp19; │ │ │ │ │ +153 out[31][0]=0; │ │ │ │ │ +154 out[31][1]=-30.0*tmp9*tmp20; │ │ │ │ │ +155 out[32][0]=0; │ │ │ │ │ +156 out[32][1]=-90.0*tmp9*tmp18; │ │ │ │ │ +157 out[33][0]=0; │ │ │ │ │ +158 out[33][1]=-210.0*tmp9*tmp19; │ │ │ │ │ +159 out[34][0]=0; │ │ │ │ │ +160 out[34][1]=-50.0*tmp10*tmp20; │ │ │ │ │ +161 out[35][0]=0; │ │ │ │ │ +162 out[35][1]=-150.0*tmp10*tmp18; │ │ │ │ │ +163 out[36][0]=0; │ │ │ │ │ +164 out[36][1]=-350.0*tmp10*tmp19; │ │ │ │ │ +165 out[37][0]=0; │ │ │ │ │ +166 out[37][1]=-70.0*tmp11*tmp20; │ │ │ │ │ +167 out[38][0]=0; │ │ │ │ │ +168 out[38][1]=-210.0*tmp11*tmp18; │ │ │ │ │ +169 out[39][0]=0; │ │ │ │ │ +170 out[39][1]=-490.0*tmp11*tmp19; │ │ │ │ │ +171 } │ │ │ │ │ +172 │ │ │ │ │ +_1_7_9 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +180 std::vector& out) const │ │ │ │ │ +181 { │ │ │ │ │ +182 out.resize(40); │ │ │ │ │ +183 auto const& x = in[0], y = in[1]; │ │ │ │ │ +184 │ │ │ │ │ +185 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1; │ │ │ │ │ +186 const auto tmp3 = 2*y - 1; │ │ │ │ │ +187 const auto tmp4 = y*(6*y - 6) + 1; │ │ │ │ │ +188 const auto tmp5 = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +189 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4); │ │ │ │ │ +190 const auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1; │ │ │ │ │ +191 const auto tmp9 = 2*x - 1; │ │ │ │ │ +192 const auto tmp10 = x*(6*x - 6) + 1; │ │ │ │ │ +193 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +194 const auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4); │ │ │ │ │ +195 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2); │ │ │ │ │ +196 const auto tmp15 = x*(x*(2*x - 3) + 1); │ │ │ │ │ +197 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1); │ │ │ │ │ +198 const auto tmp18 = y*(y*(2*y - 3) + 1); │ │ │ │ │ +199 const auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1); │ │ │ │ │ +200 const auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2); │ │ │ │ │ +201 // temporaries tmp1, tmp7, tmp13, tmp17 are not used in jacobian │ │ │ │ │ +202 │ │ │ │ │ +203 const auto dxtmp1 = 16 - x*(x*(140*x - 240) + 120); │ │ │ │ │ +204 const auto dxtmp2 = x*(x*(140*x - 240) + 120) - 16; │ │ │ │ │ +205 const auto dytmp3 = 2; │ │ │ │ │ +206 const auto dytmp4 = 12*y - 6; │ │ │ │ │ +207 const auto dytmp5 = y*(60*y - 60) + 12; │ │ │ │ │ +208 const auto dxtmp6 = x*(x*(140*x - 180) + 60) - 4; │ │ │ │ │ +209 const auto dytmp7 = 16 - y*(y*(140*y - 240) + 120); │ │ │ │ │ +210 const auto dytmp8 = y*(y*(140*y - 240) + 120) - 16; │ │ │ │ │ +211 const auto dxtmp9 = 2; │ │ │ │ │ +212 const auto dxtmp10 = 12*x - 6; │ │ │ │ │ +213 const auto dxtmp11 = x*(60*x - 60) + 12; │ │ │ │ │ +214 const auto dytmp12 = y*(y*(140*y - 180) + 60) - 4; │ │ │ │ │ +215 const auto dxtmp13 = 2 - x*(x*(28*x - 42) + 18); │ │ │ │ │ +216 const auto dxtmp14 = x*(x*(28*x - 42) + 18) - 2; │ │ │ │ │ +217 const auto dxtmp15 = x*(6*x - 6) + 1; │ │ │ │ │ +218 const auto dxtmp16 = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +219 const auto dytmp17 = 2 - y*(y*(28*y - 42) + 18); │ │ │ │ │ +220 const auto dytmp18 = y*(6*y - 6) + 1; │ │ │ │ │ +221 const auto dytmp19 = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +222 const auto dytmp20 = y*(y*(28*y - 42) + 18) - 2; │ │ │ │ │ +223 │ │ │ │ │ +224 │ │ │ │ │ +225 // x-component │ │ │ │ │ +226 out[0][0][0]=sign0*dxtmp1; │ │ │ │ │ +227 out[0][1][0]=0; │ │ │ │ │ +228 out[1][0][0]=(-3.0*dxtmp2*tmp3); │ │ │ │ │ +229 out[1][1][0]=0; │ │ │ │ │ +230 out[2][0][0]=sign0*(-5.0*dxtmp2*tmp4); │ │ │ │ │ +231 out[2][1][0]=0; │ │ │ │ │ +232 out[3][0][0]=(-7.0*dxtmp2*tmp5); │ │ │ │ │ +233 out[3][1][0]=0; │ │ │ │ │ +234 │ │ │ │ │ +235 out[4][0][0]=sign1*dxtmp6; │ │ │ │ │ +236 out[4][1][0]=0; │ │ │ │ │ +237 out[5][0][0]=(-3.0*dxtmp6*tmp3); │ │ │ │ │ +238 out[5][1][0]=0; │ │ │ │ │ +239 out[6][0][0]=sign1*(5.0*dxtmp6*tmp4); │ │ │ │ │ +240 out[6][1][0]=0; │ │ │ │ │ +241 out[7][0][0]=(-7.0*dxtmp6*tmp5); │ │ │ │ │ +242 out[7][1][0]=0; │ │ │ │ │ +243 │ │ │ │ │ +244 out[8][0][0]=0; │ │ │ │ │ +245 out[8][1][0]=0; │ │ │ │ │ +246 out[9][0][0]=0; │ │ │ │ │ +247 out[9][1][0]=3.0*dxtmp9*tmp8; │ │ │ │ │ +248 out[10][0][0]=0; │ │ │ │ │ +249 out[10][1][0]=sign2*(-5.0*dxtmp10*tmp8); │ │ │ │ │ +250 out[11][0][0]=0; │ │ │ │ │ +251 out[11][1][0]=7.0*dxtmp11*tmp8; │ │ │ │ │ +252 │ │ │ │ │ +253 out[12][0][0]=0; │ │ │ │ │ +254 out[12][1][0]=0; │ │ │ │ │ +255 out[13][0][0]=0; │ │ │ │ │ +256 out[13][1][0]=3.0*dxtmp9*tmp12; │ │ │ │ │ +257 out[14][0][0]=0; │ │ │ │ │ +258 out[14][1][0]=sign3*5.0*dxtmp10*tmp12; │ │ │ │ │ +259 out[15][0][0]=0; │ │ │ │ │ +260 out[15][1][0]=7.0*dxtmp11*tmp12; │ │ │ │ │ +261 │ │ │ │ │ +262 out[16][0][0]=10.0*dxtmp13; │ │ │ │ │ +263 out[16][1][0]=0; │ │ │ │ │ +264 out[17][0][0]=-30.0*dxtmp14*tmp3; │ │ │ │ │ +265 out[17][1][0]=0; │ │ │ │ │ +266 out[18][0][0]=-50.0*dxtmp14*tmp4; │ │ │ │ │ +267 out[18][1][0]=0; │ │ │ │ │ +268 out[19][0][0]=-70.0*dxtmp14*tmp5; │ │ │ │ │ +269 out[19][1][0]=0; │ │ │ │ │ +270 out[20][0][0]=-30.0*dxtmp15; │ │ │ │ │ +271 out[20][1][0]=0; │ │ │ │ │ +272 out[21][0][0]=-90.0*dxtmp15*tmp3; │ │ │ │ │ +273 out[21][1][0]=0; │ │ │ │ │ +274 out[22][0][0]=-150.0*dxtmp15*tmp4; │ │ │ │ │ +275 out[22][1][0]=0; │ │ │ │ │ +276 out[23][0][0]=-210.0*dxtmp15*tmp5; │ │ │ │ │ +277 out[23][1][0]=0; │ │ │ │ │ +278 out[24][0][0]=-70.0*dxtmp16; │ │ │ │ │ +279 out[24][1][0]=0; │ │ │ │ │ +280 out[25][0][0]=-210.0*dxtmp16*tmp3; │ │ │ │ │ +281 out[25][1][0]=0; │ │ │ │ │ +282 out[26][0][0]=-350.0*dxtmp16*tmp4; │ │ │ │ │ +283 out[26][1][0]=0; │ │ │ │ │ +284 out[27][0][0]=-490.0*dxtmp16*tmp5; │ │ │ │ │ +285 out[27][1][0]=0; │ │ │ │ │ +286 out[28][0][0]=0; │ │ │ │ │ +287 out[28][1][0]=0; │ │ │ │ │ +288 out[29][0][0]=0; │ │ │ │ │ +289 out[29][1][0]=0; │ │ │ │ │ +290 out[30][0][0]=0; │ │ │ │ │ +291 out[30][1][0]=0; │ │ │ │ │ +292 out[31][0][0]=0; │ │ │ │ │ +293 out[31][1][0]=-30.0*dxtmp9*tmp20; │ │ │ │ │ +294 out[32][0][0]=0; │ │ │ │ │ +295 out[32][1][0]=-90.0*dxtmp9*tmp18; │ │ │ │ │ +296 out[33][0][0]=0; │ │ │ │ │ +297 out[33][1][0]=-210.0*dxtmp9*tmp19; │ │ │ │ │ +298 out[34][0][0]=0; │ │ │ │ │ +299 out[34][1][0]=-50.0*dxtmp10*tmp20; │ │ │ │ │ +300 out[35][0][0]=0; │ │ │ │ │ +301 out[35][1][0]=-150.0*dxtmp10*tmp18; │ │ │ │ │ +302 out[36][0][0]=0; │ │ │ │ │ +303 out[36][1][0]=-350.0*dxtmp10*tmp19; │ │ │ │ │ +304 out[37][0][0]=0; │ │ │ │ │ +305 out[37][1][0]=-70.0*dxtmp11*tmp20; │ │ │ │ │ +306 out[38][0][0]=0; │ │ │ │ │ +307 out[38][1][0]=-210.0*dxtmp11*tmp18; │ │ │ │ │ +308 out[39][0][0]=0; │ │ │ │ │ +309 out[39][1][0]=-490.0*dxtmp11*tmp19; │ │ │ │ │ +310 │ │ │ │ │ +311 │ │ │ │ │ +312 // y-component │ │ │ │ │ +313 out[0][0][1]=0; │ │ │ │ │ +314 out[0][1][1]=0; │ │ │ │ │ +315 out[1][0][1]=(-3.0*tmp2*dytmp3); │ │ │ │ │ +316 out[1][1][1]=0; │ │ │ │ │ +317 out[2][0][1]=sign0*(-5.0*tmp2*dytmp4); │ │ │ │ │ +318 out[2][1][1]=0; │ │ │ │ │ +319 out[3][0][1]=(-7.0*tmp2*dytmp5); │ │ │ │ │ +320 out[3][1][1]=0; │ │ │ │ │ +321 │ │ │ │ │ +322 out[4][0][1]=0; │ │ │ │ │ +323 out[4][1][1]=0; │ │ │ │ │ +324 out[5][0][1]=(-3.0*tmp6*dytmp3); │ │ │ │ │ +325 out[5][1][1]=0; │ │ │ │ │ +326 out[6][0][1]=sign1*(5.0*tmp6*dytmp4); │ │ │ │ │ +327 out[6][1][1]=0; │ │ │ │ │ +328 out[7][0][1]=(-7.0*tmp6*dytmp5); │ │ │ │ │ +329 out[7][1][1]=0; │ │ │ │ │ +330 │ │ │ │ │ +331 out[8][0][1]=0; │ │ │ │ │ +332 out[8][1][1]=sign2*dytmp7; │ │ │ │ │ +333 out[9][0][1]=0; │ │ │ │ │ +334 out[9][1][1]=3.0*tmp9*dytmp8; │ │ │ │ │ +335 out[10][0][1]=0; │ │ │ │ │ +336 out[10][1][1]=sign2*(-5.0*tmp10*dytmp8); │ │ │ │ │ +337 out[11][0][1]=0; │ │ │ │ │ +338 out[11][1][1]=7.0*tmp11*dytmp8; │ │ │ │ │ +339 │ │ │ │ │ +340 out[12][0][1]=0; │ │ │ │ │ +341 out[12][1][1]=sign3*dytmp12; │ │ │ │ │ +342 out[13][0][1]=0; │ │ │ │ │ +343 out[13][1][1]=3.0*tmp9*dytmp12; │ │ │ │ │ +344 out[14][0][1]=0; │ │ │ │ │ +345 out[14][1][1]=sign3*5.0*tmp10*dytmp12; │ │ │ │ │ +346 out[15][0][1]=0; │ │ │ │ │ +347 out[15][1][1]=7.0*tmp11*dytmp12; │ │ │ │ │ +348 │ │ │ │ │ +349 out[16][0][1]=0; │ │ │ │ │ +350 out[16][1][1]=0; │ │ │ │ │ +351 out[17][0][1]=-30.0*tmp14*dytmp3; │ │ │ │ │ +352 out[17][1][1]=0; │ │ │ │ │ +353 out[18][0][1]=-50.0*tmp14*dytmp4; │ │ │ │ │ +354 out[18][1][1]=0; │ │ │ │ │ +355 out[19][0][1]=-70.0*tmp14*dytmp5; │ │ │ │ │ +356 out[19][1][1]=0; │ │ │ │ │ +357 out[20][0][1]=0; │ │ │ │ │ +358 out[20][1][1]=0; │ │ │ │ │ +359 out[21][0][1]=-90.0*tmp15*dytmp3; │ │ │ │ │ +360 out[21][1][1]=0; │ │ │ │ │ +361 out[22][0][1]=-150.0*tmp15*dytmp4; │ │ │ │ │ +362 out[22][1][1]=0; │ │ │ │ │ +363 out[23][0][1]=-210.0*tmp15*dytmp5; │ │ │ │ │ +364 out[23][1][1]=0; │ │ │ │ │ +365 out[24][0][1]=0; │ │ │ │ │ +366 out[24][1][1]=0; │ │ │ │ │ +367 out[25][0][1]=-210.0*tmp16*dytmp3; │ │ │ │ │ +368 out[25][1][1]=0; │ │ │ │ │ +369 out[26][0][1]=-350.0*tmp16*dytmp4; │ │ │ │ │ +370 out[26][1][1]=0; │ │ │ │ │ +371 out[27][0][1]=-490.0*tmp16*dytmp5; │ │ │ │ │ +372 out[27][1][1]=0; │ │ │ │ │ +373 out[28][0][1]=0; │ │ │ │ │ +374 out[28][1][1]=10.0*dytmp17; │ │ │ │ │ +375 out[29][0][1]=0; │ │ │ │ │ +376 out[29][1][1]=-30.0*dytmp18; │ │ │ │ │ +377 out[30][0][1]=0; │ │ │ │ │ +378 out[30][1][1]=-70.0*dytmp19; │ │ │ │ │ +379 out[31][0][1]=0; │ │ │ │ │ +380 out[31][1][1]=-30.0*tmp9*dytmp20; │ │ │ │ │ +381 out[32][0][1]=0; │ │ │ │ │ +382 out[32][1][1]=-90.0*tmp9*dytmp18; │ │ │ │ │ +383 out[33][0][1]=0; │ │ │ │ │ +384 out[33][1][1]=-210.0*tmp9*dytmp19; │ │ │ │ │ +385 out[34][0][1]=0; │ │ │ │ │ +386 out[34][1][1]=-50.0*tmp10*dytmp20; │ │ │ │ │ +387 out[35][0][1]=0; │ │ │ │ │ +388 out[35][1][1]=-150.0*tmp10*dytmp18; │ │ │ │ │ +389 out[36][0][1]=0; │ │ │ │ │ +390 out[36][1][1]=-350.0*tmp10*dytmp19; │ │ │ │ │ +391 out[37][0][1]=0; │ │ │ │ │ +392 out[37][1][1]=-70.0*tmp11*dytmp20; │ │ │ │ │ +393 out[38][0][1]=0; │ │ │ │ │ +394 out[38][1][1]=-210.0*tmp11*dytmp18; │ │ │ │ │ +395 out[39][0][1]=0; │ │ │ │ │ +396 out[39][1][1]=-490.0*tmp11*dytmp19; │ │ │ │ │ +397 │ │ │ │ │ +398 } │ │ │ │ │ +399 │ │ │ │ │ +_4_0_1 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +402 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +403 std::vector& out) const // return value │ │ │ │ │ +404 { │ │ │ │ │ +405 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +406 if (totalOrder == 0) { │ │ │ │ │ +407 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +408 } else if (totalOrder == 1) { │ │ │ │ │ +409 out.resize(_s_i_z_e()); │ │ │ │ │ +410 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ +(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ +411 auto const& x = in[0], y = in[1]; │ │ │ │ │ +412 │ │ │ │ │ +413 if (direction == 0) { │ │ │ │ │ +414 auto tmp3 = 2*y - 1; │ │ │ │ │ +415 auto tmp4 = y*(6*y - 6) + 1; │ │ │ │ │ +416 auto tmp5 = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +417 auto tmp8 = y*(y*(y*(35*y - 80) + 60) - 16) + 1; │ │ │ │ │ +418 auto tmp12 = y*(y*(y*(35*y - 60) + 30) - 4); │ │ │ │ │ +419 auto tmp18 = y*(y*(2*y - 3) + 1); │ │ │ │ │ +420 auto tmp19 = y*(y*(y*(5*y - 10) + 6) - 1); │ │ │ │ │ +421 auto tmp20 = y*(y*(y*(7*y - 14) + 9) - 2); │ │ │ │ │ +422 │ │ │ │ │ +423 auto dxtmp1 = 16 - x*(x*(140*x - 240) + 120); │ │ │ │ │ +424 auto dxtmp2 = x*(x*(140*x - 240) + 120) - 16; │ │ │ │ │ +425 auto dxtmp6 = x*(x*(140*x - 180) + 60) - 4; │ │ │ │ │ +426 auto dxtmp9 = 2; │ │ │ │ │ +427 auto dxtmp10 = 12*x - 6; │ │ │ │ │ +428 auto dxtmp11 = x*(60*x - 60) + 12; │ │ │ │ │ +429 auto dxtmp13 = 2 - x*(x*(28*x - 42) + 18); │ │ │ │ │ +430 auto dxtmp14 = x*(x*(28*x - 42) + 18) - 2; │ │ │ │ │ +431 auto dxtmp15 = x*(6*x - 6) + 1; │ │ │ │ │ +432 auto dxtmp16 = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +433 │ │ │ │ │ +434 out[0][0]=sign0*dxtmp1; │ │ │ │ │ +435 out[0][1]=0; │ │ │ │ │ +436 out[1][0]=(-3.0*dxtmp2*tmp3); │ │ │ │ │ +437 out[1][1]=0; │ │ │ │ │ +438 out[2][0]=sign0*(-5.0*dxtmp2*tmp4); │ │ │ │ │ +439 out[2][1]=0; │ │ │ │ │ +440 out[3][0]=(-7.0*dxtmp2*tmp5); │ │ │ │ │ +441 out[3][1]=0; │ │ │ │ │ +442 │ │ │ │ │ +443 out[4][0]=sign1*dxtmp6; │ │ │ │ │ +444 out[4][1]=0; │ │ │ │ │ +445 out[5][0]=(-3.0*dxtmp6*tmp3); │ │ │ │ │ +446 out[5][1]=0; │ │ │ │ │ +447 out[6][0]=sign1*(5.0*dxtmp6*tmp4); │ │ │ │ │ +448 out[6][1]=0; │ │ │ │ │ +449 out[7][0]=(-7.0*dxtmp6*tmp5); │ │ │ │ │ +450 out[7][1]=0; │ │ │ │ │ +451 │ │ │ │ │ +452 out[8][0]=0; │ │ │ │ │ +453 out[8][1]=0; │ │ │ │ │ +454 out[9][0]=0; │ │ │ │ │ +455 out[9][1]=3.0*dxtmp9*tmp8; │ │ │ │ │ +456 out[10][0]=0; │ │ │ │ │ +457 out[10][1]=sign2*(-5.0*dxtmp10*tmp8); │ │ │ │ │ +458 out[11][0]=0; │ │ │ │ │ +459 out[11][1]=7.0*dxtmp11*tmp8; │ │ │ │ │ +460 │ │ │ │ │ +461 out[12][0]=0; │ │ │ │ │ +462 out[12][1]=0; │ │ │ │ │ +463 out[13][0]=0; │ │ │ │ │ +464 out[13][1]=3.0*dxtmp9*tmp12; │ │ │ │ │ +465 out[14][0]=0; │ │ │ │ │ +466 out[14][1]=sign3*5.0*dxtmp10*tmp12; │ │ │ │ │ +467 out[15][0]=0; │ │ │ │ │ +468 out[15][1]=7.0*dxtmp11*tmp12; │ │ │ │ │ +469 │ │ │ │ │ +470 out[16][0]=10.0*dxtmp13; │ │ │ │ │ +471 out[16][1]=0; │ │ │ │ │ +472 out[17][0]=-30.0*dxtmp14*tmp3; │ │ │ │ │ +473 out[17][1]=0; │ │ │ │ │ +474 out[18][0]=-50.0*dxtmp14*tmp4; │ │ │ │ │ +475 out[18][1]=0; │ │ │ │ │ +476 out[19][0]=-70.0*dxtmp14*tmp5; │ │ │ │ │ +477 out[19][1]=0; │ │ │ │ │ +478 out[20][0]=-30.0*dxtmp15; │ │ │ │ │ +479 out[20][1]=0; │ │ │ │ │ +480 out[21][0]=-90.0*dxtmp15*tmp3; │ │ │ │ │ +481 out[21][1]=0; │ │ │ │ │ +482 out[22][0]=-150.0*dxtmp15*tmp4; │ │ │ │ │ +483 out[22][1]=0; │ │ │ │ │ +484 out[23][0]=-210.0*dxtmp15*tmp5; │ │ │ │ │ +485 out[23][1]=0; │ │ │ │ │ +486 out[24][0]=-70.0*dxtmp16; │ │ │ │ │ +487 out[24][1]=0; │ │ │ │ │ +488 out[25][0]=-210.0*dxtmp16*tmp3; │ │ │ │ │ +489 out[25][1]=0; │ │ │ │ │ +490 out[26][0]=-350.0*dxtmp16*tmp4; │ │ │ │ │ +491 out[26][1]=0; │ │ │ │ │ +492 out[27][0]=-490.0*dxtmp16*tmp5; │ │ │ │ │ +493 out[27][1]=0; │ │ │ │ │ +494 out[28][0]=0; │ │ │ │ │ +495 out[28][1]=0; │ │ │ │ │ +496 out[29][0]=0; │ │ │ │ │ +497 out[29][1]=0; │ │ │ │ │ +498 out[30][0]=0; │ │ │ │ │ +499 out[30][1]=0; │ │ │ │ │ +500 out[31][0]=0; │ │ │ │ │ +501 out[31][1]=-30.0*dxtmp9*tmp20; │ │ │ │ │ +502 out[32][0]=0; │ │ │ │ │ +503 out[32][1]=-90.0*dxtmp9*tmp18; │ │ │ │ │ +504 out[33][0]=0; │ │ │ │ │ +505 out[33][1]=-210.0*dxtmp9*tmp19; │ │ │ │ │ +506 out[34][0]=0; │ │ │ │ │ +507 out[34][1]=-50.0*dxtmp10*tmp20; │ │ │ │ │ +508 out[35][0]=0; │ │ │ │ │ +509 out[35][1]=-150.0*dxtmp10*tmp18; │ │ │ │ │ +510 out[36][0]=0; │ │ │ │ │ +511 out[36][1]=-350.0*dxtmp10*tmp19; │ │ │ │ │ +512 out[37][0]=0; │ │ │ │ │ +513 out[37][1]=-70.0*dxtmp11*tmp20; │ │ │ │ │ +514 out[38][0]=0; │ │ │ │ │ +515 out[38][1]=-210.0*dxtmp11*tmp18; │ │ │ │ │ +516 out[39][0]=0; │ │ │ │ │ +517 out[39][1]=-490.0*dxtmp11*tmp19; │ │ │ │ │ +518 } else if (direction == 1) { │ │ │ │ │ +519 const auto tmp2 = x*(x*(x*(35*x - 80) + 60) - 16) + 1; │ │ │ │ │ +520 const auto tmp6 = x*(x*(x*(35*x - 60) + 30) - 4); │ │ │ │ │ +521 const auto tmp9 = 2*x - 1; │ │ │ │ │ +522 const auto tmp10 = x*(6*x - 6) + 1; │ │ │ │ │ +523 const auto tmp11 = x*(x*(20*x - 30) + 12) - 1; │ │ │ │ │ +524 const auto tmp14 = x*(x*(x*(7*x - 14) + 9) - 2); │ │ │ │ │ +525 const auto tmp15 = x*(x*(2*x - 3) + 1); │ │ │ │ │ +526 const auto tmp16 = x*(x*(x*(5*x - 10) + 6) - 1); │ │ │ │ │ +527 │ │ │ │ │ +528 const auto dytmp3 = 2; │ │ │ │ │ +529 const auto dytmp4 = 12*y - 6; │ │ │ │ │ +530 const auto dytmp5 = y*(60*y - 60) + 12; │ │ │ │ │ +531 const auto dytmp7 = 16 - y*(y*(140*y - 240) + 120); │ │ │ │ │ +532 const auto dytmp8 = y*(y*(140*y - 240) + 120) - 16; │ │ │ │ │ +533 const auto dytmp12 = y*(y*(140*y - 180) + 60) - 4; │ │ │ │ │ +534 const auto dytmp17 = 2 - y*(y*(28*y - 42) + 18); │ │ │ │ │ +535 const auto dytmp18 = y*(6*y - 6) + 1; │ │ │ │ │ +536 const auto dytmp19 = y*(y*(20*y - 30) + 12) - 1; │ │ │ │ │ +537 const auto dytmp20 = y*(y*(28*y - 42) + 18) - 2; │ │ │ │ │ +538 │ │ │ │ │ +539 out[0][0]=0; │ │ │ │ │ +540 out[0][1]=0; │ │ │ │ │ +541 out[1][0]=(-3.0*tmp2*dytmp3); │ │ │ │ │ +542 out[1][1]=0; │ │ │ │ │ +543 out[2][0]=sign0*(-5.0*tmp2*dytmp4); │ │ │ │ │ +544 out[2][1]=0; │ │ │ │ │ +545 out[3][0]=(-7.0*tmp2*dytmp5); │ │ │ │ │ +546 out[3][1]=0; │ │ │ │ │ +547 │ │ │ │ │ +548 out[4][0]=0; │ │ │ │ │ +549 out[4][1]=0; │ │ │ │ │ +550 out[5][0]=(-3.0*tmp6*dytmp3); │ │ │ │ │ +551 out[5][1]=0; │ │ │ │ │ +552 out[6][0]=sign1*(5.0*tmp6*dytmp4); │ │ │ │ │ +553 out[6][1]=0; │ │ │ │ │ +554 out[7][0]=(-7.0*tmp6*dytmp5); │ │ │ │ │ +555 out[7][1]=0; │ │ │ │ │ +556 │ │ │ │ │ +557 out[8][0]=0; │ │ │ │ │ +558 out[8][1]=sign2*dytmp7; │ │ │ │ │ +559 out[9][0]=0; │ │ │ │ │ +560 out[9][1]=3.0*tmp9*dytmp8; │ │ │ │ │ +561 out[10][0]=0; │ │ │ │ │ +562 out[10][1]=sign2*(-5.0*tmp10*dytmp8); │ │ │ │ │ +563 out[11][0]=0; │ │ │ │ │ +564 out[11][1]=7.0*tmp11*dytmp8; │ │ │ │ │ +565 │ │ │ │ │ +566 out[12][0]=0; │ │ │ │ │ +567 out[12][1]=sign3*dytmp12; │ │ │ │ │ +568 out[13][0]=0; │ │ │ │ │ +569 out[13][1]=3.0*tmp9*dytmp12; │ │ │ │ │ +570 out[14][0]=0; │ │ │ │ │ +571 out[14][1]=sign3*5.0*tmp10*dytmp12; │ │ │ │ │ +572 out[15][0]=0; │ │ │ │ │ +573 out[15][1]=7.0*tmp11*dytmp12; │ │ │ │ │ +574 │ │ │ │ │ +575 out[16][0]=0; │ │ │ │ │ +576 out[16][1]=0; │ │ │ │ │ +577 out[17][0]=-30.0*tmp14*dytmp3; │ │ │ │ │ +578 out[17][1]=0; │ │ │ │ │ +579 out[18][0]=-50.0*tmp14*dytmp4; │ │ │ │ │ +580 out[18][1]=0; │ │ │ │ │ +581 out[19][0]=-70.0*tmp14*dytmp5; │ │ │ │ │ +582 out[19][1]=0; │ │ │ │ │ +583 out[20][0]=0; │ │ │ │ │ +584 out[20][1]=0; │ │ │ │ │ +585 out[21][0]=-90.0*tmp15*dytmp3; │ │ │ │ │ +586 out[21][1]=0; │ │ │ │ │ +587 out[22][0]=-150.0*tmp15*dytmp4; │ │ │ │ │ +588 out[22][1]=0; │ │ │ │ │ +589 out[23][0]=-210.0*tmp15*dytmp5; │ │ │ │ │ +590 out[23][1]=0; │ │ │ │ │ +591 out[24][0]=0; │ │ │ │ │ +592 out[24][1]=0; │ │ │ │ │ +593 out[25][0]=-210.0*tmp16*dytmp3; │ │ │ │ │ +594 out[25][1]=0; │ │ │ │ │ +595 out[26][0]=-350.0*tmp16*dytmp4; │ │ │ │ │ +596 out[26][1]=0; │ │ │ │ │ +597 out[27][0]=-490.0*tmp16*dytmp5; │ │ │ │ │ +598 out[27][1]=0; │ │ │ │ │ +599 out[28][0]=0; │ │ │ │ │ +600 out[28][1]=10.0*dytmp17; │ │ │ │ │ +601 out[29][0]=0; │ │ │ │ │ +602 out[29][1]=-30.0*dytmp18; │ │ │ │ │ +603 out[30][0]=0; │ │ │ │ │ +604 out[30][1]=-70.0*dytmp19; │ │ │ │ │ +605 out[31][0]=0; │ │ │ │ │ +606 out[31][1]=-30.0*tmp9*dytmp20; │ │ │ │ │ +607 out[32][0]=0; │ │ │ │ │ +608 out[32][1]=-90.0*tmp9*dytmp18; │ │ │ │ │ +609 out[33][0]=0; │ │ │ │ │ +610 out[33][1]=-210.0*tmp9*dytmp19; │ │ │ │ │ +611 out[34][0]=0; │ │ │ │ │ +612 out[34][1]=-50.0*tmp10*dytmp20; │ │ │ │ │ +613 out[35][0]=0; │ │ │ │ │ +614 out[35][1]=-150.0*tmp10*dytmp18; │ │ │ │ │ +615 out[36][0]=0; │ │ │ │ │ +616 out[36][1]=-350.0*tmp10*dytmp19; │ │ │ │ │ +617 out[37][0]=0; │ │ │ │ │ +618 out[37][1]=-70.0*tmp11*dytmp20; │ │ │ │ │ +619 out[38][0]=0; │ │ │ │ │ +620 out[38][1]=-210.0*tmp11*dytmp18; │ │ │ │ │ +621 out[39][0]=0; │ │ │ │ │ +622 out[39][1]=-490.0*tmp11*dytmp19; │ │ │ │ │ +623 } else { │ │ │ │ │ +624 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +625 } │ │ │ │ │ +626 } else { │ │ │ │ │ +627 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +628 } │ │ │ │ │ +629 } │ │ │ │ │ +630 │ │ │ │ │ +_6_3_2 unsigned int _o_r_d_e_r () const │ │ │ │ │ +633 { │ │ │ │ │ +634 return 7; │ │ │ │ │ +635 } │ │ │ │ │ +636 │ │ │ │ │ +637 private: │ │ │ │ │ +638 R sign0, sign1, sign2, sign3; │ │ │ │ │ +639 }; │ │ │ │ │ +640} │ │ │ │ │ +641 │ │ │ │ │ +642#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS3_CUBE2D_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Zero order Raviart-Thomas shape functions on cubes. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT0Cube3DLocalFiniteElement(int s) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Second order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:29 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -Number of shape functions in this finite element. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT0Cube3DLocalFiniteElement() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RT0Cube3DLocalBasis< D, R >, │ │ │ │ │ -RT0Cube3DLocalCoefficients, RT0Cube3DLocalInterpolation< RT0Cube3DLocalBasis< │ │ │ │ │ -D, R > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3d.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3dall.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3dall.hh:157 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube3dall.hh:215 │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:49 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:179 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT3Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 16. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:60 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:632 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_3_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas3cube2dlocalbasis.hh:401 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube3dall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,44 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas0cube3dall.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cmath>
│ │ │ │ -#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ #include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT03DLocalInterpolation< LB >
class  Dune::RT0Cube3DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference hexahedron. More...
 
class  Dune::RT0Cube3DLocalInterpolation< LB >
 Lowest order Raviart-Thomas shape functions on the reference hexahedron. More...
 
class  Dune::RT0Cube3DLocalCoefficients
 Layout map for RT0 elements on quadrilaterals. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,35 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas03dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0cube3dall.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + hexahedron. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ + hexahedron. _M_o_r_e_._._. │ │ │ │ │ +  │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for RT0 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00308_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube3dall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,99 +70,280 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalinterpolation.hh
│ │ │ │ +
raviartthomas0cube3dall.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │
7
│ │ │ │ -
8#include <cmath>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <bitset>
│ │ │ │ -
11#include <vector>
│ │ │ │ - │ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <numeric>
│ │ │ │ +
10#include <vector>
│ │ │ │ +
11
│ │ │ │ +
12#include <dune/common/fmatrix.hh>
│ │ │ │
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
19 public:
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ -
22 RT03DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ -
23 {
│ │ │ │ -
24 using std::sqrt;
│ │ │ │ -
25 for (std::size_t i=0; i<sign_.size(); i++)
│ │ │ │ -
26 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ -
27
│ │ │ │ -
28 m_[0] = {1/3.0, 1/3.0, 0.0};
│ │ │ │ -
29 m_[1] = {1/3.0, 0.0, 1/3.0};
│ │ │ │ -
30 m_[2] = { 0.0, 1/3.0, 1/3.0};
│ │ │ │ -
31 m_[3] = {1/3.0, 1/3.0, 1/3.0};
│ │ │ │ -
32 n_[0] = { 0.0, 0.0, -1.0};
│ │ │ │ -
33 n_[1] = { 0.0, -1.0, 0.0};
│ │ │ │ -
34 n_[2] = { -1.0, 0.0, 0.0};
│ │ │ │ -
35 n_[3] = {1.0/sqrt(3.0), 1.0/sqrt(3.0), 1.0/sqrt(3.0)};
│ │ │ │ -
36 c_[0] = sqrt(2.0);
│ │ │ │ -
37 c_[1] = sqrt(2.0);
│ │ │ │ -
38 c_[2] = sqrt(2.0);
│ │ │ │ -
39 c_[3] = sqrt(2.0)/sqrt(3.0);
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
42 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
43 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
44 {
│ │ │ │ -
45 // f gives v*outer normal at a point on the face!
│ │ │ │ -
46 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
47
│ │ │ │ -
48 out.resize(4);
│ │ │ │ -
49
│ │ │ │ -
50 for (int i=0; i<4; i++)
│ │ │ │ -
51 {
│ │ │ │ -
52 auto y = f(m_[i]);
│ │ │ │ -
53 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1]+y[2]*n_[i][2])*sign_[i]/c_[i];
│ │ │ │ -
54 }
│ │ │ │ -
55 }
│ │ │ │ -
│ │ │ │ -
56
│ │ │ │ -
57 private:
│ │ │ │ -
58 // Face orientations
│ │ │ │ -
59 std::array<typename LB::Traits::RangeFieldType,4> sign_;
│ │ │ │ -
60 // Face midpoints of the reference tetrahedron
│ │ │ │ -
61 std::array<typename LB::Traits::DomainType,4> m_;
│ │ │ │ -
62 // Unit outer normals of the reference tetrahedron
│ │ │ │ -
63 std::array<typename LB::Traits::DomainType,4> n_;
│ │ │ │ -
64 // Inverse triangle face area
│ │ │ │ -
65 std::array<typename LB::Traits::RangeFieldType,4> c_;
│ │ │ │ -
66 };
│ │ │ │ -
│ │ │ │ -
67}
│ │ │ │ -
68
│ │ │ │ -
69#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
17
│ │ │ │ +
18namespace Dune
│ │ │ │ +
19{
│ │ │ │ +
28 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
30 {
│ │ │ │ +
31 public:
│ │ │ │ +
32 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
33 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ +
36 RT0Cube3DLocalBasis (unsigned int s = 0)
│ │ │ │ +
37 {
│ │ │ │ +
38 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ +
39 if (s&1) sign0 = -1.0;
│ │ │ │ +
40 if (s&2) sign1 = -1.0;
│ │ │ │ +
41 if (s&4) sign2 = -1.0;
│ │ │ │ +
42 if (s&8) sign3 = -1.0;
│ │ │ │ +
43 if (s&16) sign4 = -1.0;
│ │ │ │ +
44 if (s&32) sign5 = -1.0;
│ │ │ │ +
45 }
│ │ │ │ +
│ │ │ │ +
46
│ │ │ │ +
│ │ │ │ +
48 unsigned int size () const
│ │ │ │ +
49 {
│ │ │ │ +
50 return 6;
│ │ │ │ +
51 }
│ │ │ │ +
│ │ │ │ +
52
│ │ │ │ +
│ │ │ │ +
54 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
55 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
56 {
│ │ │ │ +
57 out.resize(6);
│ │ │ │ +
58 out[0][0] = sign0*(in[0]-1.0); out[0][1]=0.0; out[0][2]=0.0;
│ │ │ │ +
59 out[1][0] = sign1*(in[0]); out[1][1]=0.0; out[1][2]=0.0;
│ │ │ │ +
60 out[2][0] = 0.0; out[2][1]=sign2*(in[1]-1.0); out[2][2]=0.0;
│ │ │ │ +
61 out[3][0] = 0.0; out[3][1]=sign3*(in[1]); out[3][2]=0.0;
│ │ │ │ +
62 out[4][0] = 0.0; out[4][1]=0.0; out[4][2]=sign4*(in[2]-1.0);
│ │ │ │ +
63 out[5][0] = 0.0; out[5][1]=0.0; out[5][2]=sign5*(in[2]);
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
67 inline void
│ │ │ │ +
│ │ │ │ +
68 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ +
69 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ +
70 {
│ │ │ │ +
71 out.resize(6);
│ │ │ │ +
72 out[0][0][0] = sign0; out[0][0][1] = 0; out[0][0][2] = 0;
│ │ │ │ +
73 out[0][1][0] = 0; out[0][1][1] = 0; out[0][1][2] = 0;
│ │ │ │ +
74 out[0][2][0] = 0; out[0][2][1] = 0; out[0][2][2] = 0;
│ │ │ │ +
75
│ │ │ │ +
76 out[1][0][0] = sign1; out[1][0][1] = 0; out[1][0][2] = 0;
│ │ │ │ +
77 out[1][1][0] = 0; out[1][1][1] = 0; out[1][1][2] = 0;
│ │ │ │ +
78 out[1][2][0] = 0; out[1][2][1] = 0; out[1][2][2] = 0;
│ │ │ │ +
79
│ │ │ │ +
80 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0;
│ │ │ │ +
81 out[2][1][0] = 0; out[2][1][1] = sign2; out[2][1][2] = 0;
│ │ │ │ +
82 out[2][2][0] = 0; out[2][2][1] = 0; out[2][2][2] = 0;
│ │ │ │ +
83
│ │ │ │ +
84 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0;
│ │ │ │ +
85 out[3][1][0] = 0; out[3][1][1] = sign3; out[3][1][2] = 0;
│ │ │ │ +
86 out[3][2][0] = 0; out[3][2][1] = 0; out[3][2][2] = 0;
│ │ │ │ +
87
│ │ │ │ +
88 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0;
│ │ │ │ +
89 out[4][1][0] = 0; out[4][1][1] = 0; out[4][1][2] = 0;
│ │ │ │ +
90 out[4][2][0] = 0; out[4][2][1] = 0; out[4][2][2] = sign4;
│ │ │ │ +
91
│ │ │ │ +
92 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0;
│ │ │ │ +
93 out[5][1][0] = 0; out[5][1][1] = 0; out[5][1][2] = 0;
│ │ │ │ +
94 out[5][2][0] = 0; out[5][2][1] = 0; out[5][2][2] = sign5;
│ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ +
98 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
99 const typename Traits::DomainType& in, // position
│ │ │ │ +
100 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
101 {
│ │ │ │ +
102 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
103 if (totalOrder == 0) {
│ │ │ │ +
104 evaluateFunction(in, out);
│ │ │ │ +
105 } else if (totalOrder == 1) {
│ │ │ │ +
106 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
107 out.resize(size());
│ │ │ │ +
108
│ │ │ │ +
109 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
110 out[i][0] = out[i][1] = out[i][2] = 0;
│ │ │ │ +
111
│ │ │ │ +
112 switch (direction) {
│ │ │ │ +
113 case 0:
│ │ │ │ +
114 out[0][0] = sign0;
│ │ │ │ +
115 out[1][0] = sign1;
│ │ │ │ +
116 break;
│ │ │ │ +
117 case 1:
│ │ │ │ +
118 out[2][1] = sign2;
│ │ │ │ +
119 out[3][1] = sign3;
│ │ │ │ +
120 break;
│ │ │ │ +
121 case 2:
│ │ │ │ +
122 out[4][2] = sign4;
│ │ │ │ +
123 out[5][2] = sign5;
│ │ │ │ +
124 break;
│ │ │ │ +
125 default:
│ │ │ │ +
126 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
127 }
│ │ │ │ +
128 } else {
│ │ │ │ +
129 out.resize(size());
│ │ │ │ +
130 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ +
131 for (std::size_t j = 0; j < 2; ++j)
│ │ │ │ +
132 out[i][j] = 0;
│ │ │ │ +
133 }
│ │ │ │ +
134
│ │ │ │ +
135 }
│ │ │ │ +
│ │ │ │ +
136
│ │ │ │ +
│ │ │ │ +
138 unsigned int order () const
│ │ │ │ +
139 {
│ │ │ │ +
140 return 1;
│ │ │ │ +
141 }
│ │ │ │ +
│ │ │ │ +
142
│ │ │ │ +
143 private:
│ │ │ │ +
144 R sign0, sign1, sign2, sign3, sign4, sign5;
│ │ │ │ +
145 };
│ │ │ │ +
│ │ │ │ +
146
│ │ │ │ +
147
│ │ │ │ +
155 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
157 {
│ │ │ │ +
158 public:
│ │ │ │ +
159
│ │ │ │ +
│ │ │ │ +
161 RT0Cube3DLocalInterpolation (unsigned int s = 0)
│ │ │ │ +
162 {
│ │ │ │ +
163 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0;
│ │ │ │ +
164 if (s&1) sign0 *= -1.0;
│ │ │ │ +
165 if (s&2) sign1 *= -1.0;
│ │ │ │ +
166 if (s&4) sign2 *= -1.0;
│ │ │ │ +
167 if (s&8) sign3 *= -1.0;
│ │ │ │ +
168 if (s&16) sign4 *= -1.0;
│ │ │ │ +
169 if (s&32) sign5 *= -1.0;
│ │ │ │ +
170
│ │ │ │ +
171 m0[0] = 0.0; m0[1] = 0.5; m0[2] = 0.5;
│ │ │ │ +
172 m1[0] = 1.0; m1[1] = 0.5; m1[2] = 0.5;
│ │ │ │ +
173 m2[0] = 0.5; m2[1] = 0.0; m2[2] = 0.5;
│ │ │ │ +
174 m3[0] = 0.5; m3[1] = 1.0; m3[2] = 0.5;
│ │ │ │ +
175 m4[0] = 0.5; m4[1] = 0.5; m4[2] = 0.0;
│ │ │ │ +
176 m5[0] = 0.5; m5[1] = 0.5; m5[2] = 1.0;
│ │ │ │ +
177
│ │ │ │ +
178 n0[0] = -1.0; n0[1] = 0.0; n0[2] = 0.0;
│ │ │ │ +
179 n1[0] = 1.0; n1[1] = 0.0; n1[2] = 0.0;
│ │ │ │ +
180 n2[0] = 0.0; n2[1] = -1.0; n2[2] = 0.0;
│ │ │ │ +
181 n3[0] = 0.0; n3[1] = 1.0; n3[2] = 0.0;
│ │ │ │ +
182 n4[0] = 0.0; n4[1] = 0.0; n4[2] =-1.0;
│ │ │ │ +
183 n5[0] = 0.0; n5[1] = 0.0; n5[2] = 1.0;
│ │ │ │ +
184 }
│ │ │ │ +
│ │ │ │ +
185
│ │ │ │ +
186 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
187 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
188 {
│ │ │ │ +
189 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
190 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
191
│ │ │ │ +
192 out.resize(6);
│ │ │ │ +
193
│ │ │ │ +
194 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1]+y[2]*n0[2])*sign0;
│ │ │ │ +
195 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1]+y[2]*n1[2])*sign1;
│ │ │ │ +
196 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1]+y[2]*n2[2])*sign2;
│ │ │ │ +
197 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1]+y[2]*n3[2])*sign3;
│ │ │ │ +
198 y = f(m4); out[4] = (y[0]*n4[0]+y[1]*n4[1]+y[2]*n4[2])*sign4;
│ │ │ │ +
199 y = f(m5); out[5] = (y[0]*n5[0]+y[1]*n5[1]+y[2]*n5[2])*sign5;
│ │ │ │ +
200 }
│ │ │ │ +
│ │ │ │ +
201
│ │ │ │ +
202 private:
│ │ │ │ +
203 typename LB::Traits::RangeFieldType sign0,sign1,sign2,sign3,sign4,sign5;
│ │ │ │ +
204 typename LB::Traits::DomainType m0,m1,m2,m3,m4,m5;
│ │ │ │ +
205 typename LB::Traits::DomainType n0,n1,n2,n3,n4,n5;
│ │ │ │ +
206 };
│ │ │ │ +
│ │ │ │ +
207
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
215 {
│ │ │ │ +
216 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
219 {
│ │ │ │ +
220 for (std::size_t i=0; i<6; i++)
│ │ │ │ +
221 li[i] = LocalKey(i,1,0);
│ │ │ │ +
222 }
│ │ │ │ +
│ │ │ │ +
223
│ │ │ │ +
│ │ │ │ +
225 std::size_t size () const
│ │ │ │ +
226 {
│ │ │ │ +
227 return 6;
│ │ │ │ +
228 }
│ │ │ │ +
│ │ │ │ +
229
│ │ │ │ +
│ │ │ │ +
231 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
232 {
│ │ │ │ +
233 return li[i];
│ │ │ │ +
234 }
│ │ │ │ +
│ │ │ │ +
235
│ │ │ │ +
236 private:
│ │ │ │ +
237 std::vector<LocalKey> li;
│ │ │ │ +
238 };
│ │ │ │ +
│ │ │ │ +
239
│ │ │ │ +
240}
│ │ │ │ +
241#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH
│ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition raviartthomas03dlocalinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas03dlocalinterpolation.hh:43
│ │ │ │ -
RT03DLocalInterpolation(std::bitset< 4 > s=0)
Constructor with given set of face orientations.
Definition raviartthomas03dlocalinterpolation.hh:22
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:30
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas0cube3dall.hh:48
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas0cube3dall.hh:68
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas0cube3dall.hh:138
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas0cube3dall.hh:98
│ │ │ │ +
RT0Cube3DLocalBasis(unsigned int s=0)
Make set number s, where 0 <= s < 64.
Definition raviartthomas0cube3dall.hh:36
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas0cube3dall.hh:33
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas0cube3dall.hh:54
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:157
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas0cube3dall.hh:187
│ │ │ │ +
RT0Cube3DLocalInterpolation(unsigned int s=0)
Make set number s, where 0 <= s < 64.
Definition raviartthomas0cube3dall.hh:161
│ │ │ │ +
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube3dall.hh:215
│ │ │ │ +
RT0Cube3DLocalCoefficients()
Standard constructor.
Definition raviartthomas0cube3dall.hh:218
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas0cube3dall.hh:225
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas0cube3dall.hh:231
│ │ │ │ + │ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,96 +1,300 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ -raviartthomas03dlocalinterpolation.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d │ │ │ │ │ +raviartthomas0cube3dall.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ -6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10#include │ │ │ │ │ +11 │ │ │ │ │ +12#include │ │ │ │ │ 13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -18 { │ │ │ │ │ -19 public: │ │ │ │ │ -20 │ │ │ │ │ -_2_2 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ -23 { │ │ │ │ │ -24 using std::sqrt; │ │ │ │ │ -25 for (std::size_t i=0; i │ │ │ │ │ -_4_3 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -44 { │ │ │ │ │ -45 // f gives v*outer normal at a point on the face! │ │ │ │ │ -46 auto&& f = Impl::makeFunctionWithCallOperator │ │ │ │ │ +15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +17 │ │ │ │ │ +18namespace _D_u_n_e │ │ │ │ │ +19{ │ │ │ │ │ +28 template │ │ │ │ │ +_2_9 class _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +30 { │ │ │ │ │ +31 public: │ │ │ │ │ +32 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +34 │ │ │ │ │ +_3_6 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s (unsigned int s = 0) │ │ │ │ │ +37 { │ │ │ │ │ +38 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ +39 if (s&1) sign0 = -1.0; │ │ │ │ │ +40 if (s&2) sign1 = -1.0; │ │ │ │ │ +41 if (s&4) sign2 = -1.0; │ │ │ │ │ +42 if (s&8) sign3 = -1.0; │ │ │ │ │ +43 if (s&16) sign4 = -1.0; │ │ │ │ │ +44 if (s&32) sign5 = -1.0; │ │ │ │ │ +45 } │ │ │ │ │ +46 │ │ │ │ │ +_4_8 unsigned int _s_i_z_e () const │ │ │ │ │ +49 { │ │ │ │ │ +50 return 6; │ │ │ │ │ +51 } │ │ │ │ │ +52 │ │ │ │ │ +_5_4 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +55 std::vector& out) const │ │ │ │ │ +56 { │ │ │ │ │ +57 out.resize(6); │ │ │ │ │ +58 out[0][0] = sign0*(in[0]-1.0); out[0][1]=0.0; out[0][2]=0.0; │ │ │ │ │ +59 out[1][0] = sign1*(in[0]); out[1][1]=0.0; out[1][2]=0.0; │ │ │ │ │ +60 out[2][0] = 0.0; out[2][1]=sign2*(in[1]-1.0); out[2][2]=0.0; │ │ │ │ │ +61 out[3][0] = 0.0; out[3][1]=sign3*(in[1]); out[3][2]=0.0; │ │ │ │ │ +62 out[4][0] = 0.0; out[4][1]=0.0; out[4][2]=sign4*(in[2]-1.0); │ │ │ │ │ +63 out[5][0] = 0.0; out[5][1]=0.0; out[5][2]=sign5*(in[2]); │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +67 inline void │ │ │ │ │ +_6_8 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +69 std::vector& out) const // return value │ │ │ │ │ +70 { │ │ │ │ │ +71 out.resize(6); │ │ │ │ │ +72 out[0][0][0] = sign0; out[0][0][1] = 0; out[0][0][2] = 0; │ │ │ │ │ +73 out[0][1][0] = 0; out[0][1][1] = 0; out[0][1][2] = 0; │ │ │ │ │ +74 out[0][2][0] = 0; out[0][2][1] = 0; out[0][2][2] = 0; │ │ │ │ │ +75 │ │ │ │ │ +76 out[1][0][0] = sign1; out[1][0][1] = 0; out[1][0][2] = 0; │ │ │ │ │ +77 out[1][1][0] = 0; out[1][1][1] = 0; out[1][1][2] = 0; │ │ │ │ │ +78 out[1][2][0] = 0; out[1][2][1] = 0; out[1][2][2] = 0; │ │ │ │ │ +79 │ │ │ │ │ +80 out[2][0][0] = 0; out[2][0][1] = 0; out[2][0][2] = 0; │ │ │ │ │ +81 out[2][1][0] = 0; out[2][1][1] = sign2; out[2][1][2] = 0; │ │ │ │ │ +82 out[2][2][0] = 0; out[2][2][1] = 0; out[2][2][2] = 0; │ │ │ │ │ +83 │ │ │ │ │ +84 out[3][0][0] = 0; out[3][0][1] = 0; out[3][0][2] = 0; │ │ │ │ │ +85 out[3][1][0] = 0; out[3][1][1] = sign3; out[3][1][2] = 0; │ │ │ │ │ +86 out[3][2][0] = 0; out[3][2][1] = 0; out[3][2][2] = 0; │ │ │ │ │ +87 │ │ │ │ │ +88 out[4][0][0] = 0; out[4][0][1] = 0; out[4][0][2] = 0; │ │ │ │ │ +89 out[4][1][0] = 0; out[4][1][1] = 0; out[4][1][2] = 0; │ │ │ │ │ +90 out[4][2][0] = 0; out[4][2][1] = 0; out[4][2][2] = sign4; │ │ │ │ │ +91 │ │ │ │ │ +92 out[5][0][0] = 0; out[5][0][1] = 0; out[5][0][2] = 0; │ │ │ │ │ +93 out[5][1][0] = 0; out[5][1][1] = 0; out[5][1][2] = 0; │ │ │ │ │ +94 out[5][2][0] = 0; out[5][2][1] = 0; out[5][2][2] = sign5; │ │ │ │ │ +95 } │ │ │ │ │ +96 │ │ │ │ │ +_9_8 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +99 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +100 std::vector& out) const // return value │ │ │ │ │ +101 { │ │ │ │ │ +102 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +103 if (totalOrder == 0) { │ │ │ │ │ +104 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +105 } else if (totalOrder == 1) { │ │ │ │ │ +106 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ +(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ +107 out.resize(_s_i_z_e()); │ │ │ │ │ +108 │ │ │ │ │ +109 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +110 out[i][0] = out[i][1] = out[i][2] = 0; │ │ │ │ │ +111 │ │ │ │ │ +112 switch (direction) { │ │ │ │ │ +113 case 0: │ │ │ │ │ +114 out[0][0] = sign0; │ │ │ │ │ +115 out[1][0] = sign1; │ │ │ │ │ +116 break; │ │ │ │ │ +117 case 1: │ │ │ │ │ +118 out[2][1] = sign2; │ │ │ │ │ +119 out[3][1] = sign3; │ │ │ │ │ +120 break; │ │ │ │ │ +121 case 2: │ │ │ │ │ +122 out[4][2] = sign4; │ │ │ │ │ +123 out[5][2] = sign5; │ │ │ │ │ +124 break; │ │ │ │ │ +125 default: │ │ │ │ │ +126 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +127 } │ │ │ │ │ +128 } else { │ │ │ │ │ +129 out.resize(_s_i_z_e()); │ │ │ │ │ +130 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ +131 for (std::size_t j = 0; j < 2; ++j) │ │ │ │ │ +132 out[i][j] = 0; │ │ │ │ │ +133 } │ │ │ │ │ +134 │ │ │ │ │ +135 } │ │ │ │ │ +136 │ │ │ │ │ +_1_3_8 unsigned int _o_r_d_e_r () const │ │ │ │ │ +139 { │ │ │ │ │ +140 return 1; │ │ │ │ │ +141 } │ │ │ │ │ +142 │ │ │ │ │ +143 private: │ │ │ │ │ +144 R sign0, sign1, sign2, sign3, sign4, sign5; │ │ │ │ │ +145 }; │ │ │ │ │ +146 │ │ │ │ │ +147 │ │ │ │ │ +155 template │ │ │ │ │ +_1_5_6 class _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +157 { │ │ │ │ │ +158 public: │ │ │ │ │ +159 │ │ │ │ │ +_1_6_1 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (unsigned int s = 0) │ │ │ │ │ +162 { │ │ │ │ │ +163 sign0 = sign1 = sign2 = sign3 = sign4 = sign5 = 1.0; │ │ │ │ │ +164 if (s&1) sign0 *= -1.0; │ │ │ │ │ +165 if (s&2) sign1 *= -1.0; │ │ │ │ │ +166 if (s&4) sign2 *= -1.0; │ │ │ │ │ +167 if (s&8) sign3 *= -1.0; │ │ │ │ │ +168 if (s&16) sign4 *= -1.0; │ │ │ │ │ +169 if (s&32) sign5 *= -1.0; │ │ │ │ │ +170 │ │ │ │ │ +171 m0[0] = 0.0; m0[1] = 0.5; m0[2] = 0.5; │ │ │ │ │ +172 m1[0] = 1.0; m1[1] = 0.5; m1[2] = 0.5; │ │ │ │ │ +173 m2[0] = 0.5; m2[1] = 0.0; m2[2] = 0.5; │ │ │ │ │ +174 m3[0] = 0.5; m3[1] = 1.0; m3[2] = 0.5; │ │ │ │ │ +175 m4[0] = 0.5; m4[1] = 0.5; m4[2] = 0.0; │ │ │ │ │ +176 m5[0] = 0.5; m5[1] = 0.5; m5[2] = 1.0; │ │ │ │ │ +177 │ │ │ │ │ +178 n0[0] = -1.0; n0[1] = 0.0; n0[2] = 0.0; │ │ │ │ │ +179 n1[0] = 1.0; n1[1] = 0.0; n1[2] = 0.0; │ │ │ │ │ +180 n2[0] = 0.0; n2[1] = -1.0; n2[2] = 0.0; │ │ │ │ │ +181 n3[0] = 0.0; n3[1] = 1.0; n3[2] = 0.0; │ │ │ │ │ +182 n4[0] = 0.0; n4[1] = 0.0; n4[2] =-1.0; │ │ │ │ │ +183 n5[0] = 0.0; n5[1] = 0.0; n5[2] = 1.0; │ │ │ │ │ +184 } │ │ │ │ │ +185 │ │ │ │ │ +186 template │ │ │ │ │ +_1_8_7 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +188 { │ │ │ │ │ +189 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +190 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -47 │ │ │ │ │ -48 out.resize(4); │ │ │ │ │ -49 │ │ │ │ │ -50 for (int i=0; i<4; i++) │ │ │ │ │ -51 { │ │ │ │ │ -52 auto y = f(m_[i]); │ │ │ │ │ -53 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1]+y[2]*n_[i][2])*sign_[i]/c_[i]; │ │ │ │ │ -54 } │ │ │ │ │ -55 } │ │ │ │ │ -56 │ │ │ │ │ -57 private: │ │ │ │ │ -58 // Face orientations │ │ │ │ │ -59 std::array sign_; │ │ │ │ │ -60 // Face midpoints of the reference tetrahedron │ │ │ │ │ -61 std::array m_; │ │ │ │ │ -62 // Unit outer normals of the reference tetrahedron │ │ │ │ │ -63 std::array n_; │ │ │ │ │ -64 // Inverse triangle face area │ │ │ │ │ -65 std::array c_; │ │ │ │ │ -66 }; │ │ │ │ │ -67} │ │ │ │ │ -68 │ │ │ │ │ -69#endif │ │ │ │ │ +191 │ │ │ │ │ +192 out.resize(6); │ │ │ │ │ +193 │ │ │ │ │ +194 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1]+y[2]*n0[2])*sign0; │ │ │ │ │ +195 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1]+y[2]*n1[2])*sign1; │ │ │ │ │ +196 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1]+y[2]*n2[2])*sign2; │ │ │ │ │ +197 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1]+y[2]*n3[2])*sign3; │ │ │ │ │ +198 y = f(m4); out[4] = (y[0]*n4[0]+y[1]*n4[1]+y[2]*n4[2])*sign4; │ │ │ │ │ +199 y = f(m5); out[5] = (y[0]*n5[0]+y[1]*n5[1]+y[2]*n5[2])*sign5; │ │ │ │ │ +200 } │ │ │ │ │ +201 │ │ │ │ │ +202 private: │ │ │ │ │ +203 typename LB::Traits::RangeFieldType sign0,sign1,sign2,sign3,sign4,sign5; │ │ │ │ │ +204 typename LB::Traits::DomainType m0,m1,m2,m3,m4,m5; │ │ │ │ │ +205 typename LB::Traits::DomainType n0,n1,n2,n3,n4,n5; │ │ │ │ │ +206 }; │ │ │ │ │ +207 │ │ │ │ │ +_2_1_4 class _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +215 { │ │ │ │ │ +216 public: │ │ │ │ │ +_2_1_8 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(6) │ │ │ │ │ +219 { │ │ │ │ │ +220 for (std::size_t i=0; i<6; i++) │ │ │ │ │ +221 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +222 } │ │ │ │ │ +223 │ │ │ │ │ +_2_2_5 std::size_t _s_i_z_e () const │ │ │ │ │ +226 { │ │ │ │ │ +227 return 6; │ │ │ │ │ +228 } │ │ │ │ │ +229 │ │ │ │ │ +_2_3_1 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +232 { │ │ │ │ │ +233 return li[i]; │ │ │ │ │ +234 } │ │ │ │ │ +235 │ │ │ │ │ +236 private: │ │ │ │ │ +237 std::vector li; │ │ │ │ │ +238 }; │ │ │ │ │ +239 │ │ │ │ │ +240} │ │ │ │ │ +241#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_ALL_HH │ │ │ │ │ +_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:48 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:68 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:138 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:98 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT0Cube3DLocalBasis(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:54 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RT03DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with given set of face orientations. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:22 │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:187 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT0Cube3DLocalInterpolation(unsigned int s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 64. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:161 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:215 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT0Cube3DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:218 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:225 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:231 │ │ │ │ │ +_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ _l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas12dlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT03DLocalCoefficients
 Layout map for RT0 elements. More...
class  Dune::RT12DLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas03dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas12dlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  Layout map for RT0 elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00311_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,215 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalcoefficients.hh
│ │ │ │ +
raviartthomas12dlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 {
│ │ │ │ -
29 for (std::size_t i=0; i<4; i++)
│ │ │ │ -
30 li[i] = LocalKey(i,1,0);
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ -
34 std::size_t size () const
│ │ │ │ -
35 {
│ │ │ │ -
36 return 4;
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
40 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
41 {
│ │ │ │ -
42 return li[i];
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ +
32 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT12DLocalBasis (std::bitset<3> s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 for (size_t i=0; i<3; i++)
│ │ │ │ +
42 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │
43 }
│ │ │ │
│ │ │ │
44
│ │ │ │ -
45 private:
│ │ │ │ -
46 std::vector<LocalKey> li;
│ │ │ │ -
47 };
│ │ │ │ +
│ │ │ │ +
46 unsigned int size () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return 8;
│ │ │ │ +
49 }
│ │ │ │
│ │ │ │ -
48
│ │ │ │ -
49}
│ │ │ │
50
│ │ │ │ -
51#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
59 {
│ │ │ │ +
60 out.resize(8);
│ │ │ │ +
61 out[0][0] = sign_[0]*(in[0] - 4.0*in[0]*in[1]);
│ │ │ │ +
62 out[0][1] = sign_[0]*(-1.0 + 5.0*in[1] - 4.0*in[1]*in[1]);
│ │ │ │ +
63 out[1][0] = sign_[1]*(-1.0 + 5.0*in[0] - 4.0*in[0]*in[0]);
│ │ │ │ +
64 out[1][1] = sign_[1]*(in[1] - 4.0*in[0]*in[1]);
│ │ │ │ +
65 out[2][0] = sign_[2]*(-3.0*in[0] + 4.0*in[0]*in[0] + 4.0*in[1]*in[0]);
│ │ │ │ +
66 out[2][1] = sign_[2]*(-3.0*in[1] + 4.0*in[0]*in[1] + 4.0*in[1]*in[1]);
│ │ │ │ +
67 out[3][0] = -5.0*in[0] + 8.0*in[0]*in[0] + 4.0*in[1]*in[0];
│ │ │ │ +
68 out[3][1] = 3.0 - 6.0*in[0] - 7.0*in[1] + 8.0*in[0]*in[1] + 4.0*in[1]*in[1];
│ │ │ │ +
69 out[4][0] = -3.0 + 7.0*in[0] + 6.0*in[1] - 4.0*in[0]*in[0] - 8.0*in[1]*in[0];
│ │ │ │ +
70 out[4][1] = 5.0*in[1] - 4.0*in[0]*in[1] - 8.0*in[1]*in[1];
│ │ │ │ +
71 out[5][0] = in[0] - 4.0*in[0]*in[0] + 4.0*in[1]*in[0];
│ │ │ │ +
72 out[5][1] = -1.0*in[1] - 4.0*in[0]*in[1] + 4.0*in[1]*in[1];
│ │ │ │ +
73 out[6][0] = 16.0*in[0] - 16.0*in[0]*in[0] - 8.0*in[1]*in[0];
│ │ │ │ +
74 out[6][1] = 8.0*in[1] - 16.0*in[0]*in[1] - 8.0*in[1]*in[1];
│ │ │ │ +
75 out[7][0] = 8.0*in[0] - 8.0*in[0]*in[0] - 16.0*in[1]*in[0];
│ │ │ │ +
76 out[7][1] = 16.0*in[1] - 8.0*in[0]*in[1] - 16.0*in[1]*in[1];
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
│ │ │ │ +
85 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
86 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
87 {
│ │ │ │ +
88 out.resize(8);
│ │ │ │ +
89
│ │ │ │ +
90 out[0][0][0] = sign_[0]*(1.0 - 4.0*in[1]);
│ │ │ │ +
91 out[0][0][1] = sign_[0]*(-4.0*in[0]);
│ │ │ │ +
92 out[0][1][0] = 0.0;
│ │ │ │ +
93 out[0][1][1] = sign_[0]*(5.0 - 8.0*in[1]);
│ │ │ │ +
94
│ │ │ │ +
95 out[1][0][0] = sign_[1]*(5.0 - 8.0*in[0]);
│ │ │ │ +
96 out[1][0][1] = 0.0;
│ │ │ │ +
97 out[1][1][0] = sign_[1]*(-4.0*in[1]);
│ │ │ │ +
98 out[1][1][1] = sign_[1]*(1.0 - 4.0*in[0]);
│ │ │ │ +
99
│ │ │ │ +
100 out[2][0][0] = sign_[2]*(-3.0 + 8.0*in[0] + 4.0*in[1]);
│ │ │ │ +
101 out[2][0][1] = sign_[2]*(4.0*in[0]);
│ │ │ │ +
102 out[2][1][0] = sign_[2]*(4.0*in[1]);
│ │ │ │ +
103 out[2][1][1] = sign_[2]*(-3.0 + 4.0*in[0] + 8.0*in[1]);
│ │ │ │ +
104
│ │ │ │ +
105 out[3][0][0] = -5.0 + 16.0*in[0] + 4.0*in[1];
│ │ │ │ +
106 out[3][0][1] = 4.0*in[0];
│ │ │ │ +
107 out[3][1][0] = -6.0 + 8.0*in[1];
│ │ │ │ +
108 out[3][1][1] = -7.0 + 8.0*in[0] + 8.0*in[1];
│ │ │ │ +
109
│ │ │ │ +
110 out[4][0][0] = 7.0 - 8.0*in[0] - 8.0*in[1];
│ │ │ │ +
111 out[4][0][1] = 6.0 - 8.0*in[0];
│ │ │ │ +
112 out[4][1][0] = -4.0*in[1];
│ │ │ │ +
113 out[4][1][1] = 5.0 - 4.0*in[0] - 16.0*in[1];
│ │ │ │ +
114
│ │ │ │ +
115 out[5][0][0] = 1.0 - 8.0*in[0] + 4*in[1];
│ │ │ │ +
116 out[5][0][1] = 4.0*in[0];
│ │ │ │ +
117 out[5][1][0] = -4.0*in[1];
│ │ │ │ +
118 out[5][1][1] = -1.0 - 4.0*in[0] + 8.0*in[1];
│ │ │ │ +
119
│ │ │ │ +
120 out[6][0][0] = 16.0 - 32.0*in[0] - 8.0*in[1];
│ │ │ │ +
121 out[6][0][1] = -8.0*in[0];
│ │ │ │ +
122 out[6][1][0] = -16.0*in[1];
│ │ │ │ +
123 out[6][1][1] = 8.0 - 16.0*in[0] - 16.0*in[1];
│ │ │ │ +
124
│ │ │ │ +
125 out[7][0][0] = 8.0 - 16.0*in[0] - 16.0*in[1];
│ │ │ │ +
126 out[7][0][1] = -16.0*in[0];
│ │ │ │ +
127 out[7][1][0] = -8.0*in[1];
│ │ │ │ +
128 out[7][1][1] = 16.0 - 8.0*in[0] - 32.0*in[1];
│ │ │ │ +
129 }
│ │ │ │ +
│ │ │ │ +
130
│ │ │ │ +
│ │ │ │ +
132 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ +
133 const typename Traits::DomainType& in, // position
│ │ │ │ +
134 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
135 {
│ │ │ │ +
136 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
137 if (totalOrder == 0) {
│ │ │ │ +
138 evaluateFunction(in, out);
│ │ │ │ +
139 } else if (totalOrder == 1) {
│ │ │ │ +
140 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ +
141 out.resize(size());
│ │ │ │ +
142
│ │ │ │ +
143 switch (direction) {
│ │ │ │ +
144 case 0:
│ │ │ │ +
145 out[0][0] = sign_[0]*(1.0 - 4.0*in[1]);
│ │ │ │ +
146 out[0][1] = 0.0;
│ │ │ │ +
147 out[1][0] = sign_[1]*(5.0 - 8.0*in[0]);
│ │ │ │ +
148 out[1][1] = sign_[1]*(-4.0*in[1]);
│ │ │ │ +
149 out[2][0] = sign_[2]*(-3.0 + 8.0*in[0] + 4.0*in[1]);
│ │ │ │ +
150 out[2][1] = sign_[2]*(4.0*in[1]);
│ │ │ │ +
151 out[3][0] = -5.0 + 16.0*in[0] + 4.0*in[1];
│ │ │ │ +
152 out[3][1] = -6.0 + 8.0*in[1];
│ │ │ │ +
153 out[4][0] = 7.0 - 8.0*in[0] - 8.0*in[1];
│ │ │ │ +
154 out[4][1] = -4.0*in[1];
│ │ │ │ +
155 out[5][0] = 1.0 - 8.0*in[0] + 4*in[1];
│ │ │ │ +
156 out[5][1] = -4.0*in[1];
│ │ │ │ +
157 out[6][0] = 16.0 - 32.0*in[0] - 8.0*in[1];
│ │ │ │ +
158 out[6][1] = -16.0*in[1];
│ │ │ │ +
159 out[7][0] = 8.0 - 16.0*in[0] - 16.0*in[1];
│ │ │ │ +
160 out[7][1] = -8.0*in[1];
│ │ │ │ +
161 break;
│ │ │ │ +
162 case 1:
│ │ │ │ +
163 out[2][1] = sign_[2]*(-3.0 + 4.0*in[0] + 8.0*in[1]);
│ │ │ │ +
164 out[2][0] = sign_[2]*(4.0*in[0]);
│ │ │ │ +
165 out[1][1] = sign_[1]*(1.0 - 4.0*in[0]);
│ │ │ │ +
166 out[1][0] = 0.0;
│ │ │ │ +
167 out[0][0] = sign_[0]*(-4.0*in[0]);
│ │ │ │ +
168 out[0][1] = sign_[0]*(5.0 - 8.0*in[1]);
│ │ │ │ +
169 out[3][0] = 4.0*in[0];
│ │ │ │ +
170 out[3][1] = -7.0 + 8.0*in[0] + 8.0*in[1];
│ │ │ │ +
171 out[4][0] = 6.0 - 8.0*in[0];
│ │ │ │ +
172 out[4][1] = 5.0 - 4.0*in[0] - 16.0*in[1];
│ │ │ │ +
173 out[5][0] = 4.0*in[0];
│ │ │ │ +
174 out[5][1] = -1.0 - 4.0*in[0] + 8.0*in[1];
│ │ │ │ +
175 out[6][0] = -8.0*in[0];
│ │ │ │ +
176 out[6][1] = 8.0 - 16.0*in[0] - 16.0*in[1];
│ │ │ │ +
177 out[7][0] = -16.0*in[0];
│ │ │ │ +
178 out[7][1] = 16.0 - 8.0*in[0] - 32.0*in[1];
│ │ │ │ +
179 break;
│ │ │ │ +
180 default:
│ │ │ │ +
181 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ +
182 }
│ │ │ │ +
183 } else {
│ │ │ │ +
184 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
185 }
│ │ │ │ +
186 }
│ │ │ │ +
│ │ │ │ +
187
│ │ │ │ +
│ │ │ │ +
189 unsigned int order () const
│ │ │ │ +
190 {
│ │ │ │ +
191 return 2;
│ │ │ │ +
192 }
│ │ │ │ +
│ │ │ │ +
193
│ │ │ │ +
194 private:
│ │ │ │ +
195 std::array<R,3> sign_;
│ │ │ │ +
196 };
│ │ │ │ +
│ │ │ │ +
197}
│ │ │ │ +
198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for RT0 elements.
Definition raviartthomas03dlocalcoefficients.hh:24
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas03dlocalcoefficients.hh:40
│ │ │ │ -
RT03DLocalCoefficients()
Standard constructor.
Definition raviartthomas03dlocalcoefficients.hh:27
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition raviartthomas03dlocalcoefficients.hh:34
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas12dlocalbasis.hh:28
│ │ │ │ +
RT12DLocalBasis(std::bitset< 3 > s=0)
Make set number s, where 0 <= s < 8.
Definition raviartthomas12dlocalbasis.hh:39
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas12dlocalbasis.hh:46
│ │ │ │ +
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas12dlocalbasis.hh:132
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas12dlocalbasis.hh:85
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas12dlocalbasis.hh:189
│ │ │ │ +
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas12dlocalbasis.hh:32
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas12dlocalbasis.hh:57
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,78 +1,228 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ -raviartthomas03dlocalcoefficients.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ +raviartthomas12dlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -_2_3 class _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -24 { │ │ │ │ │ -25 public: │ │ │ │ │ -_2_7 _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(4) │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_1_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ 28 { │ │ │ │ │ -29 for (std::size_t i=0; i<4; i++) │ │ │ │ │ -30 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ -31 } │ │ │ │ │ -32 │ │ │ │ │ -_3_4 std::size_t _s_i_z_e () const │ │ │ │ │ -35 { │ │ │ │ │ -36 return 4; │ │ │ │ │ -37 } │ │ │ │ │ -38 │ │ │ │ │ -_4_0 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ -41 { │ │ │ │ │ -42 return li[i]; │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_1_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<3> s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 for (size_t i=0; i<3; i++) │ │ │ │ │ +42 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ 43 } │ │ │ │ │ 44 │ │ │ │ │ -45 private: │ │ │ │ │ -46 std::vector li; │ │ │ │ │ -47 }; │ │ │ │ │ -48 │ │ │ │ │ -49} │ │ │ │ │ +_4_6 unsigned int _s_i_z_e () const │ │ │ │ │ +47 { │ │ │ │ │ +48 return 8; │ │ │ │ │ +49 } │ │ │ │ │ 50 │ │ │ │ │ -51#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_5_7 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +58 std::vector& out) const │ │ │ │ │ +59 { │ │ │ │ │ +60 out.resize(8); │ │ │ │ │ +61 out[0][0] = sign_[0]*(in[0] - 4.0*in[0]*in[1]); │ │ │ │ │ +62 out[0][1] = sign_[0]*(-1.0 + 5.0*in[1] - 4.0*in[1]*in[1]); │ │ │ │ │ +63 out[1][0] = sign_[1]*(-1.0 + 5.0*in[0] - 4.0*in[0]*in[0]); │ │ │ │ │ +64 out[1][1] = sign_[1]*(in[1] - 4.0*in[0]*in[1]); │ │ │ │ │ +65 out[2][0] = sign_[2]*(-3.0*in[0] + 4.0*in[0]*in[0] + 4.0*in[1]*in[0]); │ │ │ │ │ +66 out[2][1] = sign_[2]*(-3.0*in[1] + 4.0*in[0]*in[1] + 4.0*in[1]*in[1]); │ │ │ │ │ +67 out[3][0] = -5.0*in[0] + 8.0*in[0]*in[0] + 4.0*in[1]*in[0]; │ │ │ │ │ +68 out[3][1] = 3.0 - 6.0*in[0] - 7.0*in[1] + 8.0*in[0]*in[1] + 4.0*in[1]*in[1]; │ │ │ │ │ +69 out[4][0] = -3.0 + 7.0*in[0] + 6.0*in[1] - 4.0*in[0]*in[0] - 8.0*in[1]*in │ │ │ │ │ +[0]; │ │ │ │ │ +70 out[4][1] = 5.0*in[1] - 4.0*in[0]*in[1] - 8.0*in[1]*in[1]; │ │ │ │ │ +71 out[5][0] = in[0] - 4.0*in[0]*in[0] + 4.0*in[1]*in[0]; │ │ │ │ │ +72 out[5][1] = -1.0*in[1] - 4.0*in[0]*in[1] + 4.0*in[1]*in[1]; │ │ │ │ │ +73 out[6][0] = 16.0*in[0] - 16.0*in[0]*in[0] - 8.0*in[1]*in[0]; │ │ │ │ │ +74 out[6][1] = 8.0*in[1] - 16.0*in[0]*in[1] - 8.0*in[1]*in[1]; │ │ │ │ │ +75 out[7][0] = 8.0*in[0] - 8.0*in[0]*in[0] - 16.0*in[1]*in[0]; │ │ │ │ │ +76 out[7][1] = 16.0*in[1] - 8.0*in[0]*in[1] - 16.0*in[1]*in[1]; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +_8_5 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +86 std::vector& out) const │ │ │ │ │ +87 { │ │ │ │ │ +88 out.resize(8); │ │ │ │ │ +89 │ │ │ │ │ +90 out[0][0][0] = sign_[0]*(1.0 - 4.0*in[1]); │ │ │ │ │ +91 out[0][0][1] = sign_[0]*(-4.0*in[0]); │ │ │ │ │ +92 out[0][1][0] = 0.0; │ │ │ │ │ +93 out[0][1][1] = sign_[0]*(5.0 - 8.0*in[1]); │ │ │ │ │ +94 │ │ │ │ │ +95 out[1][0][0] = sign_[1]*(5.0 - 8.0*in[0]); │ │ │ │ │ +96 out[1][0][1] = 0.0; │ │ │ │ │ +97 out[1][1][0] = sign_[1]*(-4.0*in[1]); │ │ │ │ │ +98 out[1][1][1] = sign_[1]*(1.0 - 4.0*in[0]); │ │ │ │ │ +99 │ │ │ │ │ +100 out[2][0][0] = sign_[2]*(-3.0 + 8.0*in[0] + 4.0*in[1]); │ │ │ │ │ +101 out[2][0][1] = sign_[2]*(4.0*in[0]); │ │ │ │ │ +102 out[2][1][0] = sign_[2]*(4.0*in[1]); │ │ │ │ │ +103 out[2][1][1] = sign_[2]*(-3.0 + 4.0*in[0] + 8.0*in[1]); │ │ │ │ │ +104 │ │ │ │ │ +105 out[3][0][0] = -5.0 + 16.0*in[0] + 4.0*in[1]; │ │ │ │ │ +106 out[3][0][1] = 4.0*in[0]; │ │ │ │ │ +107 out[3][1][0] = -6.0 + 8.0*in[1]; │ │ │ │ │ +108 out[3][1][1] = -7.0 + 8.0*in[0] + 8.0*in[1]; │ │ │ │ │ +109 │ │ │ │ │ +110 out[4][0][0] = 7.0 - 8.0*in[0] - 8.0*in[1]; │ │ │ │ │ +111 out[4][0][1] = 6.0 - 8.0*in[0]; │ │ │ │ │ +112 out[4][1][0] = -4.0*in[1]; │ │ │ │ │ +113 out[4][1][1] = 5.0 - 4.0*in[0] - 16.0*in[1]; │ │ │ │ │ +114 │ │ │ │ │ +115 out[5][0][0] = 1.0 - 8.0*in[0] + 4*in[1]; │ │ │ │ │ +116 out[5][0][1] = 4.0*in[0]; │ │ │ │ │ +117 out[5][1][0] = -4.0*in[1]; │ │ │ │ │ +118 out[5][1][1] = -1.0 - 4.0*in[0] + 8.0*in[1]; │ │ │ │ │ +119 │ │ │ │ │ +120 out[6][0][0] = 16.0 - 32.0*in[0] - 8.0*in[1]; │ │ │ │ │ +121 out[6][0][1] = -8.0*in[0]; │ │ │ │ │ +122 out[6][1][0] = -16.0*in[1]; │ │ │ │ │ +123 out[6][1][1] = 8.0 - 16.0*in[0] - 16.0*in[1]; │ │ │ │ │ +124 │ │ │ │ │ +125 out[7][0][0] = 8.0 - 16.0*in[0] - 16.0*in[1]; │ │ │ │ │ +126 out[7][0][1] = -16.0*in[0]; │ │ │ │ │ +127 out[7][1][0] = -8.0*in[1]; │ │ │ │ │ +128 out[7][1][1] = 16.0 - 8.0*in[0] - 32.0*in[1]; │ │ │ │ │ +129 } │ │ │ │ │ +130 │ │ │ │ │ +_1_3_2 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +133 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +134 std::vector& out) const // return value │ │ │ │ │ +135 { │ │ │ │ │ +136 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +137 if (totalOrder == 0) { │ │ │ │ │ +138 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +139 } else if (totalOrder == 1) { │ │ │ │ │ +140 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin │ │ │ │ │ +(), _o_r_d_e_r.end(), 1)); │ │ │ │ │ +141 out.resize(_s_i_z_e()); │ │ │ │ │ +142 │ │ │ │ │ +143 switch (direction) { │ │ │ │ │ +144 case 0: │ │ │ │ │ +145 out[0][0] = sign_[0]*(1.0 - 4.0*in[1]); │ │ │ │ │ +146 out[0][1] = 0.0; │ │ │ │ │ +147 out[1][0] = sign_[1]*(5.0 - 8.0*in[0]); │ │ │ │ │ +148 out[1][1] = sign_[1]*(-4.0*in[1]); │ │ │ │ │ +149 out[2][0] = sign_[2]*(-3.0 + 8.0*in[0] + 4.0*in[1]); │ │ │ │ │ +150 out[2][1] = sign_[2]*(4.0*in[1]); │ │ │ │ │ +151 out[3][0] = -5.0 + 16.0*in[0] + 4.0*in[1]; │ │ │ │ │ +152 out[3][1] = -6.0 + 8.0*in[1]; │ │ │ │ │ +153 out[4][0] = 7.0 - 8.0*in[0] - 8.0*in[1]; │ │ │ │ │ +154 out[4][1] = -4.0*in[1]; │ │ │ │ │ +155 out[5][0] = 1.0 - 8.0*in[0] + 4*in[1]; │ │ │ │ │ +156 out[5][1] = -4.0*in[1]; │ │ │ │ │ +157 out[6][0] = 16.0 - 32.0*in[0] - 8.0*in[1]; │ │ │ │ │ +158 out[6][1] = -16.0*in[1]; │ │ │ │ │ +159 out[7][0] = 8.0 - 16.0*in[0] - 16.0*in[1]; │ │ │ │ │ +160 out[7][1] = -8.0*in[1]; │ │ │ │ │ +161 break; │ │ │ │ │ +162 case 1: │ │ │ │ │ +163 out[2][1] = sign_[2]*(-3.0 + 4.0*in[0] + 8.0*in[1]); │ │ │ │ │ +164 out[2][0] = sign_[2]*(4.0*in[0]); │ │ │ │ │ +165 out[1][1] = sign_[1]*(1.0 - 4.0*in[0]); │ │ │ │ │ +166 out[1][0] = 0.0; │ │ │ │ │ +167 out[0][0] = sign_[0]*(-4.0*in[0]); │ │ │ │ │ +168 out[0][1] = sign_[0]*(5.0 - 8.0*in[1]); │ │ │ │ │ +169 out[3][0] = 4.0*in[0]; │ │ │ │ │ +170 out[3][1] = -7.0 + 8.0*in[0] + 8.0*in[1]; │ │ │ │ │ +171 out[4][0] = 6.0 - 8.0*in[0]; │ │ │ │ │ +172 out[4][1] = 5.0 - 4.0*in[0] - 16.0*in[1]; │ │ │ │ │ +173 out[5][0] = 4.0*in[0]; │ │ │ │ │ +174 out[5][1] = -1.0 - 4.0*in[0] + 8.0*in[1]; │ │ │ │ │ +175 out[6][0] = -8.0*in[0]; │ │ │ │ │ +176 out[6][1] = 8.0 - 16.0*in[0] - 16.0*in[1]; │ │ │ │ │ +177 out[7][0] = -16.0*in[0]; │ │ │ │ │ +178 out[7][1] = 16.0 - 8.0*in[0] - 32.0*in[1]; │ │ │ │ │ +179 break; │ │ │ │ │ +180 default: │ │ │ │ │ +181 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ +182 } │ │ │ │ │ +183 } else { │ │ │ │ │ +184 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +185 } │ │ │ │ │ +186 } │ │ │ │ │ +187 │ │ │ │ │ +_1_8_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ +190 { │ │ │ │ │ +191 return 2; │ │ │ │ │ +192 } │ │ │ │ │ +193 │ │ │ │ │ +194 private: │ │ │ │ │ +195 std::array sign_; │ │ │ │ │ +196 }; │ │ │ │ │ +197} │ │ │ │ │ +198#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RT03DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT12DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:132 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:85 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:189 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ +2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalbasis.hh:57 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas03dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas12dlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <vector>
│ │ │ │ +#include <dune/geometry/quadraturerules.hh>
│ │ │ │ +#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT03DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference tetrahedron. More...
class  Dune::RT12DLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference quadrilateral. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas03dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas12dlocalinterpolation.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ - tetrahedron. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference │ │ │ │ │ + quadrilateral. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00314_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,143 +70,128 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03dlocalbasis.hh
│ │ │ │ +
raviartthomas12dlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <vector>
│ │ │ │
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
24 template<class D, class R>
│ │ │ │ +
10#include <dune/geometry/quadraturerules.hh>
│ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
24 template<class LB>
│ │ │ │
│ │ │ │ - │ │ │ │ + │ │ │ │
26 {
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ -
29 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ -
30
│ │ │ │ -
│ │ │ │ -
32 RT03DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ -
33 {
│ │ │ │ -
34 for (int i=0; i<4; i++)
│ │ │ │ -
35 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 unsigned int size () const
│ │ │ │ -
40 {
│ │ │ │ -
41 return 4;
│ │ │ │ -
42 }
│ │ │ │ -
│ │ │ │ -
43
│ │ │ │ -
│ │ │ │ -
45 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
46 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
47 {
│ │ │ │ -
48 out.resize(4);
│ │ │ │ -
49 auto c = std::sqrt(2.0);
│ │ │ │ -
50 out[0] = {sign_[0]*c* in[0], sign_[0]*c* in[1], sign_[0]*c*(in[2]-D(1))};
│ │ │ │ -
51 out[1] = {sign_[1]*c* in[0], sign_[1]*c*(in[1]-D(1)), sign_[1]*c* in[2] };
│ │ │ │ -
52 out[2] = {sign_[2]*c*(in[0]-D(1)), sign_[2]*c* in[1], sign_[2]*c* in[2] };
│ │ │ │ -
53 out[3] = {sign_[3]*c* in[0], sign_[3]*c* in[1], sign_[3]*c* in[2] };
│ │ │ │ -
54 }
│ │ │ │ -
│ │ │ │ -
55
│ │ │ │ -
57 inline void
│ │ │ │ -
│ │ │ │ -
58 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
59 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
60 {
│ │ │ │ -
61 out.resize(4);
│ │ │ │ -
62 for (int i=0; i<4; i++)
│ │ │ │ -
63 {
│ │ │ │ -
64 auto c = std::sqrt(2.0);
│ │ │ │ -
65 out[i][0] = {c*sign_[i], 0, 0};
│ │ │ │ -
66 out[i][1] = { 0,c*sign_[i], 0};
│ │ │ │ -
67 out[i][2] = { 0, 0,c*sign_[i]};
│ │ │ │ -
68 }
│ │ │ │ -
69 }
│ │ │ │ -
│ │ │ │ -
70
│ │ │ │ -
│ │ │ │ -
72 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ -
73 const typename Traits::DomainType& in, // position
│ │ │ │ -
74 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
75 {
│ │ │ │ -
76 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
77 if (totalOrder == 0) {
│ │ │ │ -
78 evaluateFunction(in, out);
│ │ │ │ -
79 } else if (totalOrder == 1) {
│ │ │ │ -
80 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
81 out.resize(size());
│ │ │ │ +
27
│ │ │ │ +
28 public:
│ │ │ │ +
29
│ │ │ │ +
│ │ │ │ +
35 RT12DLocalInterpolation (std::bitset<3> s = 0)
│ │ │ │ +
36 {
│ │ │ │ +
37 using std::sqrt;
│ │ │ │ +
38 for (size_t i=0; i<3; i++)
│ │ │ │ +
39 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
40
│ │ │ │ +
41 n_[0] = { 0.0, -1.0};
│ │ │ │ +
42 n_[1] = {-1.0, 0.0};
│ │ │ │ +
43 n_[2] = { 1.0/sqrt(2.0), 1.0/sqrt(2.0)};
│ │ │ │ +
44
│ │ │ │ +
45 c_ = { 0.5*n_[0][0] - 1.0*n_[0][1],
│ │ │ │ +
46 -1.0*n_[1][0] + 0.5*n_[1][1],
│ │ │ │ +
47 0.5*n_[2][0] + 0.5*n_[2][1]};
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
58 template<typename F, typename C>
│ │ │ │ +
│ │ │ │ +
59 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
60 {
│ │ │ │ +
61 // f gives v*outer normal at a point on the edge!
│ │ │ │ +
62 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
63 typedef typename LB::Traits::DomainFieldType Vector;
│ │ │ │ +
64
│ │ │ │ +
65 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
66
│ │ │ │ +
67 out.resize(8);
│ │ │ │ +
68 fill(out.begin(), out.end(), 0.0);
│ │ │ │ +
69
│ │ │ │ +
70 const int qOrder1 = 4;
│ │ │ │ +
71 const auto& rule1 = Dune::QuadratureRules<Scalar,1>::rule(Dune::GeometryTypes::simplex(1), qOrder1);
│ │ │ │ +
72
│ │ │ │ +
73 for (auto&& qp : rule1)
│ │ │ │ +
74 {
│ │ │ │ +
75 Scalar qPos = qp.position();
│ │ │ │ +
76 typename LB::Traits::DomainType localPos;
│ │ │ │ +
77
│ │ │ │ +
78 localPos = {qPos, 0.0};
│ │ │ │ +
79 auto y = f(localPos);
│ │ │ │ +
80 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0]/c_[0];
│ │ │ │ +
81 out[3] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight()/c_[0];
│ │ │ │
82
│ │ │ │ -
83 for (int i=0; i<size(); i++)
│ │ │ │ -
84 {
│ │ │ │ -
85 out[i][direction] = sign_[i]* std::sqrt(2.0) ;
│ │ │ │ -
86 out[i][(direction+1)%3] = 0;
│ │ │ │ -
87 out[i][(direction+2)%3] = 0;
│ │ │ │ -
88 }
│ │ │ │ -
89 } else {
│ │ │ │ -
90 out.resize(size());
│ │ │ │ -
91 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
92 for (std::size_t j = 0; j < 3; ++j)
│ │ │ │ -
93 out[i][j] = 0;
│ │ │ │ -
94 }
│ │ │ │ -
95
│ │ │ │ -
96 }
│ │ │ │ -
│ │ │ │ -
97
│ │ │ │ -
│ │ │ │ -
99 unsigned int order () const
│ │ │ │ -
100 {
│ │ │ │ -
101 return 1;
│ │ │ │ -
102 }
│ │ │ │ -
│ │ │ │ -
103
│ │ │ │ -
104 private:
│ │ │ │ -
105
│ │ │ │ -
106 // Signs of the face normals
│ │ │ │ -
107 std::array<R,4> sign_;
│ │ │ │ -
108 };
│ │ │ │ +
83 localPos = {0.0, qPos};
│ │ │ │ +
84 y = f(localPos);
│ │ │ │ +
85 out[1] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1]/c_[1];
│ │ │ │ +
86 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight()/c_[1];
│ │ │ │ +
87
│ │ │ │ +
88 localPos = {1.0 - qPos, qPos};
│ │ │ │ +
89 y = f(localPos);
│ │ │ │ +
90 out[2] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2]/c_[2];
│ │ │ │ +
91 out[5] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(2.0*qPos - 1.0)*qp.weight()/c_[2];
│ │ │ │ +
92 }
│ │ │ │ +
93
│ │ │ │ +
94 const int qOrder2 = 8;
│ │ │ │ +
95 const auto& rule2 = Dune::QuadratureRules<Vector,2>::rule(Dune::GeometryTypes::simplex(2), qOrder2);
│ │ │ │ +
96
│ │ │ │ +
97 for (auto&& qp : rule2)
│ │ │ │ +
98 {
│ │ │ │ +
99 auto qPos = qp.position();
│ │ │ │ +
100
│ │ │ │ +
101 auto y = f(qPos);
│ │ │ │ +
102 out[6] += y[0]*qp.weight();
│ │ │ │ +
103 out[7] += y[1]*qp.weight();
│ │ │ │ +
104 }
│ │ │ │ +
105 }
│ │ │ │ +
│ │ │ │ +
106
│ │ │ │ +
107 private:
│ │ │ │ +
108 // Edge orientations
│ │ │ │ +
109 std::array<typename LB::Traits::RangeFieldType, 3> sign_;
│ │ │ │ +
110
│ │ │ │ +
111 // Edge normals
│ │ │ │ +
112 std::array<typename LB::Traits::DomainType, 3> n_;
│ │ │ │ +
113
│ │ │ │ +
114 std::array<typename LB::Traits::RangeFieldType, 3> c_;
│ │ │ │ +
115 };
│ │ │ │
│ │ │ │ -
109}
│ │ │ │ -
110#endif
│ │ │ │ +
116}
│ │ │ │ +
117#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference tetrahedron.
Definition raviartthomas03dlocalbasis.hh:26
│ │ │ │ -
RT03DLocalBasis(std::bitset< 4 > s=0)
Make set number s, where 0 <= s < 16.
Definition raviartthomas03dlocalbasis.hh:32
│ │ │ │ -
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas03dlocalbasis.hh:72
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas03dlocalbasis.hh:99
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition raviartthomas03dlocalbasis.hh:39
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas03dlocalbasis.hh:58
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas03dlocalbasis.hh:45
│ │ │ │ -
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas03dlocalbasis.hh:29
│ │ │ │ - │ │ │ │ +
First order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas12dlocalinterpolation.hh:26
│ │ │ │ +
RT12DLocalInterpolation(std::bitset< 3 > s=0)
Make set number s, where 0 <= s < 8.
Definition raviartthomas12dlocalinterpolation.hh:35
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas12dlocalinterpolation.hh:59
│ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,157 +1,129 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d │ │ │ │ │ -raviartthomas03dlocalbasis.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ +raviartthomas12dlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ -6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_RAVIARTTHOMAS03DLOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +10#include │ │ │ │ │ +11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +24 template │ │ │ │ │ +_2_5 class _R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ 26 { │ │ │ │ │ -27 public: │ │ │ │ │ -28 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_2_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -30 │ │ │ │ │ -_3_2 _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ -33 { │ │ │ │ │ -34 for (int i=0; i<4; i++) │ │ │ │ │ -35 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ -36 } │ │ │ │ │ -37 │ │ │ │ │ -_3_9 unsigned int _s_i_z_e () const │ │ │ │ │ -40 { │ │ │ │ │ -41 return 4; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_5 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -46 std::vector& out) const │ │ │ │ │ -47 { │ │ │ │ │ -48 out.resize(4); │ │ │ │ │ -49 auto c = std::sqrt(2.0); │ │ │ │ │ -50 out[0] = {sign_[0]*c* in[0], sign_[0]*c* in[1], sign_[0]*c*(in[2]-D(1))}; │ │ │ │ │ -51 out[1] = {sign_[1]*c* in[0], sign_[1]*c*(in[1]-D(1)), sign_[1]*c* in[2] }; │ │ │ │ │ -52 out[2] = {sign_[2]*c*(in[0]-D(1)), sign_[2]*c* in[1], sign_[2]*c* in[2] }; │ │ │ │ │ -53 out[3] = {sign_[3]*c* in[0], sign_[3]*c* in[1], sign_[3]*c* in[2] }; │ │ │ │ │ -54 } │ │ │ │ │ -55 │ │ │ │ │ -57 inline void │ │ │ │ │ -_5_8 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -59 std::vector& out) const // return value │ │ │ │ │ +27 │ │ │ │ │ +28 public: │ │ │ │ │ +29 │ │ │ │ │ +_3_5 _R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<3> s = 0) │ │ │ │ │ +36 { │ │ │ │ │ +37 using std::sqrt; │ │ │ │ │ +38 for (size_t i=0; i<3; i++) │ │ │ │ │ +39 sign_[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +40 │ │ │ │ │ +41 n_[0] = { 0.0, -1.0}; │ │ │ │ │ +42 n_[1] = {-1.0, 0.0}; │ │ │ │ │ +43 n_[2] = { 1.0/sqrt(2.0), 1.0/sqrt(2.0)}; │ │ │ │ │ +44 │ │ │ │ │ +45 c_ = { 0.5*n_[0][0] - 1.0*n_[0][1], │ │ │ │ │ +46 -1.0*n_[1][0] + 0.5*n_[1][1], │ │ │ │ │ +47 0.5*n_[2][0] + 0.5*n_[2][1]}; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +58 template │ │ │ │ │ +_5_9 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ 60 { │ │ │ │ │ -61 out.resize(4); │ │ │ │ │ -62 for (int i=0; i<4; i++) │ │ │ │ │ -63 { │ │ │ │ │ -64 auto c = std::sqrt(2.0); │ │ │ │ │ -65 out[i][0] = {c*sign_[i], 0, 0}; │ │ │ │ │ -66 out[i][1] = { 0,c*sign_[i], 0}; │ │ │ │ │ -67 out[i][2] = { 0, 0,c*sign_[i]}; │ │ │ │ │ -68 } │ │ │ │ │ -69 } │ │ │ │ │ -70 │ │ │ │ │ -_7_2 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -73 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -74 std::vector& out) const // return value │ │ │ │ │ -75 { │ │ │ │ │ -76 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -77 if (totalOrder == 0) { │ │ │ │ │ -78 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -79 } else if (totalOrder == 1) { │ │ │ │ │ -80 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ -_o_r_d_e_r.end(), 1)); │ │ │ │ │ -81 out.resize(_s_i_z_e()); │ │ │ │ │ +61 // f gives v*outer normal at a point on the edge! │ │ │ │ │ +62 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +63 typedef typename LB::Traits::DomainFieldType Vector; │ │ │ │ │ +64 │ │ │ │ │ +65 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +66 │ │ │ │ │ +67 out.resize(8); │ │ │ │ │ +68 fill(out.begin(), out.end(), 0.0); │ │ │ │ │ +69 │ │ │ │ │ +70 const int qOrder1 = 4; │ │ │ │ │ +71 const auto& rule1 = Dune::QuadratureRules::rule(Dune:: │ │ │ │ │ +GeometryTypes::simplex(1), qOrder1); │ │ │ │ │ +72 │ │ │ │ │ +73 for (auto&& qp : rule1) │ │ │ │ │ +74 { │ │ │ │ │ +75 Scalar qPos = qp.position(); │ │ │ │ │ +76 typename LB::Traits::DomainType localPos; │ │ │ │ │ +77 │ │ │ │ │ +78 localPos = {qPos, 0.0}; │ │ │ │ │ +79 auto y = f(localPos); │ │ │ │ │ +80 out[0] += (y[0]*n_[0][0] + y[1]*n_[0][1])*qp.weight()*sign_[0]/c_[0]; │ │ │ │ │ +81 out[3] += (y[0]*n_[0][0] + y[1]*n_[0][1])*(2.0*qPos - 1.0)*qp.weight()/c_ │ │ │ │ │ +[0]; │ │ │ │ │ 82 │ │ │ │ │ -83 for (int i=0; i<_s_i_z_e(); i++) │ │ │ │ │ -84 { │ │ │ │ │ -85 out[i][direction] = sign_[i]* std::sqrt(2.0) ; │ │ │ │ │ -86 out[i][(direction+1)%3] = 0; │ │ │ │ │ -87 out[i][(direction+2)%3] = 0; │ │ │ │ │ -88 } │ │ │ │ │ -89 } else { │ │ │ │ │ -90 out.resize(_s_i_z_e()); │ │ │ │ │ -91 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -92 for (std::size_t j = 0; j < 3; ++j) │ │ │ │ │ -93 out[i][j] = 0; │ │ │ │ │ -94 } │ │ │ │ │ -95 │ │ │ │ │ -96 } │ │ │ │ │ -97 │ │ │ │ │ -_9_9 unsigned int _o_r_d_e_r () const │ │ │ │ │ -100 { │ │ │ │ │ -101 return 1; │ │ │ │ │ -102 } │ │ │ │ │ -103 │ │ │ │ │ -104 private: │ │ │ │ │ -105 │ │ │ │ │ -106 // Signs of the face normals │ │ │ │ │ -107 std::array sign_; │ │ │ │ │ -108 }; │ │ │ │ │ -109} │ │ │ │ │ -110#endif │ │ │ │ │ +83 localPos = {0.0, qPos}; │ │ │ │ │ +84 y = f(localPos); │ │ │ │ │ +85 out[1] += (y[0]*n_[1][0] + y[1]*n_[1][1])*qp.weight()*sign_[1]/c_[1]; │ │ │ │ │ +86 out[4] += (y[0]*n_[1][0] + y[1]*n_[1][1])*(1.0 - 2.0*qPos)*qp.weight()/c_ │ │ │ │ │ +[1]; │ │ │ │ │ +87 │ │ │ │ │ +88 localPos = {1.0 - qPos, qPos}; │ │ │ │ │ +89 y = f(localPos); │ │ │ │ │ +90 out[2] += (y[0]*n_[2][0] + y[1]*n_[2][1])*qp.weight()*sign_[2]/c_[2]; │ │ │ │ │ +91 out[5] += (y[0]*n_[2][0] + y[1]*n_[2][1])*(2.0*qPos - 1.0)*qp.weight()/c_ │ │ │ │ │ +[2]; │ │ │ │ │ +92 } │ │ │ │ │ +93 │ │ │ │ │ +94 const int qOrder2 = 8; │ │ │ │ │ +95 const auto& rule2 = Dune::QuadratureRules::rule(Dune:: │ │ │ │ │ +GeometryTypes::simplex(2), qOrder2); │ │ │ │ │ +96 │ │ │ │ │ +97 for (auto&& qp : rule2) │ │ │ │ │ +98 { │ │ │ │ │ +99 auto qPos = qp.position(); │ │ │ │ │ +100 │ │ │ │ │ +101 auto y = f(qPos); │ │ │ │ │ +102 out[6] += y[0]*qp.weight(); │ │ │ │ │ +103 out[7] += y[1]*qp.weight(); │ │ │ │ │ +104 } │ │ │ │ │ +105 } │ │ │ │ │ +106 │ │ │ │ │ +107 private: │ │ │ │ │ +108 // Edge orientations │ │ │ │ │ +109 std::array sign_; │ │ │ │ │ +110 │ │ │ │ │ +111 // Edge normals │ │ │ │ │ +112 std::array n_; │ │ │ │ │ +113 │ │ │ │ │ +114 std::array c_; │ │ │ │ │ +115 }; │ │ │ │ │ +116} │ │ │ │ │ +117#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RT03DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 16. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:99 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ -3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:29 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalinterpolation.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT12DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 8. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalinterpolation.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalinterpolation.hh:59 │ │ │ │ │ +_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,50 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexinterpolation.hh File Reference
│ │ │ │ +
raviartthomas12dlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -#include <dune/geometry/referenceelements.hh>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/geometry/typeindex.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/utility/interpolationhelper.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ -#include <dune/localfunctions/orthonormal/orthonormalbasis.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::LocalCoefficientsContainer
 
struct  Dune::RaviartThomasCoefficientsFactory< dim >
 
struct  Dune::RTL2InterpolationBuilder< dim, Field >
 
class  Dune::RaviartThomasL2Interpolation< dimension, F >
 An L2-based interpolation for Raviart Thomas. More...
 
struct  Dune::RaviartThomasL2InterpolationFactory< dim, Field >
class  Dune::RT12DLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on the reference triangle. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,39 +1,24 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomassimplexinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas12dlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ - class   _D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_<_ _d_i_m_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ - class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> │ │ │ │ │ -  An L2-based interpolation for Raviart Thomas. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00317_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas12dlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,546 +70,82 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexinterpolation.hh
│ │ │ │ +
raviartthomas12dlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/common/exceptions.hh>
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │
12
│ │ │ │ -
13#include <dune/geometry/quadraturerules.hh>
│ │ │ │ -
14#include <dune/geometry/referenceelements.hh>
│ │ │ │ -
15#include <dune/geometry/type.hh>
│ │ │ │ -
16#include <dune/geometry/typeindex.hh>
│ │ │ │ -
17
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
22
│ │ │ │ -
23namespace Dune
│ │ │ │ -
24{
│ │ │ │ -
25
│ │ │ │ -
26 // Internal Forward Declarations
│ │ │ │ -
27 // -----------------------------
│ │ │ │ -
28
│ │ │ │ -
29 template < unsigned int dim, class Field >
│ │ │ │ -
30 struct RaviartThomasL2InterpolationFactory;
│ │ │ │ -
31
│ │ │ │ -
32
│ │ │ │ -
33
│ │ │ │ -
34 // LocalCoefficientsContainer
│ │ │ │ -
35 // --------------------------
│ │ │ │ -
36
│ │ │ │ -
37 class LocalCoefficientsContainer
│ │ │ │ -
38 {
│ │ │ │ -
39 typedef LocalCoefficientsContainer This;
│ │ │ │ -
40
│ │ │ │ -
41 public:
│ │ │ │ -
42 template <class Setter>
│ │ │ │ -
│ │ │ │ -
43 LocalCoefficientsContainer ( const Setter &setter )
│ │ │ │ -
44 {
│ │ │ │ -
45 setter.setLocalKeys(localKey_);
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 const LocalKey &localKey ( const unsigned int i ) const
│ │ │ │ -
49 {
│ │ │ │ -
50 assert( i < size() );
│ │ │ │ -
51 return localKey_[ i ];
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
54 std::size_t size () const
│ │ │ │ -
55 {
│ │ │ │ -
56 return localKey_.size();
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
59 private:
│ │ │ │ -
60 std::vector< LocalKey > localKey_;
│ │ │ │ -
61 };
│ │ │ │ -
62
│ │ │ │ -
63
│ │ │ │ -
64
│ │ │ │ -
65 // RaviartThomasCoefficientsFactory
│ │ │ │ -
66 // --------------------------------
│ │ │ │ -
67
│ │ │ │ -
68 template < unsigned int dim >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
70 {
│ │ │ │ -
71 typedef std::size_t Key;
│ │ │ │ - │ │ │ │ -
73
│ │ │ │ -
74 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
75 static Object *create( const Key &key )
│ │ │ │ -
76 {
│ │ │ │ -
77 typedef RaviartThomasL2InterpolationFactory< dim, double > InterpolationFactory;
│ │ │ │ -
78 if( !supports< geometryId >( key ) )
│ │ │ │ -
79 return nullptr;
│ │ │ │ -
80 typename InterpolationFactory::Object *interpolation = InterpolationFactory::template create< geometryId >( key );
│ │ │ │ -
81 Object *localKeys = new Object( *interpolation );
│ │ │ │ -
82 InterpolationFactory::release( interpolation );
│ │ │ │ -
83 return localKeys;
│ │ │ │ -
84 }
│ │ │ │ -
│ │ │ │ -
85
│ │ │ │ -
86 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
87 static bool supports ( const Key &key )
│ │ │ │ -
88 {
│ │ │ │ -
89 return GeometryType(geometryId).isSimplex();
│ │ │ │ -
90 }
│ │ │ │ -
│ │ │ │ -
91 static void release( Object *object ) { delete object; }
│ │ │ │ -
92 };
│ │ │ │ -
│ │ │ │ -
93
│ │ │ │ -
94
│ │ │ │ -
95
│ │ │ │ -
96 // RTL2InterpolationBuilder
│ │ │ │ -
97 // ------------------------
│ │ │ │ -
98
│ │ │ │ -
99 // L2 Interpolation requires:
│ │ │ │ -
100 // - for element
│ │ │ │ -
101 // - test basis
│ │ │ │ -
102 // - for each face (dynamic)
│ │ │ │ -
103 // - test basis
│ │ │ │ -
104 // - normal
│ │ │ │ -
105 template< unsigned int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
107 {
│ │ │ │ -
108 static const unsigned int dimension = dim;
│ │ │ │ -
109
│ │ │ │ -
110 // for the dofs associated to the element
│ │ │ │ - │ │ │ │ - │ │ │ │ -
113
│ │ │ │ -
114 // for the dofs associated to the faces
│ │ │ │ - │ │ │ │ - │ │ │ │ -
117
│ │ │ │ -
118 // the normals of the faces
│ │ │ │ -
119 typedef FieldVector< Field, dimension > Normal;
│ │ │ │ -
120
│ │ │ │ - │ │ │ │ -
122
│ │ │ │ - │ │ │ │ - │ │ │ │ -
125
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
127 {
│ │ │ │ -
128 TestBasisFactory::release( testBasis_ );
│ │ │ │ -
129 for( FaceStructure &f : faceStructure_ )
│ │ │ │ - │ │ │ │ -
131 }
│ │ │ │ -
│ │ │ │ -
132
│ │ │ │ -
133 GeometryType type () const { return geometry_; }
│ │ │ │ -
134
│ │ │ │ -
135 std::size_t order () const { return order_; }
│ │ │ │ -
136
│ │ │ │ -
137 // number of faces
│ │ │ │ -
138 unsigned int faceSize () const { return faceSize_; }
│ │ │ │ -
139
│ │ │ │ -
140 // basis associated to the element
│ │ │ │ -
141 TestBasis *testBasis () const { return testBasis_; }
│ │ │ │ -
142
│ │ │ │ -
143 // basis associated to face f
│ │ │ │ -
144 TestFaceBasis *testFaceBasis ( unsigned int f ) const { assert( f < faceSize() ); return faceStructure_[ f ].basis_; }
│ │ │ │ -
145
│ │ │ │ -
146 // normal of face f
│ │ │ │ -
147 const Normal &normal ( unsigned int f ) const { assert( f < faceSize() ); return *(faceStructure_[ f ].normal_); }
│ │ │ │ -
148
│ │ │ │ -
149 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
150 void build ( std::size_t order )
│ │ │ │ -
151 {
│ │ │ │ -
152 constexpr GeometryType geometry = geometryId;
│ │ │ │ -
153 geometry_ = geometry;
│ │ │ │ -
154 order_ = order;
│ │ │ │ -
155
│ │ │ │ -
156 testBasis_ = (order > 0 ? TestBasisFactory::template create< geometry >( order-1 ) : nullptr);
│ │ │ │ -
157
│ │ │ │ -
158 const auto &refElement = ReferenceElements< Field, dimension >::general( type() );
│ │ │ │ -
159 faceSize_ = refElement.size( 1 );
│ │ │ │ -
160 faceStructure_.reserve( faceSize_ );
│ │ │ │ -
161 for( unsigned int face = 0; face < faceSize_; ++face )
│ │ │ │ -
162 {
│ │ │ │ -
163 /* For simplices or cubes of arbitrary dimension you could just use
│ │ │ │ -
164 *
│ │ │ │ -
165 * ```
│ │ │ │ -
166 * GeometryType faceGeometry = Impl::getBase(geometry_);
│ │ │ │ -
167 * TestFaceBasis *faceBasis = TestFaceBasisFactory::template create< faceGeometry >( order );
│ │ │ │ -
168 * ```
│ │ │ │ -
169 *
│ │ │ │ -
170 * For i.e. Prisms and Pyramids in 3d this does not work because they contain squares and triangles as faces.
│ │ │ │ -
171 * And depending on the dynamic face index a different face geometry is needed.
│ │ │ │ -
172 *
│ │ │ │ -
173 */
│ │ │ │ -
174 TestFaceBasis *faceBasis = Impl::toGeometryTypeIdConstant<dimension-1>(refElement.type( face, 1 ), [&](auto faceGeometryTypeId) {
│ │ │ │ -
175 return TestFaceBasisFactory::template create< decltype(faceGeometryTypeId)::value >( order );
│ │ │ │ -
176 });
│ │ │ │ -
177 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal( face ) );
│ │ │ │ -
178 }
│ │ │ │ -
179 assert( faceStructure_.size() == faceSize_ );
│ │ │ │ -
180 }
│ │ │ │ -
│ │ │ │ -
181
│ │ │ │ -
182 private:
│ │ │ │ -
183 struct FaceStructure
│ │ │ │ -
184 {
│ │ │ │ -
185 FaceStructure( TestFaceBasis *tfb, const Normal &n )
│ │ │ │ -
186 : basis_( tfb ), normal_( &n )
│ │ │ │ -
187 {}
│ │ │ │ -
188
│ │ │ │ -
189 TestFaceBasis *basis_;
│ │ │ │ -
190 const Dune::FieldVector< Field, dimension > *normal_;
│ │ │ │ -
191 };
│ │ │ │ -
192
│ │ │ │ -
193 std::vector< FaceStructure > faceStructure_;
│ │ │ │ -
194 TestBasis *testBasis_ = nullptr;
│ │ │ │ -
195 GeometryType geometry_;
│ │ │ │ -
196 unsigned int faceSize_;
│ │ │ │ -
197 std::size_t order_;
│ │ │ │ -
198 };
│ │ │ │ -
│ │ │ │ -
199
│ │ │ │ -
200
│ │ │ │ -
201
│ │ │ │ -
202 // RaviartThomasL2Interpolation
│ │ │ │ -
203 // ----------------------------
│ │ │ │ -
204
│ │ │ │ -
210 template< unsigned int dimension, class F>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
212 : public InterpolationHelper< F ,dimension >
│ │ │ │ -
213 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
216
│ │ │ │ -
217 public:
│ │ │ │ -
218 typedef F Field;
│ │ │ │ - │ │ │ │ -
│ │ │ │ - │ │ │ │ -
221 : order_(0),
│ │ │ │ -
222 size_(0)
│ │ │ │ -
223 {}
│ │ │ │ -
│ │ │ │ -
224
│ │ │ │ -
225 template< class Function, class Vector >
│ │ │ │ -
│ │ │ │ -
226 auto interpolate ( const Function &function, Vector &coefficients ) const
│ │ │ │ -
227 -> std::enable_if_t< std::is_same< decltype(std::declval<Vector>().resize(1) ),void >::value,void>
│ │ │ │ -
228 {
│ │ │ │ -
229 coefficients.resize(size());
│ │ │ │ -
230 typename Base::template Helper<Function,Vector,true> func( function,coefficients );
│ │ │ │ -
231 interpolate(func);
│ │ │ │ -
232 }
│ │ │ │ -
│ │ │ │ -
233
│ │ │ │ -
234 template< class Basis, class Matrix >
│ │ │ │ -
│ │ │ │ -
235 auto interpolate ( const Basis &basis, Matrix &matrix ) const
│ │ │ │ -
236 -> std::enable_if_t< std::is_same<
│ │ │ │ -
237 decltype(std::declval<Matrix>().rowPtr(0)), typename Matrix::Field* >::value,void>
│ │ │ │ -
238 {
│ │ │ │ -
239 matrix.resize( size(), basis.size() );
│ │ │ │ -
240 typename Base::template Helper<Basis,Matrix,false> func( basis,matrix );
│ │ │ │ -
241 interpolate(func);
│ │ │ │ -
242 }
│ │ │ │ -
│ │ │ │ -
243
│ │ │ │ -
│ │ │ │ -
244 std::size_t order() const
│ │ │ │ -
245 {
│ │ │ │ -
246 return order_;
│ │ │ │ -
247 }
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
248 std::size_t size() const
│ │ │ │ -
249 {
│ │ │ │ -
250 return size_;
│ │ │ │ -
251 }
│ │ │ │ -
│ │ │ │ -
252 template <GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
253 void build( std::size_t order )
│ │ │ │ -
254 {
│ │ │ │ -
255 size_ = 0;
│ │ │ │ -
256 order_ = order;
│ │ │ │ -
257 builder_.template build<geometryId>(order_);
│ │ │ │ -
258 if (builder_.testBasis())
│ │ │ │ -
259 size_ += dimension*builder_.testBasis()->size();
│ │ │ │ -
260 for ( unsigned int f=0; f<builder_.faceSize(); ++f )
│ │ │ │ -
261 if (builder_.testFaceBasis(f))
│ │ │ │ -
262 size_ += builder_.testFaceBasis(f)->size();
│ │ │ │ -
263 }
│ │ │ │ -
│ │ │ │ -
264
│ │ │ │ -
│ │ │ │ -
265 void setLocalKeys(std::vector< LocalKey > &keys) const
│ │ │ │ -
266 {
│ │ │ │ -
267 keys.resize(size());
│ │ │ │ -
268 unsigned int row = 0;
│ │ │ │ -
269 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ -
270 {
│ │ │ │ -
271 if (builder_.faceSize())
│ │ │ │ -
272 for (unsigned int i=0; i<builder_.testFaceBasis(f)->size(); ++i,++row)
│ │ │ │ -
273 keys[row] = LocalKey(f,1,i);
│ │ │ │ -
274 }
│ │ │ │ -
275 if (builder_.testBasis())
│ │ │ │ -
276 for (unsigned int i=0; i<builder_.testBasis()->size()*dimension; ++i,++row)
│ │ │ │ -
277 keys[row] = LocalKey(0,0,i);
│ │ │ │ -
278 assert( row == size() );
│ │ │ │ -
279 }
│ │ │ │ -
│ │ │ │ -
280
│ │ │ │ -
281 protected:
│ │ │ │ -
282 template< class Func, class Container, bool type >
│ │ │ │ -
│ │ │ │ -
283 void interpolate ( typename Base::template Helper<Func,Container,type> &func ) const
│ │ │ │ -
284 {
│ │ │ │ -
285 const Dune::GeometryType geoType = builder_.type();
│ │ │ │ -
286
│ │ │ │ -
287 std::vector< Field > testBasisVal;
│ │ │ │ -
288
│ │ │ │ -
289 for (unsigned int i=0; i<size(); ++i)
│ │ │ │ -
290 for (unsigned int j=0; j<func.size(); ++j)
│ │ │ │ -
291 func.set(i,j,0);
│ │ │ │ -
292
│ │ │ │ -
293 unsigned int row = 0;
│ │ │ │ -
294
│ │ │ │ -
295 // boundary dofs:
│ │ │ │ -
296 typedef Dune::QuadratureRule<Field, dimension-1> FaceQuadrature;
│ │ │ │ -
297 typedef Dune::QuadratureRules<Field, dimension-1> FaceQuadratureRules;
│ │ │ │ -
298
│ │ │ │ -
299 const auto &refElement = Dune::ReferenceElements< Field, dimension >::general( geoType );
│ │ │ │ -
300
│ │ │ │ -
301 for (unsigned int f=0; f<builder_.faceSize(); ++f)
│ │ │ │ -
302 {
│ │ │ │ -
303 if (!builder_.testFaceBasis(f))
│ │ │ │ -
304 continue;
│ │ │ │ -
305 testBasisVal.resize(builder_.testFaceBasis(f)->size());
│ │ │ │ -
306
│ │ │ │ -
307 const auto &geometry = refElement.template geometry< 1 >( f );
│ │ │ │ -
308 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 );
│ │ │ │ -
309 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, 2*order_+2 );
│ │ │ │ -
310
│ │ │ │ -
311 const unsigned int quadratureSize = faceQuad.size();
│ │ │ │ -
312 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ -
313 {
│ │ │ │ -
314 if (dimension>1)
│ │ │ │ -
315 builder_.testFaceBasis(f)->template evaluate<0>(faceQuad[qi].position(),testBasisVal);
│ │ │ │ -
316 else
│ │ │ │ -
317 testBasisVal[0] = 1.;
│ │ │ │ -
318 fillBnd( row, testBasisVal,
│ │ │ │ -
319 func.evaluate( geometry.global( faceQuad[qi].position() ) ),
│ │ │ │ -
320 builder_.normal(f), faceQuad[qi].weight(),
│ │ │ │ -
321 func);
│ │ │ │ -
322 }
│ │ │ │ -
323
│ │ │ │ -
324 row += builder_.testFaceBasis(f)->size();
│ │ │ │ -
325 }
│ │ │ │ -
326 // element dofs
│ │ │ │ -
327 if (builder_.testBasis())
│ │ │ │ -
328 {
│ │ │ │ -
329 testBasisVal.resize(builder_.testBasis()->size());
│ │ │ │ -
330
│ │ │ │ -
331 typedef Dune::QuadratureRule<Field, dimension> Quadrature;
│ │ │ │ -
332 typedef Dune::QuadratureRules<Field, dimension> QuadratureRules;
│ │ │ │ -
333 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*order_+1 );
│ │ │ │ -
334
│ │ │ │ -
335 const unsigned int quadratureSize = elemQuad.size();
│ │ │ │ -
336 for( unsigned int qi = 0; qi < quadratureSize; ++qi )
│ │ │ │ -
337 {
│ │ │ │ -
338 builder_.testBasis()->template evaluate<0>(elemQuad[qi].position(),testBasisVal);
│ │ │ │ -
339 fillInterior( row, testBasisVal,
│ │ │ │ -
340 func.evaluate(elemQuad[qi].position()),
│ │ │ │ -
341 elemQuad[qi].weight(),
│ │ │ │ -
342 func );
│ │ │ │ -
343 }
│ │ │ │ -
344
│ │ │ │ -
345 row += builder_.testBasis()->size()*dimension;
│ │ │ │ -
346 }
│ │ │ │ -
347 assert(row==size());
│ │ │ │ -
348 }
│ │ │ │ -
│ │ │ │ -
349
│ │ │ │ -
350 private:
│ │ │ │ -
360 template <class MVal, class RTVal,class Matrix>
│ │ │ │ -
361 void fillBnd (unsigned int startRow,
│ │ │ │ -
362 const MVal &mVal,
│ │ │ │ -
363 const RTVal &rtVal,
│ │ │ │ -
364 const FieldVector<Field,dimension> &normal,
│ │ │ │ -
365 const Field &weight,
│ │ │ │ -
366 Matrix &matrix) const
│ │ │ │ -
367 {
│ │ │ │ -
368 const unsigned int endRow = startRow+mVal.size();
│ │ │ │ -
369 typename RTVal::const_iterator rtiter = rtVal.begin();
│ │ │ │ -
370 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col)
│ │ │ │ -
371 {
│ │ │ │ -
372 Field cFactor = (*rtiter)*normal;
│ │ │ │ -
373 typename MVal::const_iterator miter = mVal.begin();
│ │ │ │ -
374 for (unsigned int row = startRow;
│ │ │ │ -
375 row!=endRow; ++miter, ++row )
│ │ │ │ -
376 {
│ │ │ │ -
377 matrix.add(row,col, (weight*cFactor)*(*miter) );
│ │ │ │ -
378 }
│ │ │ │ -
379 assert( miter == mVal.end() );
│ │ │ │ -
380 }
│ │ │ │ -
381 }
│ │ │ │ -
390 template <class MVal, class RTVal,class Matrix>
│ │ │ │ -
391 void fillInterior (unsigned int startRow,
│ │ │ │ -
392 const MVal &mVal,
│ │ │ │ -
393 const RTVal &rtVal,
│ │ │ │ -
394 Field weight,
│ │ │ │ -
395 Matrix &matrix) const
│ │ │ │ -
396 {
│ │ │ │ -
397 const unsigned int endRow = startRow+mVal.size()*dimension;
│ │ │ │ -
398 typename RTVal::const_iterator rtiter = rtVal.begin();
│ │ │ │ -
399 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col)
│ │ │ │ -
400 {
│ │ │ │ -
401 typename MVal::const_iterator miter = mVal.begin();
│ │ │ │ -
402 for (unsigned int row = startRow;
│ │ │ │ -
403 row!=endRow; ++miter,row+=dimension )
│ │ │ │ -
404 {
│ │ │ │ -
405 for (unsigned int i=0; i<dimension; ++i)
│ │ │ │ -
406 {
│ │ │ │ -
407 matrix.add(row+i,col, (weight*(*miter))*(*rtiter)[i] );
│ │ │ │ -
408 }
│ │ │ │ -
409 }
│ │ │ │ -
410 assert( miter == mVal.end() );
│ │ │ │ -
411 }
│ │ │ │ -
412 }
│ │ │ │ -
413
│ │ │ │ -
414 Builder builder_;
│ │ │ │ -
415 std::size_t order_;
│ │ │ │ -
416 std::size_t size_;
│ │ │ │ -
417 };
│ │ │ │ -
│ │ │ │ -
418
│ │ │ │ -
419 template < unsigned int dim, class Field >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
421 {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
424 typedef std::size_t Key;
│ │ │ │ -
425 typedef typename std::remove_const<Object>::type NonConstObject;
│ │ │ │ -
426
│ │ │ │ -
427 template <GeometryType::Id geometryId>
│ │ │ │ -
│ │ │ │ -
428 static Object *create( const Key &key )
│ │ │ │ -
429 {
│ │ │ │ -
430 if ( !supports<geometryId>(key) )
│ │ │ │ -
431 return 0;
│ │ │ │ -
432 NonConstObject *interpol = new NonConstObject();
│ │ │ │ -
433 interpol->template build<geometryId>(key);
│ │ │ │ -
434 return interpol;
│ │ │ │ -
435 }
│ │ │ │ -
│ │ │ │ -
436 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
437 static bool supports ( const Key &key )
│ │ │ │ -
438 {
│ │ │ │ -
439 return GeometryType(geometryId).isSimplex();
│ │ │ │ -
440 }
│ │ │ │ -
│ │ │ │ -
441 static void release( Object *object ) { delete object; }
│ │ │ │ -
442 };
│ │ │ │ -
│ │ │ │ -
443
│ │ │ │ -
444} // namespace Dune
│ │ │ │ -
445
│ │ │ │ -
446#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24
│ │ │ │ +
25 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29 for (std::size_t i = 0; i < 3; i++)
│ │ │ │ +
30 {
│ │ │ │ +
31 li[i] = LocalKey(i,1,0);
│ │ │ │ +
32 li[3 + i] = LocalKey(i,1,1);
│ │ │ │ +
33 }
│ │ │ │ +
34
│ │ │ │ +
35 // last two DOF are associated with the cell (codim = 0)
│ │ │ │ +
36 li[6] = LocalKey(0,0,0);
│ │ │ │ +
37 li[7] = LocalKey(0,0,1);
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
41 std::size_t size () const
│ │ │ │ +
42 {
│ │ │ │ +
43 return 8;
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
47 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
48 {
│ │ │ │ +
49 return li[i];
│ │ │ │ +
50 }
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52 private:
│ │ │ │ +
53 std::vector<LocalKey> li;
│ │ │ │ +
54 };
│ │ │ │ +
│ │ │ │ +
55}
│ │ │ │ +
56#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Definition nedelecsimplexinterpolation.hh:38
│ │ │ │ -
LocalCoefficientsContainer(const Setter &setter)
Definition nedelecsimplexinterpolation.hh:43
│ │ │ │ -
const LocalKey & localKey(const unsigned int i) const
Definition raviartthomassimplexinterpolation.hh:48
│ │ │ │ -
std::size_t size() const
Definition nedelecsimplexinterpolation.hh:54
│ │ │ │ -
Definition orthonormalbasis.hh:20
│ │ │ │ -
static void release(Object *object)
Definition orthonormalbasis.hh:57
│ │ │ │ -
Definition raviartthomassimplexinterpolation.hh:421
│ │ │ │ -
std::remove_const< Object >::type NonConstObject
Definition raviartthomassimplexinterpolation.hh:425
│ │ │ │ -
static void release(Object *object)
Definition raviartthomassimplexinterpolation.hh:441
│ │ │ │ -
static bool supports(const Key &key)
Definition raviartthomassimplexinterpolation.hh:437
│ │ │ │ -
static Object * create(const Key &key)
Definition raviartthomassimplexinterpolation.hh:428
│ │ │ │ -
RTL2InterpolationBuilder< dim, Field > Builder
Definition raviartthomassimplexinterpolation.hh:422
│ │ │ │ -
const RaviartThomasL2Interpolation< dim, Field > Object
Definition raviartthomassimplexinterpolation.hh:423
│ │ │ │ -
std::size_t Key
Definition raviartthomassimplexinterpolation.hh:424
│ │ │ │ -
Definition raviartthomassimplexinterpolation.hh:70
│ │ │ │ -
std::size_t Key
Definition raviartthomassimplexinterpolation.hh:71
│ │ │ │ -
static void release(Object *object)
Definition raviartthomassimplexinterpolation.hh:91
│ │ │ │ -
static bool supports(const Key &key)
Definition raviartthomassimplexinterpolation.hh:87
│ │ │ │ -
const LocalCoefficientsContainer Object
Definition raviartthomassimplexinterpolation.hh:72
│ │ │ │ -
static Object * create(const Key &key)
Definition raviartthomassimplexinterpolation.hh:75
│ │ │ │ -
Definition raviartthomassimplexinterpolation.hh:107
│ │ │ │ -
TestBasis * testBasis() const
Definition raviartthomassimplexinterpolation.hh:141
│ │ │ │ -
FieldVector< Field, dimension > Normal
Definition raviartthomassimplexinterpolation.hh:119
│ │ │ │ -
TestBasisFactory::Object TestBasis
Definition raviartthomassimplexinterpolation.hh:112
│ │ │ │ -
TestFaceBasisFactory::Object TestFaceBasis
Definition raviartthomassimplexinterpolation.hh:116
│ │ │ │ -
unsigned int faceSize() const
Definition raviartthomassimplexinterpolation.hh:138
│ │ │ │ -
void build(std::size_t order)
Definition raviartthomassimplexinterpolation.hh:150
│ │ │ │ - │ │ │ │ -
TestFaceBasis * testFaceBasis(unsigned int f) const
Definition raviartthomassimplexinterpolation.hh:144
│ │ │ │ -
GeometryType type() const
Definition raviartthomassimplexinterpolation.hh:133
│ │ │ │ -
const Normal & normal(unsigned int f) const
Definition raviartthomassimplexinterpolation.hh:147
│ │ │ │ -
RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete
│ │ │ │ -
OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory
Definition raviartthomassimplexinterpolation.hh:115
│ │ │ │ -
RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete
│ │ │ │ -
OrthonormalBasisFactory< dimension, Field > TestBasisFactory
Definition raviartthomassimplexinterpolation.hh:111
│ │ │ │ -
std::size_t order() const
Definition raviartthomassimplexinterpolation.hh:135
│ │ │ │ -
static const unsigned int dimension
Definition raviartthomassimplexinterpolation.hh:108
│ │ │ │ -
~RTL2InterpolationBuilder()
Definition raviartthomassimplexinterpolation.hh:126
│ │ │ │ -
An L2-based interpolation for Raviart Thomas.
Definition raviartthomassimplexinterpolation.hh:213
│ │ │ │ -
std::size_t order() const
Definition raviartthomassimplexinterpolation.hh:244
│ │ │ │ -
RaviartThomasL2Interpolation()
Definition raviartthomassimplexinterpolation.hh:220
│ │ │ │ -
void interpolate(typename Base::template Helper< Func, Container, type > &func) const
Definition raviartthomassimplexinterpolation.hh:283
│ │ │ │ -
auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix::Field * >::value, void >
Definition raviartthomassimplexinterpolation.hh:235
│ │ │ │ -
RTL2InterpolationBuilder< dimension, Field > Builder
Definition raviartthomassimplexinterpolation.hh:219
│ │ │ │ -
F Field
Definition raviartthomassimplexinterpolation.hh:218
│ │ │ │ -
void build(std::size_t order)
Definition raviartthomassimplexinterpolation.hh:253
│ │ │ │ -
auto interpolate(const Function &function, Vector &coefficients) const -> std::enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void >::value, void >
Definition raviartthomassimplexinterpolation.hh:226
│ │ │ │ -
std::size_t size() const
Definition raviartthomassimplexinterpolation.hh:248
│ │ │ │ -
void setLocalKeys(std::vector< LocalKey > &keys) const
Definition raviartthomassimplexinterpolation.hh:265
│ │ │ │ -
Definition interpolationhelper.hh:22
│ │ │ │ -
Definition interpolationhelper.hh:24
│ │ │ │ -
Definition polynomialbasis.hh:65
│ │ │ │ -
unsigned int size() const
Definition polynomialbasis.hh:113
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on the reference triangle.
Definition raviartthomas12dlocalcoefficients.hh:23
│ │ │ │ +
RT12DLocalCoefficients()
Standard constructor.
Definition raviartthomas12dlocalcoefficients.hh:27
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas12dlocalcoefficients.hh:47
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas12dlocalcoefficients.hh:41
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,622 +1,80 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ -raviartthomassimplexinterpolation.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_1_2_d │ │ │ │ │ +raviartthomas12dlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ -6#define │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ -13#include │ │ │ │ │ -14#include │ │ │ │ │ -15#include │ │ │ │ │ -16#include │ │ │ │ │ -17 │ │ │ │ │ -18#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -19#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h> │ │ │ │ │ -20#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -21#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -22 │ │ │ │ │ -23namespace _D_u_n_e │ │ │ │ │ -24{ │ │ │ │ │ -25 │ │ │ │ │ -26 // Internal Forward Declarations │ │ │ │ │ -27 // ----------------------------- │ │ │ │ │ -28 │ │ │ │ │ -29 template < unsigned int dim, class Field > │ │ │ │ │ -30 struct RaviartThomasL2InterpolationFactory; │ │ │ │ │ -31 │ │ │ │ │ -32 │ │ │ │ │ -33 │ │ │ │ │ -34 // LocalCoefficientsContainer │ │ │ │ │ -35 // -------------------------- │ │ │ │ │ -36 │ │ │ │ │ -37 class LocalCoefficientsContainer │ │ │ │ │ -38 { │ │ │ │ │ -39 typedef _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r This; │ │ │ │ │ -40 │ │ │ │ │ -41 public: │ │ │ │ │ -42 template │ │ │ │ │ -_4_3 _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r ( const Setter &setter ) │ │ │ │ │ -44 { │ │ │ │ │ -45 setter.setLocalKeys(localKey_); │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_4_8 const _L_o_c_a_l_K_e_y &_l_o_c_a_l_K_e_y ( const unsigned int i ) const │ │ │ │ │ -49 { │ │ │ │ │ -50 assert( i < _s_i_z_e() ); │ │ │ │ │ -51 return localKey_[ i ]; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -_5_4 std::size_t _s_i_z_e () const │ │ │ │ │ -55 { │ │ │ │ │ -56 return localKey_.size(); │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -59 private: │ │ │ │ │ -60 std::vector< LocalKey > localKey_; │ │ │ │ │ -61 }; │ │ │ │ │ -62 │ │ │ │ │ -63 │ │ │ │ │ -64 │ │ │ │ │ -65 // RaviartThomasCoefficientsFactory │ │ │ │ │ -66 // -------------------------------- │ │ │ │ │ -67 │ │ │ │ │ -68 template < unsigned int dim > │ │ │ │ │ -_6_9 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -70 { │ │ │ │ │ -_7_1 typedef std::size_t _K_e_y; │ │ │ │ │ -_7_2 typedef const _L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r _O_b_j_e_c_t; │ │ │ │ │ -73 │ │ │ │ │ -74 template< GeometryType::Id geometryId > │ │ │ │ │ -_7_5 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ -76 { │ │ │ │ │ -77 typedef _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_<_ _d_i_m_,_ _d_o_u_b_l_e_ _> │ │ │ │ │ -InterpolationFactory; │ │ │ │ │ -78 if( !supports< geometryId >( key ) ) │ │ │ │ │ -79 return nullptr; │ │ │ │ │ -80 typename InterpolationFactory::Object *interpolation = │ │ │ │ │ -InterpolationFactory::template create< geometryId >( key ); │ │ │ │ │ -81 _O_b_j_e_c_t *localKeys = new _O_b_j_e_c_t( *interpolation ); │ │ │ │ │ -82 InterpolationFactory::release( interpolation ); │ │ │ │ │ -83 return localKeys; │ │ │ │ │ -84 } │ │ │ │ │ -85 │ │ │ │ │ -86 template< GeometryType::Id geometryId > │ │ │ │ │ -_8_7 static bool _s_u_p_p_o_r_t_s ( const _K_e_y &key ) │ │ │ │ │ -88 { │ │ │ │ │ -89 return GeometryType(geometryId).isSimplex(); │ │ │ │ │ -90 } │ │ │ │ │ -_9_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -92 }; │ │ │ │ │ -93 │ │ │ │ │ -94 │ │ │ │ │ -95 │ │ │ │ │ -96 // RTL2InterpolationBuilder │ │ │ │ │ -97 // ------------------------ │ │ │ │ │ -98 │ │ │ │ │ -99 // L2 Interpolation requires: │ │ │ │ │ -100 // - for element │ │ │ │ │ -101 // - test basis │ │ │ │ │ -102 // - for each face (dynamic) │ │ │ │ │ -103 // - test basis │ │ │ │ │ -104 // - normal │ │ │ │ │ -105 template< unsigned int dim, class Field > │ │ │ │ │ -_1_0_6 struct _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -107 { │ │ │ │ │ -_1_0_8 static const unsigned int _d_i_m_e_n_s_i_o_n = dim; │ │ │ │ │ -109 │ │ │ │ │ -110 // for the dofs associated to the element │ │ │ │ │ -_1_1_1 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_e_n_s_i_o_n_,_ _F_i_e_l_d_ _> _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_1_1_2 typedef typename _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_B_a_s_i_s; │ │ │ │ │ -113 │ │ │ │ │ -114 // for the dofs associated to the faces │ │ │ │ │ -_1_1_5 typedef _O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y< _d_i_m_e_n_s_i_o_n-1, Field > _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_1_1_6 typedef typename _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t _T_e_s_t_F_a_c_e_B_a_s_i_s; │ │ │ │ │ -117 │ │ │ │ │ -118 // the normals of the faces │ │ │ │ │ -_1_1_9 typedef FieldVector< Field, dimension > _N_o_r_m_a_l; │ │ │ │ │ -120 │ │ │ │ │ -_1_2_1 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () = default; │ │ │ │ │ -122 │ │ │ │ │ -_1_2_3 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( const _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r & ) = delete; │ │ │ │ │ -_1_2_4 _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r ( _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r && ) = delete; │ │ │ │ │ -125 │ │ │ │ │ -_1_2_6 _~_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r () │ │ │ │ │ -127 { │ │ │ │ │ -128 _T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( testBasis_ ); │ │ │ │ │ -129 for( FaceStructure &f : faceStructure_ ) │ │ │ │ │ -130 _T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e( f.basis_ ); │ │ │ │ │ -131 } │ │ │ │ │ -132 │ │ │ │ │ -_1_3_3 GeometryType _t_y_p_e () const { return geometry_; } │ │ │ │ │ -134 │ │ │ │ │ -_1_3_5 std::size_t _o_r_d_e_r () const { return order_; } │ │ │ │ │ -136 │ │ │ │ │ -137 // number of faces │ │ │ │ │ -_1_3_8 unsigned int _f_a_c_e_S_i_z_e () const { return faceSize_; } │ │ │ │ │ -139 │ │ │ │ │ -140 // basis associated to the element │ │ │ │ │ -_1_4_1 _T_e_s_t_B_a_s_i_s *_t_e_s_t_B_a_s_i_s () const { return testBasis_; } │ │ │ │ │ -142 │ │ │ │ │ -143 // basis associated to face f │ │ │ │ │ -_1_4_4 _T_e_s_t_F_a_c_e_B_a_s_i_s *_t_e_s_t_F_a_c_e_B_a_s_i_s ( unsigned int f ) const { assert( f < │ │ │ │ │ -_f_a_c_e_S_i_z_e() ); return faceStructure_[ f ].basis_; } │ │ │ │ │ -145 │ │ │ │ │ -146 // normal of face f │ │ │ │ │ -_1_4_7 const _N_o_r_m_a_l &_n_o_r_m_a_l ( unsigned int f ) const { assert( f < _f_a_c_e_S_i_z_e() ); │ │ │ │ │ -return *(faceStructure_[ f ].normal_); } │ │ │ │ │ -148 │ │ │ │ │ -149 template< GeometryType::Id geometryId > │ │ │ │ │ -_1_5_0 void _b_u_i_l_d ( std::size_t _o_r_d_e_r ) │ │ │ │ │ -151 { │ │ │ │ │ -152 constexpr GeometryType geometry = geometryId; │ │ │ │ │ -153 geometry_ = geometry; │ │ │ │ │ -154 order_ = _o_r_d_e_r; │ │ │ │ │ -155 │ │ │ │ │ -156 testBasis_ = (_o_r_d_e_r > 0 ? TestBasisFactory::template create< geometry > │ │ │ │ │ -( _o_r_d_e_r-1 ) : nullptr); │ │ │ │ │ -157 │ │ │ │ │ -158 const auto &refElement = ReferenceElements< Field, dimension >::general │ │ │ │ │ -( _t_y_p_e() ); │ │ │ │ │ -159 faceSize_ = refElement.size( 1 ); │ │ │ │ │ -160 faceStructure_.reserve( faceSize_ ); │ │ │ │ │ -161 for( unsigned int face = 0; face < faceSize_; ++face ) │ │ │ │ │ -162 { │ │ │ │ │ -163 /* For simplices or cubes of arbitrary dimension you could just use │ │ │ │ │ -164 * │ │ │ │ │ -165 * ``` │ │ │ │ │ -166 * GeometryType faceGeometry = Impl::getBase(geometry_); │ │ │ │ │ -167 * TestFaceBasis *faceBasis = TestFaceBasisFactory::template create< │ │ │ │ │ -faceGeometry >( order ); │ │ │ │ │ -168 * ``` │ │ │ │ │ -169 * │ │ │ │ │ -170 * For i.e. Prisms and Pyramids in 3d this does not work because they │ │ │ │ │ -contain squares and triangles as faces. │ │ │ │ │ -171 * And depending on the dynamic face index a different face geometry is │ │ │ │ │ -needed. │ │ │ │ │ -172 * │ │ │ │ │ -173 */ │ │ │ │ │ -174 _T_e_s_t_F_a_c_e_B_a_s_i_s *faceBasis = Impl::toGeometryTypeIdConstant<_d_i_m_e_n_s_i_o_n-1> │ │ │ │ │ -(refElement.type( face, 1 ), [&](auto faceGeometryTypeId) { │ │ │ │ │ -175 return TestFaceBasisFactory::template create< decltype │ │ │ │ │ -(faceGeometryTypeId)::value >( _o_r_d_e_r ); │ │ │ │ │ -176 }); │ │ │ │ │ -177 faceStructure_.emplace_back( faceBasis, refElement.integrationOuterNormal │ │ │ │ │ -( face ) ); │ │ │ │ │ -178 } │ │ │ │ │ -179 assert( faceStructure_.size() == faceSize_ ); │ │ │ │ │ -180 } │ │ │ │ │ -181 │ │ │ │ │ -182 private: │ │ │ │ │ -183 struct FaceStructure │ │ │ │ │ -184 { │ │ │ │ │ -185 FaceStructure( _T_e_s_t_F_a_c_e_B_a_s_i_s *tfb, const _N_o_r_m_a_l &n ) │ │ │ │ │ -186 : basis_( tfb ), normal_( &n ) │ │ │ │ │ -187 {} │ │ │ │ │ -188 │ │ │ │ │ -189 _T_e_s_t_F_a_c_e_B_a_s_i_s *basis_; │ │ │ │ │ -190 const Dune::FieldVector< Field, dimension > *normal_; │ │ │ │ │ -191 }; │ │ │ │ │ -192 │ │ │ │ │ -193 std::vector< FaceStructure > faceStructure_; │ │ │ │ │ -194 _T_e_s_t_B_a_s_i_s *testBasis_ = nullptr; │ │ │ │ │ -195 GeometryType geometry_; │ │ │ │ │ -196 unsigned int faceSize_; │ │ │ │ │ -197 std::size_t order_; │ │ │ │ │ -198 }; │ │ │ │ │ -199 │ │ │ │ │ -200 │ │ │ │ │ -201 │ │ │ │ │ -202 // RaviartThomasL2Interpolation │ │ │ │ │ -203 // ---------------------------- │ │ │ │ │ -204 │ │ │ │ │ -210 template< unsigned int dimension, class F> │ │ │ │ │ -_2_1_1 class _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -212 : public _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r< F ,dimension > │ │ │ │ │ -213 { │ │ │ │ │ -214 typedef _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _d_i_m_e_n_s_i_o_n_,_ _F_ _> _T_h_i_s; │ │ │ │ │ -215 typedef _I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_<_F_,_d_i_m_e_n_s_i_o_n_> _B_a_s_e; │ │ │ │ │ -216 │ │ │ │ │ -217 public: │ │ │ │ │ -_2_1_8 typedef F _F_i_e_l_d; │ │ │ │ │ -_2_1_9 typedef _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_e_n_s_i_o_n_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ -_2_2_0 _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n() │ │ │ │ │ -221 : order_(0), │ │ │ │ │ -222 size_(0) │ │ │ │ │ -223 {} │ │ │ │ │ -224 │ │ │ │ │ -225 template< class Function, class Vector > │ │ │ │ │ -_2_2_6 auto _i_n_t_e_r_p_o_l_a_t_e ( const Function &function, Vector &coefficients ) const │ │ │ │ │ -227 -> std::enable_if_t< std::is_same< decltype(std::declval().resize │ │ │ │ │ -(1) ),void >::value,void> │ │ │ │ │ -228 { │ │ │ │ │ -229 coefficients.resize(_s_i_z_e()); │ │ │ │ │ -230 typename Base::template _H_e_l_p_e_r_<_F_u_n_c_t_i_o_n_,_V_e_c_t_o_r_,_t_r_u_e_> func │ │ │ │ │ -( function,coefficients ); │ │ │ │ │ -231 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ -232 } │ │ │ │ │ -233 │ │ │ │ │ -234 template< class Basis, class Matrix > │ │ │ │ │ -_2_3_5 auto _i_n_t_e_r_p_o_l_a_t_e ( const Basis &basis, Matrix &matrix ) const │ │ │ │ │ -236 -> std::enable_if_t< std::is_same< │ │ │ │ │ -237 decltype(std::declval().rowPtr(0)), typename Matrix::Field* >:: │ │ │ │ │ -value,void> │ │ │ │ │ -238 { │ │ │ │ │ -239 matrix.resize( _s_i_z_e(), basis.size() ); │ │ │ │ │ -240 typename Base::template _H_e_l_p_e_r_<_B_a_s_i_s_,_M_a_t_r_i_x_,_f_a_l_s_e_> func( basis,matrix ); │ │ │ │ │ -241 _i_n_t_e_r_p_o_l_a_t_e(func); │ │ │ │ │ -242 } │ │ │ │ │ -243 │ │ │ │ │ -_2_4_4 std::size_t _o_r_d_e_r() const │ │ │ │ │ -245 { │ │ │ │ │ -246 return order_; │ │ │ │ │ -247 } │ │ │ │ │ -_2_4_8 std::size_t _s_i_z_e() const │ │ │ │ │ -249 { │ │ │ │ │ -250 return size_; │ │ │ │ │ -251 } │ │ │ │ │ -252 template │ │ │ │ │ -_2_5_3 void _b_u_i_l_d( std::size_t _o_r_d_e_r ) │ │ │ │ │ -254 { │ │ │ │ │ -255 size_ = 0; │ │ │ │ │ -256 order_ = _o_r_d_e_r; │ │ │ │ │ -257 builder_.template build(order_); │ │ │ │ │ -258 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -259 size_ += dimension*builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e(); │ │ │ │ │ -260 for ( unsigned int f=0; f_s_i_z_e(); │ │ │ │ │ -263 } │ │ │ │ │ -264 │ │ │ │ │ -_2_6_5 void _s_e_t_L_o_c_a_l_K_e_y_s(std::vector< LocalKey > &keys) const │ │ │ │ │ -266 { │ │ │ │ │ -267 keys.resize(_s_i_z_e()); │ │ │ │ │ -268 unsigned int row = 0; │ │ │ │ │ -269 for (unsigned int f=0; f_s_i_z_e(); ++i,++row) │ │ │ │ │ -273 keys[row] = _L_o_c_a_l_K_e_y(f,1,i); │ │ │ │ │ -274 } │ │ │ │ │ -275 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -276 for (unsigned int i=0; i_s_i_z_e()*dimension; ++i,++row) │ │ │ │ │ -277 keys[row] = _L_o_c_a_l_K_e_y(0,0,i); │ │ │ │ │ -278 assert( row == _s_i_z_e() ); │ │ │ │ │ -279 } │ │ │ │ │ -280 │ │ │ │ │ -281 protected: │ │ │ │ │ -282 template< class Func, class Container, bool type > │ │ │ │ │ -_2_8_3 void _i_n_t_e_r_p_o_l_a_t_e ( typename Base::template _H_e_l_p_e_r_<_F_u_n_c_,_C_o_n_t_a_i_n_e_r_,_t_y_p_e_> │ │ │ │ │ -&func ) const │ │ │ │ │ -284 { │ │ │ │ │ -285 const Dune::GeometryType geoType = builder_._t_y_p_e(); │ │ │ │ │ -286 │ │ │ │ │ -287 std::vector< Field > testBasisVal; │ │ │ │ │ -288 │ │ │ │ │ -289 for (unsigned int i=0; i<_s_i_z_e(); ++i) │ │ │ │ │ -290 for (unsigned int j=0; j FaceQuadrature; │ │ │ │ │ -297 typedef Dune::QuadratureRules<_F_i_e_l_d, dimension-1> FaceQuadratureRules; │ │ │ │ │ -298 │ │ │ │ │ -299 const auto &refElement = Dune::ReferenceElements< Field, dimension >:: │ │ │ │ │ -general( geoType ); │ │ │ │ │ -300 │ │ │ │ │ -301 for (unsigned int f=0; f_s_i_z_e()); │ │ │ │ │ -306 │ │ │ │ │ -307 const auto &geometry = refElement.template geometry< 1 >( f ); │ │ │ │ │ -308 const Dune::GeometryType subGeoType( geometry.type().id(), dimension-1 ); │ │ │ │ │ -309 const FaceQuadrature &faceQuad = FaceQuadratureRules::rule( subGeoType, │ │ │ │ │ -2*order_+2 ); │ │ │ │ │ -310 │ │ │ │ │ -311 const unsigned int quadratureSize = faceQuad.size(); │ │ │ │ │ -312 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ -313 { │ │ │ │ │ -314 if (dimension>1) │ │ │ │ │ -315 builder_._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->template evaluate<0>(faceQuad[qi].position │ │ │ │ │ -(),testBasisVal); │ │ │ │ │ -316 else │ │ │ │ │ -317 testBasisVal[0] = 1.; │ │ │ │ │ -318 fillBnd( row, testBasisVal, │ │ │ │ │ -319 func.evaluate( geometry.global( faceQuad[qi].position() ) ), │ │ │ │ │ -320 builder_._n_o_r_m_a_l(f), faceQuad[qi].weight(), │ │ │ │ │ -321 func); │ │ │ │ │ -322 } │ │ │ │ │ -323 │ │ │ │ │ -324 row += builder_._t_e_s_t_F_a_c_e_B_a_s_i_s(f)->_s_i_z_e(); │ │ │ │ │ -325 } │ │ │ │ │ -326 // element dofs │ │ │ │ │ -327 if (builder_._t_e_s_t_B_a_s_i_s()) │ │ │ │ │ -328 { │ │ │ │ │ -329 testBasisVal.resize(builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e()); │ │ │ │ │ -330 │ │ │ │ │ -331 typedef Dune::QuadratureRule Quadrature; │ │ │ │ │ -332 typedef Dune::QuadratureRules QuadratureRules; │ │ │ │ │ -333 const Quadrature &elemQuad = QuadratureRules::rule( geoType, 2*order_+1 ); │ │ │ │ │ -334 │ │ │ │ │ -335 const unsigned int quadratureSize = elemQuad.size(); │ │ │ │ │ -336 for( unsigned int qi = 0; qi < quadratureSize; ++qi ) │ │ │ │ │ -337 { │ │ │ │ │ -338 builder_._t_e_s_t_B_a_s_i_s()->template evaluate<0>(elemQuad[qi].position │ │ │ │ │ -(),testBasisVal); │ │ │ │ │ -339 fillInterior( row, testBasisVal, │ │ │ │ │ -340 func.evaluate(elemQuad[qi].position()), │ │ │ │ │ -341 elemQuad[qi].weight(), │ │ │ │ │ -342 func ); │ │ │ │ │ -343 } │ │ │ │ │ -344 │ │ │ │ │ -345 row += builder_._t_e_s_t_B_a_s_i_s()->_s_i_z_e()*dimension; │ │ │ │ │ -346 } │ │ │ │ │ -347 assert(row==_s_i_z_e()); │ │ │ │ │ -348 } │ │ │ │ │ -349 │ │ │ │ │ -350 private: │ │ │ │ │ -360 template │ │ │ │ │ -361 void fillBnd (unsigned int startRow, │ │ │ │ │ -362 const MVal &mVal, │ │ │ │ │ -363 const RTVal &rtVal, │ │ │ │ │ -364 const FieldVector &normal, │ │ │ │ │ -365 const _F_i_e_l_d &weight, │ │ │ │ │ -366 Matrix &matrix) const │ │ │ │ │ -367 { │ │ │ │ │ -368 const unsigned int endRow = startRow+mVal.size(); │ │ │ │ │ -369 typename RTVal::const_iterator rtiter = rtVal.begin(); │ │ │ │ │ -370 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col) │ │ │ │ │ -371 { │ │ │ │ │ -372 _F_i_e_l_d cFactor = (*rtiter)*normal; │ │ │ │ │ -373 typename MVal::const_iterator miter = mVal.begin(); │ │ │ │ │ -374 for (unsigned int row = startRow; │ │ │ │ │ -375 row!=endRow; ++miter, ++row ) │ │ │ │ │ -376 { │ │ │ │ │ -377 matrix.add(row,col, (weight*cFactor)*(*miter) ); │ │ │ │ │ -378 } │ │ │ │ │ -379 assert( miter == mVal.end() ); │ │ │ │ │ -380 } │ │ │ │ │ -381 } │ │ │ │ │ -390 template │ │ │ │ │ -391 void fillInterior (unsigned int startRow, │ │ │ │ │ -392 const MVal &mVal, │ │ │ │ │ -393 const RTVal &rtVal, │ │ │ │ │ -394 _F_i_e_l_d weight, │ │ │ │ │ -395 Matrix &matrix) const │ │ │ │ │ -396 { │ │ │ │ │ -397 const unsigned int endRow = startRow+mVal.size()*dimension; │ │ │ │ │ -398 typename RTVal::const_iterator rtiter = rtVal.begin(); │ │ │ │ │ -399 for ( unsigned int col = 0; col < rtVal.size() ; ++rtiter,++col) │ │ │ │ │ -400 { │ │ │ │ │ -401 typename MVal::const_iterator miter = mVal.begin(); │ │ │ │ │ -402 for (unsigned int row = startRow; │ │ │ │ │ -403 row!=endRow; ++miter,row+=dimension ) │ │ │ │ │ -404 { │ │ │ │ │ -405 for (unsigned int i=0; i │ │ │ │ │ -_4_2_0 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -421 { │ │ │ │ │ -_4_2_2 typedef _R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_<_d_i_m_,_F_i_e_l_d_> _B_u_i_l_d_e_r; │ │ │ │ │ -_4_2_3 typedef const _R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_<_d_i_m_,_F_i_e_l_d_> _O_b_j_e_c_t; │ │ │ │ │ -_4_2_4 typedef std::size_t _K_e_y; │ │ │ │ │ -_4_2_5 typedef typename std::remove_const::type _N_o_n_C_o_n_s_t_O_b_j_e_c_t; │ │ │ │ │ -426 │ │ │ │ │ -427 template │ │ │ │ │ -_4_2_8 static _O_b_j_e_c_t *_c_r_e_a_t_e( const _K_e_y &key ) │ │ │ │ │ -429 { │ │ │ │ │ -430 if ( !supports(key) ) │ │ │ │ │ -431 return 0; │ │ │ │ │ -432 _N_o_n_C_o_n_s_t_O_b_j_e_c_t *interpol = new _N_o_n_C_o_n_s_t_O_b_j_e_c_t(); │ │ │ │ │ -433 interpol->template build(key); │ │ │ │ │ -434 return interpol; │ │ │ │ │ -435 } │ │ │ │ │ -436 template< GeometryType::Id geometryId > │ │ │ │ │ -_4_3_7 static bool _s_u_p_p_o_r_t_s ( const _K_e_y &key ) │ │ │ │ │ -438 { │ │ │ │ │ -439 return GeometryType(geometryId).isSimplex(); │ │ │ │ │ -440 } │ │ │ │ │ -_4_4_1 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -442 }; │ │ │ │ │ -443 │ │ │ │ │ -444} // namespace Dune │ │ │ │ │ -445 │ │ │ │ │ -446#endif // #ifndef │ │ │ │ │ -DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMASSIMPLEX_RAVIARTTHOMASSIMPLEXINTERPOLATION_HH │ │ │ │ │ -_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_i_n_t_e_r_p_o_l_a_t_i_o_n_h_e_l_p_e_r_._h_h │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +_2_2 class _R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +23 { │ │ │ │ │ +24 │ │ │ │ │ +25 public: │ │ │ │ │ +_2_7 _R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(8) │ │ │ │ │ +28 { │ │ │ │ │ +29 for (std::size_t i = 0; i < 3; i++) │ │ │ │ │ +30 { │ │ │ │ │ +31 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 li[3 + i] = _L_o_c_a_l_K_e_y(i,1,1); │ │ │ │ │ +33 } │ │ │ │ │ +34 │ │ │ │ │ +35 // last two DOF are associated with the cell (codim = 0) │ │ │ │ │ +36 li[6] = _L_o_c_a_l_K_e_y(0,0,0); │ │ │ │ │ +37 li[7] = _L_o_c_a_l_K_e_y(0,0,1); │ │ │ │ │ +38 } │ │ │ │ │ +39 │ │ │ │ │ +_4_1 std::size_t _s_i_z_e () const │ │ │ │ │ +42 { │ │ │ │ │ +43 return 8; │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +_4_7 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +48 { │ │ │ │ │ +49 return li[i]; │ │ │ │ │ +50 } │ │ │ │ │ +51 │ │ │ │ │ +52 private: │ │ │ │ │ +53 std::vector li; │ │ │ │ │ +54 }; │ │ │ │ │ +55} │ │ │ │ │ +56#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS12DLOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:38 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r │ │ │ │ │ -LocalCoefficientsContainer(const Setter &setter) │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(const unsigned int i) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_C_o_n_t_a_i_n_e_r_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on the reference triangle. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalcoefficients.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT12DLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalcoefficients.hh:27 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalcoefficients.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_R_T_1_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn nedelecsimplexinterpolation.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn orthonormalbasis.hh:57 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:421 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_N_o_n_C_o_n_s_t_O_b_j_e_c_t │ │ │ │ │ -std::remove_const< Object >::type NonConstObject │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:425 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:441 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:437 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:428 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_B_u_i_l_d_e_r │ │ │ │ │ -RTL2InterpolationBuilder< dim, Field > Builder │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:422 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const RaviartThomasL2Interpolation< dim, Field > Object │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:423 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:424 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:70 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:71 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:91 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_s_u_p_p_o_r_t_s │ │ │ │ │ -static bool supports(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:87 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const LocalCoefficientsContainer Object │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:72 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_C_o_e_f_f_i_c_i_e_n_t_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &key) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:75 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:107 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_B_a_s_i_s │ │ │ │ │ -TestBasis * testBasis() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:141 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_N_o_r_m_a_l │ │ │ │ │ -FieldVector< Field, dimension > Normal │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:119 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s │ │ │ │ │ -TestBasisFactory::Object TestBasis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:112 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ -TestFaceBasisFactory::Object TestFaceBasis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:116 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_f_a_c_e_S_i_z_e │ │ │ │ │ -unsigned int faceSize() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_b_u_i_l_d │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:150 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -RTL2InterpolationBuilder()=default │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_e_s_t_F_a_c_e_B_a_s_i_s │ │ │ │ │ -TestFaceBasis * testFaceBasis(unsigned int f) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:144 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_t_y_p_e │ │ │ │ │ -GeometryType type() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:133 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_n_o_r_m_a_l │ │ │ │ │ -const Normal & normal(unsigned int f) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:147 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -RTL2InterpolationBuilder(const RTL2InterpolationBuilder &)=delete │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_F_a_c_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -OrthonormalBasisFactory< dimension-1, Field > TestFaceBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -RTL2InterpolationBuilder(RTL2InterpolationBuilder &&)=delete │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_T_e_s_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -OrthonormalBasisFactory< dimension, Field > TestBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:111 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:135 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_d_i_m_e_n_s_i_o_n │ │ │ │ │ -static const unsigned int dimension │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:108 │ │ │ │ │ -_D_u_n_e_:_:_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r_:_:_~_R_T_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_B_u_i_l_d_e_r │ │ │ │ │ -~RTL2InterpolationBuilder() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:126 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -An L2-based interpolation for Raviart Thomas. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:213 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_o_r_d_e_r │ │ │ │ │ -std::size_t order() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:244 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RaviartThomasL2Interpolation() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:220 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(typename Base::template Helper< Func, Container, type > &func) │ │ │ │ │ -const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:283 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -auto interpolate(const Basis &basis, Matrix &matrix) const -> std::enable_if_t< │ │ │ │ │ -std::is_same< decltype(std::declval< Matrix >().rowPtr(0)), typename Matrix:: │ │ │ │ │ -Field * >::value, void > │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:235 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_B_u_i_l_d_e_r │ │ │ │ │ -RTL2InterpolationBuilder< dimension, Field > Builder │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:219 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_F_i_e_l_d │ │ │ │ │ -F Field │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:218 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_b_u_i_l_d │ │ │ │ │ -void build(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:253 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -auto interpolate(const Function &function, Vector &coefficients) const -> std:: │ │ │ │ │ -enable_if_t< std::is_same< decltype(std::declval< Vector >().resize(1)), void │ │ │ │ │ ->::value, void > │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:226 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:248 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_L_2_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_s_e_t_L_o_c_a_l_K_e_y_s │ │ │ │ │ -void setLocalKeys(std::vector< LocalKey > &keys) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexinterpolation.hh:265 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_I_n_t_e_r_p_o_l_a_t_i_o_n_H_e_l_p_e_r_:_:_H_e_l_p_e_r │ │ │ │ │ -DDeeffiinniittiioonn interpolationhelper.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:65 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:113 │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas12dlocalcoefficients.hh:41 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube3d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexbasis.hh File Reference
│ │ │ │ +
raviartthomas0cube3d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <dune/common/exceptions.hh>
│ │ │ │ -#include <dune/localfunctions/utility/defaultbasisfactory.hh>
│ │ │ │ -#include "raviartthomassimplexinterpolation.hh"
│ │ │ │ -#include "raviartthomassimplexprebasis.hh"
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "raviartthomas0cube3d/raviartthomas0cube3dall.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::RaviartThomasBasisFactory< dim, SF, CF >
class  Dune::RT0Cube3DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on cubes. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomassimplexbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ +raviartthomas0cube3d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  _Z_e_r_o order Raviart-Thomas shape functions on cubes. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00320_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube3d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,72 +70,119 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexbasis.hh
│ │ │ │ +
raviartthomas0cube3d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <dune/common/exceptions.hh>
│ │ │ │ -
10
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 /*
│ │ │ │ -
18 * `RTPreBasisFactory` provides a basis for the Raviart-Thomas function space.
│ │ │ │ -
19 * `RaviartThomasL2InterpolationFactory` provides the linear functionals.
│ │ │ │ -
20 *
│ │ │ │ -
21 * `Defaultbasisfactory::create` first builds the function space and the linear functionals.
│ │ │ │ -
22 * Then the constructor of `BasisMatrix` gets called. There the matrix
│ │ │ │ -
23 *
│ │ │ │ -
24 * \begin{equation}
│ │ │ │ -
25 * A_{i,j} := N_j(\phi_i)
│ │ │ │ -
26 * \end{equation}
│ │ │ │ -
27 *
│ │ │ │ -
28 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled.
│ │ │ │ -
29 * Then the matrix gets inverted and is then used as a coefficent matrix for the standard monomial basis.
│ │ │ │ -
30 *
│ │ │ │ -
31 * For more details on the theory see the first chapter "Construction of Local Finite Element Spaces Using the Generic Reference Elements"
│ │ │ │ -
32 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published in 2012.
│ │ │ │ -
33 */
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
23 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 {}
│ │ │ │ +
│ │ │ │
34
│ │ │ │ -
35 template< unsigned int dim, class SF, class CF >
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
37 : public DefaultBasisFactory< RTPreBasisFactory<dim,CF>,
│ │ │ │ -
38 RaviartThomasL2InterpolationFactory<dim,CF>,
│ │ │ │ -
39 dim,dim,SF,CF >
│ │ │ │ -
40 {};
│ │ │ │ -
│ │ │ │ -
41}
│ │ │ │ -
42
│ │ │ │ -
43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 basis(s),
│ │ │ │ +
37 interpolation(s)
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
41 {
│ │ │ │ +
42 return basis;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
46 {
│ │ │ │ +
47 return coefficients;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ +
52 return interpolation;
│ │ │ │ +
53 }
│ │ │ │ +
│ │ │ │ +
54
│ │ │ │ +
│ │ │ │ +
56 unsigned int size () const
│ │ │ │ +
57 {
│ │ │ │ +
58 return basis.size();
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 static constexpr GeometryType type ()
│ │ │ │ +
62 {
│ │ │ │ +
63 return GeometryTypes::hexahedron;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
66 private:
│ │ │ │ + │ │ │ │ +
68 RT0Cube3DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71}
│ │ │ │ +
72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition raviartthomassimplexbasis.hh:40
│ │ │ │ -
Definition defaultbasisfactory.hh:38
│ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Zero order Raviart-Thomas shape functions on cubes.
Definition raviartthomas0cube3d.hh:25
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas0cube3d.hh:61
│ │ │ │ +
RT0Cube3DLocalFiniteElement(int s)
Definition raviartthomas0cube3d.hh:35
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0cube3d.hh:56
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0cube3d.hh:40
│ │ │ │ +
RT0Cube3DLocalFiniteElement()
Definition raviartthomas0cube3d.hh:32
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0cube3d.hh:50
│ │ │ │ +
LocalFiniteElementTraits< RT0Cube3DLocalBasis< D, R >, RT0Cube3DLocalCoefficients, RT0Cube3DLocalInterpolation< RT0Cube3DLocalBasis< D, R > > > Traits
Definition raviartthomas0cube3d.hh:30
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0cube3d.hh:45
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:30
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference hexahedron.
Definition raviartthomas0cube3dall.hh:157
│ │ │ │ +
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube3dall.hh:215
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,70 +1,130 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ -raviartthomassimplexbasis.hh │ │ │ │ │ +raviartthomas0cube3d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ -6#define DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10 │ │ │ │ │ -11#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h> │ │ │ │ │ -12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h" │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 /* │ │ │ │ │ -18 * `RTPreBasisFactory` provides a basis for the Raviart-Thomas function │ │ │ │ │ -space. │ │ │ │ │ -19 * `RaviartThomasL2InterpolationFactory` provides the linear functionals. │ │ │ │ │ -20 * │ │ │ │ │ -21 * `Defaultbasisfactory::create` first builds the function space and the │ │ │ │ │ -linear functionals. │ │ │ │ │ -22 * Then the constructor of `BasisMatrix` gets called. There the matrix │ │ │ │ │ -23 * │ │ │ │ │ -24 * \begin{equation} │ │ │ │ │ -25 * A_{i,j} := N_j(\phi_i) │ │ │ │ │ -26 * \end{equation} │ │ │ │ │ -27 * │ │ │ │ │ -28 * with linear functionals $N_j$ and basisfunctions $\phi_i$ gets assembled. │ │ │ │ │ -29 * Then the matrix gets inverted and is then used as a coefficent matrix for │ │ │ │ │ -the standard monomial basis. │ │ │ │ │ -30 * │ │ │ │ │ -31 * For more details on the theory see the first chapter "Construction of │ │ │ │ │ -Local Finite Element Spaces Using the Generic Reference Elements" │ │ │ │ │ -32 * of the book "Advances in Dune" by Dedner, Flemisch and Klöfkorn published │ │ │ │ │ -in 2012. │ │ │ │ │ -33 */ │ │ │ │ │ +8#include │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +23 template │ │ │ │ │ +_2_4 class _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +25 { │ │ │ │ │ +26 public: │ │ │ │ │ +27 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +28 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +29 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_0 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +31 │ │ │ │ │ +_3_2 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +33 {} │ │ │ │ │ 34 │ │ │ │ │ -35 template< unsigned int dim, class SF, class CF > │ │ │ │ │ -_3_6 struct _R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -37 : public _D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y< RTPreBasisFactory, │ │ │ │ │ -38 RaviartThomasL2InterpolationFactory, │ │ │ │ │ -39 dim,dim,SF,CF > │ │ │ │ │ -40 {}; │ │ │ │ │ -41} │ │ │ │ │ -42 │ │ │ │ │ -43#endif // #ifndef DUNE_RAVIARTTHOMASBASIS_HH │ │ │ │ │ -_d_e_f_a_u_l_t_b_a_s_i_s_f_a_c_t_o_r_y_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_p_r_e_b_a_s_i_s_._h_h │ │ │ │ │ +_3_5 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +36 basis(s), │ │ │ │ │ +37 interpolation(s) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +41 { │ │ │ │ │ +42 return basis; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +46 { │ │ │ │ │ +47 return coefficients; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return interpolation; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_6 unsigned int _s_i_z_e () const │ │ │ │ │ +57 { │ │ │ │ │ +58 return basis.size(); │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +_6_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +62 { │ │ │ │ │ +63 return GeometryTypes::hexahedron; │ │ │ │ │ +64 } │ │ │ │ │ +65 │ │ │ │ │ +66 private: │ │ │ │ │ +67 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +68 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +69 _R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +70 }; │ │ │ │ │ +71} │ │ │ │ │ +72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE3D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_3_d_a_l_l_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexbasis.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_D_e_f_a_u_l_t_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn defaultbasisfactory.hh:38 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on cubes. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0Cube3DLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0Cube3DLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT0Cube3DLocalBasis< D, R >, │ │ │ │ │ +RT0Cube3DLocalCoefficients, RT0Cube3DLocalInterpolation< RT0Cube3DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3d.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference hexahedron. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:157 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube3dall.hh:215 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexprebasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,38 +65,34 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplexprebasis.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalcoefficients.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <fstream>
│ │ │ │ -#include <utility>
│ │ │ │ -#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/utility/polynomialbasis.hh>
│ │ │ │ +
#include <cstddef>
│ │ │ │ +#include <vector>
│ │ │ │ +#include "../../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  Dune::RTPreBasisFactory< dim, Field >
 
struct  Dune::RTPreBasisFactory< dim, Field >::EvaluationBasisFactory< dd, FF >
 
struct  Dune::RTVecMatrix< geometryId, Field >
class  Dune::RT0PrismLocalCoefficients
 Layout map for Raviart-Thomas-1 elements on prisms. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,28 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomassimplexprebasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas0prismlocalcoefficients.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -struct   _D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_i_m_,_ _F_i_e_l_d_ _>_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_<_ _d_d_,_ _F_F │ │ │ │ │ - _> │ │ │ │ │ -  │ │ │ │ │ -struct   _D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_<_ _g_e_o_m_e_t_r_y_I_d_,_ _F_i_e_l_d_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  Layout map for Raviart-Thomas-1 elements on prisms. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00323_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplexprebasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalcoefficients.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,283 +70,75 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplexprebasis.hh
│ │ │ │ +
raviartthomas0prismlocalcoefficients.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ -
6#define DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │
7
│ │ │ │ -
8#include <fstream>
│ │ │ │ -
9#include <utility>
│ │ │ │ +
8#include <cstddef>
│ │ │ │ +
9#include <vector>
│ │ │ │
10
│ │ │ │ -
11#include <dune/geometry/type.hh>
│ │ │ │ +
11#include "../../common/localkey.hh"
│ │ │ │
12
│ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17 template < GeometryType::Id geometryId, class Field >
│ │ │ │ -
18 struct RTVecMatrix;
│ │ │ │ -
19
│ │ │ │ -
20 template <unsigned int dim, class Field>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
22 {
│ │ │ │ - │ │ │ │ -
24 typedef typename MBasisFactory::Object MBasis;
│ │ │ │ - │ │ │ │ - │ │ │ │ -
27
│ │ │ │ -
28 typedef const Basis Object;
│ │ │ │ -
29 typedef std::size_t Key;
│ │ │ │ -
30
│ │ │ │ -
31 template <unsigned int dd, class FF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
33 {
│ │ │ │ - │ │ │ │ -
35 };
│ │ │ │ -
│ │ │ │ -
36 template< GeometryType::Id geometryId >
│ │ │ │ -
│ │ │ │ -
37 static Object *create ( const Key &order )
│ │ │ │ -
38 {
│ │ │ │ -
39 RTVecMatrix<geometryId,Field> vecMatrix(order);
│ │ │ │ -
40 MBasis *mbasis = MBasisFactory::template create<geometryId>(order+1);
│ │ │ │ -
41 typename std::remove_const<Object>::type *tmBasis = new typename std::remove_const<Object>::type(*mbasis);
│ │ │ │ -
42 tmBasis->fill(vecMatrix);
│ │ │ │ -
43 return tmBasis;
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
15
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
29 {
│ │ │ │ +
30 for(int i=0; i< size(); i++)
│ │ │ │ +
31 li[i] = LocalKey(i,1,0);
│ │ │ │ +
32 }
│ │ │ │ +
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
35 std::size_t size () const
│ │ │ │ +
36 {
│ │ │ │ +
37 return 5;
│ │ │ │ +
38 }
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
41 const LocalKey& localKey (std::size_t i) const
│ │ │ │ +
42 {
│ │ │ │ +
43 return li[i];
│ │ │ │
44 }
│ │ │ │
│ │ │ │ -
45 static void release( Object *object ) { delete object; }
│ │ │ │ -
46 };
│ │ │ │ +
45
│ │ │ │ +
46 private:
│ │ │ │ +
47 std::vector<LocalKey> li;
│ │ │ │ +
48 };
│ │ │ │
│ │ │ │ -
47
│ │ │ │ -
48 template <GeometryType::Id geometryId, class Field>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
50 {
│ │ │ │ -
51 static constexpr GeometryType geometry = geometryId;
│ │ │ │ -
52 static const unsigned int dim = geometry.dim();
│ │ │ │ - │ │ │ │ - │ │ │ │ -
│ │ │ │ -
55 RTVecMatrix(std::size_t order)
│ │ │ │ -
56 {
│ │ │ │ -
57 /*
│ │ │ │ -
58 * Construction of Raviart-Thomas elements in high dimensions see "Mixed Finite Elements in \R^3" by Nedelec, 1980.
│ │ │ │ -
59 *
│ │ │ │ -
60 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree $\leq k$.
│ │ │ │ -
61 * The space of Raviart-Thomas functions in $n$ dimensions with index $k$ is defined as
│ │ │ │ -
62 *
│ │ │ │ -
63 * \begin{equation*}
│ │ │ │ -
64 * RT_k := (\P_{k-1})^n \oplus \widetilde \P_k x
│ │ │ │ -
65 * \end{equation*}
│ │ │ │ -
66 * with $x=(x_1,x_2,\dots, x_n)$ in $n$ dimensions and $\widetilde \P_k$ the homogeneous polynomials of degree $k$.
│ │ │ │ -
67 *
│ │ │ │ -
68 * For $RT_k$ holds
│ │ │ │ -
69 * \begin{equation*}
│ │ │ │ -
70 * (\P_{k-1})^n \subset RT_k \subset (\P_k)^n.
│ │ │ │ -
71 * \end{equation*}
│ │ │ │ -
72 *
│ │ │ │ -
73 * We construct $(\P_k)^n$ and and only use the monomials contained in $RT_k$.
│ │ │ │ -
74 *
│ │ │ │ -
75 */
│ │ │ │ -
76
│ │ │ │ -
77 MIBasis basis(order+1);
│ │ │ │ -
78 FieldVector< MI, dim > x;
│ │ │ │ -
79 /*
│ │ │ │ -
80 * Init MultiIndices
│ │ │ │ -
81 * x[0]=(1,0,0) x
│ │ │ │ -
82 * x[1]=(0,1,0) y
│ │ │ │ -
83 * x[2]=(0,0,1) z
│ │ │ │ -
84 */
│ │ │ │ -
85 for( unsigned int i = 0; i < dim; ++i )
│ │ │ │ -
86 x[ i ].set( i, 1 );
│ │ │ │ -
87 std::vector< MI > val( basis.size() );
│ │ │ │ -
88
│ │ │ │ -
89 // val now contains all monomials in $n$ dimensions with degree $\leq order+1$
│ │ │ │ -
90 basis.evaluate( x, val );
│ │ │ │ -
91
│ │ │ │ -
92 col_ = basis.size();
│ │ │ │ -
93
│ │ │ │ -
94 // get $\dim (\P_{order-1})$
│ │ │ │ -
95 unsigned int notHomogen = 0;
│ │ │ │ -
96 if (order>0)
│ │ │ │ -
97 notHomogen = basis.sizes()[order-1];
│ │ │ │ -
98
│ │ │ │ -
99 // get $\dim \widetilde (\P_order)$
│ │ │ │ -
100 unsigned int homogen = basis.sizes()[order]-notHomogen;
│ │ │ │ -
101
│ │ │ │ -
102 /*
│ │ │ │ -
103 *
│ │ │ │ -
104 * The set $RT_k$ is defined as
│ │ │ │ -
105 *
│ │ │ │ -
106 * \begin{equation}
│ │ │ │ -
107 * RT_k := (\P_k)^dim + \widetilde \P_k x with x\in \R^n.
│ │ │ │ -
108 * \end{equation}
│ │ │ │ -
109 *
│ │ │ │ -
110 * The space $\P_k$ is split in $\P_k = \P_{k-1} + \widetilde \P_k$.
│ │ │ │ -
111 *
│ │ │ │ -
112 * \begin{align}
│ │ │ │ -
113 * RT_k &= (\P_{k-1} + \widetilde \P_k)^dim + \widetilde \P_k x with x\in \R^n
│ │ │ │ -
114 * &= (\P_{k-1})^n + (\widetilde \P_k)^n + \widetilde \P_k x with x\in \R^n
│ │ │ │ -
115 * \end{align}
│ │ │ │ -
116 *
│ │ │ │ -
117 * Thus $\dim RT_k = n * \dim \P_{k-1} + (n+1)*\dim (\widetilde \P_k)$
│ │ │ │ -
118 */
│ │ │ │ -
119
│ │ │ │ -
120 // row_ = \dim RT_k *dim
│ │ │ │ -
121 row_ = (notHomogen*dim+homogen*(dim+1))*dim;
│ │ │ │ -
122 mat_ = new Field*[row_];
│ │ │ │ -
123 int row = 0;
│ │ │ │ -
124
│ │ │ │ -
125 /* Assign the correct values for the nonhomogeneous polymonials $p\in (\P_{oder-1})^dim$
│ │ │ │ -
126 * A basis function is represented by $dim$ rows.
│ │ │ │ -
127 */
│ │ │ │ -
128 for (unsigned int i=0; i<notHomogen+homogen; ++i)
│ │ │ │ -
129 {
│ │ │ │ -
130 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ -
131 {
│ │ │ │ -
132 for (unsigned int rr=0; rr<dim; ++rr)
│ │ │ │ -
133 {
│ │ │ │ -
134 // init row to zero
│ │ │ │ -
135 mat_[row] = new Field[col_];
│ │ │ │ -
136 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ -
137 {
│ │ │ │ -
138 mat_[row][j] = 0.;
│ │ │ │ -
139 }
│ │ │ │ -
140 if (r==rr)
│ │ │ │ -
141 mat_[row][i] = 1.;
│ │ │ │ -
142 ++row;
│ │ │ │ -
143 }
│ │ │ │ -
144 }
│ │ │ │ -
145 }
│ │ │ │ -
146
│ │ │ │ -
147 /* Assign the correct values for the homogeneous polymonials $p\in RT_k \backslash (\P_{oder-1})^dim$
│ │ │ │ -
148 * A basis function is represented by $dim$ rows.
│ │ │ │ -
149 */
│ │ │ │ -
150 for (unsigned int i=0; i<homogen; ++i)
│ │ │ │ -
151 {
│ │ │ │ -
152 for (unsigned int r=0; r<dim; ++r)
│ │ │ │ -
153 {
│ │ │ │ -
154 // init rows to zero
│ │ │ │ -
155 mat_[row] = new Field[col_];
│ │ │ │ -
156 for (unsigned int j=0; j<col_; ++j)
│ │ │ │ -
157 {
│ │ │ │ -
158 mat_[row][j] = 0.;
│ │ │ │ -
159 }
│ │ │ │ -
160
│ │ │ │ -
161 unsigned int w;
│ │ │ │ -
162 // get a monomial $ p \in \widetilde \P_{order}$
│ │ │ │ -
163 MI xval = val[notHomogen+i];
│ │ │ │ -
164 xval *= x[r];
│ │ │ │ -
165 for (w=homogen+notHomogen; w<val.size(); ++w)
│ │ │ │ -
166 {
│ │ │ │ -
167 if (val[w] == xval)
│ │ │ │ -
168 {
│ │ │ │ -
169 mat_[row][w] = 1.;
│ │ │ │ -
170 break;
│ │ │ │ -
171 }
│ │ │ │ -
172 }
│ │ │ │ -
173 assert(w<val.size());
│ │ │ │ -
174 ++row;
│ │ │ │ -
175 }
│ │ │ │ -
176 }
│ │ │ │ -
177 }
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
180 {
│ │ │ │ -
181 for (unsigned int i=0; i<rows(); ++i) {
│ │ │ │ -
182 delete [] mat_[i];
│ │ │ │ -
183 }
│ │ │ │ -
184 delete [] mat_;
│ │ │ │ -
185 }
│ │ │ │ -
│ │ │ │ -
186
│ │ │ │ -
│ │ │ │ -
187 unsigned int cols() const {
│ │ │ │ -
188 return col_;
│ │ │ │ -
189 }
│ │ │ │ -
│ │ │ │ -
190
│ │ │ │ -
│ │ │ │ -
191 unsigned int rows() const {
│ │ │ │ -
192 return row_;
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
195 template <class Vector>
│ │ │ │ -
│ │ │ │ -
196 void row( const unsigned int row, Vector &vec ) const
│ │ │ │ -
197 {
│ │ │ │ -
198 const unsigned int N = cols();
│ │ │ │ -
199 assert( vec.size() == N );
│ │ │ │ -
200 for (unsigned int i=0; i<N; ++i)
│ │ │ │ -
201 field_cast(mat_[row][i],vec[i]);
│ │ │ │ -
202 }
│ │ │ │ -
│ │ │ │ -
203 unsigned int row_,col_;
│ │ │ │ -
204 Field **mat_;
│ │ │ │ -
205 };
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207
│ │ │ │ -
208}
│ │ │ │ -
209#endif // DUNE_RAVIARTTHOMASPREBASIS_HH
│ │ │ │ - │ │ │ │ +
49}
│ │ │ │ +
50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
void field_cast(const F1 &f1, F2 &f2)
a helper class to cast from one field to another
Definition field.hh:159
│ │ │ │ -
Definition raviartthomassimplexprebasis.hh:50
│ │ │ │ -
static const unsigned int dim
Definition raviartthomassimplexprebasis.hh:52
│ │ │ │ -
~RTVecMatrix()
Definition raviartthomassimplexprebasis.hh:179
│ │ │ │ -
Field ** mat_
Definition raviartthomassimplexprebasis.hh:204
│ │ │ │ -
RTVecMatrix(std::size_t order)
Definition raviartthomassimplexprebasis.hh:55
│ │ │ │ -
unsigned int cols() const
Definition raviartthomassimplexprebasis.hh:187
│ │ │ │ -
unsigned int row_
Definition raviartthomassimplexprebasis.hh:203
│ │ │ │ -
MultiIndex< dim, Field > MI
Definition raviartthomassimplexprebasis.hh:53
│ │ │ │ -
void row(const unsigned int row, Vector &vec) const
Definition raviartthomassimplexprebasis.hh:196
│ │ │ │ -
MonomialBasis< geometryId, MI > MIBasis
Definition raviartthomassimplexprebasis.hh:54
│ │ │ │ -
static constexpr GeometryType geometry
Definition raviartthomassimplexprebasis.hh:51
│ │ │ │ -
unsigned int rows() const
Definition raviartthomassimplexprebasis.hh:191
│ │ │ │ -
unsigned int col_
Definition raviartthomassimplexprebasis.hh:203
│ │ │ │ -
Definition raviartthomassimplexprebasis.hh:22
│ │ │ │ -
const Basis Object
Definition raviartthomassimplexprebasis.hh:28
│ │ │ │ -
MonomialBasisProvider< dim, Field > MBasisFactory
Definition raviartthomassimplexprebasis.hh:23
│ │ │ │ -
PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis
Definition raviartthomassimplexprebasis.hh:26
│ │ │ │ -
MBasisFactory::Object MBasis
Definition raviartthomassimplexprebasis.hh:24
│ │ │ │ -
std::size_t Key
Definition raviartthomassimplexprebasis.hh:29
│ │ │ │ -
static void release(Object *object)
Definition raviartthomassimplexprebasis.hh:45
│ │ │ │ -
StandardEvaluator< MBasis > EvalMBasis
Definition raviartthomassimplexprebasis.hh:25
│ │ │ │ -
static Object * create(const Key &order)
Definition raviartthomassimplexprebasis.hh:37
│ │ │ │ -
Definition raviartthomassimplexprebasis.hh:33
│ │ │ │ -
MonomialBasisProvider< dd, FF > Type
Definition raviartthomassimplexprebasis.hh:34
│ │ │ │ -
Definition basisevaluator.hh:131
│ │ │ │ -
Definition monomialbasis.hh:440
│ │ │ │ -
unsigned int size() const
Definition monomialbasis.hh:476
│ │ │ │ -
void evaluate(const unsigned int deriv, const DomainVector &x, Field *const values) const
Definition monomialbasis.hh:498
│ │ │ │ -
const unsigned int * sizes(unsigned int order) const
Definition monomialbasis.hh:465
│ │ │ │ -
Definition monomialbasis.hh:780
│ │ │ │ -
Definition multiindex.hh:37
│ │ │ │ -
Definition polynomialbasis.hh:348
│ │ │ │ +
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ +
Layout map for Raviart-Thomas-1 elements on prisms.
Definition raviartthomas0prismlocalcoefficients.hh:24
│ │ │ │ +
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas0prismlocalcoefficients.hh:41
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition raviartthomas0prismlocalcoefficients.hh:35
│ │ │ │ +
RT0PrismLocalCoefficients()
Standard constructor.
Definition raviartthomas0prismlocalcoefficients.hh:28
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,329 +1,73 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x │ │ │ │ │ -raviartthomassimplexprebasis.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ +raviartthomas0prismlocalcoefficients.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ -6#define DUNE_RAVIARTTHOMASPREBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ 10 │ │ │ │ │ -11#include │ │ │ │ │ +11#include "../../common/localkey.hh" │ │ │ │ │ 12 │ │ │ │ │ -13#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_p_o_l_y_n_o_m_i_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 template < GeometryType::Id geometryId, class Field > │ │ │ │ │ -18 struct RTVecMatrix; │ │ │ │ │ -19 │ │ │ │ │ -20 template │ │ │ │ │ -_2_1 struct _R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -22 { │ │ │ │ │ -_2_3 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_i_m_,_F_i_e_l_d_> _M_B_a_s_i_s_F_a_c_t_o_r_y; │ │ │ │ │ -_2_4 typedef typename MBasisFactory::Object _M_B_a_s_i_s; │ │ │ │ │ -_2_5 typedef _S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r_<_M_B_a_s_i_s_> _E_v_a_l_M_B_a_s_i_s; │ │ │ │ │ -_2_6 typedef _P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x_<_E_v_a_l_M_B_a_s_i_s_,_S_p_a_r_s_e_C_o_e_f_f_M_a_t_r_i_x_<_F_i_e_l_d_,_d_i_m_> > │ │ │ │ │ -_B_a_s_i_s; │ │ │ │ │ -27 │ │ │ │ │ -_2_8 typedef const _B_a_s_i_s _O_b_j_e_c_t; │ │ │ │ │ -_2_9 typedef std::size_t _K_e_y; │ │ │ │ │ -30 │ │ │ │ │ -31 template │ │ │ │ │ -_3_2 struct _E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -33 { │ │ │ │ │ -_3_4 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r_<_d_d_,_F_F_> _T_y_p_e; │ │ │ │ │ -35 }; │ │ │ │ │ -36 template< GeometryType::Id geometryId > │ │ │ │ │ -_3_7 static _O_b_j_e_c_t *_c_r_e_a_t_e ( const _K_e_y &order ) │ │ │ │ │ -38 { │ │ │ │ │ -39 _R_T_V_e_c_M_a_t_r_i_x_<_g_e_o_m_e_t_r_y_I_d_,_F_i_e_l_d_> vecMatrix(order); │ │ │ │ │ -40 _M_B_a_s_i_s *mbasis = MBasisFactory::template create(order+1); │ │ │ │ │ -41 typename std::remove_const::type *tmBasis = new typename std:: │ │ │ │ │ -remove_const::type(*mbasis); │ │ │ │ │ -42 tmBasis->fill(vecMatrix); │ │ │ │ │ -43 return tmBasis; │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +15 │ │ │ │ │ +_2_3 class _R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +24 { │ │ │ │ │ +25 │ │ │ │ │ +26 public: │ │ │ │ │ +_2_8 _R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(_s_i_z_e()) │ │ │ │ │ +29 { │ │ │ │ │ +30 for(int i=0; i< _s_i_z_e(); i++) │ │ │ │ │ +31 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ +32 } │ │ │ │ │ +33 │ │ │ │ │ +_3_5 std::size_t _s_i_z_e () const │ │ │ │ │ +36 { │ │ │ │ │ +37 return 5; │ │ │ │ │ +38 } │ │ │ │ │ +39 │ │ │ │ │ +_4_1 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ +42 { │ │ │ │ │ +43 return li[i]; │ │ │ │ │ 44 } │ │ │ │ │ -_4_5 static void _r_e_l_e_a_s_e( _O_b_j_e_c_t *object ) { delete object; } │ │ │ │ │ -46 }; │ │ │ │ │ -47 │ │ │ │ │ -48 template │ │ │ │ │ -_4_9 struct _R_T_V_e_c_M_a_t_r_i_x │ │ │ │ │ -50 { │ │ │ │ │ -_5_1 static constexpr GeometryType _g_e_o_m_e_t_r_y = geometryId; │ │ │ │ │ -_5_2 static const unsigned int _d_i_m = _g_e_o_m_e_t_r_y._d_i_m(); │ │ │ │ │ -_5_3 typedef _M_u_l_t_i_I_n_d_e_x_<_d_i_m_,_F_i_e_l_d_> _M_I; │ │ │ │ │ -_5_4 typedef _M_o_n_o_m_i_a_l_B_a_s_i_s_<_g_e_o_m_e_t_r_y_I_d_,_M_I_> _M_I_B_a_s_i_s; │ │ │ │ │ -_5_5 _R_T_V_e_c_M_a_t_r_i_x(std::size_t order) │ │ │ │ │ -56 { │ │ │ │ │ -57 /* │ │ │ │ │ -58 * Construction of Raviart-Thomas elements in high dimensions see "Mixed │ │ │ │ │ -Finite Elements in \R^3" by Nedelec, 1980. │ │ │ │ │ -59 * │ │ │ │ │ -60 * Let $\P_{n,k}$ be the space of polynomials in $n$ variables with degree │ │ │ │ │ -$\leq k$. │ │ │ │ │ -61 * The space of Raviart-Thomas functions in $n$ dimensions with index $k$ is │ │ │ │ │ -defined as │ │ │ │ │ -62 * │ │ │ │ │ -63 * \begin{equation*} │ │ │ │ │ -64 * RT_k := (\P_{k-1})^n \oplus \widetilde \P_k x │ │ │ │ │ -65 * \end{equation*} │ │ │ │ │ -66 * with $x=(x_1,x_2,\dots, x_n)$ in $n$ dimensions and $\widetilde \P_k$ the │ │ │ │ │ -homogeneous polynomials of degree $k$. │ │ │ │ │ -67 * │ │ │ │ │ -68 * For $RT_k$ holds │ │ │ │ │ -69 * \begin{equation*} │ │ │ │ │ -70 * (\P_{k-1})^n \subset RT_k \subset (\P_k)^n. │ │ │ │ │ -71 * \end{equation*} │ │ │ │ │ -72 * │ │ │ │ │ -73 * We construct $(\P_k)^n$ and and only use the monomials contained in │ │ │ │ │ -$RT_k$. │ │ │ │ │ -74 * │ │ │ │ │ -75 */ │ │ │ │ │ -76 │ │ │ │ │ -77 _M_I_B_a_s_i_s basis(order+1); │ │ │ │ │ -78 FieldVector< MI, dim > x; │ │ │ │ │ -79 /* │ │ │ │ │ -80 * Init MultiIndices │ │ │ │ │ -81 * x[0]=(1,0,0) x │ │ │ │ │ -82 * x[1]=(0,1,0) y │ │ │ │ │ -83 * x[2]=(0,0,1) z │ │ │ │ │ -84 */ │ │ │ │ │ -85 for( unsigned int i = 0; i < _d_i_m; ++i ) │ │ │ │ │ -86 x[ i ].set( i, 1 ); │ │ │ │ │ -87 std::vector< MI > val( basis._s_i_z_e() ); │ │ │ │ │ -88 │ │ │ │ │ -89 // val now contains all monomials in $n$ dimensions with degree $\leq │ │ │ │ │ -order+1$ │ │ │ │ │ -90 basis._e_v_a_l_u_a_t_e( x, val ); │ │ │ │ │ -91 │ │ │ │ │ -92 _c_o_l__ = basis._s_i_z_e(); │ │ │ │ │ -93 │ │ │ │ │ -94 // get $\dim (\P_{order-1})$ │ │ │ │ │ -95 unsigned int notHomogen = 0; │ │ │ │ │ -96 if (order>0) │ │ │ │ │ -97 notHomogen = basis._s_i_z_e_s()[order-1]; │ │ │ │ │ -98 │ │ │ │ │ -99 // get $\dim \widetilde (\P_order)$ │ │ │ │ │ -100 unsigned int homogen = basis._s_i_z_e_s()[order]-notHomogen; │ │ │ │ │ -101 │ │ │ │ │ -102 /* │ │ │ │ │ -103 * │ │ │ │ │ -104 * The set $RT_k$ is defined as │ │ │ │ │ -105 * │ │ │ │ │ -106 * \begin{equation} │ │ │ │ │ -107 * RT_k := (\P_k)^dim + \widetilde \P_k x with x\in \R^n. │ │ │ │ │ -108 * \end{equation} │ │ │ │ │ -109 * │ │ │ │ │ -110 * The space $\P_k$ is split in $\P_k = \P_{k-1} + \widetilde \P_k$. │ │ │ │ │ -111 * │ │ │ │ │ -112 * \begin{align} │ │ │ │ │ -113 * RT_k &= (\P_{k-1} + \widetilde \P_k)^dim + \widetilde \P_k x with x\in │ │ │ │ │ -\R^n │ │ │ │ │ -114 * &= (\P_{k-1})^n + (\widetilde \P_k)^n + \widetilde \P_k x with x\in \R^n │ │ │ │ │ -115 * \end{align} │ │ │ │ │ -116 * │ │ │ │ │ -117 * Thus $\dim RT_k = n * \dim \P_{k-1} + (n+1)*\dim (\widetilde \P_k)$ │ │ │ │ │ -118 */ │ │ │ │ │ -119 │ │ │ │ │ -120 // row_ = \dim RT_k *dim │ │ │ │ │ -121 _r_o_w__ = (notHomogen*_d_i_m+homogen*(_d_i_m+1))*_d_i_m; │ │ │ │ │ -122 _m_a_t__ = new Field*[_r_o_w__]; │ │ │ │ │ -123 int _r_o_w = 0; │ │ │ │ │ -124 │ │ │ │ │ -125 /* Assign the correct values for the nonhomogeneous polymonials $p\in (\P_ │ │ │ │ │ -{oder-1})^dim$ │ │ │ │ │ -126 * A basis function is represented by $dim$ rows. │ │ │ │ │ -127 */ │ │ │ │ │ -128 for (unsigned int i=0; i │ │ │ │ │ -_1_9_6 void _r_o_w( const unsigned int _r_o_w, Vector &vec ) const │ │ │ │ │ -197 { │ │ │ │ │ -198 const unsigned int N = _c_o_l_s(); │ │ │ │ │ -199 assert( vec.size() == N ); │ │ │ │ │ -200 for (unsigned int i=0; i li; │ │ │ │ │ +48 }; │ │ │ │ │ +49} │ │ │ │ │ +50#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALCOEFFICIENTS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_f_i_e_l_d___c_a_s_t │ │ │ │ │ -void field_cast(const F1 &f1, F2 &f2) │ │ │ │ │ -a helper class to cast from one field to another │ │ │ │ │ -DDeeffiinniittiioonn field.hh:159 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:50 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_d_i_m │ │ │ │ │ -static const unsigned int dim │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:52 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_~_R_T_V_e_c_M_a_t_r_i_x │ │ │ │ │ -~RTVecMatrix() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:179 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_m_a_t__ │ │ │ │ │ -Field ** mat_ │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:204 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_R_T_V_e_c_M_a_t_r_i_x │ │ │ │ │ -RTVecMatrix(std::size_t order) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:55 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_c_o_l_s │ │ │ │ │ -unsigned int cols() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:187 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_r_o_w__ │ │ │ │ │ -unsigned int row_ │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_M_I │ │ │ │ │ -MultiIndex< dim, Field > MI │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_r_o_w │ │ │ │ │ -void row(const unsigned int row, Vector &vec) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_M_I_B_a_s_i_s │ │ │ │ │ -MonomialBasis< geometryId, MI > MIBasis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:54 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_g_e_o_m_e_t_r_y │ │ │ │ │ -static constexpr GeometryType geometry │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:51 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_r_o_w_s │ │ │ │ │ -unsigned int rows() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:191 │ │ │ │ │ -_D_u_n_e_:_:_R_T_V_e_c_M_a_t_r_i_x_:_:_c_o_l__ │ │ │ │ │ -unsigned int col_ │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:203 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:22 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_O_b_j_e_c_t │ │ │ │ │ -const Basis Object │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:28 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -MonomialBasisProvider< dim, Field > MBasisFactory │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_B_a_s_i_s │ │ │ │ │ -PolynomialBasisWithMatrix< EvalMBasis, SparseCoeffMatrix< Field, dim > > Basis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_M_B_a_s_i_s │ │ │ │ │ -MBasisFactory::Object MBasis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_K_e_y │ │ │ │ │ -std::size_t Key │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_r_e_l_e_a_s_e │ │ │ │ │ -static void release(Object *object) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_M_B_a_s_i_s │ │ │ │ │ -StandardEvaluator< MBasis > EvalMBasis │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:25 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_c_r_e_a_t_e │ │ │ │ │ -static Object * create(const Key &order) │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_T_P_r_e_B_a_s_i_s_F_a_c_t_o_r_y_:_:_E_v_a_l_u_a_t_i_o_n_B_a_s_i_s_F_a_c_t_o_r_y_:_:_T_y_p_e │ │ │ │ │ -MonomialBasisProvider< dd, FF > Type │ │ │ │ │ -DDeeffiinniittiioonn raviartthomassimplexprebasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_S_t_a_n_d_a_r_d_E_v_a_l_u_a_t_o_r │ │ │ │ │ -DDeeffiinniittiioonn basisevaluator.hh:131 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:440 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:476 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e │ │ │ │ │ -void evaluate(const unsigned int deriv, const DomainVector &x, Field *const │ │ │ │ │ -values) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:498 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_:_:_s_i_z_e_s │ │ │ │ │ -const unsigned int * sizes(unsigned int order) const │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:465 │ │ │ │ │ -_D_u_n_e_:_:_M_o_n_o_m_i_a_l_B_a_s_i_s_P_r_o_v_i_d_e_r │ │ │ │ │ -DDeeffiinniittiioonn monomialbasis.hh:780 │ │ │ │ │ -_D_u_n_e_:_:_M_u_l_t_i_I_n_d_e_x │ │ │ │ │ -DDeeffiinniittiioonn multiindex.hh:37 │ │ │ │ │ -_D_u_n_e_:_:_P_o_l_y_n_o_m_i_a_l_B_a_s_i_s_W_i_t_h_M_a_t_r_i_x │ │ │ │ │ -DDeeffiinniittiioonn polynomialbasis.hh:348 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ +Describe position of one degree of freedom. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for Raviart-Thomas-1 elements on prisms. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalcoefficients.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const LocalKey & localKey(std::size_t i) const │ │ │ │ │ +get i'th index │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalcoefficients.hh:41 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +std::size_t size() const │ │ │ │ │ +number of coefficients │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalcoefficients.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +RT0PrismLocalCoefficients() │ │ │ │ │ +Standard constructor. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalcoefficients.hh:28 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,33 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalinterpolation.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalinterpolation.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cmath>
│ │ │ │ -#include <array>
│ │ │ │ -#include <bitset>
│ │ │ │ -#include <vector>
│ │ │ │ +
#include <vector>
│ │ │ │ #include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT02DLocalInterpolation< LB >
class  Dune::RT0PrismLocalInterpolation< LB >
 First order Raviart-Thomas shape functions on the reference prism. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,23 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas02dlocalinterpolation.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0prismlocalinterpolation.hh File Reference │ │ │ │ │ #include │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00326_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalinterpolation.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalinterpolation.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,96 +70,101 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalinterpolation.hh
│ │ │ │ +
raviartthomas0prismlocalinterpolation.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │ -
6#define DUNE_RT02DLOCALINTERPOLATION_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │
7
│ │ │ │ -
8#include <cmath>
│ │ │ │ -
9#include <array>
│ │ │ │ -
10#include <bitset>
│ │ │ │ -
11#include <vector>
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
18 {
│ │ │ │ -
19 public:
│ │ │ │ -
20
│ │ │ │ -
│ │ │ │ -
22 RT02DLocalInterpolation (std::bitset<3> s = 0)
│ │ │ │ -
23 {
│ │ │ │ -
24 using std::sqrt;
│ │ │ │ -
25 for (std::size_t i=0; i<sign_.size(); i++)
│ │ │ │ -
26 sign_[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
8#include <vector>
│ │ │ │ +
9
│ │ │ │ + │ │ │ │ +
11
│ │ │ │ +
12namespace Dune
│ │ │ │ +
13{
│ │ │ │ +
22 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
24 {
│ │ │ │ +
25
│ │ │ │ +
26 public:
│ │ │ │
27
│ │ │ │ -
28 m_[0] = {0.5, 0.0};
│ │ │ │ -
29 m_[1] = {0.0, 0.5};
│ │ │ │ -
30 m_[2] = {0.5, 0.5};
│ │ │ │ -
31 n_[0] = {0.0, -1.0};
│ │ │ │ -
32 n_[1] = {-1.0, 0.0};
│ │ │ │ -
33 n_[2] = {1.0/sqrt(2.0), 1.0/sqrt(2.0)};
│ │ │ │ -
34 c_[0] = ( 0.5*n_[0][0] - 1.0*n_[0][1]);
│ │ │ │ -
35 c_[1] = (-1.0*n_[1][0] + 0.5*n_[1][1]);
│ │ │ │ -
36 c_[2] = ( 0.5*n_[2][0] + 0.5*n_[2][1]);
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
39 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
40 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
41 {
│ │ │ │ -
42 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
43 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
44
│ │ │ │ -
45 out.resize(3);
│ │ │ │ -
46
│ │ │ │ -
47 for (int i=0; i<3; i++)
│ │ │ │ -
48 {
│ │ │ │ -
49 auto y = f(m_[i]);
│ │ │ │ -
50 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1])*sign_[i]/c_[i];
│ │ │ │ -
51 }
│ │ │ │ -
52 }
│ │ │ │ -
│ │ │ │ +
│ │ │ │ +
33 RT0PrismLocalInterpolation (std::bitset<5> s = 0)
│ │ │ │ +
34 {
│ │ │ │ +
35 typedef typename LB::Traits::RangeFieldType Scalar;
│ │ │ │ +
36
│ │ │ │ +
37 for (size_t i=0; i<5; i++)
│ │ │ │ +
38 sign[i] = (s[i]) ? -1.0 : 1.0;
│ │ │ │ +
39
│ │ │ │ +
40 Scalar r = 1/std::sqrt(2);
│ │ │ │ +
41
│ │ │ │ +
42 n[0] = { 0.0, -1.0, 0.0};
│ │ │ │ +
43 n[1] = {-1.0, 0.0, 0.0};
│ │ │ │ +
44 n[2] = { r, r, 0.0};
│ │ │ │ +
45 n[3] = { 0.0, 0.0, -1.0};
│ │ │ │ +
46 n[4] = { 0.0, 0.0, 1.0};
│ │ │ │ +
47
│ │ │ │ +
48 c[0] = 1.0;
│ │ │ │ +
49 c[1] = 1.0;
│ │ │ │ +
50 c[2] = std::sqrt(2);
│ │ │ │ +
51 c[3] = 1/2.0;
│ │ │ │ +
52 c[4] = 1/2.0;
│ │ │ │
53
│ │ │ │ -
54 private:
│ │ │ │ -
55 // Edge orientations
│ │ │ │ -
56 std::array<typename LB::Traits::RangeFieldType,3> sign_;
│ │ │ │ -
57 // Edge midpoints of the reference triangle
│ │ │ │ -
58 std::array<typename LB::Traits::DomainType,3> m_;
│ │ │ │ -
59 // Unit outer normals of the reference triangle
│ │ │ │ -
60 std::array<typename LB::Traits::DomainType,3> n_;
│ │ │ │ -
61 // Inverse triangle edge length
│ │ │ │ -
62 std::array<typename LB::Traits::RangeFieldType,3> c_;
│ │ │ │ -
63 };
│ │ │ │ -
│ │ │ │ -
64}
│ │ │ │ -
65
│ │ │ │ -
66#endif
│ │ │ │ +
54 m[0] = { 0.5, 0.0, 0.5};
│ │ │ │ +
55 m[1] = { 0.0, 0.5, 0.5};
│ │ │ │ +
56 m[2] = { 0.5, 0.5, 0.5};
│ │ │ │ +
57 m[3] = { 1/3.0, 1/3.0, 0.0};
│ │ │ │ +
58 m[4] = { 1/3.0, 1/3.0, 1.0};
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
69 template<class F, class C>
│ │ │ │ +
│ │ │ │ +
70 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ +
71 {
│ │ │ │ +
72 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ +
73
│ │ │ │ +
74 out.resize(5);
│ │ │ │ +
75 for(int i=0; i<5; i++)
│ │ │ │ +
76 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i];
│ │ │ │ +
77 }
│ │ │ │ +
│ │ │ │ +
78
│ │ │ │ +
79 private:
│ │ │ │ +
80 // Facet orientations
│ │ │ │ +
81 std::array<typename LB::Traits::RangeFieldType, 5> sign;
│ │ │ │ +
82 // Facet area
│ │ │ │ +
83 std::array<typename LB::Traits::RangeFieldType, 5> c;
│ │ │ │ +
84
│ │ │ │ +
85 // Facet normals
│ │ │ │ +
86 std::array<typename LB::Traits::DomainType, 5> n;
│ │ │ │ +
87 // Facet midpoints
│ │ │ │ +
88 std::array<typename LB::Traits::DomainType, 5> m;
│ │ │ │ +
89 };
│ │ │ │ +
│ │ │ │ +
90}
│ │ │ │ +
91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Definition raviartthomas02dlocalinterpolation.hh:18
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas02dlocalinterpolation.hh:40
│ │ │ │ -
RT02DLocalInterpolation(std::bitset< 3 > s=0)
Constructor with given set of edge orientations.
Definition raviartthomas02dlocalinterpolation.hh:22
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference prism.
Definition raviartthomas0prismlocalinterpolation.hh:24
│ │ │ │ +
RT0PrismLocalInterpolation(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0prismlocalinterpolation.hh:33
│ │ │ │ +
void interpolate(const F &ff, std::vector< C > &out) const
Interpolate a given function with shape functions.
Definition raviartthomas0prismlocalinterpolation.hh:70
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,91 +1,98 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ -raviartthomas02dlocalinterpolation.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ +raviartthomas0prismlocalinterpolation.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ -6#define DUNE_RT02DLOCALINTERPOLATION_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11#include │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 template │ │ │ │ │ -_1_7 class _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -18 { │ │ │ │ │ -19 public: │ │ │ │ │ -20 │ │ │ │ │ -_2_2 _R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<3> s = 0) │ │ │ │ │ -23 { │ │ │ │ │ -24 using std::sqrt; │ │ │ │ │ -25 for (std::size_t i=0; i │ │ │ │ │ +9 │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +11 │ │ │ │ │ +12namespace _D_u_n_e │ │ │ │ │ +13{ │ │ │ │ │ +22 template │ │ │ │ │ +_2_3 class _R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +24 { │ │ │ │ │ +25 │ │ │ │ │ +26 public: │ │ │ │ │ 27 │ │ │ │ │ -28 m_[0] = {0.5, 0.0}; │ │ │ │ │ -29 m_[1] = {0.0, 0.5}; │ │ │ │ │ -30 m_[2] = {0.5, 0.5}; │ │ │ │ │ -31 n_[0] = {0.0, -1.0}; │ │ │ │ │ -32 n_[1] = {-1.0, 0.0}; │ │ │ │ │ -33 n_[2] = {1.0/sqrt(2.0), 1.0/sqrt(2.0)}; │ │ │ │ │ -34 c_[0] = ( 0.5*n_[0][0] - 1.0*n_[0][1]); │ │ │ │ │ -35 c_[1] = (-1.0*n_[1][0] + 0.5*n_[1][1]); │ │ │ │ │ -36 c_[2] = ( 0.5*n_[2][0] + 0.5*n_[2][1]); │ │ │ │ │ -37 } │ │ │ │ │ -38 │ │ │ │ │ -39 template │ │ │ │ │ -_4_0 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -41 { │ │ │ │ │ -42 // f gives v*outer normal at a point on the edge! │ │ │ │ │ -43 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -44 │ │ │ │ │ -45 out.resize(3); │ │ │ │ │ -46 │ │ │ │ │ -47 for (int i=0; i<3; i++) │ │ │ │ │ -48 { │ │ │ │ │ -49 auto y = f(m_[i]); │ │ │ │ │ -50 out[i] = (y[0]*n_[i][0]+y[1]*n_[i][1])*sign_[i]/c_[i]; │ │ │ │ │ -51 } │ │ │ │ │ -52 } │ │ │ │ │ +_3_3 _R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<5> s = 0) │ │ │ │ │ +34 { │ │ │ │ │ +35 typedef typename LB::Traits::RangeFieldType Scalar; │ │ │ │ │ +36 │ │ │ │ │ +37 for (size_t i=0; i<5; i++) │ │ │ │ │ +38 sign[i] = (s[i]) ? -1.0 : 1.0; │ │ │ │ │ +39 │ │ │ │ │ +40 Scalar r = 1/std::sqrt(2); │ │ │ │ │ +41 │ │ │ │ │ +42 n[0] = { 0.0, -1.0, 0.0}; │ │ │ │ │ +43 n[1] = {-1.0, 0.0, 0.0}; │ │ │ │ │ +44 n[2] = { r, r, 0.0}; │ │ │ │ │ +45 n[3] = { 0.0, 0.0, -1.0}; │ │ │ │ │ +46 n[4] = { 0.0, 0.0, 1.0}; │ │ │ │ │ +47 │ │ │ │ │ +48 c[0] = 1.0; │ │ │ │ │ +49 c[1] = 1.0; │ │ │ │ │ +50 c[2] = std::sqrt(2); │ │ │ │ │ +51 c[3] = 1/2.0; │ │ │ │ │ +52 c[4] = 1/2.0; │ │ │ │ │ 53 │ │ │ │ │ -54 private: │ │ │ │ │ -55 // Edge orientations │ │ │ │ │ -56 std::array sign_; │ │ │ │ │ -57 // Edge midpoints of the reference triangle │ │ │ │ │ -58 std::array m_; │ │ │ │ │ -59 // Unit outer normals of the reference triangle │ │ │ │ │ -60 std::array n_; │ │ │ │ │ -61 // Inverse triangle edge length │ │ │ │ │ -62 std::array c_; │ │ │ │ │ -63 }; │ │ │ │ │ -64} │ │ │ │ │ -65 │ │ │ │ │ -66#endif │ │ │ │ │ +54 m[0] = { 0.5, 0.0, 0.5}; │ │ │ │ │ +55 m[1] = { 0.0, 0.5, 0.5}; │ │ │ │ │ +56 m[2] = { 0.5, 0.5, 0.5}; │ │ │ │ │ +57 m[3] = { 1/3.0, 1/3.0, 0.0}; │ │ │ │ │ +58 m[4] = { 1/3.0, 1/3.0, 1.0}; │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +69 template │ │ │ │ │ +_7_0 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ +71 { │ │ │ │ │ +72 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ +73 │ │ │ │ │ +74 out.resize(5); │ │ │ │ │ +75 for(int i=0; i<5; i++) │ │ │ │ │ +76 out[i] = f(m[i]).dot(n[i]) * c[i] * sign[i]; │ │ │ │ │ +77 } │ │ │ │ │ +78 │ │ │ │ │ +79 private: │ │ │ │ │ +80 // Facet orientations │ │ │ │ │ +81 std::array sign; │ │ │ │ │ +82 // Facet area │ │ │ │ │ +83 std::array c; │ │ │ │ │ +84 │ │ │ │ │ +85 // Facet normals │ │ │ │ │ +86 std::array n; │ │ │ │ │ +87 // Facet midpoints │ │ │ │ │ +88 std::array m; │ │ │ │ │ +89 }; │ │ │ │ │ +90} │ │ │ │ │ +91#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALINTERPOLATION_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalinterpolation.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +RT0PrismLocalInterpolation(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalinterpolation.hh:33 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RT02DLocalInterpolation(std::bitset< 3 > s=0) │ │ │ │ │ -Constructor with given set of edge orientations. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalinterpolation.hh:22 │ │ │ │ │ +Interpolate a given function with shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalinterpolation.hh:70 │ │ │ │ │ _l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,35 +65,35 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalcoefficients.hh File Reference
│ │ │ │ +
raviartthomas0prismlocalbasis.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <cstddef>
│ │ │ │ -#include <iostream>
│ │ │ │ +
#include <numeric>
│ │ │ │ #include <vector>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ +#include <dune/common/fmatrix.hh>
│ │ │ │ +#include "../../common/localbasis.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT02DLocalCoefficients
 Layout map for RT0 elements. More...
class  Dune::RT0PrismLocalBasis< D, R >
 First order Raviart-Thomas shape functions on the reference prism. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,25 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas02dlocalcoefficients.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +raviartthomas0prismlocalbasis.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  Layout map for RT0 elements. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ +  First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ + _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00329_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalcoefficients.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0prismlocalbasis.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,78 +70,146 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalcoefficients.hh
│ │ │ │ +
raviartthomas0prismlocalbasis.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ -
6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │
7
│ │ │ │ -
8#include <cstddef>
│ │ │ │ -
9#include <iostream>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
16
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
24 {
│ │ │ │ -
25 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
28 {
│ │ │ │ -
29 for (std::size_t i=0; i<3; i++)
│ │ │ │ -
30 li[i] = LocalKey(i,1,0);
│ │ │ │ -
31 }
│ │ │ │ -
│ │ │ │ -
32
│ │ │ │ -
│ │ │ │ -
34 std::size_t size () const
│ │ │ │ -
35 {
│ │ │ │ -
36 return 3;
│ │ │ │ -
37 }
│ │ │ │ -
│ │ │ │ -
38
│ │ │ │ -
│ │ │ │ -
40 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
41 {
│ │ │ │ -
42 return li[i];
│ │ │ │ +
8#include <numeric>
│ │ │ │ +
9#include <vector>
│ │ │ │ +
10
│ │ │ │ +
11#include <dune/common/fmatrix.hh>
│ │ │ │ +
12
│ │ │ │ +
13#include "../../common/localbasis.hh"
│ │ │ │ +
14
│ │ │ │ +
15namespace Dune
│ │ │ │ +
16{
│ │ │ │ +
26 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
28 {
│ │ │ │ +
29
│ │ │ │ +
30 public:
│ │ │ │ +
31 typedef LocalBasisTraits<D,3,Dune::FieldVector<D,3>,R,3,Dune::FieldVector<R,3>,
│ │ │ │ +
32 Dune::FieldMatrix<R,3,3> > Traits;
│ │ │ │ +
33
│ │ │ │ +
│ │ │ │ +
39 RT0PrismLocalBasis (std::bitset<5> s = 0)
│ │ │ │ +
40 {
│ │ │ │ +
41 for (size_t i=0; i<size(); i++)
│ │ │ │ +
42 sign[i] = s[i] ? -1.0 : 1.0;
│ │ │ │
43 }
│ │ │ │
│ │ │ │
44
│ │ │ │ -
45 private:
│ │ │ │ -
46 std::vector<LocalKey> li;
│ │ │ │ -
47 };
│ │ │ │ +
│ │ │ │ +
46 unsigned int size () const
│ │ │ │ +
47 {
│ │ │ │ +
48 return 5;
│ │ │ │ +
49 }
│ │ │ │
│ │ │ │ -
48
│ │ │ │ -
49}
│ │ │ │
50
│ │ │ │ -
51#endif
│ │ │ │ - │ │ │ │ +
│ │ │ │ +
57 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ +
58 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
59 {
│ │ │ │ +
60 out.resize(5);
│ │ │ │ +
61
│ │ │ │ +
62 out[0] = { in[0], -1.0 + in[1], 0.0};
│ │ │ │ +
63
│ │ │ │ +
64 out[1] = { -1.0 + in[0], in[1], 0.0};
│ │ │ │ +
65
│ │ │ │ +
66 out[2] = { in[0], in[1], 0.0};
│ │ │ │ +
67
│ │ │ │ +
68 out[3] = { 0.0, 0.0, -2.0 + 2.0*in[2]};
│ │ │ │ +
69
│ │ │ │ +
70 out[4] = { 0.0, 0.0, 2.0*in[2]};
│ │ │ │ +
71
│ │ │ │ +
72 for (std::size_t i=0; i<out.size(); i++)
│ │ │ │ +
73 out[i] *= sign[i];
│ │ │ │ +
74
│ │ │ │ +
75 }
│ │ │ │ +
│ │ │ │ +
76
│ │ │ │ +
│ │ │ │ +
83 inline void evaluateJacobian (const typename Traits::DomainType& in,
│ │ │ │ +
84 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
85 {
│ │ │ │ +
86 out.resize(5);
│ │ │ │ +
87
│ │ │ │ +
88 for(int i=0; i<size(); i++)
│ │ │ │ +
89 for(int j=0; j<3; j++)
│ │ │ │ +
90 out[i][j] = {0.0, 0.0, 0.0};
│ │ │ │ +
91
│ │ │ │ +
92 out[0][0][0] = sign[0];
│ │ │ │ +
93 out[0][1][1] = sign[0];
│ │ │ │ +
94
│ │ │ │ +
95 out[1][0][0] = sign[1];
│ │ │ │ +
96 out[1][1][1] = sign[1];
│ │ │ │ +
97
│ │ │ │ +
98 out[2][0][0] = sign[2];
│ │ │ │ +
99 out[2][1][1] = sign[2];
│ │ │ │ +
100
│ │ │ │ +
101 out[3][2][2] = sign[3]*(2.0);
│ │ │ │ +
102
│ │ │ │ +
103 out[4][2][2] = sign[4]*(2.0);
│ │ │ │ +
104 }
│ │ │ │ +
│ │ │ │ +
105
│ │ │ │ +
│ │ │ │ +
107 void partial (const std::array<unsigned int, 3>& order,
│ │ │ │ +
108 const typename Traits::DomainType& in, // position
│ │ │ │ +
109 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ +
110 {
│ │ │ │ +
111 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ +
112 if (totalOrder == 0) {
│ │ │ │ +
113 evaluateFunction(in, out);
│ │ │ │ +
114 } else {
│ │ │ │ +
115 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
│ │ │ │ +
116 }
│ │ │ │ +
117 }
│ │ │ │ +
│ │ │ │ +
118
│ │ │ │ +
│ │ │ │ +
120 unsigned int order () const
│ │ │ │ +
121 {
│ │ │ │ +
122 return 1;
│ │ │ │ +
123 }
│ │ │ │ +
│ │ │ │ +
124
│ │ │ │ +
125 private:
│ │ │ │ +
126 std::array<R,5> sign;
│ │ │ │ +
127 };
│ │ │ │ +
│ │ │ │ +
128}
│ │ │ │ +
129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Layout map for RT0 elements.
Definition raviartthomas02dlocalcoefficients.hh:24
│ │ │ │ -
RT02DLocalCoefficients()
Standard constructor.
Definition raviartthomas02dlocalcoefficients.hh:27
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas02dlocalcoefficients.hh:40
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition raviartthomas02dlocalcoefficients.hh:34
│ │ │ │ +
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ +
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ +
First order Raviart-Thomas shape functions on the reference prism.
Definition raviartthomas0prismlocalbasis.hh:28
│ │ │ │ +
RT0PrismLocalBasis(std::bitset< 5 > s=0)
Make set number s, where 0 <= s < 32.
Definition raviartthomas0prismlocalbasis.hh:39
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas0prismlocalbasis.hh:57
│ │ │ │ +
unsigned int size() const
number of shape functions
Definition raviartthomas0prismlocalbasis.hh:46
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas0prismlocalbasis.hh:120
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas0prismlocalbasis.hh:83
│ │ │ │ +
void partial(const std::array< unsigned int, 3 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas0prismlocalbasis.hh:107
│ │ │ │ +
LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, 3 >, Dune::FieldMatrix< R, 3, 3 > > Traits
Definition raviartthomas0prismlocalbasis.hh:32
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,76 +1,157 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ -raviartthomas02dlocalcoefficients.hh │ │ │ │ │ + * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_p_r_i_s_m │ │ │ │ │ +raviartthomas0prismlocalbasis.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ -6#define DUNE_RT0TRIANGLELOCALCOEFFICIENTS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -16 │ │ │ │ │ -_2_3 class _R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -24 { │ │ │ │ │ -25 public: │ │ │ │ │ -_2_7 _R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(3) │ │ │ │ │ +8#include │ │ │ │ │ +9#include │ │ │ │ │ +10 │ │ │ │ │ +11#include │ │ │ │ │ +12 │ │ │ │ │ +13#include "../../common/localbasis.hh" │ │ │ │ │ +14 │ │ │ │ │ +15namespace _D_u_n_e │ │ │ │ │ +16{ │ │ │ │ │ +26 template │ │ │ │ │ +_2_7 class _R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ 28 { │ │ │ │ │ -29 for (std::size_t i=0; i<3; i++) │ │ │ │ │ -30 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ -31 } │ │ │ │ │ -32 │ │ │ │ │ -_3_4 std::size_t _s_i_z_e () const │ │ │ │ │ -35 { │ │ │ │ │ -36 return 3; │ │ │ │ │ -37 } │ │ │ │ │ -38 │ │ │ │ │ -_4_0 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ -41 { │ │ │ │ │ -42 return li[i]; │ │ │ │ │ +29 │ │ │ │ │ +30 public: │ │ │ │ │ +31 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_3_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_3_>,R,3,Dune:: │ │ │ │ │ +FieldVector, │ │ │ │ │ +_3_2 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +33 │ │ │ │ │ +_3_9 _R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s (std::bitset<5> s = 0) │ │ │ │ │ +40 { │ │ │ │ │ +41 for (size_t i=0; i<_s_i_z_e(); i++) │ │ │ │ │ +42 sign[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ 43 } │ │ │ │ │ 44 │ │ │ │ │ -45 private: │ │ │ │ │ -46 std::vector li; │ │ │ │ │ -47 }; │ │ │ │ │ -48 │ │ │ │ │ -49} │ │ │ │ │ +_4_6 unsigned int _s_i_z_e () const │ │ │ │ │ +47 { │ │ │ │ │ +48 return 5; │ │ │ │ │ +49 } │ │ │ │ │ 50 │ │ │ │ │ -51#endif │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +_5_7 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +58 std::vector& out) const │ │ │ │ │ +59 { │ │ │ │ │ +60 out.resize(5); │ │ │ │ │ +61 │ │ │ │ │ +62 out[0] = { in[0], -1.0 + in[1], 0.0}; │ │ │ │ │ +63 │ │ │ │ │ +64 out[1] = { -1.0 + in[0], in[1], 0.0}; │ │ │ │ │ +65 │ │ │ │ │ +66 out[2] = { in[0], in[1], 0.0}; │ │ │ │ │ +67 │ │ │ │ │ +68 out[3] = { 0.0, 0.0, -2.0 + 2.0*in[2]}; │ │ │ │ │ +69 │ │ │ │ │ +70 out[4] = { 0.0, 0.0, 2.0*in[2]}; │ │ │ │ │ +71 │ │ │ │ │ +72 for (std::size_t i=0; i& out) const │ │ │ │ │ +85 { │ │ │ │ │ +86 out.resize(5); │ │ │ │ │ +87 │ │ │ │ │ +88 for(int i=0; i<_s_i_z_e(); i++) │ │ │ │ │ +89 for(int j=0; j<3; j++) │ │ │ │ │ +90 out[i][j] = {0.0, 0.0, 0.0}; │ │ │ │ │ +91 │ │ │ │ │ +92 out[0][0][0] = sign[0]; │ │ │ │ │ +93 out[0][1][1] = sign[0]; │ │ │ │ │ +94 │ │ │ │ │ +95 out[1][0][0] = sign[1]; │ │ │ │ │ +96 out[1][1][1] = sign[1]; │ │ │ │ │ +97 │ │ │ │ │ +98 out[2][0][0] = sign[2]; │ │ │ │ │ +99 out[2][1][1] = sign[2]; │ │ │ │ │ +100 │ │ │ │ │ +101 out[3][2][2] = sign[3]*(2.0); │ │ │ │ │ +102 │ │ │ │ │ +103 out[4][2][2] = sign[4]*(2.0); │ │ │ │ │ +104 } │ │ │ │ │ +105 │ │ │ │ │ +_1_0_7 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ +108 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ +109 std::vector& out) const // return value │ │ │ │ │ +110 { │ │ │ │ │ +111 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ +112 if (totalOrder == 0) { │ │ │ │ │ +113 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ +114 } else { │ │ │ │ │ +115 DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); │ │ │ │ │ +116 } │ │ │ │ │ +117 } │ │ │ │ │ +118 │ │ │ │ │ +_1_2_0 unsigned int _o_r_d_e_r () const │ │ │ │ │ +121 { │ │ │ │ │ +122 return 1; │ │ │ │ │ +123 } │ │ │ │ │ +124 │ │ │ │ │ +125 private: │ │ │ │ │ +126 std::array sign; │ │ │ │ │ +127 }; │ │ │ │ │ +128} │ │ │ │ │ +129#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_PRISM_LOCALBASIS_HH │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ -Describe position of one degree of freedom. │ │ │ │ │ -DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RT02DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:27 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:40 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ -std::size_t size() const │ │ │ │ │ -number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalcoefficients.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ +Type traits for LocalBasisVirtualInterface. │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ +D DomainType │ │ │ │ │ +domain type │ │ │ │ │ +DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +First order Raviart-Thomas shape functions on the reference prism. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +RT0PrismLocalBasis(std::bitset< 5 > s=0) │ │ │ │ │ +Make set number s, where 0 <= s < 32. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:57 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +unsigned int size() const │ │ │ │ │ +number of shape functions │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:46 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +unsigned int order() const │ │ │ │ │ +Polynomial order of the shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:120 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::JacobianType > &out) const │ │ │ │ │ +Evaluate Jacobian of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:83 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, 3 > &order, const typename │ │ │ │ │ +Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:107 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_P_r_i_s_m_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalBasisTraits< D, 3, Dune::FieldVector< D, 3 >, R, 3, Dune::FieldVector< R, │ │ │ │ │ +3 >, Dune::FieldMatrix< R, 3, 3 > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0prismlocalbasis.hh:32 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalbasis.hh File Reference │ │ │ │ +dune-localfunctions: raviartthomas0cube2d.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,34 +65,34 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas02dlocalbasis.hh File Reference
│ │ │ │ +
raviartthomas0cube2d.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <numeric>
│ │ │ │ -#include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ +
#include <dune/geometry/type.hh>
│ │ │ │ +#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ +#include "raviartthomas0cube2d/raviartthomas0cube2dall.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT02DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference triangle. More...
class  Dune::RT0Cube2DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on rectangles. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas02dlocalbasis.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ +raviartthomas0cube2d.hh File Reference │ │ │ │ │ +#include │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_a_l_l_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ - _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ +  _Z_e_r_o order Raviart-Thomas shape functions on rectangles. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00332_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas02dlocalbasis.hh Source File │ │ │ │ +dune-localfunctions: raviartthomas0cube2d.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,138 +70,119 @@ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas02dlocalbasis.hh
│ │ │ │ +
raviartthomas0cube2d.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ -
6#define DUNE_RT0TRIANGLELOCALBASIS_HH
│ │ │ │ +
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ -
8#include <numeric>
│ │ │ │ +
8#include <dune/geometry/type.hh>
│ │ │ │
9
│ │ │ │ -
10#include <dune/common/fmatrix.hh>
│ │ │ │ -
11
│ │ │ │ - │ │ │ │ -
13
│ │ │ │ -
14namespace Dune
│ │ │ │ -
15{
│ │ │ │ -
24 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
26 {
│ │ │ │ -
27 public:
│ │ │ │ -
28 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
29 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
30
│ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
23 template<class D, class R>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
25 {
│ │ │ │ +
26 public:
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
31
│ │ │ │
│ │ │ │ -
32 RT02DLocalBasis (std::bitset<3> s = 0)
│ │ │ │ -
33 {
│ │ │ │ -
34 for (int i=0; i<3; i++)
│ │ │ │ -
35 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
36 }
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
39 unsigned int size () const
│ │ │ │ -
40 {
│ │ │ │ -
41 return 3;
│ │ │ │ -
42 }
│ │ │ │ + │ │ │ │ +
33 {}
│ │ │ │
│ │ │ │ -
43
│ │ │ │ +
34
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
36 basis(s),
│ │ │ │ +
37 interpolation(s)
│ │ │ │ +
38 {}
│ │ │ │ +
│ │ │ │ +
39
│ │ │ │ +
│ │ │ │ +
40 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ +
41 {
│ │ │ │ +
42 return basis;
│ │ │ │ +
43 }
│ │ │ │ +
│ │ │ │ +
44
│ │ │ │
│ │ │ │ -
45 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
46 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
47 {
│ │ │ │ -
48 out.resize(3);
│ │ │ │ -
49 out[0] = {sign_[0]*in[0], sign_[0]*(in[1]-D(1))};
│ │ │ │ -
50 out[1] = {sign_[1]*(in[0]-D(1)), sign_[1]*in[1]};
│ │ │ │ -
51 out[2] = {sign_[2]*in[0], sign_[2]*in[1]};
│ │ │ │ -
52 }
│ │ │ │ + │ │ │ │ +
46 {
│ │ │ │ +
47 return coefficients;
│ │ │ │ +
48 }
│ │ │ │ +
│ │ │ │ +
49
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
51 {
│ │ │ │ +
52 return interpolation;
│ │ │ │ +
53 }
│ │ │ │
│ │ │ │ -
53
│ │ │ │ -
55 inline void
│ │ │ │ +
54
│ │ │ │
│ │ │ │ -
56 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
57 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
58 {
│ │ │ │ -
59 out.resize(3);
│ │ │ │ -
60 for (int i=0; i<3; i++)
│ │ │ │ -
61 {
│ │ │ │ -
62 out[i][0] = {sign_[i], 0};
│ │ │ │ -
63 out[i][1] = { 0, sign_[i]};
│ │ │ │ -
64 }
│ │ │ │ -
65 }
│ │ │ │ -
│ │ │ │ -
66
│ │ │ │ -
│ │ │ │ -
68 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
69 const typename Traits::DomainType& in, // position
│ │ │ │ -
70 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
71 {
│ │ │ │ -
72 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
73 if (totalOrder == 0) {
│ │ │ │ -
74 evaluateFunction(in, out);
│ │ │ │ -
75 } else if (totalOrder == 1) {
│ │ │ │ -
76 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
77 out.resize(size());
│ │ │ │ -
78
│ │ │ │ -
79 for (int i=0; i<3; i++)
│ │ │ │ -
80 {
│ │ │ │ -
81 out[i][direction] = sign_[i];
│ │ │ │ -
82 out[i][1-direction] = 0;
│ │ │ │ -
83 }
│ │ │ │ -
84 } else {
│ │ │ │ -
85 out.resize(size());
│ │ │ │ -
86 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
87 for (std::size_t j = 0; j < 2; ++j)
│ │ │ │ -
88 out[i][j] = 0;
│ │ │ │ -
89 }
│ │ │ │ -
90
│ │ │ │ -
91 }
│ │ │ │ -
│ │ │ │ -
92
│ │ │ │ -
│ │ │ │ -
94 unsigned int order () const
│ │ │ │ -
95 {
│ │ │ │ -
96 return 1;
│ │ │ │ -
97 }
│ │ │ │ -
│ │ │ │ -
98
│ │ │ │ -
99 private:
│ │ │ │ -
100
│ │ │ │ -
101 // Signs of the edge normals
│ │ │ │ -
102 std::array<R,3> sign_;
│ │ │ │ -
103 };
│ │ │ │ -
│ │ │ │ -
104}
│ │ │ │ -
105#endif
│ │ │ │ +
56 unsigned int size () const
│ │ │ │ +
57 {
│ │ │ │ +
58 return basis.size();
│ │ │ │ +
59 }
│ │ │ │ +
│ │ │ │ +
60
│ │ │ │ +
│ │ │ │ +
61 static constexpr GeometryType type ()
│ │ │ │ +
62 {
│ │ │ │ +
63 return GeometryTypes::quadrilateral;
│ │ │ │ +
64 }
│ │ │ │ +
│ │ │ │ +
65
│ │ │ │ +
66 private:
│ │ │ │ + │ │ │ │ +
68 RT0Cube2DLocalCoefficients coefficients;
│ │ │ │ + │ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71}
│ │ │ │ +
72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH
│ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │ -
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference triangle.
Definition raviartthomas02dlocalbasis.hh:26
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas02dlocalbasis.hh:94
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas02dlocalbasis.hh:56
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas02dlocalbasis.hh:29
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas02dlocalbasis.hh:45
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition raviartthomas02dlocalbasis.hh:39
│ │ │ │ -
RT02DLocalBasis(std::bitset< 3 > s=0)
Make set number s, where 0 <= s < 8.
Definition raviartthomas02dlocalbasis.hh:32
│ │ │ │ -
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas02dlocalbasis.hh:68
│ │ │ │ - │ │ │ │ +
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ +
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ +
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ +
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ +
Zero order Raviart-Thomas shape functions on rectangles.
Definition raviartthomas0cube2d.hh:25
│ │ │ │ +
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas0cube2d.hh:45
│ │ │ │ +
RT0Cube2DLocalFiniteElement()
Definition raviartthomas0cube2d.hh:32
│ │ │ │ +
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas0cube2d.hh:50
│ │ │ │ +
LocalFiniteElementTraits< RT0Cube2DLocalBasis< D, R >, RT0Cube2DLocalCoefficients, RT0Cube2DLocalInterpolation< RT0Cube2DLocalBasis< D, R > > > Traits
Definition raviartthomas0cube2d.hh:30
│ │ │ │ +
unsigned int size() const
Number of shape functions in this finite element.
Definition raviartthomas0cube2d.hh:56
│ │ │ │ +
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas0cube2d.hh:40
│ │ │ │ +
RT0Cube2DLocalFiniteElement(int s)
Definition raviartthomas0cube2d.hh:35
│ │ │ │ +
static constexpr GeometryType type()
Definition raviartthomas0cube2d.hh:61
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:30
│ │ │ │ +
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:134
│ │ │ │ +
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube2dall.hh:186
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,150 +1,130 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_2_d │ │ │ │ │ -raviartthomas02dlocalbasis.hh │ │ │ │ │ +raviartthomas0cube2d.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ -6#define DUNE_RT0TRIANGLELOCALBASIS_HH │ │ │ │ │ +5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ 7 │ │ │ │ │ -8#include │ │ │ │ │ +8#include │ │ │ │ │ 9 │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ -12#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -13 │ │ │ │ │ -14namespace _D_u_n_e │ │ │ │ │ -15{ │ │ │ │ │ -24 template │ │ │ │ │ -_2_5 class _R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -26 { │ │ │ │ │ -27 public: │ │ │ │ │ -28 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_2_9 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -30 │ │ │ │ │ -_3_2 _R_T_0_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<3> s = 0) │ │ │ │ │ -33 { │ │ │ │ │ -34 for (int i=0; i<3; i++) │ │ │ │ │ -35 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ -36 } │ │ │ │ │ -37 │ │ │ │ │ -_3_9 unsigned int _s_i_z_e () const │ │ │ │ │ -40 { │ │ │ │ │ -41 return 3; │ │ │ │ │ -42 } │ │ │ │ │ -43 │ │ │ │ │ -_4_5 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -46 std::vector& out) const │ │ │ │ │ -47 { │ │ │ │ │ -48 out.resize(3); │ │ │ │ │ -49 out[0] = {sign_[0]*in[0], sign_[0]*(in[1]-D(1))}; │ │ │ │ │ -50 out[1] = {sign_[1]*(in[0]-D(1)), sign_[1]*in[1]}; │ │ │ │ │ -51 out[2] = {sign_[2]*in[0], sign_[2]*in[1]}; │ │ │ │ │ -52 } │ │ │ │ │ -53 │ │ │ │ │ -55 inline void │ │ │ │ │ -_5_6 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -57 std::vector& out) const // return value │ │ │ │ │ -58 { │ │ │ │ │ -59 out.resize(3); │ │ │ │ │ -60 for (int i=0; i<3; i++) │ │ │ │ │ -61 { │ │ │ │ │ -62 out[i][0] = {sign_[i], 0}; │ │ │ │ │ -63 out[i][1] = { 0, sign_[i]}; │ │ │ │ │ +10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ +11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_a_l_l_._h_h" │ │ │ │ │ +12 │ │ │ │ │ +13namespace _D_u_n_e │ │ │ │ │ +14{ │ │ │ │ │ +23 template │ │ │ │ │ +_2_4 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +25 { │ │ │ │ │ +26 public: │ │ │ │ │ +27 typedef _L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s< │ │ │ │ │ +28 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>, │ │ │ │ │ +29 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ +_3_0 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ +31 │ │ │ │ │ +_3_2 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ +33 {} │ │ │ │ │ +34 │ │ │ │ │ +_3_5 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (int s) : │ │ │ │ │ +36 basis(s), │ │ │ │ │ +37 interpolation(s) │ │ │ │ │ +38 {} │ │ │ │ │ +39 │ │ │ │ │ +_4_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ +41 { │ │ │ │ │ +42 return basis; │ │ │ │ │ +43 } │ │ │ │ │ +44 │ │ │ │ │ +_4_5 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ +46 { │ │ │ │ │ +47 return coefficients; │ │ │ │ │ +48 } │ │ │ │ │ +49 │ │ │ │ │ +_5_0 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ +51 { │ │ │ │ │ +52 return interpolation; │ │ │ │ │ +53 } │ │ │ │ │ +54 │ │ │ │ │ +_5_6 unsigned int _s_i_z_e () const │ │ │ │ │ +57 { │ │ │ │ │ +58 return basis.size(); │ │ │ │ │ +59 } │ │ │ │ │ +60 │ │ │ │ │ +_6_1 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ +62 { │ │ │ │ │ +63 return GeometryTypes::quadrilateral; │ │ │ │ │ 64 } │ │ │ │ │ -65 } │ │ │ │ │ -66 │ │ │ │ │ -_6_8 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -69 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -70 std::vector& out) const // return value │ │ │ │ │ -71 { │ │ │ │ │ -72 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -73 if (totalOrder == 0) { │ │ │ │ │ -74 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -75 } else if (totalOrder == 1) { │ │ │ │ │ -76 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ -_o_r_d_e_r.end(), 1)); │ │ │ │ │ -77 out.resize(_s_i_z_e()); │ │ │ │ │ -78 │ │ │ │ │ -79 for (int i=0; i<3; i++) │ │ │ │ │ -80 { │ │ │ │ │ -81 out[i][direction] = sign_[i]; │ │ │ │ │ -82 out[i][1-direction] = 0; │ │ │ │ │ -83 } │ │ │ │ │ -84 } else { │ │ │ │ │ -85 out.resize(_s_i_z_e()); │ │ │ │ │ -86 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -87 for (std::size_t j = 0; j < 2; ++j) │ │ │ │ │ -88 out[i][j] = 0; │ │ │ │ │ -89 } │ │ │ │ │ -90 │ │ │ │ │ -91 } │ │ │ │ │ -92 │ │ │ │ │ -_9_4 unsigned int _o_r_d_e_r () const │ │ │ │ │ -95 { │ │ │ │ │ -96 return 1; │ │ │ │ │ -97 } │ │ │ │ │ -98 │ │ │ │ │ -99 private: │ │ │ │ │ -100 │ │ │ │ │ -101 // Signs of the edge normals │ │ │ │ │ -102 std::array sign_; │ │ │ │ │ -103 }; │ │ │ │ │ -104} │ │ │ │ │ -105#endif │ │ │ │ │ +65 │ │ │ │ │ +66 private: │ │ │ │ │ +67 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ +68 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ +69 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ +70 }; │ │ │ │ │ +71} │ │ │ │ │ +72#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_LOCALFINITEELEMENT_HH │ │ │ │ │ +_r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d_a_l_l_._h_h │ │ │ │ │ +_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ -Type traits for LocalBasisVirtualInterface. │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ -D DomainType │ │ │ │ │ -domain type │ │ │ │ │ -DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference triangle. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ -unsigned int order() const │ │ │ │ │ -Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:94 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ -void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::JacobianType > &out) const │ │ │ │ │ -Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:56 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:45 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ +traits helper struct │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ +LB LocalBasisType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ +LC LocalCoefficientsType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ +LI LocalInterpolationType │ │ │ │ │ +DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +Zero order Raviart-Thomas shape functions on rectangles. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:25 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:45 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0Cube2DLocalFiniteElement() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:50 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ +LocalFiniteElementTraits< RT0Cube2DLocalBasis< D, R >, │ │ │ │ │ +RT0Cube2DLocalCoefficients, RT0Cube2DLocalInterpolation< RT0Cube2DLocalBasis< │ │ │ │ │ +D, R > > > Traits │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:39 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RT02DLocalBasis(std::bitset< 3 > s=0) │ │ │ │ │ -Make set number s, where 0 <= s < 8. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas02dlocalbasis.hh:68 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ +Number of shape functions in this finite element. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:56 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ +const Traits::LocalBasisType & localBasis() const │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:40 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ +RT0Cube2DLocalFiniteElement(int s) │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:35 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ +static constexpr GeometryType type() │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2d.hh:61 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:30 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:134 │ │ │ │ │ +_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ +DDeeffiinniittiioonn raviartthomas0cube2dall.hh:186 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2dall.hh File Reference │ │ │ │ +dune-localfunctions: mimeticall.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,44 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomas0cube2dall.hh File Reference
│ │ │ │ +
mimeticall.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │
#include <cstddef>
│ │ │ │ -#include <numeric>
│ │ │ │ -#include <vector>
│ │ │ │ +#include <dune/common/exceptions.hh>
│ │ │ │ +#include <dune/common/fvector.hh>
│ │ │ │ #include <dune/common/fmatrix.hh>
│ │ │ │ -#include <dune/localfunctions/common/localbasis.hh>
│ │ │ │ -#include <dune/localfunctions/common/localkey.hh>
│ │ │ │ -#include <dune/localfunctions/common/localinterpolation.hh>
│ │ │ │ +#include <dune/geometry/type.hh>
│ │ │ │ +#include "../common/localbasis.hh"
│ │ │ │ +#include "../common/localkey.hh"
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RT0Cube2DLocalBasis< D, R >
 Lowest order Raviart-Thomas shape functions on the reference quadrilateral. More...
class  Dune::MimeticLocalBasis< D, R, dim >
 
class  Dune::RT0Cube2DLocalInterpolation< LB >
 Lowest order Raviart-Thomas shape functions on the reference quadrilateral. More...
class  Dune::MimeticLocalInterpolation< LB >
 
class  Dune::RT0Cube2DLocalCoefficients
 Layout map for RT0 elements on quadrilaterals. More...
class  Dune::MimeticLocalCoefficients
 ! More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,35 +1,30 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d │ │ │ │ │ + * _m_i_m_e_t_i_c │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas0cube2dall.hh File Reference │ │ │ │ │ +mimeticall.hh File Reference │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ #include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ +#include "_._._/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h" │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_ _> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_<_ _D_,_ _R_,_ _d_i_m_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │ -  Lowest order Raviart-Thomas shape functions on the reference │ │ │ │ │ - quadrilateral. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_ _L_B_ _> │ │ │ │ │   │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -  Layout map for RT0 elements on quadrilaterals. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +  ! _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00335_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas0cube2dall.hh Source File │ │ │ │ +dune-localfunctions: mimeticall.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,252 +70,173 @@ │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas0cube2dall.hh
│ │ │ │ +
mimeticall.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ +
5#ifndef DUNE_MIMETIC_ALL_HH
│ │ │ │ +
6#define DUNE_MIMETIC_ALL_HH
│ │ │ │
7
│ │ │ │
8#include <cstddef>
│ │ │ │ -
9#include <numeric>
│ │ │ │ -
10#include <vector>
│ │ │ │ -
11
│ │ │ │ +
9
│ │ │ │ +
10#include <dune/common/exceptions.hh>
│ │ │ │ +
11#include <dune/common/fvector.hh>
│ │ │ │
12#include <dune/common/fmatrix.hh>
│ │ │ │
13
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
17
│ │ │ │ -
18namespace Dune
│ │ │ │ -
19{
│ │ │ │ -
28 template<class D, class R>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
30 {
│ │ │ │ -
31 public:
│ │ │ │ -
32 typedef LocalBasisTraits<D,2,Dune::FieldVector<D,2>,R,2,Dune::FieldVector<R,2>,
│ │ │ │ -
33 Dune::FieldMatrix<R,2,2> > Traits;
│ │ │ │ -
34
│ │ │ │ -
│ │ │ │ -
36 RT0Cube2DLocalBasis (std::bitset<4> s = 0)
│ │ │ │ -
37 {
│ │ │ │ -
38 for (int i=0; i<4; i++)
│ │ │ │ -
39 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
40 }
│ │ │ │ -
│ │ │ │ -
41
│ │ │ │ -
│ │ │ │ -
43 unsigned int size () const
│ │ │ │ -
44 {
│ │ │ │ -
45 return 4;
│ │ │ │ -
46 }
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
49 inline void evaluateFunction (const typename Traits::DomainType& in,
│ │ │ │ -
50 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ -
51 {
│ │ │ │ -
52 out.resize(4);
│ │ │ │ -
53 out[0] = {sign_[0]*(in[0]-1.0), 0.0};
│ │ │ │ -
54 out[1] = {sign_[1]*(in[0]), 0.0};
│ │ │ │ -
55 out[2] = {0.0, sign_[2]*(in[1]-1.0)};
│ │ │ │ -
56 out[3] = {0.0, sign_[3]*(in[1])};
│ │ │ │ -
57 }
│ │ │ │ -
│ │ │ │ -
58
│ │ │ │ -
60 inline void
│ │ │ │ -
│ │ │ │ -
61 evaluateJacobian (const typename Traits::DomainType& in, // position
│ │ │ │ -
62 std::vector<typename Traits::JacobianType>& out) const // return value
│ │ │ │ -
63 {
│ │ │ │ -
64 out.resize(4);
│ │ │ │ -
65 out[0][0] = {sign_[0], 0};
│ │ │ │ -
66 out[0][1] = {0, 0};
│ │ │ │ -
67
│ │ │ │ -
68 out[1][0] = {sign_[1], 0};
│ │ │ │ -
69 out[1][1] = {0, 0};
│ │ │ │ -
70
│ │ │ │ -
71 out[2][0] = {0, 0};
│ │ │ │ -
72 out[2][1] = {0, sign_[2]};
│ │ │ │ -
73
│ │ │ │ -
74 out[3][0] = {0, 0};
│ │ │ │ -
75 out[3][1] = {0, sign_[3]};
│ │ │ │ -
76 }
│ │ │ │ +
14#include <dune/geometry/type.hh>
│ │ │ │ +
15
│ │ │ │ +
16#include "../common/localbasis.hh"
│ │ │ │ +
17#include "../common/localkey.hh"
│ │ │ │ +
18
│ │ │ │ +
19namespace Dune
│ │ │ │ +
20{
│ │ │ │ +
21 template<class D, class R, int dim>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
23 {
│ │ │ │ +
24 public:
│ │ │ │ + │ │ │ │ +
26 R,1,Dune::FieldVector<R,1>, Dune::FieldMatrix<R,1,dim> > Traits;
│ │ │ │ +
27
│ │ │ │ +
│ │ │ │ +
28 MimeticLocalBasis (unsigned int variant_)
│ │ │ │ +
29 : variant(variant_)
│ │ │ │ +
30 {}
│ │ │ │ +
│ │ │ │ +
31
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
33 : variant(0)
│ │ │ │ +
34 {}
│ │ │ │ +
│ │ │ │ +
35
│ │ │ │ +
36 unsigned int size () const { return variant; }
│ │ │ │ +
37
│ │ │ │ +
│ │ │ │ +
39 inline void evaluateFunction (
│ │ │ │ +
40 const typename Traits::DomainType& in,
│ │ │ │ +
41 std::vector<typename Traits::RangeType>& out) const
│ │ │ │ +
42 {
│ │ │ │ +
43 DUNE_THROW(Dune::Exception,"mimetic basis evaluation not available");
│ │ │ │ +
44 }
│ │ │ │ +
│ │ │ │ +
45
│ │ │ │ +
│ │ │ │ +
47 inline void evaluateJacobian (
│ │ │ │ +
48 const typename Traits::DomainType& in,
│ │ │ │ +
49 std::vector<typename Traits::JacobianType>& out) const
│ │ │ │ +
50 {
│ │ │ │ +
51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not available");
│ │ │ │ +
52 }
│ │ │ │ +
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
55 void partial (const std::array<unsigned int, dim>& /*order*/,
│ │ │ │ +
56 const typename Traits::DomainType& /*in*/, // position
│ │ │ │ +
57 std::vector<typename Traits::RangeType>& /*out*/) const // return value
│ │ │ │ +
58 {
│ │ │ │ +
59 DUNE_THROW(Dune::Exception,"mimetic basis partial derivative evaluation not available");
│ │ │ │ +
60 }
│ │ │ │ +
│ │ │ │ +
61
│ │ │ │ +
│ │ │ │ +
63 unsigned int order () const
│ │ │ │ +
64 {
│ │ │ │ +
65 DUNE_THROW(Dune::Exception,"mimetic order evaluation not available");
│ │ │ │ +
66 }
│ │ │ │
│ │ │ │ -
77
│ │ │ │ +
67
│ │ │ │ +
68 private:
│ │ │ │ +
69 unsigned int variant;
│ │ │ │ +
70 };
│ │ │ │ +
│ │ │ │ +
71
│ │ │ │ +
72 template<class LB>
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
74 {
│ │ │ │ +
75 public:
│ │ │ │ +
76
│ │ │ │ +
78 template<typename F, typename C>
│ │ │ │
│ │ │ │ -
79 void partial (const std::array<unsigned int, 2>& order,
│ │ │ │ -
80 const typename Traits::DomainType& in, // position
│ │ │ │ -
81 std::vector<typename Traits::RangeType>& out) const // return value
│ │ │ │ -
82 {
│ │ │ │ -
83 auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
│ │ │ │ -
84 if (totalOrder == 0) {
│ │ │ │ -
85 evaluateFunction(in, out);
│ │ │ │ -
86 } else if (totalOrder == 1) {
│ │ │ │ -
87 auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
│ │ │ │ -
88 out.resize(size());
│ │ │ │ -
89
│ │ │ │ -
90 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
91 out[i] = {0, 0};
│ │ │ │ -
92
│ │ │ │ -
93 switch (direction) {
│ │ │ │ -
94 case 0:
│ │ │ │ -
95 out[0][0] = sign_[0];
│ │ │ │ -
96 out[1][0] = sign_[1];
│ │ │ │ -
97 break;
│ │ │ │ -
98 case 1:
│ │ │ │ -
99 out[2][1] = sign_[2];
│ │ │ │ -
100 out[3][1] = sign_[3];
│ │ │ │ -
101 break;
│ │ │ │ -
102 default:
│ │ │ │ -
103 DUNE_THROW(RangeError, "Component out of range.");
│ │ │ │ -
104 }
│ │ │ │ -
105 } else {
│ │ │ │ -
106 out.resize(size());
│ │ │ │ -
107 for (std::size_t i = 0; i < size(); ++i)
│ │ │ │ -
108 for (std::size_t j = 0; j < 2; ++j)
│ │ │ │ -
109 out[i][j] = 0;
│ │ │ │ -
110 }
│ │ │ │ -
111
│ │ │ │ -
112 }
│ │ │ │ -
│ │ │ │ -
113
│ │ │ │ -
│ │ │ │ -
115 unsigned int order () const
│ │ │ │ -
116 {
│ │ │ │ -
117 return 1;
│ │ │ │ -
118 }
│ │ │ │ -
│ │ │ │ -
119
│ │ │ │ -
120 private:
│ │ │ │ -
121 std::array<R,4> sign_;
│ │ │ │ -
122 };
│ │ │ │ -
│ │ │ │ -
123
│ │ │ │ -
124
│ │ │ │ -
132 template<class LB>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
134 {
│ │ │ │ -
135 public:
│ │ │ │ -
136
│ │ │ │ -
│ │ │ │ -
138 RT0Cube2DLocalInterpolation (std::bitset<4> s = 0)
│ │ │ │ -
139 {
│ │ │ │ -
140 for (int i=0; i<4; i++)
│ │ │ │ -
141 sign_[i] = s[i] ? -1.0 : 1.0;
│ │ │ │ -
142
│ │ │ │ -
143 m0 = {0.0, 0.5};
│ │ │ │ -
144 m1 = {1.0, 0.5};
│ │ │ │ -
145 m2 = {0.5, 0.0};
│ │ │ │ -
146 m3 = {0.5, 1.0};
│ │ │ │ -
147
│ │ │ │ -
148 n0 = {-1.0, 0.0};
│ │ │ │ -
149 n1 = { 1.0, 0.0};
│ │ │ │ -
150 n2 = { 0.0, -1.0};
│ │ │ │ -
151 n3 = { 0.0, 1.0};
│ │ │ │ -
152 }
│ │ │ │ -
│ │ │ │ -
153
│ │ │ │ -
154 template<typename F, typename C>
│ │ │ │ -
│ │ │ │ -
155 void interpolate (const F& ff, std::vector<C>& out) const
│ │ │ │ -
156 {
│ │ │ │ -
157 // f gives v*outer normal at a point on the edge!
│ │ │ │ -
158 auto&& f = Impl::makeFunctionWithCallOperator<typename LB::Traits::DomainType>(ff);
│ │ │ │ -
159
│ │ │ │ -
160 out.resize(4);
│ │ │ │ -
161
│ │ │ │ -
162 // Evaluate the normal components at the edge midpoints
│ │ │ │ -
163 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1])*sign_[0];
│ │ │ │ -
164 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1])*sign_[1];
│ │ │ │ -
165 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1])*sign_[2];
│ │ │ │ -
166 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1])*sign_[3];
│ │ │ │ -
167 }
│ │ │ │ -
│ │ │ │ -
168
│ │ │ │ -
169 private:
│ │ │ │ -
170 std::array<typename LB::Traits::RangeFieldType,4> sign_;
│ │ │ │ -
171
│ │ │ │ -
172 // The four edge midpoints of the reference quadrilateral
│ │ │ │ -
173 typename LB::Traits::DomainType m0,m1,m2,m3;
│ │ │ │ -
174
│ │ │ │ -
175 // The four edge normals of the reference quadrilateral
│ │ │ │ -
176 typename LB::Traits::DomainType n0,n1,n2,n3;
│ │ │ │ -
177 };
│ │ │ │ -
│ │ │ │ -
178
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
186 {
│ │ │ │ -
187 public:
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
190 {
│ │ │ │ -
191 for (std::size_t i=0; i<4; i++)
│ │ │ │ -
192 li[i] = LocalKey(i,1,0);
│ │ │ │ -
193 }
│ │ │ │ -
│ │ │ │ -
194
│ │ │ │ -
│ │ │ │ -
196 std::size_t size () const
│ │ │ │ -
197 {
│ │ │ │ -
198 return 4;
│ │ │ │ -
199 }
│ │ │ │ -
│ │ │ │ -
200
│ │ │ │ -
│ │ │ │ -
202 const LocalKey& localKey (std::size_t i) const
│ │ │ │ -
203 {
│ │ │ │ -
204 return li[i];
│ │ │ │ -
205 }
│ │ │ │ -
│ │ │ │ -
206
│ │ │ │ -
207 private:
│ │ │ │ -
208 std::vector<LocalKey> li;
│ │ │ │ -
209 };
│ │ │ │ -
│ │ │ │ -
210
│ │ │ │ -
211}
│ │ │ │ -
212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH
│ │ │ │ - │ │ │ │ +
79 void interpolate (const F& f, std::vector<C>& out) const {
│ │ │ │ +
80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available");
│ │ │ │ +
81 }
│ │ │ │ +
│ │ │ │ +
82 };
│ │ │ │ +
│ │ │ │ +
83
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
88 {
│ │ │ │ +
89 public:
│ │ │ │ +
│ │ │ │ +
90 MimeticLocalCoefficients (unsigned int variant_)
│ │ │ │ +
91 : variant(variant_), li(variant_)
│ │ │ │ +
92 {
│ │ │ │ +
93 for (unsigned int i=0; i<variant; i++)
│ │ │ │ + │ │ │ │ +
95 }
│ │ │ │ +
│ │ │ │ +
96
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
98 : variant(0), li(0)
│ │ │ │ +
99 {}
│ │ │ │ +
│ │ │ │ +
100
│ │ │ │ +
102 std::size_t size () const { return variant; }
│ │ │ │ +
103
│ │ │ │ +
│ │ │ │ +
105 const Dune::LocalKey& localKey (std::size_t i) const {
│ │ │ │ +
106 return li[i];
│ │ │ │ +
107 }
│ │ │ │ +
│ │ │ │ +
108
│ │ │ │ +
109 private:
│ │ │ │ +
110 unsigned int variant;
│ │ │ │ +
111 std::vector<Dune::LocalKey> li;
│ │ │ │ +
112 };
│ │ │ │ +
│ │ │ │ +
113}
│ │ │ │ +
114
│ │ │ │ +
115#endif
│ │ │ │
Definition bdfmcube.hh:18
│ │ │ │
Type traits for LocalBasisVirtualInterface.
Definition common/localbasis.hh:34
│ │ │ │
D DomainType
domain type
Definition common/localbasis.hh:42
│ │ │ │
Describe position of one degree of freedom.
Definition localkey.hh:23
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:30
│ │ │ │ -
RT0Cube2DLocalBasis(std::bitset< 4 > s=0)
Constructor with a set of edge orientations.
Definition raviartthomas0cube2dall.hh:36
│ │ │ │ -
LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, 2 >, Dune::FieldMatrix< R, 2, 2 > > Traits
Definition raviartthomas0cube2dall.hh:33
│ │ │ │ -
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition raviartthomas0cube2dall.hh:49
│ │ │ │ -
void partial(const std::array< unsigned int, 2 > &order, const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate partial derivatives of all shape functions.
Definition raviartthomas0cube2dall.hh:79
│ │ │ │ -
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition raviartthomas0cube2dall.hh:61
│ │ │ │ -
unsigned int order() const
Polynomial order of the shape functions.
Definition raviartthomas0cube2dall.hh:115
│ │ │ │ -
unsigned int size() const
number of shape functions
Definition raviartthomas0cube2dall.hh:43
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference quadrilateral.
Definition raviartthomas0cube2dall.hh:134
│ │ │ │ -
void interpolate(const F &ff, std::vector< C > &out) const
Definition raviartthomas0cube2dall.hh:155
│ │ │ │ -
RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0)
Constructor with explicitly given edge orientations.
Definition raviartthomas0cube2dall.hh:138
│ │ │ │ -
Layout map for RT0 elements on quadrilaterals.
Definition raviartthomas0cube2dall.hh:186
│ │ │ │ -
RT0Cube2DLocalCoefficients()
Standard constructor.
Definition raviartthomas0cube2dall.hh:189
│ │ │ │ -
std::size_t size() const
number of coefficients
Definition raviartthomas0cube2dall.hh:196
│ │ │ │ -
const LocalKey & localKey(std::size_t i) const
get i'th index
Definition raviartthomas0cube2dall.hh:202
│ │ │ │ - │ │ │ │ - │ │ │ │ +
@ intersectionCodim
Codimension returned by LocalKey::codim() for degrees of freedom attached to an intersection.
Definition localkey.hh:36
│ │ │ │ +
Definition mimeticall.hh:23
│ │ │ │ +
MimeticLocalBasis(unsigned int variant_)
Definition mimeticall.hh:28
│ │ │ │ +
Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune::FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits
Definition mimeticall.hh:26
│ │ │ │ +
MimeticLocalBasis()
Definition mimeticall.hh:32
│ │ │ │ +
void evaluateJacobian(const typename Traits::DomainType &in, std::vector< typename Traits::JacobianType > &out) const
Evaluate Jacobian of all shape functions.
Definition mimeticall.hh:47
│ │ │ │ +
unsigned int order() const
Polynomial order of the shape functions.
Definition mimeticall.hh:63
│ │ │ │ +
void partial(const std::array< unsigned int, dim > &, const typename Traits::DomainType &, std::vector< typename Traits::RangeType > &) const
Evaluate partial derivatives of all shape functions.
Definition mimeticall.hh:55
│ │ │ │ +
unsigned int size() const
Definition mimeticall.hh:36
│ │ │ │ +
void evaluateFunction(const typename Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const
Evaluate all shape functions.
Definition mimeticall.hh:39
│ │ │ │ +
Definition mimeticall.hh:74
│ │ │ │ +
void interpolate(const F &f, std::vector< C > &out) const
Local interpolation of a function.
Definition mimeticall.hh:79
│ │ │ │ +
!
Definition mimeticall.hh:88
│ │ │ │ +
const Dune::LocalKey & localKey(std::size_t i) const
map index i to local key
Definition mimeticall.hh:105
│ │ │ │ +
MimeticLocalCoefficients(unsigned int variant_)
Definition mimeticall.hh:90
│ │ │ │ +
std::size_t size() const
number of coefficients
Definition mimeticall.hh:102
│ │ │ │ +
MimeticLocalCoefficients()
Definition mimeticall.hh:97
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,271 +1,193 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s_0_c_u_b_e_2_d │ │ │ │ │ -raviartthomas0cube2dall.hh │ │ │ │ │ + * _m_i_m_e_t_i_c │ │ │ │ │ +mimeticall.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ +5#ifndef DUNE_MIMETIC_ALL_HH │ │ │ │ │ +6#define DUNE_MIMETIC_ALL_HH │ │ │ │ │ 7 │ │ │ │ │ 8#include │ │ │ │ │ -9#include │ │ │ │ │ -10#include │ │ │ │ │ -11 │ │ │ │ │ +9 │ │ │ │ │ +10#include │ │ │ │ │ +11#include │ │ │ │ │ 12#include │ │ │ │ │ 13 │ │ │ │ │ -14#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ -15#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_k_e_y_._h_h> │ │ │ │ │ -16#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ -17 │ │ │ │ │ -18namespace _D_u_n_e │ │ │ │ │ -19{ │ │ │ │ │ -28 template │ │ │ │ │ -_2_9 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -30 { │ │ │ │ │ -31 public: │ │ │ │ │ -32 typedef _L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_2_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_2_>,R,2,Dune:: │ │ │ │ │ -FieldVector, │ │ │ │ │ -_3_3 Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ -34 │ │ │ │ │ -_3_6 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s (std::bitset<4> s = 0) │ │ │ │ │ -37 { │ │ │ │ │ -38 for (int i=0; i<4; i++) │ │ │ │ │ -39 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ -40 } │ │ │ │ │ -41 │ │ │ │ │ -_4_3 unsigned int _s_i_z_e () const │ │ │ │ │ -44 { │ │ │ │ │ -45 return 4; │ │ │ │ │ -46 } │ │ │ │ │ -47 │ │ │ │ │ -_4_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ -50 std::vector& out) const │ │ │ │ │ -51 { │ │ │ │ │ -52 out.resize(4); │ │ │ │ │ -53 out[0] = {sign_[0]*(in[0]-1.0), 0.0}; │ │ │ │ │ -54 out[1] = {sign_[1]*(in[0]), 0.0}; │ │ │ │ │ -55 out[2] = {0.0, sign_[2]*(in[1]-1.0)}; │ │ │ │ │ -56 out[3] = {0.0, sign_[3]*(in[1])}; │ │ │ │ │ -57 } │ │ │ │ │ -58 │ │ │ │ │ -60 inline void │ │ │ │ │ -_6_1 _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n (const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -62 std::vector& out) const // return value │ │ │ │ │ -63 { │ │ │ │ │ -64 out.resize(4); │ │ │ │ │ -65 out[0][0] = {sign_[0], 0}; │ │ │ │ │ -66 out[0][1] = {0, 0}; │ │ │ │ │ +14#include │ │ │ │ │ +15 │ │ │ │ │ +16#include "../common/localbasis.hh" │ │ │ │ │ +17#include "../common/localkey.hh" │ │ │ │ │ +18 │ │ │ │ │ +19namespace _D_u_n_e │ │ │ │ │ +20{ │ │ │ │ │ +21 template │ │ │ │ │ +_2_2 class _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +23 { │ │ │ │ │ +24 public: │ │ │ │ │ +25 typedef _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_<_D_,_d_i_m_,_D_u_n_e_:_:_F_i_e_l_d_V_e_c_t_o_r_<_D_,_d_i_m_>, │ │ │ │ │ +_2_6 R,1,Dune::FieldVector, Dune::FieldMatrix > _T_r_a_i_t_s; │ │ │ │ │ +27 │ │ │ │ │ +_2_8 _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s (unsigned int variant_) │ │ │ │ │ +29 : variant(variant_) │ │ │ │ │ +30 {} │ │ │ │ │ +31 │ │ │ │ │ +_3_2 _M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s () │ │ │ │ │ +33 : variant(0) │ │ │ │ │ +34 {} │ │ │ │ │ +35 │ │ │ │ │ +_3_6 unsigned int _s_i_z_e () const { return variant; } │ │ │ │ │ +37 │ │ │ │ │ +_3_9 inline void _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n ( │ │ │ │ │ +40 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +41 std::vector& out) const │ │ │ │ │ +42 { │ │ │ │ │ +43 DUNE_THROW(Dune::Exception,"mimetic basis evaluation not available"); │ │ │ │ │ +44 } │ │ │ │ │ +45 │ │ │ │ │ +_4_7 inline void _e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n ( │ │ │ │ │ +48 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, │ │ │ │ │ +49 std::vector& out) const │ │ │ │ │ +50 { │ │ │ │ │ +51 DUNE_THROW(Dune::Exception,"mimetic basis Jacobian evaluation not │ │ │ │ │ +available"); │ │ │ │ │ +52 } │ │ │ │ │ +53 │ │ │ │ │ +_5_5 void _p_a_r_t_i_a_l (const std::array& /*order*/, │ │ │ │ │ +56 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& /*in*/, // position │ │ │ │ │ +57 std::vector& /*out*/) const // return value │ │ │ │ │ +58 { │ │ │ │ │ +59 DUNE_THROW(Dune::Exception,"mimetic basis partial derivative evaluation not │ │ │ │ │ +available"); │ │ │ │ │ +60 } │ │ │ │ │ +61 │ │ │ │ │ +_6_3 unsigned int _o_r_d_e_r () const │ │ │ │ │ +64 { │ │ │ │ │ +65 DUNE_THROW(Dune::Exception,"mimetic order evaluation not available"); │ │ │ │ │ +66 } │ │ │ │ │ 67 │ │ │ │ │ -68 out[1][0] = {sign_[1], 0}; │ │ │ │ │ -69 out[1][1] = {0, 0}; │ │ │ │ │ -70 │ │ │ │ │ -71 out[2][0] = {0, 0}; │ │ │ │ │ -72 out[2][1] = {0, sign_[2]}; │ │ │ │ │ -73 │ │ │ │ │ -74 out[3][0] = {0, 0}; │ │ │ │ │ -75 out[3][1] = {0, sign_[3]}; │ │ │ │ │ -76 } │ │ │ │ │ -77 │ │ │ │ │ -_7_9 void _p_a_r_t_i_a_l (const std::array& _o_r_d_e_r, │ │ │ │ │ -80 const typename _T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e& in, // position │ │ │ │ │ -81 std::vector& out) const // return value │ │ │ │ │ -82 { │ │ │ │ │ -83 auto totalOrder = std::accumulate(_o_r_d_e_r.begin(), _o_r_d_e_r.end(), 0); │ │ │ │ │ -84 if (totalOrder == 0) { │ │ │ │ │ -85 _e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n(in, out); │ │ │ │ │ -86 } else if (totalOrder == 1) { │ │ │ │ │ -87 auto const direction = std::distance(_o_r_d_e_r.begin(), std::find(_o_r_d_e_r.begin(), │ │ │ │ │ -_o_r_d_e_r.end(), 1)); │ │ │ │ │ -88 out.resize(_s_i_z_e()); │ │ │ │ │ -89 │ │ │ │ │ -90 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -91 out[i] = {0, 0}; │ │ │ │ │ -92 │ │ │ │ │ -93 switch (direction) { │ │ │ │ │ -94 case 0: │ │ │ │ │ -95 out[0][0] = sign_[0]; │ │ │ │ │ -96 out[1][0] = sign_[1]; │ │ │ │ │ -97 break; │ │ │ │ │ -98 case 1: │ │ │ │ │ -99 out[2][1] = sign_[2]; │ │ │ │ │ -100 out[3][1] = sign_[3]; │ │ │ │ │ -101 break; │ │ │ │ │ -102 default: │ │ │ │ │ -103 DUNE_THROW(RangeError, "Component out of range."); │ │ │ │ │ -104 } │ │ │ │ │ -105 } else { │ │ │ │ │ -106 out.resize(_s_i_z_e()); │ │ │ │ │ -107 for (std::size_t i = 0; i < _s_i_z_e(); ++i) │ │ │ │ │ -108 for (std::size_t j = 0; j < 2; ++j) │ │ │ │ │ -109 out[i][j] = 0; │ │ │ │ │ -110 } │ │ │ │ │ -111 │ │ │ │ │ -112 } │ │ │ │ │ -113 │ │ │ │ │ -_1_1_5 unsigned int _o_r_d_e_r () const │ │ │ │ │ -116 { │ │ │ │ │ -117 return 1; │ │ │ │ │ -118 } │ │ │ │ │ -119 │ │ │ │ │ -120 private: │ │ │ │ │ -121 std::array sign_; │ │ │ │ │ -122 }; │ │ │ │ │ -123 │ │ │ │ │ -124 │ │ │ │ │ -132 template │ │ │ │ │ -_1_3_3 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -134 { │ │ │ │ │ -135 public: │ │ │ │ │ -136 │ │ │ │ │ -_1_3_8 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n (std::bitset<4> s = 0) │ │ │ │ │ -139 { │ │ │ │ │ -140 for (int i=0; i<4; i++) │ │ │ │ │ -141 sign_[i] = s[i] ? -1.0 : 1.0; │ │ │ │ │ -142 │ │ │ │ │ -143 m0 = {0.0, 0.5}; │ │ │ │ │ -144 m1 = {1.0, 0.5}; │ │ │ │ │ -145 m2 = {0.5, 0.0}; │ │ │ │ │ -146 m3 = {0.5, 1.0}; │ │ │ │ │ -147 │ │ │ │ │ -148 n0 = {-1.0, 0.0}; │ │ │ │ │ -149 n1 = { 1.0, 0.0}; │ │ │ │ │ -150 n2 = { 0.0, -1.0}; │ │ │ │ │ -151 n3 = { 0.0, 1.0}; │ │ │ │ │ -152 } │ │ │ │ │ -153 │ │ │ │ │ -154 template │ │ │ │ │ -_1_5_5 void _i_n_t_e_r_p_o_l_a_t_e (const F& ff, std::vector& out) const │ │ │ │ │ -156 { │ │ │ │ │ -157 // f gives v*outer normal at a point on the edge! │ │ │ │ │ -158 auto&& f = Impl::makeFunctionWithCallOperator(ff); │ │ │ │ │ -159 │ │ │ │ │ -160 out.resize(4); │ │ │ │ │ -161 │ │ │ │ │ -162 // Evaluate the normal components at the edge midpoints │ │ │ │ │ -163 auto y = f(m0); out[0] = (y[0]*n0[0]+y[1]*n0[1])*sign_[0]; │ │ │ │ │ -164 y = f(m1); out[1] = (y[0]*n1[0]+y[1]*n1[1])*sign_[1]; │ │ │ │ │ -165 y = f(m2); out[2] = (y[0]*n2[0]+y[1]*n2[1])*sign_[2]; │ │ │ │ │ -166 y = f(m3); out[3] = (y[0]*n3[0]+y[1]*n3[1])*sign_[3]; │ │ │ │ │ -167 } │ │ │ │ │ -168 │ │ │ │ │ -169 private: │ │ │ │ │ -170 std::array sign_; │ │ │ │ │ -171 │ │ │ │ │ -172 // The four edge midpoints of the reference quadrilateral │ │ │ │ │ -173 typename LB::Traits::DomainType m0,m1,m2,m3; │ │ │ │ │ -174 │ │ │ │ │ -175 // The four edge normals of the reference quadrilateral │ │ │ │ │ -176 typename LB::Traits::DomainType n0,n1,n2,n3; │ │ │ │ │ -177 }; │ │ │ │ │ -178 │ │ │ │ │ -_1_8_5 class _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -186 { │ │ │ │ │ -187 public: │ │ │ │ │ -_1_8_9 _R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () : li(4) │ │ │ │ │ -190 { │ │ │ │ │ -191 for (std::size_t i=0; i<4; i++) │ │ │ │ │ -192 li[i] = _L_o_c_a_l_K_e_y(i,1,0); │ │ │ │ │ -193 } │ │ │ │ │ -194 │ │ │ │ │ -_1_9_6 std::size_t _s_i_z_e () const │ │ │ │ │ -197 { │ │ │ │ │ -198 return 4; │ │ │ │ │ -199 } │ │ │ │ │ -200 │ │ │ │ │ -_2_0_2 const _L_o_c_a_l_K_e_y& _l_o_c_a_l_K_e_y (std::size_t i) const │ │ │ │ │ -203 { │ │ │ │ │ -204 return li[i]; │ │ │ │ │ -205 } │ │ │ │ │ -206 │ │ │ │ │ -207 private: │ │ │ │ │ -208 std::vector li; │ │ │ │ │ -209 }; │ │ │ │ │ -210 │ │ │ │ │ -211} │ │ │ │ │ -212#endif // DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS0_CUBE2D_ALL_HH │ │ │ │ │ -_l_o_c_a_l_k_e_y_._h_h │ │ │ │ │ +68 private: │ │ │ │ │ +69 unsigned int variant; │ │ │ │ │ +70 }; │ │ │ │ │ +71 │ │ │ │ │ +72 template │ │ │ │ │ +_7_3 class _M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +74 { │ │ │ │ │ +75 public: │ │ │ │ │ +76 │ │ │ │ │ +78 template │ │ │ │ │ +_7_9 void _i_n_t_e_r_p_o_l_a_t_e (const F& f, std::vector& out) const { │ │ │ │ │ +80 DUNE_THROW(Dune::Exception,"mimetic local interpolation not available"); │ │ │ │ │ +81 } │ │ │ │ │ +82 }; │ │ │ │ │ +83 │ │ │ │ │ +_8_7 class _M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +88 { │ │ │ │ │ +89 public: │ │ │ │ │ +_9_0 _M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s (unsigned int variant_) │ │ │ │ │ +91 : variant(variant_), li(variant_) │ │ │ │ │ +92 { │ │ │ │ │ +93 for (unsigned int i=0; i li; │ │ │ │ │ +112 }; │ │ │ │ │ +113} │ │ │ │ │ +114 │ │ │ │ │ +115#endif │ │ │ │ │ _D_u_n_e │ │ │ │ │ DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s │ │ │ │ │ Type traits for LocalBasisVirtualInterface. │ │ │ │ │ DDeeffiinniittiioonn common/localbasis.hh:34 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_B_a_s_i_s_T_r_a_i_t_s_:_:_D_o_m_a_i_n_T_y_p_e │ │ │ │ │ D DomainType │ │ │ │ │ domain type │ │ │ │ │ DDeeffiinniittiioonn common/localbasis.hh:42 │ │ │ │ │ _D_u_n_e_:_:_L_o_c_a_l_K_e_y │ │ │ │ │ Describe position of one degree of freedom. │ │ │ │ │ DDeeffiinniittiioonn localkey.hh:23 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:30 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -RT0Cube2DLocalBasis(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with a set of edge orientations. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:36 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalBasisTraits< D, 2, Dune::FieldVector< D, 2 >, R, 2, Dune::FieldVector< R, │ │ │ │ │ -2 >, Dune::FieldMatrix< R, 2, 2 > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:33 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ -void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ -typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:49 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ -void partial(const std::array< unsigned int, 2 > &order, const typename │ │ │ │ │ -Traits::DomainType &in, std::vector< typename Traits::RangeType > &out) const │ │ │ │ │ -Evaluate partial derivatives of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:79 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ +_D_u_n_e_:_:_L_o_c_a_l_K_e_y_:_:_i_n_t_e_r_s_e_c_t_i_o_n_C_o_d_i_m │ │ │ │ │ +@ intersectionCodim │ │ │ │ │ +Codimension returned by LocalKey::codim() for degrees of freedom attached to an │ │ │ │ │ +intersection. │ │ │ │ │ +DDeeffiinniittiioonn localkey.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:23 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +MimeticLocalBasis(unsigned int variant_) │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:28 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_T_r_a_i_t_s │ │ │ │ │ +Dune::LocalBasisTraits< D, dim, Dune::FieldVector< D, dim >, R, 1, Dune:: │ │ │ │ │ +FieldVector< R, 1 >, Dune::FieldMatrix< R, 1, dim > > Traits │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:26 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ +MimeticLocalBasis() │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:32 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_J_a_c_o_b_i_a_n │ │ │ │ │ void evaluateJacobian(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ typename Traits::JacobianType > &out) const │ │ │ │ │ Evaluate Jacobian of all shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:61 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:47 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_o_r_d_e_r │ │ │ │ │ unsigned int order() const │ │ │ │ │ Polynomial order of the shape functions. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:115 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:63 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_p_a_r_t_i_a_l │ │ │ │ │ +void partial(const std::array< unsigned int, dim > &, const typename Traits:: │ │ │ │ │ +DomainType &, std::vector< typename Traits::RangeType > &) const │ │ │ │ │ +Evaluate partial derivatives of all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:55 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_s_i_z_e │ │ │ │ │ unsigned int size() const │ │ │ │ │ -number of shape functions │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference quadrilateral. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:134 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ -void interpolate(const F &ff, std::vector< C > &out) const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:155 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -RT0Cube2DLocalInterpolation(std::bitset< 4 > s=0) │ │ │ │ │ -Constructor with explicitly given edge orientations. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:138 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RT0 elements on quadrilaterals. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:186 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -RT0Cube2DLocalCoefficients() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:189 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:36 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_B_a_s_i_s_:_:_e_v_a_l_u_a_t_e_F_u_n_c_t_i_o_n │ │ │ │ │ +void evaluateFunction(const typename Traits::DomainType &in, std::vector< │ │ │ │ │ +typename Traits::RangeType > &out) const │ │ │ │ │ +Evaluate all shape functions. │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:39 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:74 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_:_:_i_n_t_e_r_p_o_l_a_t_e │ │ │ │ │ +void interpolate(const F &f, std::vector< C > &out) const │ │ │ │ │ +Local interpolation of a function. │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:79 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +! │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:88 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ +const Dune::LocalKey & localKey(std::size_t i) const │ │ │ │ │ +map index i to local key │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:105 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +MimeticLocalCoefficients(unsigned int variant_) │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:90 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_s_i_z_e │ │ │ │ │ std::size_t size() const │ │ │ │ │ number of coefficients │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:196 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_C_u_b_e_2_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_l_o_c_a_l_K_e_y │ │ │ │ │ -const LocalKey & localKey(std::size_t i) const │ │ │ │ │ -get i'th index │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas0cube2dall.hh:202 │ │ │ │ │ -_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:102 │ │ │ │ │ +_D_u_n_e_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_:_:_M_i_m_e_t_i_c_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ +MimeticLocalCoefficients() │ │ │ │ │ +DDeeffiinniittiioonn mimeticall.hh:97 │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03d.hh File Reference │ │ │ │ +dune-localfunctions: rannacherturek.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,43 +65,29 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
│ │ │ │ -Classes | │ │ │ │ -Namespaces
│ │ │ │ -
raviartthomas03d.hh File Reference
│ │ │ │ +
rannacherturek.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ -
#include <dune/geometry/type.hh>
│ │ │ │ -#include <dune/localfunctions/common/localfiniteelementtraits.hh>
│ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalbasis.hh"
│ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalcoefficients.hh"
│ │ │ │ -#include "raviartthomas03d/raviartthomas03dlocalinterpolation.hh"
│ │ │ │ + │ │ │ │ +

Convenience header that includes all available Rannacher-Turek LocalFiniteElements. │ │ │ │ +More...

│ │ │ │ + │ │ │ │

Go to the source code of this file.

│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

class  Dune::RT03DLocalFiniteElement< D, R >
 Zero order Raviart-Thomas shape functions on tetrahedra. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Namespaces

namespace  Dune
 
│ │ │ │ -
│ │ │ │ +

Detailed Description

│ │ │ │ +

Convenience header that includes all available Rannacher-Turek LocalFiniteElements.

│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,24 +1,16 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ -_C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomas03d.hh File Reference │ │ │ │ │ -#include │ │ │ │ │ -#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ +rannacherturek.hh File Reference │ │ │ │ │ +Convenience header that includes all available Rannacher-Turek │ │ │ │ │ +LocalFiniteElements. _M_o_r_e_._._. │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ -CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _D_,_ _R_ _> │ │ │ │ │ -  _Z_e_r_o order Raviart-Thomas shape functions on tetrahedra. _M_o_r_e_._._. │ │ │ │ │ -  │ │ │ │ │ -NNaammeessppaacceess │ │ │ │ │ -namespace   _D_u_n_e │ │ │ │ │ -  │ │ │ │ │ +********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ +Convenience header that includes all available Rannacher-Turek │ │ │ │ │ +LocalFiniteElements. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00338_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomas03d.hh Source File │ │ │ │ +dune-localfunctions: rannacherturek.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,125 +70,27 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomas03d.hh
│ │ │ │ +
rannacherturek.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH
│ │ │ │ -
7
│ │ │ │ -
8#include <dune/geometry/type.hh>
│ │ │ │ -
9
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
14
│ │ │ │ -
15namespace Dune
│ │ │ │ -
16{
│ │ │ │ -
17
│ │ │ │ -
26 template<class D, class R>
│ │ │ │ -
│ │ │ │ -
27 class
│ │ │ │ - │ │ │ │ -
29 {
│ │ │ │ -
30 public:
│ │ │ │ - │ │ │ │ - │ │ │ │ -
33
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
36 {}
│ │ │ │ -
│ │ │ │ -
37
│ │ │ │ -
│ │ │ │ -
43 RT03DLocalFiniteElement (std::bitset<4> s) :
│ │ │ │ -
44 basis(s),
│ │ │ │ -
45 interpolation(s)
│ │ │ │ -
46 {}
│ │ │ │ -
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
48 const typename Traits::LocalBasisType& localBasis () const
│ │ │ │ -
49 {
│ │ │ │ -
50 return basis;
│ │ │ │ -
51 }
│ │ │ │ -
│ │ │ │ -
52
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
54 {
│ │ │ │ -
55 return coefficients;
│ │ │ │ -
56 }
│ │ │ │ -
│ │ │ │ -
57
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
59 {
│ │ │ │ -
60 return interpolation;
│ │ │ │ -
61 }
│ │ │ │ -
│ │ │ │ -
62
│ │ │ │ -
│ │ │ │ -
63 unsigned int size () const
│ │ │ │ -
64 {
│ │ │ │ -
65 return 4;
│ │ │ │ -
66 }
│ │ │ │ -
│ │ │ │ -
67
│ │ │ │ -
│ │ │ │ -
68 static constexpr GeometryType type ()
│ │ │ │ -
69 {
│ │ │ │ -
70 return GeometryTypes::tetrahedron;
│ │ │ │ -
71 }
│ │ │ │ -
│ │ │ │ -
72
│ │ │ │ -
73 private:
│ │ │ │ - │ │ │ │ -
75 RT03DLocalCoefficients coefficients;
│ │ │ │ - │ │ │ │ -
77 };
│ │ │ │ -
│ │ │ │ -
78
│ │ │ │ -
79}
│ │ │ │ -
80
│ │ │ │ -
81#endif
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
Definition bdfmcube.hh:18
│ │ │ │ -
traits helper struct
Definition localfiniteelementtraits.hh:13
│ │ │ │ -
LB LocalBasisType
Definition localfiniteelementtraits.hh:16
│ │ │ │ -
LC LocalCoefficientsType
Definition localfiniteelementtraits.hh:20
│ │ │ │ -
LI LocalInterpolationType
Definition localfiniteelementtraits.hh:24
│ │ │ │ -
Zero order Raviart-Thomas shape functions on tetrahedra.
Definition raviartthomas03d.hh:29
│ │ │ │ -
LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits
Definition raviartthomas03d.hh:32
│ │ │ │ -
unsigned int size() const
Definition raviartthomas03d.hh:63
│ │ │ │ -
static constexpr GeometryType type()
Definition raviartthomas03d.hh:68
│ │ │ │ -
RT03DLocalFiniteElement(std::bitset< 4 > s)
Constructor with explicitly given face orientations.
Definition raviartthomas03d.hh:43
│ │ │ │ -
const Traits::LocalCoefficientsType & localCoefficients() const
Definition raviartthomas03d.hh:53
│ │ │ │ -
const Traits::LocalBasisType & localBasis() const
Definition raviartthomas03d.hh:48
│ │ │ │ -
const Traits::LocalInterpolationType & localInterpolation() const
Definition raviartthomas03d.hh:58
│ │ │ │ -
RT03DLocalFiniteElement()
Standard constructor.
Definition raviartthomas03d.hh:35
│ │ │ │ -
Lowest order Raviart-Thomas shape functions on the reference tetrahedron.
Definition raviartthomas03dlocalbasis.hh:26
│ │ │ │ -
Layout map for RT0 elements.
Definition raviartthomas03dlocalcoefficients.hh:24
│ │ │ │ -
Definition raviartthomas03dlocalinterpolation.hh:18
│ │ │ │ + │ │ │ │ + │ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,136 +1,17 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ -raviartthomas03d.hh │ │ │ │ │ +rannacherturek.hh │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _d_o_c_u_m_e_n_t_a_t_i_o_n_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ 1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- │ │ │ │ │ 2// vi: set et ts=4 sw=2 sts=2: │ │ │ │ │ 3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file │ │ │ │ │ LICENSE.md in module root │ │ │ │ │ 4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception │ │ │ │ │ -5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ -6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_RAVIARTTHOMAS03D_HH │ │ │ │ │ -7 │ │ │ │ │ -8#include │ │ │ │ │ -9 │ │ │ │ │ -10#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_c_o_m_m_o_n_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h> │ │ │ │ │ -11#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h" │ │ │ │ │ -12#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h" │ │ │ │ │ -13#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_/_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h" │ │ │ │ │ -14 │ │ │ │ │ -15namespace _D_u_n_e │ │ │ │ │ -16{ │ │ │ │ │ -17 │ │ │ │ │ -26 template │ │ │ │ │ -_2_7 class │ │ │ │ │ -28 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -29 { │ │ │ │ │ -30 public: │ │ │ │ │ -31 typedef │ │ │ │ │ -_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_>,_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s, │ │ │ │ │ -_3_2 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > > _T_r_a_i_t_s; │ │ │ │ │ -33 │ │ │ │ │ -_3_5 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t () │ │ │ │ │ -36 {} │ │ │ │ │ -37 │ │ │ │ │ -_4_3 _R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t (std::bitset<4> s) : │ │ │ │ │ -44 basis(s), │ │ │ │ │ -45 interpolation(s) │ │ │ │ │ -46 {} │ │ │ │ │ -47 │ │ │ │ │ -_4_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e& _l_o_c_a_l_B_a_s_i_s () const │ │ │ │ │ -49 { │ │ │ │ │ -50 return basis; │ │ │ │ │ -51 } │ │ │ │ │ -52 │ │ │ │ │ -_5_3 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e& _l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s () const │ │ │ │ │ -54 { │ │ │ │ │ -55 return coefficients; │ │ │ │ │ -56 } │ │ │ │ │ -57 │ │ │ │ │ -_5_8 const typename _T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e& _l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n () const │ │ │ │ │ -59 { │ │ │ │ │ -60 return interpolation; │ │ │ │ │ -61 } │ │ │ │ │ -62 │ │ │ │ │ -_6_3 unsigned int _s_i_z_e () const │ │ │ │ │ -64 { │ │ │ │ │ -65 return 4; │ │ │ │ │ -66 } │ │ │ │ │ -67 │ │ │ │ │ -_6_8 static constexpr GeometryType _t_y_p_e () │ │ │ │ │ -69 { │ │ │ │ │ -70 return GeometryTypes::tetrahedron; │ │ │ │ │ -71 } │ │ │ │ │ -72 │ │ │ │ │ -73 private: │ │ │ │ │ -74 _R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> basis; │ │ │ │ │ -75 _R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s coefficients; │ │ │ │ │ -76 _R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_<_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s_<_D_,_R_> > interpolation; │ │ │ │ │ -77 }; │ │ │ │ │ -78 │ │ │ │ │ -79} │ │ │ │ │ -80 │ │ │ │ │ -81#endif │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h │ │ │ │ │ -_r_a_v_i_a_r_t_t_h_o_m_a_s_0_3_d_l_o_c_a_l_b_a_s_i_s_._h_h │ │ │ │ │ -_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_t_r_a_i_t_s_._h_h │ │ │ │ │ -_D_u_n_e │ │ │ │ │ -DDeeffiinniittiioonn bdfmcube.hh:18 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s │ │ │ │ │ -traits helper struct │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:13 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_B_a_s_i_s_T_y_p_e │ │ │ │ │ -LB LocalBasisType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:16 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s_T_y_p_e │ │ │ │ │ -LC LocalCoefficientsType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:20 │ │ │ │ │ -_D_u_n_e_:_:_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_T_r_a_i_t_s_:_:_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n_T_y_p_e │ │ │ │ │ -LI LocalInterpolationType │ │ │ │ │ -DDeeffiinniittiioonn localfiniteelementtraits.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -Zero order Raviart-Thomas shape functions on tetrahedra. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:29 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_T_r_a_i_t_s │ │ │ │ │ -LocalFiniteElementTraits< RT03DLocalBasis< D, R >, RT03DLocalCoefficients, │ │ │ │ │ -RT03DLocalInterpolation< RT03DLocalBasis< D, R > > > Traits │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:32 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_s_i_z_e │ │ │ │ │ -unsigned int size() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:63 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_t_y_p_e │ │ │ │ │ -static constexpr GeometryType type() │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:68 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT03DLocalFiniteElement(std::bitset< 4 > s) │ │ │ │ │ -Constructor with explicitly given face orientations. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:43 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -const Traits::LocalCoefficientsType & localCoefficients() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:53 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_B_a_s_i_s │ │ │ │ │ -const Traits::LocalBasisType & localBasis() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:48 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_l_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -const Traits::LocalInterpolationType & localInterpolation() const │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:58 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_:_:_R_T_0_3_D_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t │ │ │ │ │ -RT03DLocalFiniteElement() │ │ │ │ │ -Standard constructor. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03d.hh:35 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_B_a_s_i_s │ │ │ │ │ -Lowest order Raviart-Thomas shape functions on the reference tetrahedron. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalbasis.hh:26 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_C_o_e_f_f_i_c_i_e_n_t_s │ │ │ │ │ -Layout map for RT0 elements. │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalcoefficients.hh:24 │ │ │ │ │ -_D_u_n_e_:_:_R_T_0_3_D_L_o_c_a_l_I_n_t_e_r_p_o_l_a_t_i_o_n │ │ │ │ │ -DDeeffiinniittiioonn raviartthomas03dlocalinterpolation.hh:18 │ │ │ │ │ +9#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_/_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h> │ │ │ │ │ +_r_a_n_n_a_c_h_e_r_t_u_r_e_k_._h_h │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplex.hh File Reference │ │ │ │ +dune-localfunctions: orthonormal.hh File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -65,45 +65,42 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Namespaces
│ │ │ │ -
raviartthomassimplex.hh File Reference
│ │ │ │ +
orthonormal.hh File Reference
│ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension. │ │ │ │ -More...

│ │ │ │ │ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

class  Dune::RaviartThomasSimplexLocalFiniteElement< dimDomain, D, R, SF, CF >
 Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension. More...
class  Dune::OrthonormalLocalFiniteElement< dimDomain, D, R, SF, CF >
 A class providing orthonormal basis functions. More...
 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │

│ │ │ │ Namespaces

namespace  Dune
 
│ │ │ │ -

Detailed Description

│ │ │ │ -

Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.

│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,27 +1,22 @@ │ │ │ │ │ dune-localfunctions 2.9.0 │ │ │ │ │ Loading... │ │ │ │ │ Searching... │ │ │ │ │ No Matches │ │ │ │ │ * _d_u_n_e │ │ │ │ │ * _l_o_c_a_l_f_u_n_c_t_i_o_n_s │ │ │ │ │ - * _r_a_v_i_a_r_t_t_h_o_m_a_s │ │ │ │ │ _C_l_a_s_s_e_s | _N_a_m_e_s_p_a_c_e_s │ │ │ │ │ -raviartthomassimplex.hh File Reference │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. _M_o_r_e_._._. │ │ │ │ │ +orthonormal.hh File Reference │ │ │ │ │ #include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_o_c_a_l_f_i_n_i_t_e_e_l_e_m_e_n_t_._h_h> │ │ │ │ │ -#include "_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_/_r_a_v_i_a_r_t_t_h_o_m_a_s_s_i_m_p_l_e_x_b_a_s_i_s_._h_h" │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_d_g_l_o_c_a_l_c_o_e_f_f_i_c_i_e_n_t_s_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_u_t_i_l_i_t_y_/_l_2_i_n_t_e_r_p_o_l_a_t_i_o_n_._h_h> │ │ │ │ │ +#include <_d_u_n_e_/_l_o_c_a_l_f_u_n_c_t_i_o_n_s_/_o_r_t_h_o_n_o_r_m_a_l_/_o_r_t_h_o_n_o_r_m_a_l_b_a_s_i_s_._h_h> │ │ │ │ │ _G_o_ _t_o_ _t_h_e_ _s_o_u_r_c_e_ _c_o_d_e_ _o_f_ _t_h_i_s_ _f_i_l_e_. │ │ │ │ │ CCllaasssseess │ │ │ │ │ -class   _D_u_n_e_:_:_R_a_v_i_a_r_t_T_h_o_m_a_s_S_i_m_p_l_e_x_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _d_i_m_D_o_m_a_i_n_,_ _D_,_ _R_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ -  Raviart-Thomas local finite elements of arbitrary order for simplices │ │ │ │ │ - of arbitrary dimension. _M_o_r_e_._._. │ │ │ │ │ +class   _D_u_n_e_:_:_O_r_t_h_o_n_o_r_m_a_l_L_o_c_a_l_F_i_n_i_t_e_E_l_e_m_e_n_t_<_ _d_i_m_D_o_m_a_i_n_,_ _D_,_ _R_,_ _S_F_,_ _C_F_ _> │ │ │ │ │ +  A class providing orthonormal basis functions. _M_o_r_e_._._. │ │ │ │ │   │ │ │ │ │ NNaammeessppaacceess │ │ │ │ │ namespace   _D_u_n_e │ │ │ │ │   │ │ │ │ │ -********** DDeettaaiilleedd DDeessccrriippttiioonn ********** │ │ │ │ │ -Raviart-Thomas local finite elements of arbitrary order for simplices of │ │ │ │ │ -arbitrary dimension. │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by _[_d_o_x_y_g_e_n_] 1.9.8 │ │ │ ├── ./usr/share/doc/libdune-localfunctions-doc/doxygen/a00341_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -dune-localfunctions: raviartthomassimplex.hh Source File │ │ │ │ +dune-localfunctions: orthonormal.hh Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -70,63 +70,68 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ -
raviartthomassimplex.hh
│ │ │ │ +
orthonormal.hh
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
│ │ │ │
2// vi: set et ts=4 sw=2 sts=2:
│ │ │ │
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
│ │ │ │
4// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
│ │ │ │ -
5#ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ -
6#define DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ +
5#ifndef DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │ +
6#define DUNE_ORTHONORMALFINITEELEMENT_HH
│ │ │ │
7
│ │ │ │ │ │ │ │ - │ │ │ │ -
10
│ │ │ │ -
17namespace Dune
│ │ │ │ -
18{
│ │ │ │ -
35 template<unsigned int dimDomain, class D, class R,
│ │ │ │ -
36 class SF=R, class CF=SF>
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
38 : public GenericLocalFiniteElement<RaviartThomasBasisFactory<dimDomain, SF, CF>,
│ │ │ │ -
39 RaviartThomasCoefficientsFactory<dimDomain>,
│ │ │ │ -
40 RaviartThomasL2InterpolationFactory<dimDomain, SF> >
│ │ │ │ -
41 {
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
45 public:
│ │ │ │ -
46 using typename Base::Traits;
│ │ │ │ -
47
│ │ │ │ -
│ │ │ │ -
49 RaviartThomasSimplexLocalFiniteElement(const GeometryType &gt, unsigned int order)
│ │ │ │ -
50 : Base(gt, order)
│ │ │ │ -
51 {}
│ │ │ │ -
│ │ │ │ -
52 };
│ │ │ │ -
│ │ │ │ -
53} // namespace Dune
│ │ │ │ -
54
│ │ │ │ -
55#endif // #ifndef DUNE_LOCALFUNCTIONS_RAVIARTTHOMAS_SIMPLEX_HH
│ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
12
│ │ │ │ +
13namespace Dune
│ │ │ │ +
14{
│ │ │ │ +
32 template< unsigned int dimDomain, class D, class R,
│ │ │ │ +
33 class SF=R, class CF=SF >
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
35 : public GenericLocalFiniteElement< OrthonormalBasisFactory< dimDomain, SF, CF >,
│ │ │ │ +
36 DGLocalCoefficientsFactory< OrthonormalBasisFactory< dimDomain, SF, CF > >,
│ │ │ │ +
37 LocalL2InterpolationFactory< OrthonormalBasisFactory< dimDomain, SF, CF >,true > >
│ │ │ │ +
38 {
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
42 public:
│ │ │ │ +
43 using typename Base::Traits;
│ │ │ │ +
44
│ │ │ │ +
│ │ │ │ +
47 OrthonormalLocalFiniteElement ( const GeometryType &gt, unsigned int order )
│ │ │ │ +
48 : Base(gt, order)
│ │ │ │ +
49 {}
│ │ │ │ +
│ │ │ │ +
50 };
│ │ │ │ +
│ │ │ │ +
51
│ │ │ │ +
52}
│ │ │ │ +
53
│ │ │ │ +
54#endif
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │
Definition bdfmcube.hh:18
│ │ │ │ -
Raviart-Thomas local finite elements of arbitrary order for simplices of arbitrary dimension.
Definition raviartthomassimplex.hh:41
│ │ │ │ -
RaviartThomasSimplexLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition raviartthomassimplex.hh:49
│ │ │ │ -
Definition raviartthomassimplexinterpolation.hh:421
│ │ │ │ -
Definition raviartthomassimplexinterpolation.hh:70
│ │ │ │ +
A class providing orthonormal basis functions.
Definition orthonormal.hh:38
│ │ │ │ +
OrthonormalLocalFiniteElement(const GeometryType &gt, unsigned int order)
Definition orthonormal.hh:47
│ │ │ │ +
A factory class for the dg local coefficients.
Definition dglocalcoefficients.hh:59
│ │ │ │ +
A factory class for the local l2 interpolations taking a basis factory.
Definition l2interpolation.hh:199
│ │ │ │
A LocalFiniteElement implementation based on three TopologyFactories providing the LocalBasis,...
Definition localfunctions/utility/localfiniteelement.hh:25
│ │ │ │
LocalFiniteElementTraits< typename BasisF::Object, typename CoeffF::Object, typename InterpolF::Object > Traits
Definition localfunctions/utility/localfiniteelement.hh:29
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │